Last active
April 30, 2020 11:11
-
-
Save ingenieursaurav/8e3758818b8593ee0133e67028c7006e to your computer and use it in GitHub Desktop.
Compile Android SDK
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
A : Make Android SDK | |
STEP1: Example for extract the part1 and part2 rar files | |
root# unrar x -e HiSTBAndroidV800R001C00SPC020.tar.part1.rar | |
resutls -> HiSTBAndroidV800R001C00SPC020.tar.gz | |
STEP2: Download the Android SDK through | |
root# sudo apt -y install git | |
root# repo init -u https://android.googlesource.com/platform/manifest -b android-8.0.0_r4 | |
root# git config --global user.email "[email protected]" | |
root# git config --global user.name "SAURAV" | |
root# repo init -u https://android.googlesource.com/platform/manifest -b android-8.0.0_r4 | |
root# repo sync -j8 | |
or | |
Copy from harddisk | |
STEP3: Patching the HISI SDK | |
copy both SDK20 and SDK21 | |
{HiSTBAndroidV800R001C00SPC020.tar.gz and | |
HiSTBAndroidV800R001C00SPC021.tar.gz} | |
root# tar -xvzf HiSTBAndroidV800R001C00SPC020.tar.gz | |
root# tar -xvzf HiSTBAndroidV800R001C00SPC021.tar.gz | |
root# cp -rf HiSTBAndroidV800R001C00SPC020/* $yourAndroidPath/ | |
root# cp -rf HiSTBAndroidV800R001C00SPC021/* $yourAndroidPath/ | |
STEP4: Download and copy the linux source | |
Then copy the linux linux-4.9.44.tar.gz into the following path and you can download the | |
linux tar file in path www.kernel.org/pub/linux/kernel/v4.x/linux-4.9.44.tar.gz | |
root# cp -rf linux-4.9.44.tar.gz \ | |
$yourAndroidPath/device/hisilicon/bigfish/sdk/third_party/open_source/ | |
Once above all done your SDK setup ready. | |
B : Setup the environment | |
STEP1: Install these apt | |
root# sudo apt-get install git make zlib1g-dev:i386 cpp gcc-multilib \ | |
g++ g++-4.8-multilib cpp-4.8 g++-4.8 gcc-4.8 binutils gnupg flex \ | |
lib32ncurses5-dev bison gperf build-essential zip curl libc6-dev \ | |
x11proto-core-dev libx11-dev lib32readline6-dev zlib1g-dev \ | |
lib32z-dev libgl1-mesa-dev g++-multilib tofrodos gettext \ | |
libxml2-utils xsltproc u-boot-tools mingw-w64 | |
STEP 2: Then Install JAVA JDK 1.8 as we are going to use Android 8.0 | |
root# sudo apt-get install openjdk-8-jdk | |
Then update the following path in /etc/profile | |
export JAVA_HOME="/usr/lib/jvm/java-1.8.0-openjdk-amd64" | |
export PATH="/usr/lib/jvm/java-1.8.0-openjdk-amd64/bin":$PATH | |
STEP 3: Replace the system shell with bash. | |
root# sudo rm /bin/sh;sudo ln -s /bin/bash /bin/sh | |
STEP 4: Add the s permission to mknod chmod chown | |
root# sudo chmod a+s /bin/mknod | |
root# sudo chmod a+s /bin/chmod | |
root# sudo chmod a+s /bin/chown | |
C : Compile the environment | |
STEP 1: Compile the source code | |
to make all image: | |
--------------------------------- | |
root# cd $yourAndroidPath/ | |
root# source build/envsetup.sh | |
root# lunch | |
and choose Hi3798MV200-eng which is in option 30 | |
root# make bigfish -j32 2>&1 | tee bigfish.log | |
to make boot: | |
--------------------------------- | |
make hiboot -j32 2>&1 | tee hiboot.log | |
following image is compiled: | |
fastboot.bin | |
to make kernel: | |
--------------------------------- | |
root#make kernel –j32 2>&1 | tee kernel.log | |
following image is compiled: | |
kernel.img | |
to make system for Emmc: | |
--------------------------------- | |
root#make ext4fs -j32 2>&1 | tee ext4fs.log | |
following image is compiled: | |
system.ext4 | |
userdata.ext4 | |
cache.ext4 | |
kernel.img | |
to clean: | |
--------------------------------- | |
root# make clean | |
once this done all the images will be compiled. | |
STEP 2: Compiled Images | |
To verify the images go to below path: | |
root# cd $yourAndroidPath/out/target/product/Hi3798MV200/Emmc/ | |
Note: | |
please follow all the commands following with root# | |
Refer *.log in the Android SDK root directory to get full compilation logs |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment