Finally got boot to flash from updater script !!!
Quote:
Originally Posted by ClearD
Any idea of the syntax to flash the boot.img properly? I keep getting status 7 error (assert failed) with the binary from the official OTA update (the one that includes the boot.img).
|
I have to say... This was one hell of a b**ch !!! The reason boot flashing has been failing is because of the faulty recovery we have, hence the Beta status of our recovery.
For this to work, you will need busybox installed on your system folder.
Meaning... Make sure busybox libraries are present in /system/xbin.
If you are flashing a new ROM, run package_extract_dir first to dump system first.
Then place the following code at the very end of the updater script to flash boot.img :
ui_print("");
ui_print("Test - Boot - Flasher");
ui_print("Mounting System");
mount("ext3", "MMC", "/dev/block/mmcblk1p18", "/system");
ui_print("");
ui_print("Stage 1... Extracting");
package_extract_dir("bootimg", "/tmp");
ui_print("Stage 2... Setting Perms");
set_perm(0, 0, 0777, "/tmp/boot.img");
ui_print("Stage 3... Flashing Boot");
run_program("/system/xbin/busybox", "dd", "if=/tmp/boot.img", "of=/dev/block/mmcblk1p12", "bs=1024");
ui_print("Unmounting System");
unmount("/system");
ui_print("");
ui_print("Flash Successful");
ui_print("");
Note:
- No need to mount system again if you've done that in the beginning of the script.
- I've placed boot.img in a separate folder named bootimg within the zip file.
- Remember to set /tmp/boot.img permissions to give busybox access to boot.img
I have tested this and can confirm that it is working 100%.
Enjoy :)