LineageOS 编译教程

大家好,我在群发现其实很多人想自己编译个Rom,但是不知道怎么开始。今天我就给大家示范一下。。有问题请留言。

 

电脑:Ubentu系统

Cpu:最好i7,不过i5也行

空间:200Gb以上

 

第一步,更新环境

sudo apt-get update

第二步,安装Java 8,Java是编译必要的东西哦

sudo apt-get install openjdk-8-jdk

第三步,创造Bin文件夹

mkdir ~/bin
PATH=~/bin:$PATH

第四步,下载Repo工具并给予权利(等下有用)

curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo

第五步,创造Lineage文件夹并进去

mkdir -p Lineage
cd Lineage

第六步,设置Github访问权利

git config --global user.name "你的名字"
git config --global user.email "你的邮箱"

第七步,现在就要用到刚刚的Repo工具了

repo init -u https://github.com/LineageOS/android.git -b cm-14.1

第八步,下载源码(源码29+Gb,要很久,用自家电脑要一晚上,谷歌云电脑15分钟)

repo sync -c -f -j8 --force-sync --no-clone-bundle --no-tags

第九步,设置编译环境

. build/envsetup.sh

第十步,你执行完这个,然后找Mido,再输入对于号码,之后Lineage会自己下载mido的设备树等等)

lunch

第十一步,由于Lineage没有小米厂商文件,我们要自己加

git clone https://github.com/TheMuppets/proprietary_vendor_xiaomi.git -b cm-14.1 vendor/xiaomi

第十二步,

最后一步:

brunch mido

 

posted @ 2017-10-16 13:16  思恋&勾起回忆  阅读(5632)  评论(0编辑  收藏  举报