• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

[TOOL][WIN,LIN,AND,DARW] Super image tools | extract or make partitions RW in super partition

Search This thread

svoc

Member
Oct 5, 2015
43
19
Moto E6
Moto G9 Power
Moto g play 2021 no errors stuck on boot screen and if I do product_a I get boot but no settings page and lot of system apps don't work
 

Attachments

  • script.log
    523 bytes · Views: 11

svoc

Member
Oct 5, 2015
43
19
Moto E6
Moto G9 Power
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/: 3520/3584 files (34.7% non-contiguous), 209394/210597 blocks
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/: 3520/3584 files (34.7% non-contiguous), 209394/210597 blocks
 

Pachacouti

Senior Member
Jul 8, 2020
390
78
52
The Capital above the Lower one...
See post 8.

In most case if you change those byte vbmeta protection will do a bootloop, so I think no way to set it to force rw except if you unlock bootloader and disable vbmeta protection trought fastboot (more info -> https://forum.xda-developers.com/t/tool-newflasher-xperia-command-line-flasher.3619426/post-84509179)
You dont diasble vbmeta to change system properties, messin with vbmeta causes the ro when tampered with needing this or that, instead, use boot-debug.img from android 10 which allows read write cause it's your debug, if you've android 10. Simple. No root. Mount rw works.

Only works with no magisk, and vbmeta best bein legit..
 

munjeni

Senior Member
Jun 2, 2011
9,454
22,047
You dont diasble vbmeta to change system properties, messin with vbmeta causes the ro when tampered with needing this or that, instead, use boot-debug.img from android 10 which allows read write cause it's your debug, if you've android 10. Simple. No root. Mount rw works.

Only works with no magisk, and vbmeta best bein legit..
If I understand right you say RW works without need for any tool? Just installing boot debug image to get rw? Can you post your boot debug image?
 

Pachacouti

Senior Member
Jul 8, 2020
390
78
52
The Capital above the Lower one...
If I understand right you say RW works without need for any tool? Just installing boot debug image to get rw? Can you post your boot debug image?
Sure... I'm on an Ulefone Armor x5 Pro mt6765/6762, Android 10_Q stock. NOT PIE, arrm64-v8a A-only system-as-root

Firmware is after sales, I broke into this fn using a note9 recovery... This forced me to look for an engineer bootloader, and guess what? the boot-debug.img found in most ulefone firmware comes rooted! there never was reason to root! Magisk WI|LL kill this, but it's really the other way round... to keep stock, you CANT use magisk.

Just flash boot-debug to boot, stock vbmeta etc, check size of bootloader, mine is 32mb.

System_As_Root means no root required, it's just understanding variant=eng is a no go since android 10, but the note9 (origionally android 9) uses same mt so same commands for me in android 10 got me in to discover the boot-debug IS android 10 root, but need the user-debug to have FULL root, which no longer works, because the user-debug img's wont let fone on network until removed from fone, so I've heard...

Could really do wiith this having supersu or busybox added instead of magisk, but then, is it actually needed? no offence magisk, but after finding this, I can honestly say... I Killed magisk like magisk kills su...

Ps, I'll prove it, with an overdue reflash only this time instead of systemrw1.32, I'll try your script, wont settle until I see the system adapt to space changes. But take my word for it, do whatever on a fone with NO magisk, if we can add su to this, it would be true root designed for each and every fone!!

Read:


Ps, if you could make your script adapt to space change's, I'm up for testing an updated for 10-11-12 script that can adapt to system changes made by you using the boot-debug... thanks...

Ps, to all other testers, you need stock for this to work.

Stock = NO magisk.
 

Attachments

  • boot-debug.img
    32 MB · Views: 6
Last edited:

munjeni

Senior Member
Jun 2, 2011
9,454
22,047
Man you are in wrong thread! This tool inside this thread is related to superparition! Your phone do not have superpartition. And thats nothing new having root on eng builds
 

Pachacouti

Senior Member
Jul 8, 2020
390
78
52
The Capital above the Lower one...
Man you are in wrong thread! This tool inside this thread is related to superparition! Your phone do not have superpartition. And thats nothing new having root on eng builds
I'm not in wrong thread, I posted to you after the op of systemrw1.32 sent me here, then you ask for a debug, while I'm still looking to keep my system partition read write without magisk... I figure since the guy who sent me here says you know your stuff, that I should at least show you why certain things are failing.

You see, using magisk, you are writing to an overlaid filesystem, so people actually write to the overlaid filesystem when using magisk, irelevant of wether who-ever's script grants access to the actual system partition or not.

If you check my thread, YOU are wrong. I know MY fone.

By meddling with vbmeta (ie, blank them) MAGISK FORCES writing to overlaid filesystem, which, like windows 98se, wont write to actual ro partition until a reboot...

So is John Wu correct or not? Can we write to an ro system?

Sure... using your script, or someone else's.. who's is a remix of your's. I'm NOT in the wrong thread, and thank you for failing to mention to all that we dont need this script when using boot-debug.img.

I guess your magisk'd...

;)

Soz for mentioning what you clearly never knew before you asked...

Cant believe you think I have no super partition after me stating what fone I have... says it all really..

Clearly in wrong thread... my apologies...
 
Last edited:

munjeni

Senior Member
Jun 2, 2011
9,454
22,047
I still not understand what you need. Its well known having root by enabling adb root inside ramdisk. Also if you have recovery you have root that way too. Magisk is diferent story, its used for systemless things not just for root. Question is what you want to do?
 
Last edited:

Pachacouti

Senior Member
Jul 8, 2020
390
78
52
The Capital above the Lower one...
I have found away to resize partitions to use 100% of space freed up if we say delete other partitions on the fly, within the super, the op of system_1.32 used your work, which I only found after he pointed me in your direction, me, I could do with the three partitions doing this, as welll as the super itself..?

It's a race now tho lol ;)

I think your version would work better being for my fone, being an arm64 -v8a, because mine seems to be quite picky because I want to do my fone without magisk, and this helps with the rw... your about to get busy lol, others will be after this shortly ...

And just for the record, so many people read about magisk before discovering that since Pie, Android/google is killing root apps by GIVING us root OVER our overlaid filesystems, this is already obvious when recovery.img does not give root access, but boot-debug.img GIVES root as opposed to earlier 'recoveries' that did pretty much everything to force us to use root apps... Not one person posted this fact when I went on about variant=eng being removed from android since android 10, provable by both boot, and boot-debug both showing variant =user when opened in hex... and googles confirmation that variant=eng are being removed perm. Identical files that are NOT identical... if anyone here knew before I found it, it would have been written of by now...

I'm just happy discovering I never needed root, we need a thread on this alone...
 
Last edited:

hendrysetiadi

Member
Apr 12, 2021
6
0
hi, munjeni...
i want to try your tools on my amlogic s905x2 box running android 10 stock firmware (not rooted). if using systemrw script from lebigmac, i'm afraid there's not enough space on the device itself while it's using only 8gb rom & 2gb ram.
can u comment what i must do on step by step is correct or not?
1. unlock bootloader?
2. install magisk?
3. patch boot.img and install it?
4. run your tools?
or without installing magisk, can just running your tools?
and can u help me how i replace stock recovery to twrp? any guide on this?
 

lookeye

New member
Oct 16, 2021
1
0
Disclaimer:

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


How to use superunpack:

- First step, unpack super.sin using my tool or use @IgorEisberg unsin tool
- Step two, Superunpack. 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!
- If you need to unpack partition images in RW mode add parameter 1 at the end of command line e.g. "superunpack super.img 1", than resize partition using resize2fs, repair and unshare blocks using e2fsck. Or if you unpack without rw you no need to resize or repair it, just mount it ro.

Note that, superunpack is a tool for extract all logical partitions from super image or directly from super partition.

How to use superrepack:

adb push superrepack.arm64_pie /data/local/tmp
adb shell
su
cd /data/local/tmp
mv superrepack.arm64_pie superrepack
chmod 755 superrepack
stop
./superrepack /dev/block/bootdevice/by-name/super system_a
sync
reboot

Note that, superrepack is a tool to convert logical RO partitions iside your phone super partition to RW mode without extracting anything, all things is done on the fly directly inside super partition/image! In this example system_a partiton is converted to the rw mode, if you need other partitions to rw just change system_a argument. Or if you need all partitions to rw mode do it without partition rw argumet e.g: "./superrepack /dev/block/bootdevice/by-name/super". YOU MUST RUN TOOL 4-5 TIMES UNTIL ALL ERRORS DISAPEARS!!! One of the well known errors is: "Couldn't clone file: Could not allocate block in ext2 filesystem". Look at /data/local/tmp/script.log each time and make sure it not contain any error otherwise you are not done things right and partition is not repaired yet!!! More info -> https://forum.xda-developers.com/t/...s-rw-in-super-partition.4120963/post-84966715

Platform:

- Superunpack is working on Windows, Linux, Android, Darwin11, just chose right binary.
- Superrepack is working only under android


Changelog:

- version 1 (21.Jun.2020), initial version
- version 1.1 (22.Jun.2020), dump file format detection, partition size correction in case ext4, partition group detection, have extraction progress bar, improvements
- version 2 (03.04.2021) implemented possibility to extract partition images to rw mode using Superunpack & I have made new tool called Superrepack
- version 2 (04.04.2021) implemented arguments so you would do conversion on single partition instead of doing it on all partitions
- version 3 (04.04.2021) implemented return codes and implemented output logs to be more scripting friendly
- version 4 - not released
- version 5 (08.04.2021) implemented resize and repair partitions after switching to rw mode. Implemented build script for building resize2fs, e2fsck, simg2ims, img2simg, lptools
- version 6 (08.04.2021) better loop device detection and setup
- version 7 (08.04.2021) fix selinux status detection
- version 8 (15.04.2021) fix loop device setup in superrepack
- version 9 (16.04.2021) make losetup android compatible
- version 10 - not released
- version 11 (01.05.2021) simplified, removed needs for parameter rw, implemented dm-verity disabler
- version 12 (05.05.2021) make old logs always deleted before fresh log is created, this prevent concentation with old logs
- version 13 (06.05.2021) make linux version so you should do the things on your super partition dump in linux machine
- version 14 (07.05.2021) fix compilation mess between linux and android
- version 15 (08.05.2021) use libselinux to determine and set selinux to permissive mode instead of popening getenforce-setenforce tools

Credits:

- me and me :)


Source code:

- source code -> https://github.com/munjeni/super_image_dumper
good
 

munjeni

Senior Member
Jun 2, 2011
9,454
22,047
hi, munjeni...
i want to try your tools on my amlogic s905x2 box running android 10 stock firmware (not rooted). if using systemrw script from lebigmac, i'm afraid there's not enough space on the device itself while it's using only 8gb rom & 2gb ram.
can u comment what i must do on step by step is correct or not?
1. unlock bootloader?
2. install magisk?
3. patch boot.img and install it?
4. run your tools?
or without installing magisk, can just running your tools?
and can u help me how i replace stock recovery to twrp? any guide on this?
I can sugest you ask somebody with the same device, I don't know what you need to do. And instead of our tool do it with systemrw script from lebigmac
 
  • Haha
Reactions: lebigmac

tids2k

Senior Member
Apr 21, 2009
2,611
876
Sydney
Google Pixel 6 Pro
Hello @munjeni i thank you for the tool. As instructed please find the ls_after and ls_before files. Please note i have sent the links in a PM to you as they contain some sensitive information regarding the device. I had the same result like @Pachacouti , on restart there is a kernel panic which goes into endless bootloops. @lebigmac has been trying to help as well with the script but it appears that I have the same error, issue ( bootloops ) as when running his script. So in short it appears that the script works properly, the issue could be related to a permissive or enforcing nature of the kernel or the verity issue. Hopefully once you look at the logs, more light could be shed.

My device is a Google Pixel 6 Pro and on Android 12 with dynamic partitions.
 
  • Wow
Reactions: lebigmac

munjeni

Senior Member
Jun 2, 2011
9,454
22,047
Hello @munjeni i thank you for the tool. As instructed please find the ls_after and ls_before files. Please note i have sent the links in a PM to you as they contain some sensitive information regarding the device. I had the same result like @Pachacouti , on restart there is a kernel panic which goes into endless bootloops. @lebigmac has been trying to help as well with the script but it appears that I have the same error, issue ( bootloops ) as when running his script. So in short it appears that the script works properly, the issue could be related to a permissive or enforcing nature of the kernel or the verity issue. Hopefully once you look at the logs, more light could be shed.

My device is a Google Pixel 6 Pro and on Android 12 with dynamic partitions.
Hello, can you send me ls after and ls before logs?
 

Top Liked Posts

  • There are no posts matching your filters.
  • 33
    Disclaimer:

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


    How to use superunpack:

    - First step, unpack super.sin using my tool or use @IgorEisberg unsin tool
    - Step two, Superunpack. 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!
    - If you need to unpack partition images in RW mode add parameter 1 at the end of command line e.g. "superunpack super.img 1", than resize partition using resize2fs, repair and unshare blocks using e2fsck. Or if you unpack without rw you no need to resize or repair it, just mount it ro.

    Note that, superunpack is a tool for extract all logical partitions from super image or directly from super partition.

    How to use superrepack:

    adb push superrepack.arm64_pie /data/local/tmp
    adb shell
    su
    cd /data/local/tmp
    mv superrepack.arm64_pie superrepack
    chmod 755 superrepack
    stop
    ./superrepack /dev/block/bootdevice/by-name/super system_a
    sync
    reboot

    Note that, superrepack is a tool to convert logical RO partitions iside your phone super partition to RW mode without extracting anything, all things is done on the fly directly inside super partition/image! In this example system_a partiton is converted to the rw mode, if you need other partitions to rw just change system_a argument. Or if you need all partitions to rw mode do it without partition rw argumet e.g: "./superrepack /dev/block/bootdevice/by-name/super". YOU MUST RUN TOOL 4-5 TIMES UNTIL ALL ERRORS DISAPEARS!!! One of the well known errors is: "Couldn't clone file: Could not allocate block in ext2 filesystem". Look at /data/local/tmp/script.log each time and make sure it not contain any error otherwise you are not done things right and partition is not repaired yet!!! More info -> https://forum.xda-developers.com/t/...s-rw-in-super-partition.4120963/post-84966715

    Platform:

    - Superunpack is working on Windows, Linux, Android, Darwin11, just chose right binary.
    - Superrepack is working only under android


    Changelog:

    - version 1 (21.Jun.2020), initial version
    - version 1.1 (22.Jun.2020), dump file format detection, partition size correction in case ext4, partition group detection, have extraction progress bar, improvements
    - version 2 (03.04.2021) implemented possibility to extract partition images to rw mode using Superunpack & I have made new tool called Superrepack
    - version 2 (04.04.2021) implemented arguments so you would do conversion on single partition instead of doing it on all partitions
    - version 3 (04.04.2021) implemented return codes and implemented output logs to be more scripting friendly
    - version 4 - not released
    - version 5 (08.04.2021) implemented resize and repair partitions after switching to rw mode. Implemented build script for building resize2fs, e2fsck, simg2ims, img2simg, lptools
    - version 6 (08.04.2021) better loop device detection and setup
    - version 7 (08.04.2021) fix selinux status detection
    - version 8 (15.04.2021) fix loop device setup in superrepack
    - version 9 (16.04.2021) make losetup android compatible
    - version 10 - not released
    - version 11 (01.05.2021) simplified, removed needs for parameter rw, implemented dm-verity disabler
    - version 12 (05.05.2021) make old logs always deleted before fresh log is created, this prevent concentation with old logs
    - version 13 (06.05.2021) make linux version so you should do the things on your super partition dump in linux machine
    - version 14 (07.05.2021) fix compilation mess between linux and android
    - version 15 (08.05.2021) use libselinux to determine and set selinux to permissive mode instead of popening getenforce-setenforce tools

    Credits:

    - me and me :)


    Source code:

    - source code -> https://github.com/munjeni/super_image_dumper
    16
    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! ;)
    3
    Version 7 is out! V6 had error detecting slinux status. I do not have device with super partition for test my tool but I have only hope that all is ok. Let me know! :)
    3
    Pixel 4a, working. V13
    2
    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!