unmk2 / firmware-mod-kit

Automatically exported from code.google.com/p/firmware-mod-kit
0 stars 0 forks source link

FMK won't extract zip compressed cramfs images? #148

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Important: This is not a router firmware.
I'm trying to mod a Digital Video Recorder, h264DVR.
I'm aware that this tool wasn't coded exactly for this kind of situation.
But perhaps you might help me?

What steps will reproduce the problem?

king@castle:~/fmk$ ./extract-firmware.sh myfirmware.bin 

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...

What version of the product are you using? On what operating system?

Please provide any additional information below.

I can get the script to work once I manually unzip the .bin file.

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...

I'm not sure how to proceed on repacking it, since build-firmware will always 
result in a .bin file (I guess I need an .img one?)

Sorry for the newbieness. ._.

Original issue reported on code.google.com by pe...@uesb.edu.br on 18 Aug 2015 at 5:18