How-to build Roms (crDroid) for the ZTE Axon 7

[armitage]

Senior Member
Nov 26, 2010
510
445
93
Quite a while ago I promised to make a How-to on how to build Roms for the Axon 7.
Well, here we are... 84 years later. :D

It's a bit quick & dirty, but all the basics should be there. :)

Thanks to raystef66 & tprfd for all the help.

Code:
Complete How-to for building LineageOS:
https://wiki.lineageos.org/devices/axon7/build#prepare-the-device-specific-code

I'd start there and then check this How-to for the rest.


( pre-building )

Start in your home directory.
Get the latest platform tools:
wget https://dl.google.com/android/repository/platform-tools-latest-linux.zip

Unzip them:
unzip platform-tools-latest-linux.zip -d ~

Add adb and fastboot as well as ~/bin to your path by editing ~/.profile and adding these lines (~/bin may already be there):

# add Android SDK platform tools to path
if [ -d "$HOME/platform-tools" ] ; then
    PATH="$HOME/platform-tools:$PATH"
fi

# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/axon7-build/bin" ] ; then
    PATH="$HOME/axon7-build/bin:$PATH"
fi

Update your environment by running 
[CODE]source ~/.profile
Install the required packages:
Code:
sudo apt-get install bc bison build-essential ccache curl flex g++-multilib gcc-multilib git gnupg gperf imagemagick lib32ncurses5-dev lib32readline-dev lib32z1-dev liblz4-tool libncurses5-dev libsdl1.2-dev libssl-dev libwxgtk3.0-dev libxml2 libxml2-utils lzop pngcrush rsync schedtool squashfs-tools xsltproc zip zlib1g-dev openjdk-8-jdk

( First Build / crDroid )
cd /home
mkdir crDroid
cd crDroid
repo init -u git://github.com/crdroidandroid/android.git -b 9.0
repo sync
git clone https://github.com/Jake-Armitage/android_device_zte_axon7-1.git -b crdroid-pie device/zte/axon7
git clone https://github.com/Jake-Armitage/proprietary_vendor_zte-1.git -b lineage-16.0 vendor/zte
git clone https://github.com/Jake-Armitage/caf_kernel_zte_msm8996.git -b axon7-stable kernel/zte/msm8996

[When rebuilding]
( cd /home/[username]/axon7-build/android/crDroid && make clean && source build/envsetup.sh && breakfast axon7 && repo sync --force-sync )
[/(When rebuilding)]

source build/envsetup.sh #(don't do this again if you already did the step --> (When rebuilding)
breakfast axon7 #(don't do this again if you already did the step --> (When rebuilding)

cd /home/[username]/axon7-build/android/crDroid/device/zte/axon7
./setup-makefiles.sh
cd /home/[udername]/axon7-build/android/crDroid
croot
brunch axon7
[/CODE]
 
  • Like
Reactions: foggydew88

TerrorToetje

Senior Member
Nov 30, 2014
214
88
48
Maastricht
Testing the instructions now :)

Update:

First attempt and working, I just flashed my own compiled build thanks for the instructions! (Now let's git clone all and fix all issues (Wish))
 
Last edited:

tprfd

Senior Member
Jan 20, 2012
63
53
0
Very new to android development (?)... How do you get the latest security patches and apply them to a rom?
The developers for lineage, crdroid, etc. do this. If you build with instructions from OP you will pull in the latest security patches. You can sync every month to get the latest. I am doing this with my own build of lineage 16 using a mix and match of sources for this phone.