What needs to be done is to bundle the boot.img and construct a new zip file suitable for flashing via ClockworkMod or TWRP.
- a Linux environment that has the usual development packages, such as Java installed. (It can also apply to other platforms, just be careful that the instructions here indicating the path used below, uses a forward slash
/, so flip that around to be a back slash
\ for Windows environment especially!)
- adb command line tool installed.
- `testsign.jar' tool, for signing the zip file so that the recovery can authenticate and verify it is a valid archive otherwise recovery will report corrupt archive or similar.
update-binary command line application, that is internal for usage with the flashable script. (This can be found with any flashable zip, the important thing is to extract that binary and deposited in the structure of the directory as shown)
- zip command line tool.
Assuming your directory is called workdir, for discussion, lets call this the working directory, copy the
boot.img into that directory, and create the following directory structure -
META-INF/com/google/android, this is important! And within the
META-INF/com/google/android, copy the binary application called
update-binary into that directory. So the directory structure should be like this:
As for the
updater-script, copy the contents of the following below:
ui_print("Please wait, boot.img being flashed...");
ui_print("It is now safe to reboot! :)");
Remember: Do not get confused here, the updater-script as shown, should be left alone and as-is, so do not try flip the forward-slash to a back slash if doing this under Windows environment.
Go back to the parent of the directory structure, i.e. outside of workdir and do the following, we're going to create a zip file from this:
zip -r my_custom_flashable_boot_unsigned.zip workdir/ which is a recursive function, this will zip up everything into the file called my_custom_flashable_boot_unsigned.zip.
Finally, to sign the zip file, issue this:
java -classpath testsign.jar testsign my_custom_flashable_boot_unsigned.zip my_custom_flashable_boot_signed.zip
Then its a matter of pushing that across the SDCard as in
adb push my_custom_flashable_boot_signed.zip /sdcard/ and manually go into recovery and specify that zip archive (i.e. my_custom_flashable_boot_signed.zip) in which it will perform the flashing for you.