FORUMS

[TOOL][WIN,LIN,AND,DARW] Super image unpack tool

8,848 posts
Thanks Meter: 21,760
 
By munjeni, Senior Member on 21st June 2020, 06:30 PM
Post Reply Email Thread
Disclaimer:

Superunpack tool was made for testing and educational purposes, ME is not responsible for what you do on/with your device using superunpack, you must agree that you using superunpack on your own risk, I am not responsible for anything else!


How to use:

- First step, unpack super.sin using my tool or use @IgorEisberg unsin tool
- Step two, on windows just drag and drop unpacked super image onto our exe to start extraction. Also you can use it from command line, from script or from etc. On Linux use it from command line. No need to set slot like it was a case on lpunpack, our tool will auto extract all slot images for you, enjoy!



Platform:


- Superunpack is working on Windows, Linux, Android, Darwin11, just chose right superunpack binary.


Changelog:

- version 10 (21.Jun.2020), initial version
- version 11 (22.Jun.2020), dump file format detection, partition size correction in case ext4, partition group detection, have extraction progress bar, improvements


Credits:

- not right now


Source code:

- tool is based on just this header, the rest of things is myself implemented - hardcoded, no external libs, no android libs.
- my source code -> https://github.com/munjeni/super_image_dumper
Attached Files
File Type: rar super_image_unpacker.rar - [Click for QR Code] (1.39 MB, 52 views)
The Following 10 Users Say Thank You to munjeni For This Useful Post: [ View ] Gift munjeni Ad-Free
21st June 2020, 10:49 PM |#2  
bigrammy's Avatar
Senior Member
Flag huddersfield
Thanks Meter: 2,530
 
More
Quote:
Originally Posted by munjeni

hardcoded, no external libs, no android libs.
- my source code, later

Yet Another great tool!!
Thanks!
The Following User Says Thank You to bigrammy For This Useful Post: [ View ] Gift bigrammy Ad-Free
22nd June 2020, 03:29 PM |#3  
munjeni's Avatar
OP Senior Member
Thanks Meter: 21,760
 
Donate to Me
More
New version is out, v11, it now detect file format, partition size correction in case ext4, partition group detection, have extraction progress bar, and it looks like:

Code:
---------------------------------------------------------
Super image dumper v_11 (by expert :) munjeni @ xda 2020)
---------------------------------------------------------

LpMetadataGeometry magic = 0x616c4467
LpMetadataGeometry struct size = 0x34
LpMetadataGeometry sha256 = 12FF55F0ABA7B506F25CB5DA5DCA09344234E8DF1D9C93AE82A499D98019467E
LpMetadataGeometry metadata_max_size = 0x10000
LpMetadataGeometry metadata_slot_count = 0x3
LpMetadataGeometry logical_block_size = 0x1000

LpMetadataHeader magic = 0x414c5030
LpMetadataHeader major_version = 10
LpMetadataHeader minor_version = 0
LpMetadataHeader header_size = 0x80
LpMetadataHeader header sha256 = CCF4F5D07842AAAE7C1B87F0E025512CF7AEA426D477B1E5175DA3D74F9B1C8C
LpMetadataHeader tables_size = 0x2e8
LpMetadataHeader tables sha256 = 52578668F89D8BCDA1BD1F748F2F69ED874C10A7062C85EF9970EE05D90161B1
LpMetadataHeader partitions offset = 0x0
LpMetadataHeader partitions num_entries = 0x8
LpMetadataHeader partitions entry_size = 0x34
LpMetadataHeader extents offset = 0x1a0
LpMetadataHeader extents num_entries = 0x5
LpMetadataHeader extents entry_size = 0x18
LpMetadataHeader groups offset = 0x218
LpMetadataHeader groups num_entries = 0x3
LpMetadataHeader groups entry_size = 0x30
LpMetadataHeader block_devices offset = 0x2a8
LpMetadataHeader block_devices num_entries = 0x1
LpMetadataHeader block_devices entry_size = 0x40

Partitions = 5 used, 3 not used, total 8

  partition_1_name = system_a
    attributes = 0x1
    first_extent_index = 0x0
    num_extents = 0x1
    group_index = 0x1
    partition_group = somc_dynamic_partitions_a
    extent num_sectors = 0x336390 (0x66c72000 bytes total)
    extent target_type = 0x0
    extent target_data = 0x800 (dumping offset = 0x100000)
    extent target_source = 0x0
      Filetype EXT4. EXT4 size = 0x6526c000
      Dumping system_a.ext4 ...
      ....................................................
      ....................................................
      ....................................................
      ..............................................
  partition_2_name = system_b
    attributes = 0x1
    first_extent_index = 0x1
    num_extents = 0x1
    group_index = 0x2
    partition_group = somc_dynamic_partitions_b
    extent num_sectors = 0xab178 (0x1562f000 bytes total)
    extent target_type = 0x0
    extent target_data = 0x337000 (dumping offset = 0x66e00000)
    extent target_source = 0x0
      Filetype EXT4. EXT4 size = 0x150b3000
      Dumping system_b.ext4 ...
      ..........................................
  partition_3_name = product_a
    attributes = 0x1
    first_extent_index = 0x2
    num_extents = 0x1
    group_index = 0x1
    partition_group = somc_dynamic_partitions_a
    extent num_sectors = 0x2b62b8 (0x56c57000 bytes total)
    extent target_type = 0x0
    extent target_data = 0x3e2800 (dumping offset = 0x7c500000)
    extent target_source = 0x0
      Filetype EXT4. EXT4 size = 0x5565b000
      Dumping product_a.ext4 ...
      ....................................................
      ....................................................
      ....................................................
      ..............
  partition_4_name = product_b (not unused)
    attributes = 0x1
    first_extent_index = 0x3
    num_extents = 0x0
    group_index = 0x2
    partition_group = somc_dynamic_partitions_b
    extent num_sectors = NULL
    extent target_type = NULL
    extent target_data = NULL
    extent target_source = NULL
      Skipping dump.

  partition_5_name = vendor_a
    attributes = 0x1
    first_extent_index = 0x3
    num_extents = 0x1
    group_index = 0x1
    partition_group = somc_dynamic_partitions_a
    extent num_sectors = 0x186d58 (0x30dab000 bytes total)
    extent target_type = 0x0
    extent target_data = 0x699000 (dumping offset = 0xd3200000)
    extent target_source = 0x0
      Filetype EXT4. EXT4 size = 0x30141000
      Dumping vendor_a.ext4 ...
      ....................................................
      ............................................
  partition_6_name = vendor_b (not unused)
    attributes = 0x1
    first_extent_index = 0x4
    num_extents = 0x0
    group_index = 0x2
    partition_group = somc_dynamic_partitions_b
    extent num_sectors = NULL
    extent target_type = NULL
    extent target_data = NULL
    extent target_source = NULL
      Skipping dump.

  partition_7_name = odm_a
    attributes = 0x1
    first_extent_index = 0x4
    num_extents = 0x1
    group_index = 0x1
    partition_group = somc_dynamic_partitions_a
    extent num_sectors = 0xa60 (0x14c000 bytes total)
    extent target_type = 0x0
    extent target_data = 0x820000 (dumping offset = 0x104000000)
    extent target_source = 0x0
      Filetype EXT4. EXT4 size = 0x132000
      Dumping odm_a.ext4 ...

  partition_8_name = odm_b (not unused)
    attributes = 0x1
    first_extent_index = 0x5
    num_extents = 0x0
    group_index = 0x2
    partition_group = somc_dynamic_partitions_b
    extent num_sectors = NULL
    extent target_type = NULL
    extent target_data = NULL
    extent target_source = NULL
      Skipping dump.
Press any key to continue . . .
If you need to mount ext4 partition on Linux you need to mount partition RO or it will not mount!
The Following User Says Thank You to munjeni For This Useful Post: [ View ] Gift munjeni Ad-Free
22nd June 2020, 03:59 PM |#4  
munjeni's Avatar
OP Senior Member
Thanks Meter: 21,760
 
Donate to Me
More
I'm not one of those who make paid software and promote on xda, my work is always free. Even I'm always providing source code for free, source code of this tool is here -> https://github.com/munjeni/super_image_dumper , enjoy!
The Following 8 Users Say Thank You to munjeni For This Useful Post: [ View ] Gift munjeni Ad-Free
26th June 2020, 09:26 PM |#5  
bigrammy's Avatar
Senior Member
Flag huddersfield
Thanks Meter: 2,530
 
More
Quote:
Originally Posted by munjeni

I'm not one of those who make paid software and promote on xda, my work is always free. Even I'm always providing source code for free, source code of this tool is here -> https://github.com/munjeni/super_image_dumper , enjoy!

You are the best and I and many others thank you for make life so easy for us.
PS: I will send you a PM with something you may find interesting and useful.
The Following User Says Thank You to bigrammy For This Useful Post: [ View ] Gift bigrammy Ad-Free
30th June 2020, 03:55 PM |#6  
paijoe88's Avatar
Member
Flag surabaya
Thanks Meter: 9
 
More
Can I make this tool for remake oem.sin?
I have fw Xperia docomo bundling,and many bloatware,so I wont to remake oem.sin and deleted any bloatware, can I?


🙏🏻sorry my English por🙏🏻🙏🏻
30th June 2020, 05:12 PM |#7  
munjeni's Avatar
OP Senior Member
Thanks Meter: 21,760
 
Donate to Me
More
Quote:
Originally Posted by paijoe88

Can I make this tool for remake oem.sin?
I have fw Xperia docomo bundling,and many bloatware,so I wont to remake oem.sin and deleted any bloatware, can I?


🏻sorry my English por🏻🏻

No you can't. Tool is unpacker only, it extracts oem from super image but doesn't reconstruct it back to super image. Even there is no known tool to make valid sin back because of signature.
3rd July 2020, 03:30 PM |#8  
munjeni's Avatar
OP Senior Member
Thanks Meter: 21,760
 
Donate to Me
More
Seems readonly partitions like oem, system, vendor...etc can be set to read-write mode via LP_PARTITION_ATTR overiding LpMetadataPartition.attributes 1 with 0. Anybody tried android version of this tool? E.g. dump block device e.g. /dev/block/bootdevice/super

RO flags (0x1), when it is set to 0x0 its RW mode, but header sha256 checksums of the LpMetadataGeometry and LpMetadataHeader also need to be modified in case we overvrite flags with RW mode!
Code:
Offset(h)  00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F

000003080  73 79 73 74 65 6D 5F 61 00 00 00 00 00 00 00 00  system_a........
000003090  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0000030A0  00 00 00 00 01 00 00 00 00 00 00 00 01 00 00 00  ................
0000030B0  01 00 00 00 73 79 73 74 65 6D 5F 62 00 00 00 00  ....system_b....
0000030C0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0000030D0  00 00 00 00 00 00 00 00 01 00 00 00 01 00 00 00  ................
0000030E0  01 00 00 00 02 00 00 00 70 72 6F 64 75 63 74 5F  ........product_
0000030F0  61 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  a...............
000003100  00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00  ................
000003110  02 00 00 00 01 00 00 00 01 00 00 00 70 72 6F 64  ............prod
000003120  75 63 74 5F 62 00 00 00 00 00 00 00 00 00 00 00  uct_b...........
000003130  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
000003140  01 00 00 00 03 00 00 00 00 00 00 00 02 00 00 00  ................
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes