0,vbox Mount Share
sudo mount-t vboxsf h/mnt/h/
1, installation system
Configuration:
Memory 12G
Cpu16, Peak 95%
HDD 200G
Partitions: Automatic Partitioning
2, configure the environment, download the source code
sudo apt-get update
sudo apt-get install Git-core GnuPG Flex Bison gperf build-essential \
Zip Curl Zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 \
Lib32ncurses5-dev x11proto-core-dev libx11-dev Lib32z-dev ccache \
Libgl1-mesa-dev Libxml2-utils Xsltproc Unzip
sudo apt-get install OPENJDK-7-JDK
mkdir ~/bin
Path=~/bin: $PATH
Curl Https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo
git config--global user.name "FBB"
git config--global user.email "[Email protected]"
M4b30zandroid-6.0.1_r77marshmallownexus 5
mkdir android-6.0.1_r77
CD android-6.0.1_r77
# # If the hint cannot be connected to gerrit.googlesource.com, you can edit the ~/bin/repo and replace the Repo_url line with the following:
# # Repo_url = ' Https://gerrit-googlesource.proxy.ustclug.org/git-repo '
Google address download difficult to use, Tsinghua Mirror.
Repo Init-u git://mirrors.ustc.edu.cn/aosp/platform/manifest-b android-6.0.1_r77
Repo Sync-j4
3, (see) Download the Nexus 5 hardware driver:
Keyword: Compile android brush to Nexus 5
Https://developers.google.com/android/drivers
Nexus 5 (Gsm/lte) ("Hammerhead")
Nexus 5 (Gsm/lte) binaries for Android 6.0.1 (mmb29s)
/*
Nexus 5 (Gsm/lte) binaries for Android 6.0.1 (mmb29s)
Hardware Component company Download SHA-256 Checksum
NFC, Bluetooth, Wi-Fi Broadcom Link 57e056be0925ab0800d5e07b06849322d9a8d3e9e00f0fe1ecebad0387d3f1f1
Camera, sensors, Audio LG Link 3a8f970fc13330ea54573f2c9002a1071dae56eae5337aa2220efa213b810164
Graphics, GSM, Camera, GPS, sensors, Media, DSP, USB Qualcomm Link Add1a3008faf2a68b44851e7ab193fb5b2e488dd4a92ec0c6b7d391576312a23
*/
Process:
Download three tgz files according to the link,
After decompression is the sh file into the source directory,
Executes the sh file, which will survive the vendor folder in the source root directory.
Command:
mkdir drivers
Curl https://dl.google.com/dl/android/aosp/broadcom-hammerhead-mmb29s-3a3c03c6.tgz > ~/drivers/ Broadcom-hammerhead-mmb29s-3a3c03c6.tgz
Curl https://dl.google.com/dl/android/aosp/lge-hammerhead-mmb29s-fa0209c9.tgz > ~/drivers/ Lge-hammerhead-mmb29s-fa0209c9.tgz
Curl https://dl.google.com/dl/android/aosp/qcom-hammerhead-mmb29s-bd184be4.tgz > ~/drivers/ Qcom-hammerhead-mmb29s-bd184be4.tgz
TAR-ZXF broadcom-hammerhead-mmb29s-3a3c03c6.tgz
TAR-ZXF lge-hammerhead-mmb29s-fa0209c9.tgz
TAR-ZXF qcom-hammerhead-mmb29s-bd184be4.tgz
CP ~/drivers/extract-broadcom-hammerhead.sh ~/android-4.4.4_r1/extract-broadcom-hammerhead.sh
CP ~/drivers/extract-lge-hammerhead.sh ~/android-4.4.4_r1/extract-lge-hammerhead.sh
CP ~/drivers/extract-qcom-hammerhead.sh ~/android-4.4.4_r1/extract-qcom-hammerhead.sh
./extract-broadcom-hammerhead.sh
./extract-lge-hammerhead.sh
./extract-qcom-hammerhead.sh
################################################################
Package: Tar-cf/mnt/h/android-6.0.1_r77.tar android-6.0.1_r77
################################################################
4, compiling Android source code
Make clobber
SOURCE build/envsetup.sh
Lunch
Input: 19
Selected by:
Aosp_hammerhead-userdebug.
Make-j16
Lunch Aosp_hammerhead-user
Target_build_variant=user
Choosecombo Release msm8974 User
function Choosecombo ()
{
Choosetype $
Echo
Echo
Chooseproduct
Echo
Echo
Choosevariant
Echo
Set_stuff_for_environment
Printconfig
Choosevariant
Choosevariant
The user version needs to open the USB debug switch first, open the way as follows:
1. Open USB Debug Build/core/main.mk
Please change the user version to Ro.debuggable = 1
Ifeq (True, (strip (enable_target_debugging)))
# Target is more debuggable and ADBD are on by default
Additional_default_properties + = ro.debuggable=1
# Include The debugging/testing OTA keys in this build.
Include_test_ota_keys: = True
else #!enable_target_debugging
# Target is less debuggable and adbd are off by default
Additional_default_properties + = ro.debuggable=1//This side changed to 1
endif #!enable_target_debugging
Language:
/home/fbb/android-6.0.1_r77/build/target/product/languages_full.mk
Android source code compilation to the brush process 2