[Closed] Universal SystemRW / SuperRW feat. MakeRW / ro2rw (read-only-2-read/write super partition converter)

Status
Not open for further replies.
Search This thread

nttuan

Member
Jan 26, 2018
43
11
I tried version 1.22 and still the same issue. Please see the attached files.
 

Attachments

  • lpdump.txt
    3.2 KB · Views: 30
  • myargs.txt
    1.6 KB · Views: 30
  • recovery.log
    34 KB · Views: 30
  • Wow
Reactions: lebigmac

lebigmac

Account currently disabled
Jan 31, 2017
1,342
994
@nttuan can you successfully run lpmake command manually?
Check the excellent Brepro1 tutorial and the excellent AndyYan tutorial on how to do this. Thanks.

@nttuan I have a possible solution for you. Check your PM
 
Last edited:

kory-vadim

Member
Dec 12, 2016
21
16
@nttuan can you successfully run lpmake command manually?
Check the excellent Brepro1 tutorial and the excellent AndyYan tutorial on how to do this. Thanks.

@nttuan I have a possible solution for you. Your group size is not large enough to fit all the individual partitions inside in raw format. The solution is to convert all files into sparse before running lpmake command.
This is easier said than done though. I know it's possible because I've done it before in version 1.04 and earlier but right now I'm facing this problem:

Code:
lpmake --metadata-size 65536 --super-name super --metadata-slots 2 --sparse --output ./super_fixed.bin --device super:8589934592 --group qti_dynamic_partitions:8254596872 --image system=./system_sparse.img --partition system:none:2771027928:qti_dynamic_partitions --image product=./product_sparse.img --partition product:none:1186084560:qti_dynamic_partitions --image vendor=./vendor_sparse.img --partition vendor:none:1297484384:qti_dynamic_partitions
lpmake I 04-01 00:13:56 14374 14374 builder.cpp:1012] [liblp]Partition system will resize from 0 bytes to 2771030016 bytes
lpmake I 04-01 00:13:56 14374 14374 builder.cpp:1012] [liblp]Partition product will resize from 0 bytes to 1186086912 bytes
lpmake I 04-01 00:13:56 14374 14374 builder.cpp:1012] [liblp]Partition vendor will resize from 0 bytes to 1297485824 bytes
lpmake E 04-01 00:14:03 14374 14374 images.cpp:338] [liblp]Image for partition 'system' is greater than its size (2887667712, expected 2771030016)
I've already told you several times that you don't need to convert to sparse, because lpmake will still write a raw image to super.img.
Also, why are you merging the super section into a file? It takes time and a lot of space, pull the images directly from the super section.
 

quanqw

Senior Member
Oct 10, 2011
348
23
33
Viet Nam
@nttuan can you successfully run lpmake command manually?
Check the excellent Brepro1 tutorial and the excellent AndyYan tutorial on how to do this. Thanks.

@nttuan I have a possible solution for you. Your group size is not large enough to fit all the individual partitions inside in raw format. The solution is to convert all files into sparse before running lpmake command.
This is easier said than done though. I know it's possible because I've done it before in version 1.04 and earlier but right now I'm facing this problem:

Code:
lpmake --metadata-size 65536 --super-name super --metadata-slots 2 --sparse --output ./super_fixed.bin --device super:8589934592 --group qti_dynamic_partitions:8254596872 --image system=./system_sparse.img --partition system:none:2771027928:qti_dynamic_partitions --image product=./product_sparse.img --partition product:none:1186084560:qti_dynamic_partitions --image vendor=./vendor_sparse.img --partition vendor:none:1297484384:qti_dynamic_partitions
lpmake I 04-01 00:13:56 14374 14374 builder.cpp:1012] [liblp]Partition system will resize from 0 bytes to 2771030016 bytes
lpmake I 04-01 00:13:56 14374 14374 builder.cpp:1012] [liblp]Partition product will resize from 0 bytes to 1186086912 bytes
lpmake I 04-01 00:13:56 14374 14374 builder.cpp:1012] [liblp]Partition vendor will resize from 0 bytes to 1297485824 bytes
lpmake E 04-01 00:14:03 14374 14374 images.cpp:338] [liblp]Image for partition 'system' is greater than its size (2887667712, expected 2771030016)
It don't work on my g8 android 10. It show error: 225.
 

quanqw

Senior Member
Oct 10, 2011
348
23
33
Viet Nam
:/ $ su
# ./makesysrw.sh
-------------------------------------------------------------------------
| makeSystemRW v1.22 automated script by lebigmac @xda 2021 |
| Thanks @Kolibass @Brepro1 @munjeni @AndyYan @gabrielfrias @YOisuPU |
| without your help this script would not be possible! |
------------------------------------------------------------------------
makesysrw: Phone is not in TWRP recovery mode. Ignoring
makesysrw: Initiating procedure...

makesysrw: Unable to locate super partition on device. Ignoring
makesysrw: Partition detected: product_a @ /dev/block/sda26
makesysrw: Dumping product_a to: /data/local/tmp/makesysrw_1.22/files/nosuper/product_a.img
4194304+0 records in
4194304+0 records out
2147483648 bytes (2.0 G) copied, 29.128942 s, 70 M/s
makesysrw: Successfully dumped product_a

makesysrw: Current size of product_a.img in bytes: 2147483648
makesysrw: Current size of product_a.img in MB: 2048
makesysrw: Current size of product_a.img in 512-byte sectors: 4194304

makesysrw: Increasing filesystem size of product_a.img to 5242880 512-byte sectors...
resize2fs 1.44.4 (18-Aug-2018)
Resizing the filesystem on /data/local/tmp/makesysrw_1.22/files/nosuper/product_a.img to 655360 (4k) blocks.
The filesystem on /data/local/tmp/makesysrw_1.22/files/nosuper/product_a.img is now 655360 (4k) blocks long.

makesysrw: The filesystem of product_a.img was successfully resizedmakesysrw: Removing 'shared_blocks feature' of product_a.img...
e2fsck 1.44.4 (18-Aug-2018)
makesysrw: Read-only lock of product_a.img successfully removed

makesysrw: Shrinking size of product_a.img back to minimum size...
resize2fs 1.44.4 (18-Aug-2018)
Resizing the filesystem on /data/local/tmp/makesysrw_1.22/files/nosuper/product_a.img to 472989 (4k) blocks.
The filesystem on /data/local/tmp/makesysrw_1.22/files/nosuper/product_a.img is now 472989 (4k) blocks long.

makesysrw: Current size of product_a.img in bytes: 1937362944
makesysrw: Current size of product_a.img in MB: 1847
makesysrw: Current size of product_a.img in 512-byte sectors: 3783912

========================================================================

makesysrw: Please reboot into bootloader and flash the file(s) manually
makesysrw: Partition detected: product_b @ /dev/block/sda27
makesysrw: Dumping product_b to: /data/local/tmp/makesysrw_1.22/files/nosuper/product_b.img
4194304+0 records in
4194304+0 records out
2147483648 bytes (2.0 G) copied, 27.364214 s, 75 M/s
makesysrw: Successfully dumped product_b

makesysrw: Current size of product_b.img in bytes: 2147483648
makesysrw: Current size of product_b.img in MB: 2048
makesysrw: Current size of product_b.img in 512-byte sectors: 4194304
./tools/bin/tune2fs: Bad magic number in super-block while trying to open /data/local/tmp/makesysrw_1.22/files/nosuper/product_b.img
makesysrw: Current size of product_b.img in bytes: 2147483648
makesysrw: Current size of product_b.img in MB: 2048
makesysrw: Current size of product_b.img in 512-byte sectors: 4194304

========================================================================

makesysrw: Please reboot into bootloader and flash the file(s) manually
makesysrw: Partition detected: system_a @ /dev/block/sda24
makesysrw: Dumping system_a to: /data/local/tmp/makesysrw_1.22/files/nosuper/system_a.img
7856128+0 records in
7856128+0 records out
4022337536 bytes (3.7 G) copied, 54.771102 s, 70 M/s
makesysrw: Successfully dumped system_a

makesysrw: Current size of system_a.img in bytes: 4022337536
makesysrw: Current size of system_a.img in MB: 3836
makesysrw: Current size of system_a.img in 512-byte sectors: 7856128

makesysrw: Increasing filesystem size of system_a.img to 9820160 512-byte sectors...
resize2fs 1.44.4 (18-Aug-2018)
Resizing the filesystem on /data/local/tmp/makesysrw_1.22/files/nosuper/system_a.img to 1227520 (4k) blocks.
The filesystem on /data/local/tmp/makesysrw_1.22/files/nosuper/system_a.img is now 1227520 (4k) blocks long.

makesysrw: The filesystem of system_a.img was successfully resized
makesysrw: Removing 'shared_blocks feature' of system_a.img...
e2fsck 1.44.4 (18-Aug-2018)
makesysrw: Read-only lock of system_a.img successfully removed

makesysrw: Shrinking size of system_a.img back to minimum size...
resize2fs 1.44.4 (18-Aug-2018)
Resizing the filesystem on /data/local/tmp/makesysrw_1.22/files/nosuper/system_a.img to 680479 (4k) blocks.
The filesystem on /data/local/tmp/makesysrw_1.22/files/nosuper/system_a.img is now 680479 (4k) blocks long.

makesysrw: Current size of system_a.img in bytes: 2787241984
makesysrw: Current size of system_a.img in MB: 2658
makesysrw: Current size of system_a.img in 512-byte sectors: 5443832

========================================================================

makesysrw: Please reboot into bootloader and flash the file(s) manually
makesysrw: Partition detected: system_b @ /dev/block/sda25
makesysrw: Dumping system_b to: /data/local/tmp/makesysrw_1.22/files/nosuper/system_b.img
7856128+0 records in
7856128+0 records out
4022337536 bytes (3.7 G) copied, 53.732777 s, 71 M/s
makesysrw: Successfully dumped system_b

makesysrw: Current size of system_b.img in bytes: 4022337536
makesysrw: Current size of system_b.img in MB: 3836
makesysrw: Current size of system_b.img in 512-byte sectors: 7856128

makesysrw: Increasing filesystem size of system_b.img to 9820160 512-byte sectors...
resize2fs 1.44.4 (18-Aug-2018)
Resizing the filesystem on /data/local/tmp/makesysrw_1.22/files/nosuper/system_b.img to 1227520 (4k) blocks.
The filesystem on /data/local/tmp/makesysrw_1.22/files/nosuper/system_b.img is now 1227520 (4k) blocks long.

makesysrw: The filesystem of system_b.img was successfully resized
makesysrw: Removing 'shared_blocks feature' of system_b.img...
e2fsck 1.44.4 (18-Aug-2018)
makesysrw: Read-only lock of system_b.img successfully removed

makesysrw: Shrinking size of system_b.img back to minimum size...
resize2fs 1.44.4 (18-Aug-2018)
Resizing the filesystem on /data/local/tmp/makesysrw_1.22/files/nosuper/system_b.img to 224148 (4k) blocks.
The filesystem on /data/local/tmp/makesysrw_1.22/files/nosuper/system_b.img is now 224148 (4k) blocks long.

makesysrw: Current size of system_b.img in bytes: 918110208
makesysrw: Current size of system_b.img in MB: 875
makesysrw: Current size of system_b.img in 512-byte sectors: 1793184

========================================================================

makesysrw: Please reboot into bootloader and flash the file(s) manually
makesysrw: Partition detected: vendor_a @ /dev/block/sda22
makesysrw: Dumping vendor_a to: /data/local/tmp/makesysrw_1.22/files/nosuper/vendor_a.img
3481600+0 records in
3481600+0 records out
1782579200 bytes (1.6 G) copied, 23.576392 s, 72 M/s
makesysrw: Successfully dumped vendor_a

makesysrw: Current size of vendor_a.img in bytes: 1782579200
makesysrw: Current size of vendor_a.img in MB: 1700
makesysrw: Current size of vendor_a.img in 512-byte sectors: 3481600

makesysrw: Increasing filesystem size of vendor_a.img to 4352000 512-byte sectors...
resize2fs 1.44.4 (18-Aug-2018)
Resizing the filesystem on /data/local/tmp/makesysrw_1.22/files/nosuper/vendor_a.img to 544000 (4k) blocks.
The filesystem on /data/local/tmp/makesysrw_1.22/files/nosuper/vendor_a.img is now 544000 (4k) blocks long.

makesysrw: The filesystem of vendor_a.img was successfully resized
makesysrw: Removing 'shared_blocks feature' of vendor_a.img...
e2fsck 1.44.4 (18-Aug-2018)
makesysrw: There was a problem removing the read-only lock of vendor_a.img
1|:/data/local/tmp/makesysrw_1.22 #
Can you please post screenshots and a copy of the lpdump.txt and the myargs.txt files in the folder. Also, do you have TWRP or did you flash it through fastboot. Thanks!
I run it via terminal.
 
  • Wow
Reactions: lebigmac

lebigmac

Account currently disabled
Jan 31, 2017
1,342
994
I've already told you several times that you don't need to convert to sparse, because lpmake will still write a raw image to super.img.
Also, why are you merging the super section into a file? It takes time and a lot of space, pull the images directly from the super section.

@kory-vadim you are absolutely right. Lpmake will automatically convert from sparse to raw before writing new super_fixed.bin so there is no point in using img2simg before running lpmake. I can confirm this.

The reason why I am dumping original super partition to image file on local storage is for backup purposes before new super_fixed.bin is flashed irreversibly to block device. Feel free to deactivate the dd function if you want ;)

@quanqw thanks for your log. It's looking good. Apparently system_a.img and system_b.img have been successfully patched. Did you try flashing them yet in fastboot?
Please make a backup of the original files first.

For flashing you can do
Bash:
adb pull /data/local/tmp/makesysrw_1.22/files/nosuper
adb reboot bootloader
fastboot flash system_a ./system_a.img
fastboot flash system_b ./system_b.img
 
Last edited:

quanqw

Senior Member
Oct 10, 2011
348
23
33
Viet Nam
@quanqw thanks for your log. It's looking good. Apparently system_a.img and system_b.img have been successfully patched. Did you try flashing them yet in fastboot?
Please make a backup of the original files first. For some reason my script forgot to backup your original files.

You can make backup like this
dd if=/dev/block/sda25 of=./system_b_original.img
This is my error.
Code:
makesysrw: The filesystem of vendor_a.img was successfully resized

makesysrw: Removing 'shared_blocks feature' of vendor_a.img...

e2fsck 1.44.4 (18-Aug-2018)

makesysrw: There was a problem removing the read-only lock of vendor_a.img
 
Last edited:

lebigmac

Account currently disabled
Jan 31, 2017
1,342
994
@quanqw In that case we must try to figure out why e2fsck command failed for vendor_a.img
Can you run the command manually?
e2fsck -y -E unshare_blocks ./vendor_a.img
 
Last edited:

lebigmac

Account currently disabled
Jan 31, 2017
1,342
994
is there a way to WIPE super partitions while flashing cusom roms?
i have SURYA (POCO NFC)
It could be possible with fastboot erase super
but I've never done this before and therefore cannot recommend it

Thanks a lot for this, finally i can get rid unwanted apps.
You're welcome. Did it work on your device?

Any downside of this? impact on performance or anything?
Congratulations for getting it to work on your device!
No downsides to making your system r/w ;)

Working in REDMI K30 Device
Congratulations! Is your device slot A only? Please send me your text files next to the script. Thanks!
 
Last edited:

Rahamatulla

Member
Jun 6, 2018
18
6
India
Xiaomi Poco X2

makeSystemRW v1.22

automated bash script by lebigmac for Android 10 and above

Creation date: February 2021
Updated: March 2021

Requirements:
  • STOCK Android 10 or newer (custom ROM should already be read-write!)
  • Custom recovery is recommended but no longer required in latest version
  • at least 20 GB free space on phone for dumping data
Description:
A script for all Android power users that wish to make their read-only Android 10+ system read-write-able again to remove bloatware and make more thorough customizations to their device.

In a nutshell this is what the script is doing:
  • dumps your existing super OR your system / product / vendor partitions depending on whether or not you have super partition
  • extracts embedded read-only partitions (system, vendor, product...) from super if applicable
  • makes these partitions read-write-able
  • joins everything back together to new super.img OR NOT depending on whether or not you have super partition
  • flashes read-write-able images back to device using the super fast Kolibass technique (only in recovery mode)
User data is not affected.

Installation:
Installation of the script has never been this easy!
Download the flashable zip below, do NOT enable zip signature verification and simply install it in your custom recovery (WORKS IN BOTH TWRP AND ORANGEFOX!)
The installer binary will auto-detect whether or not your device has a super partition and launch the script accordingly with the proper command line arguments.

Flashable zip custom usage:
You can set these custom installation arguments in the included config.ini file.
Simply extract the flashable.zip and modify the makesysrw_*VERSION*/config.ini file and make your adjustments. Then compress the makesysrw_*VERSION* and META-INF folders again as a new .zip and install it.
First line of config.ini contains the script arguments for those WITHOUT super partition.
By default this line is completely empty (no space).
Second line of config.ini contains the script arguments for those WITH super partition.
For example if you already dumped your super_original and want to skip that process next time you install the .zip then put this in line #2 of config.ini :
Code:
 in=./files/super/super_original.bin size=100
Remember if you decide to use custom arguments in config.ini then the first character should always be an empty space. If no arguments are used such as by default in line #1 (no super) then the line should be completely empty, no space, nothing.

Script usage:
If you've got no super partition then simply call the script with no arguments from the shell.
If you've got a super partition I would recommend using the optional size=100 parameter as well to give some extra free space (in MB) to each partition.
The script can be run both inside custom recovery and inside Android operating system. If you run it in Android you will need to fastboot flash the patched images manually!
Optional arguments: (replace x with your custom value)
  • in=x : *THIS IS IGNORED IF YOU HAVE NO SUPER PARTITION*
    With this flag you can specify an existing super image as input and skip the entire dumping of the super image process. Here you can use the super_original.bin which you dumped earlier with makesysrw or the official unsparsed super.img from your downloaded firmware. (unsparse with simg2img)
    If omitted, makesysrw will dump super image from phone to ./files/super/super_original.bin
    (path is relative to the script)
  • out=x : *THIS IS IGNORED IF YOU HAVE NO SUPER PARTITION*
    With this argument you can specify the output path of the new patched super file.
    If omitted, default output value is ./files/super/super_fixed.bin
  • size=x : *ONLY RECOMMENDED IF YOU HAVE SUPER PARTITION*
    With this parameter you can specify the extra free space (in megabytes) that will be added to each partition.
    If omitted, default extra size is 0 (shrink to minimum)
Examples:
Code:
# Run this command *IF YOU HAVE NO SUPER PARTITION*
./makesysrw.sh

# Run this command if you're first time user *AND YOU HAVE SUPER PARTITION*
# Specify the extra free space in megabytes for each partition:
./makesysrw.sh size=100

# Plug an existing super image into the script like this *ONLY IF YOU HAVE SUPER PARTITION*
./makesysrw.sh in=./files/super/super_original.bin size=100

# Specify both the input file as well as the output destination *ONLY IF YOU HAVE SUPER PARTITION*
./makesysrw.sh in=./files/super/super_original.bin out=./custom/path/super_fixed.bin size=100

To check whether or not you've got a super partition on your device you can run this command:

Code:
adb shell "ls -Alg /dev/block/by-name | grep 'super'"

Troubleshooting:
If you get error 255 when trying to install flashable zip then try to install it manually.
Make sure the script folder was correctly extracted to:
/data/local/tmp/makesysrw_*VERSION*
If you can't run the script try making the file executable like this: chmod +x ./makesysrw.sh
If you still can't get it to work run which sh in your shell and replace the shebang in the first line of the script with the output of that command. Don't remove the first two #! symbols though. Then save the file and try again.
Make sure you have full read write access to the /data/local/tmp directory and that the containing files are not encrypted in custom recovery!

NOTE:
I did not come up with all this by myself. After searching for a solution for countless days without success, going even as far as learning hex editing - I coincidentally came across a couple of very interesting threads burried deep inside the new forum interface where this method has been described by various enthousiasts (links can be found in the credits section below). So I take absolutely no credit for the underlying core mechanisms of the script. I'm only the amateur who put it all together into a compact script so that everybody can enjoy an Android system that's read-write-able again. Just like it used to be in Android 9 or earlier. Before this annoying 'shared_blocks feature' was implemented.

Credits:
Huge thanks to @Kolibass for allowing me to use his partition tools for Android. Without your tools this script would not work on the Android platform! This genius also showed me how to flash a 8GB file to my partition in just under 30 seconds! Much faster than fastboot! I still can't believe it!
Big thanks to @Brepro1 for allowing me to basically copy his awesome tutorial and make it into a script. Without your tutorial guiding me I couldn't have created this script.
Thanks @AndyYan your great tutorial also helped me a lot for automating the script especially the lpdump part.
Also big thanks @munjeni for allowing me to use his superunpack tool in the previous version. It helped me to understand how these super images work.
Thanks @bynarie for making available his otatools package! A part of it was bundled with the previous version which helped me to create this version.
More thanks @gabrielfrias for his helpful comment
Thanks @YOisuPU and of course @topjohnwu for discovering the 'shared_blocks feature'

Disclaimer:
This is open source software and is provided as is without any kind of warranty or support whatsoever. By using and viewing this software you agree to the following terms:
Under no circumstances shall the author be held responsible for any damages or negative consequences that may arrise from the (inappropriate) use of this software.
All responsibility and liability lies with the end-user. You hereby agree not to abuse this software for illegal purposes. Use this software at your own risk!

Please feel free to improve this script as you see fit (as long as you don't add anything malicious).
And make sure to post your feedback, suggestions and improvements in the official thread right here.
If you decide to use my work in your project please send me a message and include a link to this official thread in your project. Thank you.


makesysrw_1-21_01-jpg.5264625
makesysrw_1-21_02-jpg.5264627
makesysrw_1-21_03-jpg.5264631

01-jpg.5259863
03-jpg.5259867


1-jpg.5235933


Download v1.22
current status: experimental/semi-stable
Seems to work well with slot A only devices

Please click my like button below if you like my work! Thanks!

Confirmed working on these devices :

Xiaomi Poco X3 NFC
Xiaomi Redmi Note 9 Pro joyeuse - Android 10
Xiaomi Mi 10 T Lite - Android 11
Xiaomi Mi 10 T lite - Android 11 - TWRP
Xiaomi Mi 10 - Android 11
Xiaomi Mi Note 10 Lite - Android 11 - OrangeFox
Xiaomi Redmi 9T - Android 11 - TWRP

Asus Rog Phone 3 - Android 10 - TWRP
Working in Poco X2 (Redmi K30) miui eu stable Android 10
 
  • Love
Reactions: lebigmac
Status
Not open for further replies.

Top Liked Posts

  • There are no posts matching your filters.
  • 242
    Welcome to the one and only, the original, universal,

    System-RW / Super-RW feat. Make-RW / ro2rw (read-only-2-read/write super partition converter) by lebigmac
    Also known as: THE-REAL-RW, FULL-RW, EXT4-RW, EROFS-RW, EROFS-2-RW, F2FS-RW, F2FS-2-RW, EROFS-2-EXT4-CONVERTER, F2FS-2-EXT4-CONVERTER, Super Resizer/Flasher, SYSTEM-RW / PRODUCT-RW / VENDOR-RW / ODM-RW, root enhancer, real root, FULL ROOT, RW MULTI TOOL and many more aliases!
    (NOTE: Full F2FS-RW support coming in 1. quartal 2023 ! Get your Samsungs ready!)



    The prophecy has finally been fulfilled.
    Making Android ten years younger!
    Inspiring a whole generation of talented developers and empowering the open source community.
    The Pandora's Box has been fully unlocked at last!
    The genie has been unleashed from within the bottle!
    Sesame! Open up now!
    Let the Olympic Android System Modding Games (OASMG) begin!
    The power is now in YOUR hands! And don't forget:
    With great power comes great responsibility!


    Creation date: February 2021
    Updated: January 2023

    Requirements:
    • rooted STOCK Android 10 or newer
    • at least 10+ GB free space on phone for dumping data
    Description:
    A script for all Android power users that wish to make their read-only Android 10+ system read/write-able again to remove bloatware and make more thorough customizations to their device.
    Script only modifies super and vbmeta partitions. /data partition is not affected. It's only used for dumping data and for storing script files.
    In a nutshell this is what the script is doing:
    • dumps your existing super partition
    • extracts embedded read-only sub-partitions (system, system_ext, odm, vendor, product...) from specified super image
    • makes these sub-partitions read/write-able using the one and only original MakeRW/ro2rw algorithm
    • joins everything back together to new super.img
    • flashes read/write-able patched super image back to device using the super fast Kolibass technique (only available in recovery mode)

    NOTE:
    • The script can be run both inside custom recovery and inside Android operating system.
      If you run script in Android mode you will need to fastboot flash the patched image(s) manually!
    • To check whether or not the script worked correctly you can run this code:
      Bash:
      adb shell
      su
      mount -o remount,rw /
      mount -o remount,rw /odm
      mount -o remount,rw /product
      mount -o remount,rw /system_ext
      mount -o remount,rw /vendor
      mount | grep dm- | head -5
    Manual installation:
    • Extract flashable.zip and copy sysrw_*VERSION* folder into /data/local/tmp/
    • run this command to make the script executable:
      chmod +x /data/local/tmp/sysrw_*VERSION*/sysrw
    Automatic installation:
    Installation of the script has never been this easy!
    Download the flashable.zip below, do NOT enable zip signature verification and simply install it in your custom recovery (works in TWRP, OrangeFox and PBRP!)
    The update binary will auto-detect the arguments in config.ini and launch the script accordingly

    Flashable zip custom usage:
    You can easily modify the custom script execution arguments in the included config.ini file. Simply extract the flashable.zip, edit the included config.ini file with notepad and then save the file. Next compress the sysrw_*VERSION* and META-INF folders again as a new flashable .zip and install it in recovery. Have fun playing around with your config.ini :D(y)

    Script usage:
    Simply execute the program from the terminal shell with or without custom arguments
    Optional script arguments:
    Replace x with your custom value
    • in=x
      Specify existing super image as input [OPTIONAL]
      Omitting this parameter is equivalent to using in=@auto which is equivalent to using your super block device as input
    • out=x
      Specify patched super image output file path [OPTIONAL]
      Omitting this parameter is equivalent to using out=@auto
      and the patched super image will be saved as ./img/super_patched.bin by default
    • size=x
      Specify the extra free space (in megabytes) to be added to each sub-partition of super.img [OPTIONAL]
      Omitting this parameter is equivalent to using size=@auto which will activate the auto-resize feature
    • -r
      Specify whether or not the patched super image should be output in raw file format [OPTIONAL]
      Omitting this parameter will create a sparse patched super image by default

    Usage examples:
    Bash:
    adb shell
    su
    cd /data/local/tmp/sysrw_1.33
    chmod +x ./sysrw
    
    #  Run program with default settings [RECOMMENDED]
    ./sysrw
    
    # Specify existing super image as input [OPTIONAL]
    ./sysrw in=./img/super_original.img
    
    # Specify patched super image output file path [OPTIONAL]
    ./sysrw out=./img/super_patched_new.img
    
    # Specify the extra free space (in megabytes) to be added to each sub-partition of super.img [OPTIONAL]
    ./sysrw size=15
    
    # Specify whether or not the patched super image should be output in raw file format [OPTIONAL]
    ./sysrw -r
    
    # EXPERT EXAMPLE (Warning! This command could potentially corrupt your system. Only use at your own risk in recovery mode!)
    ./sysrw in=img/super_original.bin out=`realpath /dev/block/by-name/super` -r

    Uninstallation:
    • To free up space and keep script as well as r/w capability you can simply delete /img subfolder at /data/local/tmp/sysrw_*VERSION*/img
    • To delete script and keep r/w capability you can simply delete whole script folder at /data/local/tmp/sysrw_*VERSION*
    • To undo all changes performed by the script you can simply reflash original stock read-only super image and re-enable dm-verity and verification either through adb/fastboot or with the included avbctl binary.

    Troubleshooting:
    If you can't get this script to work on your device check out the brand new sophisticated superrepack tool by @munjeni
    If you get any errors from the update-binary in your custom recovery during installation of the flashable .zip then please send me this log file /tmp/recovery.log
    and a screenshot of your error. Thanks! (y)
    Make sure the script folder was correctly extracted to:
    /data/local/tmp/sysrw_*VERSION*
    If you can't run the script try making the file executable like this: chmod +x ./sysrw
    If you still can't get it to work run which sh in your shell and replace the shebang in the first line of the script with the output of that command. Don't remove the first two #! symbols though. Then save the file and try again.
    Make sure you've got full read / write access to the /data/local/tmp directory and that the containing files are not encrypted in custom recovery!
    If you get a bootloop after successfully creating and flashing super_patched.bin then that's probably because you didn't properly disable your dm-verity and verification.
    To undo any bootloop simply re-flash original stock read-only super image and re-enable dm-verity and verification with the included avbctl binary or through adb/fastboot. Those are the only changes performed by the script. If you have any more questions just ask in this thread. Good luck!

    About:
    I did not come up with all this by myself. After searching for a solution for countless days without success, going even as far as learning hex editing - I accidentally came across a couple of very interesting threads burried deep inside the new forum interface where this method has been described by various rw enthousiasts (links can be found in the credits section below). Therefore most credit goes to these rw enthousiasts. I'm only the amateur who put it all together into a compact script so that everybody can enjoy an Android system that's read/write-able again. Just like it used to be in Android 9 or earlier. Before these annoying 'shared_blocks' and 'EROFS' read-only features were implemented.

    Credits:
    Huge thanks to @Brepro1 for allowing me to use his awesome tutorial and make it into a script. Without your tutorial guiding me I couldn't have created this script.
    Huge thanks to @Kolibass for allowing me to use his partition tools for Android. Without your tools this script would not work on the Android platform!
    Big thanks @munjeni for allowing me to use his amazing superunpack V1 tool in the initial version. It helped me to understand how these super images work.
    Thanks @AndyYan your great tutorial also helped me a lot for automating the script especially the lpdump part.
    Thanks @bynarie for making available his otatools package! A part of it was bundled with the initial version which helped me to create this universal version. It's still part of the troubleshooting repair script to fix error 73.
    Thanks @HemanthJabalpuri for assisting me in optimizing the underlying algorithm!

    Disclaimer:
    #Disclaimer v3.0​
    This open source software is provided as is without any kind of warranty or support whatsoever.
    By using and viewing this software you agree to the following terms:
    • Under no circumstances shall the author be held responsible for any damages that may occur from the (inappropriate) use of this software (or parts thereof).
    • All responsibility, liability and risk lies with the end-user. You hereby agree not to abuse this software for illegal purposes.
    • Please don't steal, hack, crack, mod, hex-edit, decompile, rebrand and / or abuse this software or parts thereof. Thank you!
    • This software can be re-uploaded to 3rd party websites indefinitely as long as the software itself (or any parts thereof) were not modified by unauthorized 3rd parties without the original author's prior knowledge and explicit written consent
    • This software (or parts thereof) were provided for free only for non-commercial, educational, personal, legal purposes
    • To use this software (or parts thereof) for commercial purposes, please rent a commercial usage license
      Thank you very much for your support! Thanks to your amazing support I can continue working on this project and other interesting projects like this. :D(y)

    Enjoy debloating and customizing your fully read/write-able next-gen Android device! :love:(y)

    Please post your feedback, suggestions and your Olympic Android System Mods (OASMG) @ the official SystemRW / SuperRW feat. MakeRW / ro2rw by lebigmac links below. Thanks :D(y)

    https://xdaforums.com/t/universal-s...tition-converter-resizer-by-lebigmac.4247311/

    https://xdaforums.com/t/closed-the-...n-converter-erofs-rw-ext4-rw-f2fs-rw.4536821/


    v1-31d_01-jpg.5309953
    v1-31d_03-jpg.5309957


    1-jpg.5235933


    working-jpg.5525671


    Confirmed working on these devices:


    Download

    current status: experimental


    If you like this project and want to support further development of it & the creation of more amazing projects like this then please feel free to donate to the original developer lebigmac by clicking the button below. Thanks! Your support is very much appreciated!

    Donate
    25
    Thread Closed

    Hello everyone

    As helpful as @lebigmac may be, no one – not even us – is above XDA's Forum Rules. Our work as moderators usually remains in the background but it felt necessary to provide some transparency here. After consulting our team I have decided to ban the OP of this thread for three months and it will remain locked until OP requests to open it back up after the ban expires. For some of you this will come as a complete surprise and may seem unfair but I would like to stress that we have invested a massive amount of energy and a mountain of patience to come to a resolve with lebigmac. Several moderators were involved. Despite our many efforts, (s)he persisted to openly accuse people of plagiarism, inciting conflict, call out the people involved and communicated in a very condescending and demeaning way.
    We of course regret this course of action. Developers and development is everything to us but boundaries must be respected. After several earlier time-outs we had no other option but to proceed this way. We're hoping this will bring back some peace in this feud as well. With so much going on in the world we really don't need opposing developer parties. Open source is about cooperation and improving existing code, not about bitter fights over protecting your own code, which is based on the work of others anyway. One questionable screenshot aside, there hasn't been any viable proof of plagiarism provided to us related to this project.

    Thank you all for your understanding and as always we remain available to answer your questions and concerns via PM. Have an amazing day!

    Kind regards
    Timmy
    Senior Moderator
    17
    If the script works on your device please send me your log files from this folder:
    /data/local/tmp/systemrw_1.32/log/

    And please write your phone model - Android version - firmware version

    Then I can add you to the list of successful devices and it will be helpful for further development. Thank you!(y)
    17
    Allow me to add some more information to above post of my teammate @Timmmmaaahh!

    The account of the author of this thread has been permanently suspended. In your own interest, I ask everybody not to promote a banned user or his website, blog, work etc. on XDA. Thanks very much for your cooperation.

    Regards
    Oswald Boelcke
    Senior Moderator
    10
    Okay I know you guys have been waiting a long time... Thanks for your patience, loyalty, support and your interest in this amazing project for the past year! Unfortunately there's lots of dubious copycats floating around by now. Remember you saw it here first ;)(y)
    The one and only, the original
    SystemRW / SuperRW featuring MakeRW by lebigmac
    This month new version should be ready :D(y)
    I'm working on it hard 🛠️⚙️⛏️🔧✂️🔨
    Hopefully we can start beta testing in 2nd half of April May June July August September October and then it should be ready for final release :love:
    I'm so excited!


    This is awesome! Unfortunately, it doesn't support Android 12 yet : ( .

    The new version has support for Android 12 and beyond! :ROFLMAO:

    Bash:
    sdkCheck(){
        sdkVersion=`getprop ro.build.version.sdk`
        if [ $sdkVersion -lt 29 ]; then
            printf "$app: Please install Android 10 or newer and try again\n\n" && exit 1
        else
            android=$(($sdkVersion - 19))
        fi
        printf "$app: Current Android version: %s\n" $android
    }