diff --git a/META-INF/com/google/android/updater-script b/META-INF/com/google/android/updater-script index 4878f7a..a2dbf08 100644 --- a/META-INF/com/google/android/updater-script +++ b/META-INF/com/google/android/updater-script @@ -8,10 +8,11 @@ ui_print("Extracting Kernel files..."); package_extract_dir("kernel", "/tmp"); ui_print("Installing kernel..."); set_perm(0, 0, 0777, "/tmp/dump_image"); +set_perm(0, 0, 0777, "/tmp/mkflashnewboot.sh"); set_perm(0, 0, 0777, "/tmp/mkbootimg"); set_perm(0, 0, 0777, "/tmp/unpackbootimg"); run_program("/tmp/dump_image", "boot", "/tmp/boot.img"); run_program("/tmp/unpackbootimg", "/tmp/boot.img", "/tmp/"); -run_program("sh", "-c", "/tmp/mkbootimg --kernel /tmp/zImage --ramdisk /tmp/boot.img-ramdisk.gz --cmdline $(cat /tmp/boot.img-cmdline) --base $(cat /tmp/boot.img-base) --output /tmp/newboot.img"); +run_program("/tmp/mkflashnewboot.sh"); write_raw_image("/tmp/newboot.img", "boot"); ui_print("Done!"); diff --git a/kernel/mkflashnewboot.sh b/kernel/mkflashnewboot.sh new file mode 100644 index 0000000..8942ad5 --- /dev/null +++ b/kernel/mkflashnewboot.sh @@ -0,0 +1,7 @@ +#!/sbin/sh +echo \#!/sbin/sh > /tmp/flashnewboot.sh +echo /tmp/mkbootimg --kernel /tmp/zImage --ramdisk /tmp/boot.img-ramdisk.gz --cmdline \"$(cat /tmp/boot.img-cmdline)\" --base $(cat /tmp/boot.img-base) --output /tmp/newboot.img >> /tmp/flashnewboot.sh +echo sync >> /tmp/flashnewboot.sh +chmod 777 /tmp/flashnewboot.sh +/tmp/flashnewboot.sh +return $? \ No newline at end of file