Compile Android 4.4 source code and burn it to NEXUS4

Source: Internet
Author: User

Environment Preparation: Basic Environment: ubuntu-12.04-desktop-64bit (bare metal or Windows virtual machine installation can be, 14.04 can also) other requirements: free disk space above 100G, the code part is close to 10G, the larger the better the memory. ========================================== The first part: Environment initialization========================================== 1. Install Oracle JDKNote: If compiling Android4.4 cannot be used with OPENJDK, Oracle jdk1.6,1.7 is not currently supported. 2. Install the prerequisite tools software$sudo apt-get install git gnupg Flex Bison gperf build-essential Zip curl Libc6-dev libncurses5-dev:i386 X11proto-core-dev libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-dri:i386 libgl1-mesa-dev g++-multilib mingw32 Tofrodos Python-markdown libxml2-utils xsltproc zlib1g-dev:i386 dpkg-dev$ sudo ln-s/usr/lib/i386-linux-gnu/mesa/libgl.so.1/ Usr/lib/i386-linux-gnu/libgl.so 3. Configure the CCACHE installation CCACHE and add the export use_ccache=1 to ~/.BASHRC. ========================================== Part II: source code Download========================================== uses the downloaded source code to compile, eliminating the complexity of the source download process: 115 network disk HTTP://115.COM/LB/5LBCB7JOKLQ = = = ======================================= Part III: source code compilation========================================== 1. Setting Environment VariablesExport android_home=~/android4.4
Export path= $PATH: ${android_home}/out/host/linux-x86/bin
Export Android_product_out=${android_home}/out/target/product/mako 2. Download the required source code to swipe the phone driver files and configure
    1. Enter Https://developers.google.com/android/nexus/drivers according to the mobile phone model select the corresponding driver package
    2. Download three drive Packs: Broadcom-mako-krt16s-f54c9ff9.tgz, lge-mako-krt16s-23ef7d53.tgz, qcom-mako-krt16s-cc4bd932.tgz
    3. Extract to source root directory (i.e. ~/android4.4)
    4. Run three extracted sh files, in the root directory will be more than the vendor directory, this is the hardware driver directory
3. Start compiling
    1. Import compiled android environment variable: source build/envsetup.sh
    2. Set compilation cache size: Prebuilts/misc/linux-x86/ccache/ccache-m 50G
    3. Select Compile terminal type: Lunch Full_mako-userdebug
    4. Compiled Source: Make-j4
========================================== Part IV: A compiled system to swipe into the phone========================================== 1. View the Out directorySee if you want to generate System.img boot.img recovery.img userdata.img and other required files 2. Swipe in your phoneEnter the directory where system.img is located1) Enter the brush mode: adb reboot bootloader

2) swipe image into your phone: sudo fastboot-w flashall or swipe into recovery boot system UserData to enter the phone

Compile Android 4.4 source code and burn it to NEXUS4

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.