Building and Flashing AOSP for Device Nexus 5 hammerhead

Keywords: Attribute Android Google shell

Compile Android 6.0 in the wall and burn it into the record of Nexus 5

Refer to

http://saurabhsharma123k.blogspot.hk/2017/02/building-and-flashing-aosp-for-device.html
https://lug.ustc.edu.cn/wiki/mirrors/help/aosp

Source download

https://lug.ustc.edu.cn/wiki/mirrors/help/aosp

Download driver

https://developers.google.com/android/drivers#hammerheadm4b30z

 cd android6
 mkdir u
 cd u
wget  https://dl.google.com/dl/android/aosp/broadcom-hammerhead-m4b30z-21cf8433.tgz
wget https://dl.google.com/dl/android/aosp/lge-hammerhead-m4b30z-520d054d.tgz
wget https://dl.google.com/dl/android/aosp/qcom-hammerhead-m4b30z-d6c0fe26.tgz

tar -xvzf broadcom-hammerhead-m4b30z-21cf8433.tgz
tar -xvzf lge-hammerhead-m4b30z-520d054d.tgz
tar -xvzf qcom-hammerhead-m4b30z-d6c0fe26.tgz

cd ..
bash /u/extract-broadcom-hammerhead.sh
bash /u/extract-qcom-hammerhead.sh
bash /u/extract-lge-hammerhead.sh

Check whether the vendor folder exists

Compile

. build/envsetup.sh
lunch 
#19
make -j4

Burn write

cd out/target/product/hammerhead
adb reboot bootloader 
# Mobile Phone Restart to Maintenance Interface
fastboot flash boot boot.img
fastboot flash system system.img 
fastboot flash userdata userdata.img
fastboot flash recovery recovery.img
fastboot reboot 

Effect

adb shell screencap -p /sdcard/Download/11.png
adb pull /sdcard/Download/11.png .

PS: There's a problem. Why didn't Kernel write my name? It seems that there is no kernel folder under the source code. I'll study how to change the kernel later.

exception handling

1. What if you fail to restart successfully?

adb shell logcat

Look at the error message

2. Ways to Re-Brush Official Packages

wget https://dl.google.com/dl/android/aosp/hammerhead-m4b30z-factory-625c027b.zip
unzip hammerhead-m4b30z-factory-625c027b.zip
cd hammerhead-m4b30z

adb reboot bootloader
./flash-all.sh

Posted by riex1 on Thu, 07 Feb 2019 03:36:18 -0800