AOSP on MAKO (swipe Android 4.4 source bundle on Nexus 4-download/configure/compile/Brush)

Source: Internet
Author: User

AOSP on MAKO (swipe Android 4.4 source bundle on Nexus 4-download/configure/compile/Brush)

Special thanks to Google official documents and AOSP Open source
Reference Links:
https://source.android.com/source/building-devices.html (official source brush device)
Https://developers.google.com/android/nexus/drivers#makokrt16s (Hardware driver package, such as just run the emulator will be installed directly)
Https://developers.google.com/android/nexus/images (Official Brush Package-Download Image direct swipe)

Steps:
1. Download Android 4.4 Source package, due to GFW reasons, through the official website of Google repo download source is more difficult, so I chose the domestic Android cattle innost provide compression package. (with 10G)
NIU Man Blog: http://blog.csdn.net/innost/article/details/14002899
115 Network disk Download: HTTP://115.COM/LB/5LBCB7JOKLQ
2. Unzip to the directory, where I unzip to ~/android4.4 (set to Android_home)
3. Set the environment variable (edit the ~/.BASHRC file, add the following three lines at the end)
Export android_home=~/android4.4
Export path= $PATH: ${android_home}/out/host/linux-x86/bin
Export Android_product_out=${android_home}/out/target/product/mako
4. Download the required source code to brush the driver files and configuration (I started directly lunch select Mako, but finally fastboot-w Flashall, the prompt success, but the phone started to stay in the Google launch interface, Later verified by the multi-party found that the System.image package is less hardware-driven)
1) into the https://developers.google.com/android/nexus/drivers according to the mobile phone model selected corresponding driver package, my phone is Nexus 4, the source package is Android 4.4, so enter the link https:// Developers.google.com/android/nexus/drivers#makokrt16s
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

5. Install some of the dependencies required to compile the source package (this may encounter a lot of problems, according to the error prompt Google one by one resolution).

Reference Link: https://source.android.com/source/building-running.html

6. Build adb and FastBoot command: Make fastboot adb (adb is used to enter the FastBoot brush mode, FastBoot is used to swipe the image into the phone. Of course, you can also manually enter the brush mode, this step can be skipped)
7. Configure the pre-brush machine environment variables and compile the generated image
1) Open the terminal and enter the root directory of the source code
2) Import compiled android environment variable: source build/envsetup.sh (mainly for the terminal to find the command location)
3) Set compilation cache size: Prebuilts/misc/linux-x86/ccache/ccache-m 50G
4) Select compile terminal type: Lunch Full_mako-userdebug (note: Direct lunch is no full_mako-userdebug option, I run the command directly according to Google's official documents)
5) Compile Source: make-j16 (depending on the number of CPU cores selected is 16 or 8, I spent a total of 28 minutes)
8. Official Brush Machine
1) Enter the brush mode: adb reboot bootloader

2) swipe image into mobile phone: fastboot-w Flashall (Note: There may be waiting for device, and stay here, and then I found that running the command requires root user rights, so SU Root, switch to the root user environment, and then After configuring the relevant variables, run Fastboot-w flashall again, the command runs successfully, haha ...)


Here are the logs and:
--------------------------------------------
Bootloader Version ...: makoz30d
Baseband Version ...: m9615a-cefwmazm-2.0.1700.98
Serial number ...: 017cf480db62e55e
--------------------------------------------
Checking product ...
OKAY [0.002s]
Sending ' boot ' (6340 KB) ...
OKAY [0.204s]
Writing ' Boot ' ...
OKAY [0.351s]
Sending ' recovery ' (6886 KB) ...
OKAY [0.221s]
Writing ' recovery ' ...
OKAY [0.418s]
Erasing ' system ' ...
OKAY [0.676s]
Sending ' system ' (295871 KB) ...
OKAY [9.358s]
Writing ' System ' ...
OKAY [19.851s]
Erasing ' UserData ' ...
OKAY [1.960s]
Formatting ' UserData ' partition ...
Creating filesystem with Parameters:
size:6189744128
Block size:4096
Blocks per group:32768
Inodes per group:8048
Inode size:256
Journal blocks:23612
Label:
blocks:1511168
Block groups:47
Reserved Block Group size:375
Created filesystem with 11/378256 inodes and 50366/1511168 blocks
Sending ' UserData ' (98413 KB) ...
Writing ' UserData ' ...
OKAY [8.988s]
Erasing ' cache ' ...
OKAY [0.051s]
Formatting ' cache ' partition ...
Creating filesystem with Parameters:
size:587202560
Block size:4096
Blocks per group:32768
Inodes per group:7168
Inode size:256
Journal blocks:2240
Label:
blocks:143360
Block Groups:5
Reserved Block Group size:39
Created filesystem with 11/35840 inodes and 4616/143360 blocks
Sending ' cache ' (10984 KB) ...
Writing ' Cache ' ...
OKAY [1.022s]
Rebooting ...


Related Article

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.