This device tree is intended to be used with this kernel repo:
See: https://github.com/codeofhonor-dev/android_kernel_huawei_hi6250
branch: o-emui-5
This device tree is intented to be used with this vendor repo
https://github.com/codeofhonor-dev/android_vendor_huawei_hi6250
branch: o-emui5
https://github.com/codeofhonor-dev/android_vendor_coh
branch: master
This "How to" is scoped for new builders with moderate PC skills.
You'll need Linux to be able to build LineageOS. You have three choices here; you can:
- Install Linux natively on your computer.
- Dual boot Linux and Windows.
- Use virtual machine software ( virtual box, vmware ) to run linux.
NOTE: I recommend you use Ubuntu 16.04 LTS to build. That's what I use.
NOTE: DISK SPACE - You'll need about 110GB of free space for the build; swap space ( depending on PC specs ), and some head room. I'd say 130GB at a minimum but more is better if you can spare it.
Now read this: http://source.android.com/source/initializing.html
NOTE: Some say that it is better to download the ROM source and put in your local manifest later. I don't know if that's best but that's what we are going to do.
BEFORE YOU BEGIN: You are about to start downloading 15 - 20 Gigs of data. That could take a very long time, so plan accordingly. I like to start just before I go to sleep and let it go overnight! If you have to work, perhaps start it before work and let it go through out the day.
Execute the following commands in a linux terminal:
Terminal:
mkdir /home/$USER/los
cd /home/$USER/los
repo init -u git://github.com/LineageOS/android.git -b cm-14.1
repo sync
WARNING: There may be times, towards the end when it seem like, the download is stuck and not making any progress because there are no updates on the screen. BE PATIENT!, open a program that will show how much bandwidth you are using to be sure!
The local manifest is different for every device. It contains those repos that are device specific, where as the ROM code you just "repo sync'd" is code that is general to any device.
NOTE: Meticulus Development also builds some extra features and functions into its builds and we include the source for those builds in this tree as well.
Execute the following commands:
Terminal:
mkdir /home/$USER/los/.repo/local_manifests
gedit /home/$USER/los/.repo/local_manifests/hi6250.xml
Copy the following into hi6250.xml, save and close.
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="codeofhonor-dev/android_kernel_huawei_hi6250" path="kernel/huawei/hi6250" remote="github" revision="o-emui5"/>
<project name="codeofhonor-dev/android_device_huawei_hi6250" path="device/huawei/hi6250" remote="github" revision="o-emui5"/>
<project name="codeofhonor-dev/android_vendor_huawei_hi6250" path="vendor/huawei/hi6250" remote="github" revision="o-emui5"/>
<project name="codeofhonor-dev/android_vendor_coh" path="vendor/coh" remote="github" revision="master"/>
</manifest>
Alternatively, if you would like to include Code Of Honor's "extras" then copy the following into hi6250.xml, save and close.
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="codeofhonor-dev/android_kernel_huawei_hi6250" path="kernel/huawei/hi6250" remote="github" revision="o-emui5"/>
<project name="codeofhonor-dev/android_device_huawei_hi6250" path="device/huawei/hi6250" remote="github" revision="o-emui5"/>
<project name="codeofhonor-dev/android_vendor_huawei_hi6250" path="vendor/huawei/hi6250" remote="github" revision="o-emui5"/>
<project name="codeofhonor-dev/android_vendor_coh" path="vendor/coh" remote="github" revision="master"/>
<project name="codeofhonor-dev/android_packages_apps_CodinalteParts" path="packages/apps/CodinalteParts" remote="github" revision="hi6250"/>
</manifest>
Execute the following commands:
Terminal:
cd /home/$USER/los
repo sync
NOTE: Yes we are syncing again and No, it shouldn't take quite as long. Every time you repo sync just new data is downloaded. So we are downloading the 6 or 7 repo's we just put in and any updates that may have occured to the repo's we already have.
If you want to include Code Of Honor's extras
Terminal:
export I_AM_CODEOFHONOR=true
This may not be neccessary depending on your PC's specs. On my previous laptop ( only 4Gig of mem ), I could not build without this and I keep it just in case.
Terminal:
export ANDROID_JACK_VM_ARGS="-Xmx4g -Dfile.encoding=UTF-8 -XX:+TieredCompilation"
This will apply device specific patches everytime you lunch.
Terminal:
export AUTOPATCH=true
If you did not turn on autopatch, you will want to apply the repo patches manually. These patches modify code in the ROM to work with this device. Execute the following commands:
Terminal:
cd /home/$USER/los/device/huawei/hi6250/patches && ./patch.sh
NOTE: Now you have everything that you need to build LineageOS 14.1 for your hi6250 device. Build times depend on your PC's performance specifications. In the following terminal command "-j8" represents the number of concurrent tasks to execute. For low specs machines (such as mine) lowering the value to "-j3" may help speed things up. For high spec'd machines raising the value may speed things up.
NOTE: It may take anywhere from 1 hours to 15 hours depending on system specs for a complete build. Execute the following commands:
Terminal:
cd /home/$USER/los
. build/envsetup.sh
lunch aosp_hi6250-userdebug
make -j8 bacon