Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#Help# E: magic num mismatch #8

Open
12281001 opened this issue Nov 28, 2018 · 8 comments
Open

#Help# E: magic num mismatch #8

12281001 opened this issue Nov 28, 2018 · 8 comments

Comments

@12281001
Copy link

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
Copy link
Owner

nlitsme commented Nov 29, 2018

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
Copy link
Author

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
Copy link
Author

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
Copy link
Owner

nlitsme commented Nov 29, 2018

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
Copy link
Author

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

@jc10
Copy link

jc10 commented Jan 3, 2019

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

@mcr-ksh
Copy link

mcr-ksh commented Apr 5, 2020

is there any progress on this one?

@t-hg
Copy link

t-hg commented May 25, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants