Hello,
I checked out the Android source code from the official website, and built it locally.
I was using Android source code 4.4.
My target device is Nexus 7 (2013, Wifi).
According to Android document (https://source.android.com/source/building-devices.html),
I selected aosp_flo-userdebug in lunch.
Then, I built the code using make -j16.
After it succeed, I found the images in my OUT folder.
-rw-r--r-- 1 user user 7.0M Oct 17 17:57 boot.img
-rw-r--r-- 1 user user 4.6M Oct 17 17:14 cache.img
-rw-rw-r-- 1 user user 567K Oct 17 17:55 ramdisk.img
-rw-rw-r-- 1 user user 1.2M Oct 17 17:57 ramdisk-recovery.img
-rw-r--r-- 1 user user 7.6M Oct 17 17:57 recovery.img
**-rw-r--r-- 1 user user 260M Oct 17 18:14 system.img**
-rw-r--r-- 1 user user 134M Oct 17 18:06 userdata.img
I used fastboot to flash these images to my device, but it seems not work...
Therefore, I have to flash it back using factory images (https://developers.google.com/android/nexus/images).
I downloaded the one for my device, which is "razor" for Nexus 7 [2013] (Wi-Fi).
After flashing the device with new images, it works again...
I checked the factory images, and found out that:
-rw-r--r-- 1 user user 6.9M Jan 1 2009 boot.img
-rw-r----- 1 user user 3.9M Nov 19 2013 bootloader-flo-flo-04.01.img
-rw------- 1 user user 4.6M Nov 15 2013 cache.img
-rw-r--r-- 1 user user 7.4M Jan 1 2009 recovery.img
**-rw-r--r-- 1 user user 689M Jan 1 2009 system.img**
-rw------- 1 user user 134M Nov 15 2013 userdata.img
Everything seems to be good, except two things:
My system.img is only 260M, while the official one is about 690M.
The official one comes with a bootloader.img, while mine does not.
Did I do anything wrong in the compiling/building?
And, why there is a huge size difference between my system.img and the official one?
Thanks a lot for your help!
Hello Glenn,
Thanks a lot for your response. I double checked with the result of compile.It seems to be no error during the compiling.Enclosed is a screenshot of the final output. It says "make completed successfully"...
So, I think there is no problem in the make process.But did I choose the right lunch option for NEXUS 7 (2013, wifi)? I am using aosp_flo-userdebug now. Is there any other option that I can obtain larger image that matches the factory image?