Cyanogenmod 12.0 12.1 13.0 bacon(Oneplus)下载编译

来源:互联网 发布:北京的打车软件 编辑:程序博客网 时间:2024/04/29 14:01

Cyanogenmod 12.0 12.1 13.0 bacon(Oneplus)下载编译

  • repo下载
  • 源码下载
  • 机型相关代码下载
  • 编译和打包
  • 刷机

repo下载

mkdir -p ~/bin
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo
由于被墙,可使用下面方法获取repo(不建议,12.1和13.0的代码下载会有问题):
git clone git://codeaurora.org/tools/repo.git
cp ./repo/repo ~/bin/repo

源码下载

输入如下指令进行操作:

~/bin/repo init -u git://github.com/CyanogenMod/android.git -b cm-12.0
~/bin/repo init -u git://github.com/CyanogenMod/android.git -b cm-12.1
~/bin/repo init -u git://github.com/CyanogenMod/android.git -b cm-13.0
或:
~/bin/repo init -u git://github.com/CyanogenMod/android.git -b cm-12.0 —repo-url=git://codeaurora.org/tools/repo.git —repo-branch=caf-stable
~/bin/repo sync -j8

机型相关代码下载

mkdir .repo/local_manifests
vim .repo/local_manifests/local_manifests.xml

cm12.0文件内容如下:

<?xml version="1.0" encoding="UTF-8"?><manifest><project name="CyanogenMod/android_device_oneplus_bacon" path="device/oneplus/bacon" remote="github" /><project name="CyanogenMod/android_device_qcom_common" path="device/qcom/common" remote="github" /><project name="CyanogenMod/android_device_oppo_msm8974-common" path="device/oppo/msm8974-common" remote="github" /><project name="CyanogenMod/android_device_oppo_common" path="device/oppo/common" remote="github" revision="cm-12.0" /><project name="CyanogenMod/android_kernel_oneplus_msm8974" path="kernel/oneplus/msm8974" remote="github" /><project name="TheMuppets/proprietary_vendor_oppo" path="vendor/oppo" remote="github" /><project name="TheMuppets/proprietary_vendor_oneplus" path="vendor/oneplus" remote="github" /><project name="CyanogenMod/android_frameworks_opt_connectivity" path="frameworks/opt/connectivity" remote="github" revision="cm-11.0" /></manifest>

cm13.0文件内容如下:

<?xml version="1.0" encoding="UTF-8"?><manifest>  <remote  name="github"           fetch="https://github.com"           review="review.cyanogenmod.org" />  <project name="updateing/android_device_oneplus_bacon" path="device/oneplus/bacon" remote="github" revision="marshmallow_caf" />  <project name="CyanogenMod/android_device_oppo_common" path="device/oppo/common" remote="github" revision="cm-12.1" />  <project name="updateing/android_kernel_oneplus_msm8974" path="kernel/oneplus/msm8974" remote="github" revision="marshmallow" />  <project name="updateing/proprietary_vendor_oneplus" path="vendor/oneplus" remote="github" revision="marshmallow" />  <project name="CyanogenMod/android_external_sony_boringssl-compat" path="external/boringssl-compat" remote="github" revision="cm-13.0" />  <project name="CyanogenMod/android_external_jpeg" path="external/jpeg" remote="github" revision="cm-12.1" />  <project name="CyanogenMod/android_device_qcom_common" path="device/qcom/common" remote="github" revision="cm-13.0" /></manifest>

[注意]:也可以不编辑这个文件,而是通过breakfast bacon指令来自动下载相关文件

编译和打包

. build/envsetup.sh

choosecombo (选择编译选项和编译,也可以直接运行brunch bacon以默认选项开始编译)
make -j24 2>&1 | tee build.log

make otapackage

再次编译前需要先执行下面指令以清除编译生成文件:
make clobber

刷机

将生成的zip包重命名成update.zip并放到手机内置存储区根目录下,
然后关机重启进入recovery mode,选择update.zip升级
如果遇到开机异常,可能需要wipe下用户数据


参考:
1. http://wiki.cyanogenmod.org/w/Build_for_bacon
2. http://forum.xda-developers.com/oneplus-one/general/guide-building-lollipop-oneplus-one-t2947949
3. http://forum.xda-developers.com/oneplus-one/orig-development/experimental-homemade-android-6-0-t3225725
4. http://forum.xda-developers.com/oneplus-one/development/exp-rom-cyanogenmod-13-unofficial-t3232077
5. http://forum.xda-developers.com/oneplus-one/development/wip-cyanogenmod-13-t3230116

0 0
原创粉丝点击