Hi All,
I am trying to use recovery.img for upgrading android images (boot.img, system.img, recovery.img) in eMMC Nand flash. Please suggest if it is feasible to hack recovery.img to automate the upgrade process. Please provide any link or document in this regard.
Problem while using recovery.img
========================
When i boot sabresd board in recovery mode (by pressing vol-down button) from eMMC, the boot up process hangs at "Freeing init memory" and android recovery icon appears on hdmi display. The same image boots up properly in normal mode with the bootargs=console=ttymxc0,115200 androidboot.console=ttymxc0 init=/init vmalloc=400M video=mxcfb0:dev=hdmi,1920x1080M@60,bpp=32 video=mxcfb1:off video=mxcfb2:off fbmem=28M androidboot.hardware=freescale.
Thanks & Regards,
Ashish Gupta
Solved! Go to Solution.
Yes,they are different.
1.If you want to building updatepackage for fastboot.
$make updatepackage
THis is just a zip file including target board binary images (boot.img,recovery.img,system.img)
You can use it in fastboot mode.
$fastboot update yourupdatepackage.zip --this will check target board name
2.Well,the otapackage is a zip file including your whole target system files Generally otapackage building require
device key.Of course you can use fsl common device key in device/fsl/common/security and this is default setting in BoardConfig.mk
by below lines:
PRODUCT_DEFAULT_DEV_CERTIFICATE := \
device/fsl/common/security/testkey
Here I list my otapackage zip file dir:
boot.img
system/ --including all your system files like your out/target/product/xxx/system
recovery/ --including recovery script and recovery.P
META-INF/ --including script and CERT,signature of your ota package which is used by recovery image.
Hi Raymond,
After rebuilding the android source JB422, i am able to generate OTA package "sabresd_6dq-ota-eng.root.zip". And this file has same directory list as you have mentioned.
I rename this file to update.zip and copied it to sabresd cache folder. My sabresd board is running Android 13.4.1 (4.0.0) image and i am doing a POC which will upgrade it to JB422 through this OTA package.
After copying it to cache folder, i made command file in recovery folder, with following:
--update_package=/cache/update.zip
and restarted the system in recovery mode. On HDMI display i am able to see the Android Robot while upgrading and after upgrading it prints successful message in the display.
But when i restart the system, it keeps on rebooting after loading the kernel. Please suggest.
Thanks & Regards,
Ashish Gupta
Android recovery only provide mechanism of updating your system. After upgrading completed,it will reboot automatically.
If your board always restart after kernel is loading, you should check your boot.img and system.img.
For example,you can upgrade your kernel (boot.img=kernel+ramdisk) and system.img by fastboot
in device uboot console
$fastboot
in your usb otg connected linux machine(We assume you have permission to access adb devices)
$fastboot flash boot out/target/product/XXX/boot.img
$fastboot flash system out/target/product/XXX/system.img
$fastboot reboot
As a summary,you should check your boot.img and system.img can boot up properly. They are nothing to do with android
recovery OTA .
Hi Raymond wang,
Ofcourse you answer is helpful, but i am stuck little bit while generating the OTA package.
Today i tried to build the ota package based on the instructions mentioned in 13.4.1 "Android_Advanced_User_Guide.pdf".
After,
$ make PRODUCT=sabresd_6dq-eng dist -j4
I can find out/dist/ folder and following zip files inside:
-rw-r--r-- 1 root root 53284796 Nov 7 12:28 full-apps-eng.root.zip
-rw-r--r-- 1 root root 121056186 Nov 7 12:29 full-emulator-eng.root.zip
-rw-r--r-- 1 root root 564312424 Nov 7 12:30 full-symbols-eng.root.zip
-rw-r--r-- 1 root root 118854623 Nov 7 12:29 full-target_files-eng.root.zip
And no zip file is created in the out/target/product/sabresd_6q/
Then i tried to update the board with fastboot
$ fastboot update full-target_files-eng.root.zip
But it is failing.
Also $ make otapackage, does'nt work.
Ques: Whether update.zip is the same file as full-target_files-eng.root.zip? Or there is a different command for generating update.zip?
b.t.w. i am using jb4.2.2_1_0_0 patches for compiling android, and have sabresd imx6q board.
Yes,they are different.
1.If you want to building updatepackage for fastboot.
$make updatepackage
THis is just a zip file including target board binary images (boot.img,recovery.img,system.img)
You can use it in fastboot mode.
$fastboot update yourupdatepackage.zip --this will check target board name
2.Well,the otapackage is a zip file including your whole target system files Generally otapackage building require
device key.Of course you can use fsl common device key in device/fsl/common/security and this is default setting in BoardConfig.mk
by below lines:
PRODUCT_DEFAULT_DEV_CERTIFICATE := \
device/fsl/common/security/testkey
Here I list my otapackage zip file dir:
boot.img
system/ --including all your system files like your out/target/product/xxx/system
recovery/ --including recovery script and recovery.P
META-INF/ --including script and CERT,signature of your ota package which is used by recovery image.
Recovery.img boot without console in default so it seems system hangup in console.
You can test ota package with your recovery.img
Step 1: building otapackage
$make otapackage
Step 2:
$adb push update.zip /cache #assume update.zip is your otapackage
$adb shell
#Now in device shell
#mkdir /cache/recovery/
#echo "--update_package=/cache/update.zip" > /cache/recovery/command
#reboot recovery
Now your android will reboot to recovery mode to update your OTA package,it will reboot automatically after finished.
Thanks Raymond Wang, for the guiding us in the right direction.
If your problem resolved,please mark thread as answered or help answered.