Question [SOLVED] How to extract files from super.img?

Search This thread

MrCrayon

Senior Member
Sep 6, 2013
193
60
Xiaomi Redmi Note 4
Lenovo P11
I am using global ROM in TB-J706F but I wanted to extract the original wallpaper from chinese ROM, so I downloaded the one available in lolinet.

Then I did (I am using Linux):
  1. Extract files
  2. Merge super_* to a single file with
    Bash:
    cat super_1.img super_2.img super_3.img super_4.img > super.img
  3. Extract system_a.img with
    Bash:
    lpunpack -p system_a super.img ./super
Now I don't know how to mount system_a.img, this is what I tried:
Bash:
> simg2img super/system_a.img super/system_a.ext4.img
Invalid sparse file format at header magic
Failed to read sparse file
Bash:
> sudo mount -t ext4 -o loop super/system_a.img ./system
mount: ./system: wrong fs type, bad option, bad superblock on /dev/loop2, missing codepage or helper program, or other error.

Bash:
> file super/system_a.img
super/system_a.img: data

What am I missing?

P.S.
Anyway if someone has the wallpaper and can upload it somewhere would be great.
 

mardon85

Senior Member
Jan 8, 2009
546
80
Manchester
I am using global ROM in TB-J706F but I wanted to extract the original wallpaper from chinese ROM, so I downloaded the one available in lolinet.

Then I did (I am using Linux):
  1. Extract files
  2. Merge super_* to a single file with
    Bash:
    cat super_1.img super_2.img super_3.img super_4.img > super.img
  3. Extract system_a.img with
    Bash:
    lpunpack -p system_a super.img ./super
Now I don't know how to mount system_a.img, this is what I tried:
Bash:
> simg2img super/system_a.img super/system_a.ext4.img
Invalid sparse file format at header magic
Failed to read sparse file
Bash:
> sudo mount -t ext4 -o loop super/system_a.img ./system
mount: ./system: wrong fs type, bad option, bad superblock on /dev/loop2, missing codepage or helper program, or other error.

Bash:
> file super/system_a.img
super/system_a.img: data

What am I missing?

P.S.
Anyway if someone has the wallpaper and can upload it somewhere would be great.


Have you read the link below?

 

MrCrayon

Senior Member
Sep 6, 2013
193
60
Xiaomi Redmi Note 4
Lenovo P11
Have you read the link below?

Yes, I got some of the commands from there, as far as I understand what they do there is aimed to mount system rw so I shouldn't need it, I tried to mount read only and it gives the same error.

Also I cannot use resize2fs or e2fsck because it's not recognized as an image, I get:
Bad magic number in super-block

I think system_a.img needs an additional step but it's not even compressed, so I'm stuck.
 

MrCrayon

Senior Member
Sep 6, 2013
193
60
Xiaomi Redmi Note 4
Lenovo P11
Ok, I solved it.

It was actually very easy, starting from the ROM:
  1. Extract files
  2. Mount super_2.img for system with:
    Bash:
    sudo mount -t ext4 -o ro,loop super_2.img ./system
The trick is that it needs to be mounted read only with ro.
 
Last edited:

MrCrayon

Senior Member
Sep 6, 2013
193
60
Xiaomi Redmi Note 4
Lenovo P11
Yes, it was in system/media/wallpaper.
 

Attachments

  • wallpaper.png
    wallpaper.png
    15.9 MB · Views: 24
  • Like
Reactions: mardon85

Top Liked Posts