Aosp on mako (Click ANDROID 4.4 source code package on nexus 4-download/configure/compile/flash)

Source: Internet
Author: User

Aosp on mako (Click ANDROID 4.4 source code package on nexus 4-download/configure/compile/flash)
Aosp on mako (Click ANDROID 4.4 source code package on nexus 4-download/configure/compile/flash)

Special thanks to the official google documentation and AOSP source code
Reference link:
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 simulator directly install)
Https://developers.google.com/android/nexus/images (Official brush-download image direct brush)

Steps:
1. Download the android 4.4 source code package. Due to GFW, it is difficult to download the source code through Google's official website repo, so I chose the compressed package provided by innost, a Chinese android cool (with 10 Gb)
Ox blog: http://blog.csdn.net/innost/article/details/14002899
115 Network Disk download: http://115.com/lb/5lbcb7joklq
2. decompress the package to the directory. Here I will decompress the package ~ /Android4.4 (set to ANDROID_HOME)
3. Set environment variables (edit ~ /. 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, click the driver file of the mobile phone, and configure it. (At the beginning, I directly select mako for lunch, but when fastboot-w flashall is finished, a success prompt is displayed, however, when the mobile phone was started, it stayed on the google startup interface. Later, it was verified by multiple parties to find the system. hardware driver missing in the image package)
1) into the https://developers.google.com/android/nexus/drivers according to the phone model to select the 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 packages: broadcom-mako-krt16s-f54c9ff9.tgz, lge-mako-krt16s-23ef7d53.tgz, qcom-mako-krt16s-cc4bd932.tgz
3) decompress the package to the source code root directory (that is ~ /Android4.4)
4) run the three decompressed sh files. In the root directory, there will be more vendor directories. This is the hardware driver directory.

5. install some dependent packages required to compile the source code package (many problems may occur in the middle, and google will solve them one by one according to the error prompt ).

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

6. compile and generate the adb and fastboot commands: make fastboot adb (adb is used to enter the fastboot flash mode, and fastboot is used to fl the image to the mobile phone. Of course, you can also manually enter the flash mode. skip this step)
7. Configure environment variables before flashing and compile and generate an image
1) Open the terminal and enter the source code root directory.
2) import and compile the android environment variable: source build/envsetup. sh (mainly to let the terminal find the command location)
3) set the compilation cache size: prebuilts/misc/linux-x86/ccache-M 50G
4) Select compile terminal type: lunch full_mako-userdebug (Note: Direct lunch does not have the full_mako-userdebug option, I am running the command directly according to the official Google Documentation)
5) Compile the source code: make-j16 (select 16 or 8 based on the number of machine CPU cores, and I spent 28 minutes in total)
8. Official flash
1) enter the fl mode: adb reboot bootloader

2) brush the image to your mobile phone: fastboot-w flashall (Note: waiting for device may appear here and stay here all the time. Later I found that the root user permission is required to run this command, so su root switches to the root user environment and configures the relevant variables again. Then, run fastboot-w flashall again. The command runs successfully. Haha ...)


Below are logs and:
--------------------------------------------
Bootloader Version...: MAKOZ30d
Baseband Version...: M9615A-CEFWMAZM-2.0.1700.98
Serial Number ......: 017cf480db62e55e
--------------------------------------------
Checking product...
OKAY [0.002 s]
Sending 'boot' (6340 KB )...
OKAY [0.204 s]
Writing 'boot '...
OKAY [0.351 s]
Sending 'recovery '(6886 KB )...
OKAY [0.221 s]
Writing 'recovery '...
OKAY [0.418 s]
Erasing 'system '...
OKAY [0.676 s]
Sending 'system' (295871 KB )...
OKAY [9.358 s]
Writing 'system '...
OKAY [19.851 s]
Erasing 'userdata '...
OKAY [1.960 s]
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.988 s]
Erasing 'cache '...
OKAY [0.051 s]
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.022 s]
Rebooting...


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.