工具下载
百度网盘链接
解包
- Linux PC系统新建rkpack目录
- unpack.sh、rkImageMaker、afptool拷贝到同一目录rkpack
- 完整固件也拷贝到rkpack,并重命名成update.img
- 执行./unpack.sh
neardi-work-dir/rkpack$ ./unpack.sh
start to unpack update.img...
********rkImageMaker ver 2.0********
Unpacking image, please wait...
Exporting boot.bin
Exporting firmware.img
Unpacking image success.
Android Firmware Package Tool v2.0
Check file... OK
------- UNPACK ------
package-file offset=0x800 size=0x25D
Image/MiniLoaderAll.bin offset=0x1000 size=0x6D9C0
Image/parameter.txt offset=0x6F000 size=0x1F7
Image/uboot.img offset=0x6F800 size=0x400000
Image/misc.img offset=0x46F800 size=0xC000
Image/boot.img offset=0x47B800 size=0x25BAA00
Image/recovery.img offset=0x2A36800 size=0x2FE4A00
Image/rootfs.img offset=0x5A1B800 size=0x1095B7000
Unpack firmware OK!
------ OK ------
Unpacking update.img OK.
Press any key to quit: //点击回车退出
解压成功生成路径结构:
neardi-work-dir/rkpack$ tree
.
├── afptool
├── mkupdate.sh
├── output
│ ├── Image
│ │ ├── boot.img
│ │ ├── MiniLoaderAll.bin
│ │ ├── misc.img
│ │ ├── parameter.txt
│ │ ├── recovery.img
│ │ ├── rootfs.img
│ │ └── uboot.img
│ └── package-file
├── rkImageMaker
├── unpack.sh
└── update.img
打包
例如替换rootfs重新打包
- rootfs.img替换到
neardi-work-dir/rkpack/output/Image
目录(必须命名成rootfs.img替换进去)
- mkupdate.sh拷贝到
neardi-work-dir/rkpack/output
目录
- 进入
output
目录重新打包执行./mkupdate.sh
- 打包成功打印
neardi-work-dir/rkpack/$ cd output
neardi-work-dir/rkpack/output/$ ./mkupdate.sh
start to make update.img...
Android Firmware Package Tool v2.0
------ PACKAGE ------
Add file: ./package-file
package-file,Add file: ./package-file done,offset=0x800,size=0x28b,userspace=0x1
Add file: ./Image/MiniLoaderAll.bin
bootloader,Add file: ./Image/MiniLoaderAll.bin done,offset=0x1000,size=0x6d9c0,userspace=0xdc
Add file: ./Image/parameter.txt
parameter,Add file: ./Image/parameter.txt done,offset=0x6f000,size=0x203,userspace=0x1
Add file: ./Image/uboot.img
uboot,Add file: ./Image/uboot.img done,offset=0x6f800,size=0x400000,userspace=0x800
Add file: ./Image/misc.img
misc,Add file: ./Image/misc.img done,offset=0x46f800,size=0xc000,userspace=0x18
Add file: ./Image/boot.img
boot,Add file: ./Image/boot.img done,offset=0x47b800,size=0x25b9a00,userspace=0x4b74
Add file: ./Image/recovery.img
recovery,Add file: ./Image/recovery.img done,offset=0x2a35800,size=0x2fe3200,userspace=0x5fc7
Add file: ./Image/rootfs.img
rootfs,Add file: ./Image/rootfs.img done,offset=0x5a19000,size=0x3809b6000,userspace=0x70136c
Add file: ./Image/oem.img
oem,Add file: ./Image/oem.img done,offset=0x3863cf000,size=0x10a8000,userspace=0x2150
Add file: ./Image/userdata.img
userdata,Add file: ./Image/userdata.img done,offset=0x387477000,size=0x446000,userspace=0x88c
Add CRC...
Make firmware OK!
------ OK ------
********rkImageMaker ver 2.0********
Generating new image, please wait...
Writing head info...
Writing boot file...
Writing firmware...
Generating MD5 data...
MD5 data generated successfully!
New image generated successfully!
Making ./Image/update.img OK.
neardi-work-dir/rkpack/output/update.img
为更新rootfs后的完整固件