Hello Guys hope you are doing well!!!.
How to build AOSP for real device let say Nexus 5 (Hammerhead). In my previous blog, I had given info for AOSP download and build for Emulator. But building AOSP for a real device and flashing it is quite different. Today I am going to discuss it step by step.
Pre requisites:
Before proceeding for Downloading and building
1. GIT has to be installed
2. Make sure the following packages are installed in the system
- gcc-multilib --> sudo apt-get install gcc-multilib
- bison --> sudo apt-get install bison
- flex --> sudo apt-get install flex
- lib32z1 and lib32z1-dev --> sudo apt-get install lib32z1 lib32z1-dev
Downloading and building:
Step 1. Choose Right Source code
Based on your available Test device and its binary file (device driver) , Download the respective source code. Please follow this link
Open above link search for your device and then find the corresponding AOSP branch code. Let say for Nexus 5 (hammerhead) I have chosen Marshmallow (android-6.0.1_r77).
Step 2 Download the AOSP code
Please follow my previous blog for download.
Step 3. Download the binaries file
Open following link
and search for your device binaries. In my case I have Nexus 5 (hammerhead) and I have selected android-6.0.1_r77 this AOSP branch . So code Name is M4B30Z.
After successful download of device driver binary , extract it (say /u dir) and go to root folder of your AOSP code base. cd ../<AOSP code>/
Run this scripts from there.
Step 4. Build the source code
Use following command for building. For more detail on build command follow my previous blog.
> source build/envsetup.sh
>lunch
> select your lunch argument. For me it is 19 (aosp_hammerhead-userdebug).
>make -j4 (or -j16 based on your RAM and CPU core)
Once the build is complete, the system.img file can be found at out/target/product/hammerhead
Step 5. Flash Image into device
After building successful system image, We can flash now. Connect your Test device via USB cable and give following command in your terminal
Thanks
Note:- Please proved your comment and suggestion for my post. It will energize me.
How to build AOSP for real device let say Nexus 5 (Hammerhead). In my previous blog, I had given info for AOSP download and build for Emulator. But building AOSP for a real device and flashing it is quite different. Today I am going to discuss it step by step.
Pre requisites:
Before proceeding for Downloading and building
1. GIT has to be installed
2. Make sure the following packages are installed in the system
- gcc-multilib --> sudo apt-get install gcc-multilib
- bison --> sudo apt-get install bison
- flex --> sudo apt-get install flex
- lib32z1 and lib32z1-dev --> sudo apt-get install lib32z1 lib32z1-dev
Downloading and building:
Step 1. Choose Right Source code
Based on your available Test device and its binary file (device driver) , Download the respective source code. Please follow this link
Open above link search for your device and then find the corresponding AOSP branch code. Let say for Nexus 5 (hammerhead) I have chosen Marshmallow (android-6.0.1_r77).
Step 2 Download the AOSP code
Please follow my previous blog for download.
Step 3. Download the binaries file
Open following link
and search for your device binaries. In my case I have Nexus 5 (hammerhead) and I have selected android-6.0.1_r77 this AOSP branch . So code Name is M4B30Z.
After successful download of device driver binary , extract it (say /u dir) and go to root folder of your AOSP code base. cd ../<AOSP code>/
Run this scripts from there.
- sh /u/extract-broadcom-hammerhead.sh
- sh /u/extract-qcom-hammerhead.sh
- sh /u/extract-lge-hammerhead.sh
run each command one by one and hit enter slowly and at the end you have to enter I Accept for T&C. After successful this operation check your <aosp code> folder there you find one new folder named as vendor. This folder contain all binaries for your device.
Use following command for building. For more detail on build command follow my previous blog.
> source build/envsetup.sh
>lunch
> select your lunch argument. For me it is 19 (aosp_hammerhead-userdebug).
>make -j4 (or -j16 based on your RAM and CPU core)
Once the build is complete, the system.img file can be found at out/target/product/hammerhead
Step 5. Flash Image into device
After building successful system image, We can flash now. Connect your Test device via USB cable and give following command in your terminal
- <aosp-working-dir> ./adb reboot bootloader
- <aosp-working-dir> ./fastboot flash boot /path_of_your_boot_image
- <aosp-working-dir> ./fastboot flash system /path_of_your_system.img
- <aosp-working-dir> ./fastboot flash userdata /path_of_your_userdata.img
- <aosp-working-dir> ./fastboot flash recovery /path_of_your_recovery.img
- <aosp-working-dir> .fastboot reboot
Thanks
Note:- Please proved your comment and suggestion for my post. It will energize me.
0 komentar:
Posting Komentar