- Download some file
repack-bootimg.pl
unpack-bootimg.pl
split_bootimg.pl - Dump boot.img from device
cat /dev/mtd/mtd2 > /sdcard/boot.img - Un-pack boot.img
./split_bootimg.pl boot.img - Extract the ramdisk.
mkdir ramdisk
cd ramdisk
gzip -dc ../boot.img-ramdisk.gz | cpio -i
cd .. - Recreate ramdisk (the mkbootfs binary produced from building the Android source code)
mkbootfs ./ramdisk | gzip > ramdisk-new.gz - Re-pack boot.img
mkbootimg --cmdline 'no_console_suspend=1 console=null' --base 0x20000000 --kernel boot.img-kernel --ramdisk ramdisk-new.gz -o boot-new.img
For Nexus One : Add --base 0x20000000 to mkbootimg command-line.
(Note: the console=null command line option was introduced in the TC4-RC30 boot images to remove the root shell (TODO: add link)) - Flashing your new image back onto the phone
adb push ./mynewimage.img /sdcard
(android shell) cat /dev/zero > /dev/mtd/mtd2
write: No space left on device [this is ok, you can ignore]
(android shell) flash_image boot /sdcard/boot-new.img - Reboot
Reference:
沒有留言:
張貼留言