Thursday, November 28, 2013

Rockchip unpack/repack boot.img

UNPACKING
rkunpack boot.img
mkdir boot-extracted
cd boot-extracted
cat ../boot.img-raw | gunzip | cpio -i

REPACK
find . | cpio -o -H newc | gzip > ../newboot.img
rkcrc -k newboot.img newboot-signed.img



#ALTERNATE METHOD

#UNPACK
dd if=boot.img of=boot.img.gz skip=8 bs=1 count=100000000000
gunzip boot.img.gz
mkdir unpacked
cd unpacked
cpio -i <../boot.img

#PACK
cd unpacked
find . | xargs -I file touch -d "1970-01-01 01:00" file
find . | cpio -o -H newc | gzip -n >../newboot.img.gz
rkcrc -k newboot.img.gz newboot.img

https://sites.google.com/site/embedheadfiles/multiboot-rk2928-extsd-SIGNED-v0.8.img

2 comments:

  1. How could I get "rkunpack" this tool ?

    ReplyDelete
  2. Check this github repo: https://github.com/naobsd/rkutils

    ReplyDelete