nlitsme / ubidump

Tool for viewing and extracting files from an UBIFS image
MIT License
229 stars 60 forks source link

#Help# E: magic num mismatch #8

Open 12281001 opened 5 years ago

12281001 commented 5 years ago

I need to extract files from a ubi image. I use command: python ubidump.py 205108.ubi -s save but I got this result: ==> 205108.ubi <== 1 named volumes found, 2 physical volumes, blocksize=0x20000 == volume app == E: magic num mismatch

I had checked the ubi image, there were some "UBI#". I don't know how to solve it? Could you help me? 205108.zip

nlitsme commented 5 years ago

Thanks for the sample file, this will help me improve my tool.

The problem is that the volume does not contain a UbiFs filesystem, but a SquashFs filesystem. I'll have to add an option to either extract raw volumes, or specify a filesystem type.

12281001 commented 5 years ago

Thank you very much. I hope you can add the option you mentioned. BTW, do you have any advice to help me to solve this problem? Thanks

12281001 commented 5 years ago

Hi, I used “file 205108.ubi”, the result was "205108.ubi: UBI image, version 1". And I used "unsquashfs 205108.ubi" to unpack, but got the result: Can't find a SQUASHFS superblock on 205108.ubi I don't think 205108.ubi is a SquashFs filesystem. What should I do? Please help! Thanks

nlitsme commented 5 years ago

it is because the '205108.ubi' file a ubifs block image, containing the squashfs volume, i first need to create an option to extract it before you can use unsquashfs on it.

12281001 commented 5 years ago

Yeah, there is a squashfs volume! I have used ubi_read to finish it! Thank you for your advice!

jc10 commented 5 years ago

Hi nlitsme and 12281001, I am facing the same issue, may I ask how to extract the squashfs vol in it? Thanks!

mcr-ksh commented 4 years ago

is there any progress on this one?

t-hg commented 3 years ago

Hmm... I think what 12281001 meant is the following.
You can use ubireader_extract_images from https://github.com/jrspruitt/ubi_reader.
This will extract the squashfs. Then you can extract it further with unsquashfs. This seemed to work for me.