[Huawei Y6 Guides, News, & Discussion] Runner85sx:
Today i share my knowledge to setup and build lineageos-7 for the Huawei Y6.

First of all we need to install some things.

Run these commands with root or sudo.

apt-get install -y bison build-essential curl flex git gnupg gperf libesd0-dev liblz4-tool libncurses5-dev libsdl1.2-dev libwxgtk3.0-dev libxml2 libxml2-utils lzop maven openjdk-8-jdk pngcrush schedtool squashfs-tools xsltproc zip zlib1g-dev g++-multilib gcc-multilib lib32ncurses5-dev lib32readline6-dev lib32z1-dev ccache rsync tig sudo imagemagick android-tools-adb android-tools-fastboot bc bsdmainutils file screen bash-completion wget nano

This one works well for Ubuntu 16.04 64 bit.

After that create a user with that you like to build android and log in with that user.

You need to run the following command after login:

mkdir ~/bin && cd ~/bin && curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > repo && chmod a+x repo && cd

After that you should configure git. For me it is:

git config --global user.name "username" && git config --global user.email "name@email.com"

Now you can start to fetch the sources.:

mkdir lineageos-7.1 && cd lineageos-7.1 && repo init -u git://github.com/LineageOS/android.git -b cm-14.1 && repo sync

That will set up up a fresh source for lineageos-7.1 at all. Everything from now is device specific.

First we should create the basic folders for our device. I always fetch the sources for the huawei cherry to get the deps.:

cd ~/lineageos-7.1 && . build/envsetup.sh

That will set up the lineageos build env.

Next command:

breakfast cherry

That will fetch some sources for qcom devices.

Now we need to get the files to build lineageos-7.1 for our huawei y6.

cd ~/lineageos-7.1/kernel/huawei && git clone https://github.com/giorgio130/android_kernel_huawei_msm8916.git msm8908 -b cm-14.1 && cd ~/lineageos-7.1/devices/huawei && git clone https://github.com/giorgio130/android_device_huawei_scale.git scale -b cm-14.1 && git clone https://github.com/giorgio130/android_device_huawei_msm8909-common.git msm8909-common -b cm-14.1 && git clone https://github.com/giorgio130/proprietary_vendor_huawei.git ~/lineageos-7.1/vendor/huawei -b cm-14.1

That was a simple Do that after that command quene. Nothing special for linux users.

If you got everything at the right place, please edit:

lineageos-14.1/device/huawei/msm8909-common/BoardConfigCommon.mk

and change:

TARGET_KERNEL_SOURCE := kernel/huawei/msm8916

to:

TARGET_KERNEL_SOURCE := kernel/huawei/msm8909

Now we should be ready to go. Go back to the base folder and run:

. build/envsetup.sh && export WITH_SU=true && brunch lineage_scale-userdebug

With that commands everybody should be able to build and run LineageOs for the Huawei Y6 and other devices. It is the same with only other devices.

Step 1.

. build/envsetup.sh

will source up the LineageOS.

Step 2.

export WITH_SU=true

will enable full root access inside the finished build.

Step 3.

brunch lineage_scale-userdebug

will build a flashable zip file for the Huawei Y6 aka Huawei Scale.

make clean && make clobber

will clean up your whole environment before or after you compiled Android. You need to run step 1, 2, and 3 again after you run this or changed something.

Edit 1: Moved text to code.

Edit 2: Added some stuff.

Edit 3: Cleanup