Originally Posted by whirleyes
Err.. Doesn't the /system/bin/applypatch
can do this already??
I've always used it to patch OTA manualy..
applypatch boot.img boot_new.img x y z:boot.img.p
x is the target(boot_new.img) sha1sum
y is the target(boot_new.img) new size
z is the source(boot.img) sha1sum
Obviously it will failed the cert test,
if the patch(boot.img.p) is not intended for the base(boot.img)
I can confirm that applypatch does have at least some success in patching a boot.img once you can figure out the information required from updater-script found in the OTA you are trying to make fastboot images for. I patched the file obtained by
dd if=/dev/block/mmcblk1p14 of=/sdcard-ext/b/boot.bin
on a 6.12.181 successfully using the code
applypatch ./boot.bin ./boot.bin.2 dd9310794842a4908aff55979a9fe97f825e8748 8388608 8e21cfa5d9be4dd08427b079fbff9a80d6e04560:boot.img.p
the code i ripped apart from 6.16.206 is
"-", dd9310794842a4908aff55979a9fe97f825e8748, 8388608,
to figure out the apply patch code i looked at the info above and compared it to this
[qoute]adb shell applypatch
usage: applypatch <src-file> <tgt-file> <tgt-sha1> <tgt-size> [<src-sha1>:<patch> ...]
or applypatch -c <file> [<sha1> ...]
or applypatch -s <bytes>
or applypatch -l
Filenames may be of the form
to specify reading from or writing to an MTD partition.[/quote] and with a little trial and error got it to work
Let me be clear the patched boot.bin.2 does flash perfectly fine. no preflash validation failure.
Anyone on 6.16.206 want to do me a favor and do?
dd if=/dev/block/mmcblk1p15 of=/sdcard-ext/b/recovery.bin
and email/upload it to me? I'll hit the thanks button