charles2gan / charles2gan/firmware-mod-kit
FMK won't extract zip compressed cramfs images?
- Dominant language
- C
- Stars
- 7
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
```
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
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with extract-firmware.sh and inspect how it handles the ZIP entries containing the cramfs images; the report shows extraction fails at offset 0 while manually unzipped images work. Then review build-firmware for the related repacking path. Done should mean the reported firmware can be extracted and the expected output format for rebuilding is documented or supported.
Written by the indexing model from the issue text.
Assessment
- Domain
- embedded-iot, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100