i.MX53 QSB Android Recovery Mode

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

i.MX53 QSB Android Recovery Mode

i.MX53 QSB Android Recovery Mode

Software Update and Recovery

The information reproduced above is from Android User Guide R10.2, found into Android release package.


It is possible to format the /data and /cache partitions or update software based on a update script using recovery mode as follows:

  • Prepare for all Android source code that assumed to be saved in ~/myandroid directory.
  • Prepare for ADB over USB. make sure that ADB over USB is ok. USB cable is connected. Refer to i.MX51 Android ADB over USB section for more information.
  • Connect the UART to the PC and open a terminal to check for printed messages
  • Enter the recovery by manual

for imx51_BBG board:       setenv bootargs_android_recovery 'setenv bootargs ${bootargs} init=/init root=/dev/mmcblk0p4 rootfs=ext4 di1_primary'       setenv bootcmd_android_recovery 'run bootargs_base bootargs_android_recovery;mmc read 0 ${loadaddr} 0x800 0x2000;bootm'       run bootcmd_android_recovery

For imx53_SMD board:       setenv bootargs_android_recovery 'setenv bootargs ${bootargs} init=/init root=/dev/mmcblk0p4 rootfs=ext4'       setenv bootcmd_android_recovery 'run bootargs_base bootargs_android_recovery;mmc read 0 ${loadaddr} 0x800 0x2000;bootm'       run bootcmd_android_recovery

  • When system has completed bootup,  You will see this screen:
  • You can press "MENU" "HOME" or "F1" (by USB keyboard, for developer)" going to the text menu like this:
  • Select the required option using the direction keys on the keypad or keyboard.
    • Apply sdcard:update.zip, you may update the software from update.zip as shown in the following example:
      • Copy this directory from android source code myandroid/bootable/recovery/etc to a tempepory directory, such as ~/recovery.
      • cd ~/recovery and remove init.rc from this directory.
      • Edit ./META-INF/com/google/android/updater-script according to the required commands. for example, in order to format /system partition and use update.zip to update system partition, copy whole the entire content directory to system partition, all commands are found in ~/myandroid/bootable/recovery/update/install.c
      • You must notice, when your signing the zip package, it will lose ALL of the permission information, you need to set the right permission in the script. You can find the example in ./META-INF/com/google/android/updater-script
      • Copy update-binary, Copy out/target/product/YOU_PRODUCT/system/bin/updater to ~/recovery/META-INF/com/google/android/update-binary
      • Create a directory called system and copy some files you would like to update to ./system.
      • Create a directory called res to save the public key of your system.

        fsl@fsl-desktop:~/recovery$ mkdir res         fsl@fsl-desktop:~/recovery$ ~/myandroid/out/host/linux-x86/framework/dumpkey.jar ~/myandroid/build/target/product/security/testkey.x509.pem > res/keys

      • Create a package called recovery.zip using the zip command
        fsl@fsl-desktop:~/recovery$zip recovery.zip -r ./META-INF ./system ./res
      • recovery.zip is located in the current directory. Then create a digital signature for recovery.zip package as follows.

        fsl@fsl-desktop:~/recovery$ cd ~/myandroid         fsl@fsl-desktop:~/myandroid$ make signapk         fsl@fsl-desktop:~/myandroid$ cd ~/recovery         fsl@fsl-desktop:~/recovery$ java -jar ~/myandroid/out/host/linux-x86/framework/signapk.jar -w ~/myandroid/build/target/product/security/testkey.x509.pem ~/myandroid/build/target/product/security/testkey.pk8 recovery.zip recovery_signed.zip

      • recovery_signed.zip is located in the current directory. Copy it to the SD card using ADB
        fsl@fsl-desktop:~/recovery$ adb push recovery_signed.zip /sdcard/update.zip
      • update.zip is completed and the system is updated based on the commands in the update-script. Check for error messages on the LCD.
    • Wipe data/factory reset. /data and /cache partitions are formatted.
    • Wipe cache partition. /cache partition is formatted.
  • Reboot the system.
Labels (1)
No ratings
Version history
Last update:
‎09-10-2020 02:33 AM
Updated by: