如何使用固件Mod Kit重新打包自定义固件?

时间:2015-08-18 04:53:19

标签: filesystems customization extract mount firmware

我一直试图修改数字视频录像机的默认固件只是因为它的闪屏徽标,非常明亮,每次我在晚上打开它时几乎让我失明。

我尝试使用固件Mod Kit从二进制文件中提取固件。我最终得到了一些zip压缩文件,而不是遇到壁球或补习文件系统。这是一些输出:

Scan Time:     2015-08-17 23:28:44
Signatures:    193
Target File:   /home/king/fmk/myfirmware.bin
MD5 Checksum:  [omitted]

DECIMAL       HEX           DESCRIPTION
-------------------------------------------------------------------------------------------------------
0             0x0           Zip archive data, at least v2.0 to extract, compressed size: 2118527, uncompressed size: 2154560, name: "custom-x.cramfs.img"  
2118597       0x2053C5      Zip archive data, at least v2.0 to extract, compressed size: 2928495, uncompressed size: 2932800, name: "user-x.cramfs.img"  
5047160       0x4D0378      Zip archive data, at least v2.0 to extract, compressed size: 2424987, uncompressed size: 2445376, name: "romfs-x.cramfs.img"  
7472216       0x720458      Zip archive data, at least v2.0 to extract, compressed size: 18725, uncompressed size: 20544, name: "logo-x.cramfs.img"  
7491009       0x724DC1      Zip archive data, at least v2.0 to extract, compressed size: 141, uncompressed size: 354, name: "InstallDesc"  
7491611       0x72501B      End of Zip archive

Extracting 0 bytes of zip header image at offset 0
ERROR: No supported file system found! Aborting...

但是,如果我解压缩二进制文件,我可以让FMK提取我真正想要更改的唯一文件:logo-x.cramfs.img

king@castle:~/fmk$ ./extract-firmware.sh logo-x.cramfs.img:

Firmware Mod Kit (extract) 0.99, (c)2011-2013 Craig Heffner, Jeremy Collake

Preparing tools ...
Scanning firmware...

Scan Time:     2015-08-18 00:19:50
Signatures:    193
Target File:   /home/king/fmk/logo-x.cramfs.img
MD5 Checksum:  [omitted]

DECIMAL       HEX           DESCRIPTION
-------------------------------------------------------------------------------------------------------
0             0x0           uImage header, header size: 64 bytes, header CRC: 0x94AD77F7, created: Sun May 26 23:46:43 2013, image size: 20480 bytes, Data Address: 0x10770000, Entry Point: 0x10780000, data CRC: 0x8EDB113D, OS: Linux, CPU: ARM, image type: Standalone Program, compression type: gzip, image name: "linux"
64            0x40          CramFS filesystem, little endian size 20480 version #2 sorted_dirs CRC 0xbda508c, edition 0, 5 blocks, 2 files  

Extracting 64 bytes of uimage header image at offset 0
Extracting cramfs file system at offset 64
Extracting CramFS file system...

现在我不知道该怎么办。 build-firmware脚本不会将它重新安装回.img文件,即使是这样,我也无法重新打包初始二进制文件,因为我不得不手动提取它而不是通过extract-firmware脚本

思考?我真的不想把我的dvr搞砸,几乎放弃了。任何有用的评论都非常感谢。

1 个答案:

答案 0 :(得分:0)

在fmk中,这是不可能的。 这是一个更复杂的过程,因为你需要生成标题...这里的所有步骤: http://sysmagazine.com/posts/213411/