ubidump icon indicating copy to clipboard operation
ubidump copied to clipboard

#Help# E: magic num mismatch

Open 12281001 opened this issue 5 years ago • 8 comments

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

12281001 avatar Nov 28 '18 14:11 12281001

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.

nlitsme avatar Nov 29 '18 08:11 nlitsme

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 avatar Nov 29 '18 09:11 12281001

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

12281001 avatar Nov 29 '18 10:11 12281001

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.

nlitsme avatar Nov 29 '18 11:11 nlitsme

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

12281001 avatar Nov 29 '18 14:11 12281001

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

jc10 avatar Jan 03 '19 05:01 jc10

is there any progress on this one?

mcr-ksh avatar Apr 05 '20 17:04 mcr-ksh

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.

t-hg avatar May 25 '21 20:05 t-hg