[SCRIPT][Android 10+] Universal MakeSystemRW Mount SystemRW / SuperRW featuring MakeRW (read/write)

Search This thread

lebigmac

Account currently disabled
Jan 31, 2017
1,206
813
PLEASE NOTE: THIS PROGRAM IN ITS CURRENT STATE ONLY WORKS ON EXT4 PARTITIONS WITH THE INFAMOUS SHARED_BLOCKS READ-ONLY FEATURE!!! NEXT VERSION WILL HAVE EROFS/F2FS SUPPORT. OPEN BETA COMING SOON! ;)(y)


If you can't get this script to work on your device check out the brand new sophisticated superrepack tool by @munjeni


Welcome to

logo_large.jpg

SystemRW / SuperRW (feat. MakeRW) v1.32 by lebigmac
NEW VERSION COMING SOON! STAY TUNED!;)(y)
ANY TALENTED DEVELOPERS WANT TO CONTRIBUTE TO NEXT VERSION? PLEASE CONTACT ME NOW! THANKS! :love:(y)

Creation date: February 2021
Updated: August 2021

Requirements:
  • rooted STOCK Android 10 or newer (custom ROM should already be R/W!)
  • 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 OR your system / product / vendor partitions depending on whether or not you've got 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've got super partition
  • flashes read/write-able images back to device using the super fast Kolibass technique (only in recovery mode)

NOTE:
  • Before running this experimental software on your device it is recommended to make a full backup of your device (just in case you are unlucky enough to end up in an irreversible bootloop)
  • Extract BUNDLE.zip (the included sysrw_repair.zip is only for fixing error 73!)
  • 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 you've got a super partition on your device you can run this command: adb shell "ls -l /dev/block/by-name/super"
  • To check whether or not your device has the notorious 'shared_blocks' read-only feature you can run this code:
    Bash:
    adb shell
    su
    for a in /dev/block/dm-*; do tune2fs -l $a | grep -e "feat" -e "vol" && echo; done
  • To check whether or not the script worked correctly you can run this code:
    Bash:
    adb shell
    su
    for a in /dev/block/dm-*; do mount -o remount,rw $a; done
Manual installation:
  • Extract flashable.zip and copy systemrw_*VERSION* folder into /data/local/tmp/
  • run this command to make the script executable:
    chmod +x /data/local/tmp/systemrw_*VERSION*/systemrw.sh
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 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 included config.ini file and then save the file. Then compress the systemrw_*VERSION* and META-INF folders again as a new .zip and install it in recovery.
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.bin and want to skip that process next time you install the .zip then put this in line #2 of config.ini :
in=`realpath /dev/block/by-name/super` size=15
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 (see examples below).
If you've got a super partition I would recommend using the optional size=15 parameter as well to give some extra free space (in MB) to each partition.
Optional script arguments:
Replace x with your custom value
  • in=x *THIS IS IGNORED IF YOU'VE GOT 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 systemrw or the official unsparsed super.img from your downloaded firmware. (unsparse with simg2img). It's also possible to use your super partition block device as input.
    If omitted, systemrw will dump super image from phone to ./img/super_original.bin
    (path is relative to the script)
  • out=x *THIS IS IGNORED IF YOU'VE GOT NO SUPER PARTITION*
    With this argument you can specify the output path of the new patched super file.
    If omitted, default output value is ./img/super_fixed.bin
  • size=x *ONLY RECOMMENDED IF YOU'VE GOT SUPER PARTITION*
    With this parameter you can specify the extra free space (in megabytes) that will be added to each partition. There is a limit as to how much extra free space you can add per partition. Check your lpdump.txt to find out the exact maximum extra size.
    If omitted, default extra size is 0 (shrink to minimum)

Examples:
Bash:
adb shell
su
cd /data/local/tmp/systemrw_1.32
chmod +x ./systemrw.sh

# Run this command *IF YOU'VE GOT NO SUPER PARTITION*
./systemrw.sh

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

# Plug an existing super image into the script like this *ONLY IF YOU'VE GOT SUPER PARTITION*
./systemrw.sh in=./img/super_original.bin size=15

# Specify both the input file as well as the output destination *ONLY IF YOU'VE GOT SUPER PARTITION*
./systemrw.sh in=./img/super_original.bin out=./custom/path/super_fixed.bin size=15

# EXPERT EXAMPLE:
./systemrw.sh in=`realpath /dev/block/by-name/super` out=./img/super_fixed.bin size=50

Uninstallation:
  • To free up space and keep script as well as r/w capability you can simply delete /img subfolder at /data/local/tmp/systemrw_1.32/img
  • To delete script and keep r/w capability you can simply delete whole script folder at /data/local/tmp/systemrw_1.32
  • 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 (inside /tools/ subfolder - also available in recovery).

Troubleshooting:
If you get error 255 in custom recovery when trying to install flashable zip then try to install it manually. If you encounter this error please send me this file /tmp/recovery.log
Make sure the script folder was correctly extracted to:
/data/local/tmp/systemrw_*VERSION*
If you can't run the script try making the file executable like this: chmod +x ./systemrw.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!
If you get bootloop after successfully flashing super_fixed.bin then you can undo bootloop simply by re-flashing original stock super image and re-enabling dm-verity and verification with the included avbctl binary (inside /tools/ subfolder - also available in recovery). Those are the only changes performed by the script.
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 enthousiasts (links can be found in the credits section below). Therefore 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 @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! This genius also showed me how to flash a 5GB file to my partition in just under 30 seconds! Much faster than fastboot! I still can't believe it!
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.
More thanks @gabrielfrias for his helpful comment
Thanks @YOisuPU and of course @topjohnwu for discovering the 'shared_blocks feature'
Thanks @HemanthJabalpuri for assisting me in optimizing the underlying algorithm!
Thanks @aIecxs for helping me fix some shell scripting errors (y)

Disclaimer:
#Disclaimer v2.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 ensue from the (inappropriate) use of this software.
  • All responsibility, liability and risk lies with the end-user. You hereby agree not to abuse this software for illegal purposes.
  • Under no circumstances shall the comments & title section of the script (lines #1 - #100) as well as the included update-binary be modified or removed by the end-user without the original author's explicit consent.
  • Under no circumstances shall the end-user steal and / or abuse my entire SystemRW project or parts thereof (including but not limited to my update-binary, my script, my program logo, my program name or the names of my functions and/or my variables and more...) only to rename and republish my SystemRW / SuperRW feat. MakeRW project (or parts thereof) as his/her own creation without even mentioning original source!!! (yes this actually happened :( perpetrated by at least 2 fellow forum members...)
  • Unverified, unauthorized re-uploads of any files contained within this project to 3rd party websites are not permitted without the original author's prior knowledge and consent (for security reasons). If you want to share this software with your friends please just send them the link to this website. Thanks.
  • The end-user is allowed to improve the underlying algorithm (as long as no malicious code is added) and post his/her improvements, results and feedback right here in the official SystemRW / SuperRW feat. MakeRW project thread @ xda-developers.com
  • If the end-user wishes to re-use my SystemRW / SuperRW featuring MakeRW project (or any parts thereof) inside his/her own project then he/she shall first contact me! Thanks!
    If you want to make a video tutorial about this project please contact me first!
    Thank you! I can give you high resolution project logo and more!

Please make sure to post your feedback and suggestions in the official thread right here.
Enjoy customizing your fully read/write-able Android device! And feel free to share your Android system mods with other users in this thread! Thanks!


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


1-jpg.5235933


working-jpg.5525671


Confirmed working on these devices:
Note:
To run it in Android 12+ you must edit the systemrw.sh file with text editor.
Simply disable sdkCheck() function at line #420
It should look like this:
#sdkCheck
Now save file and run script (or repack flashable.zip and flash). Good luck! (y)


Download v1.32 mirror #1
Download v1.32 mirror #2
more official download mirrors coming soon!
current status: experimental


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

Donate
 
Last edited:

lebigmac

Account currently disabled
Jan 31, 2017
1,206
813
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)
 
Last edited:

lebigmac

Account currently disabled
Jan 31, 2017
1,206
813
You're supposed to run this on the phone ;)
This universal version is different from the previous Linux only version!
Please follow the instructions in the first post or in the comment section of the script itself!

It looks like I'll have to make a flashable zip out of this. Please give me a day or two to learn more about flashable zip's!
I just wanted to release it as soon as possible because I know many people were waiting for the new universal version ;)
 
Last edited:

lebigmac

Account currently disabled
Jan 31, 2017
1,206
813
Manual installation:

Extract BUNDLE.zip
Extract flashable.zip
Copy systemrw_1.32 folder into /data/local/tmp/
It should look like this:
/data/local/tmp/systemrw_1.32

Please keep in mind I have not tested this in orangefox but only in twrp so you will be the first person to do so!
Is orangefox an engineer build like twrp? You can check this by doing
Code:
getprop ro.build.type
 
Last edited:

Frxhb

Member
Feb 24, 2018
39
15
Huawei P9 Lite
Xiaomi Mi 10T Lite
yes but the makesysrw_1.15 folder containing the script should go into /data/local/tmp/
so it should look like this:
/data/local/tmp/makesysrw_1.15

Also if you have orangefox you can simply replace the TWRP check at line #303 with this:
Code:
if ( whoami>/dev/null ); then

Please keep in mind I have not tested this in orangefox but only in twrp so you will be the first person to do so!
If orangefox is anything like twrp it should work! Is orangefox an engineer build like twrp?
you can check this by doing
Code:
getprop ro.build.type
If I try to access the link it says "

403 Forbidden"​

 

lebigmac

Account currently disabled
Jan 31, 2017
1,206
813
IT WORKS! Device: Xiaomi Redmi Note 9 Pro joyeuse
You've got to be kidding me!
Thanks for your feedback uvzen. I think you were the first one to try it. Congratulations :D
Can you please tell me do you have a super partition on your device? What Android version?
And how did you like the flashing process? Was it smooth and fast?
Thanks to a suggestion by user @Kolibass the flashing is now super fast in this new version!
 
Last edited:

uvzen

Senior Member
Feb 28, 2020
78
45
Huawei P8
Huawei P10
You've got to be kidding me!
Thanks for your feedback uvzen. I think you were the first one to try it. Congratulations :D
Can you please tell me do you have a super partition on your device? What Android version?
And how did you like the flashing process? Was it smooth and fast?
Thanks to a suggestion by user @Kolibass the flashing is super fast in this new version!
Device: Xiaomi Redmi Note 9 Pro joyeuse Android 10 MIUI 12.0.1
I have a super partition and the process took about 5 minutes
 
  • Like
Reactions: lebigmac

lebigmac

Account currently disabled
Jan 31, 2017
1,206
813
So is your system read-write now? Did you use any special arguments when calling the script such as size=100 to give extra free space to your partitions? That's useful so you can copy stuff to system. Otherwise you can only delete stuff...
 
Last edited:

lebigmac

Account currently disabled
Jan 31, 2017
1,206
813
1 GB (1024 MB) is probably too much ;)
Did you try copy stuff into /system yet to see if it's read write?
In your favorite root file manager you can click the remount as R/W button on top.
You can also try mounting your partition(s) as read/write manually like this:

1-jpg.5235933
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 4
    Hello. I tried to use the automatic script in twrp but I get the error that my device is not supported. I also tried to run the script manually, but nothing happens. I'm on Oneplus 7 Pro, Android 12(GM1903_11.H.30), TWRP 3.7.0_12. Can someone help?
    Systemrw_1.32 script is not compatible with A12 yet.
    Hello. I added this piece of info to front page ;)(y)
    Depending on what filesystem format your super's sub-partitions are in you might get lucky in A12+ at least on some sub-partitions using the old version of the script. New version is in the works and should be ready soon hopefully ;)(y)

    Note:
    To run it in Android 12+ you must edit the systemrw.sh file with text editor.
    Simply disable sdkCheck() function at line #420
    It should look like this:
    #sdkCheck
    Now save file and run script. Good luck!
    2
    It didn't work on LE2127 after multiple tries...unless I am doing something wrong!
    i am also using it on custom roms but oos12.13 have erofs and custom doesn't that's the reason for working custom rom, ( CUSTOM ROM DONT HAVE EROFS ) ......
    2
    can i just pause the script before joining the partition back to be super image

    the problem is my partition is EROFS so i just want to pause the script and make my modifications then resume running the script

    thanks
    I guess you could open the systemrw.sh script file with notepad and add this command
    read -p "Press enter to continue"
    how about adding that line between lines #233 and #234 ? :unsure:
    after lpUnpack but before my MakeRW procedure
    @jackeagle

    By the way soon it will be the official 2nd anniversary of my unique and original MakeRW procedure. I'm so excited! I can't wait to show you guys the new version! ;)(y)
    1
    How could I do it? Mount RW on my Samsung A73 5G
    How do you do that?
    I have a Samsung Galaxy A13 SM-A135F with F2FS file system

    Thank you
    If you want I can setup a crowdfunding campaign and you can donate if you want :)
    Then I can buy a next-gen Samsung device to do some good RW experiments 🥼🧪 on it which would speed up development tremendously :D(y)
    Which Samsung device should I go for? I know that not all next-gen Samsung devices got the infamous F2FS read-only problem...

    Wait a second. Do some Samsung devices have the F2FS read-only problem as well as the shared_blocks read-only problem AND the EROFS read-only problem? :unsure:

    Please show me your fstab and/or your mount output. Thanks (y)
    Bash:
    adb shell
    cat /vendor/etc/*fstab*
    1
    Please show me your fstab and/or your mount output. Thanks (y)
    Bash:
    adb shell
    cat /vendor/etc/*fstab*

    happily

    If there's anything else I can help with, I'm here for you


    a13:/ $ cat /vendor/etc/*fstab*
    # Android fstab file.
    #<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>
    # The filesystem that contains the filesystem checker binary (typically /system) cannot
    # specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK

    system /system f2fs ro wait,avb=vbmeta,logical,first_stage_mount,avb_keys=/avb/q-gsi.avbpubkey:/avb/r-gsi.avbpubkey:/avb/s-gsi.avbpubkey
    system /system ext4 ro wait,avb=vbmeta,logical,first_stage_mount,avb_keys=/avb/q-gsi.avbpubkey:/avb/r-gsi.avbpubkey:/avb/s-gsi.avbpubkey
    vendor /vendor f2fs ro wait,avb,logical,first_stage_mount
    product /product f2fs ro wait,avb,logical,first_stage_mount
    odm /odm f2fs ro wait,avb,logical,first_stage_mount

    /dev/block/by-name/prism /prism ext4 ro,barrier=1 nofail,avb,first_stage_mount
    /dev/block/by-name/optics /optics ext4 ro,barrier=1 nofail,avb,first_stage_mount
    /dev/block/by-name/metadata /metadata ext4 noatime,nosuid,nodev,noauto_da_alloc,discard,journal_checksum,data=ordered,errors=panic,sync wait,first_stage_mount,formattable,check
    /dev/block/by-name/cache /cache ext4 noatime,nosuid,nodev,noauto_da_alloc,discard,journal_checksum,data=ordered,errors=panic wait,check
    /dev/block/by-name/userdata /data f2fs noatime,nosuid,nodev,discard,usrquota,grpquota,fsync_mode=nobarrier,reserve_root=32768,resgid=5678,whint_mode=fs-based,inlinecrypt latemount,wait,check,quota,reservedsize=128M,fileencryption=aes-256-xts:aes-256-cts:v2,checkpoint=fs,fscompress,keydirectory=/metadata/vold/metadata_encryption
    /dev/block/by-name/efs /mnt/vendor/efs ext4 noatime,nosuid,nodev,noauto_da_alloc,discard,journal_checksum,data=ordered,errors=panic wait,check
    /dev/block/by-name/cpefs /mnt/vendor/cpefs ext4 noatime,nosuid,nodev,noauto_da_alloc,discard,journal_checksum,data=ordered,errors=panic wait,check,nofail
    /dev/block/by-name/misc /misc emmc defaults defaults,first_stage_mount

    # VOLD:fstab.exynos850
    /devices/platform/13500000.dwmmc2/mmc_host* auto auto default voldmanaged=sdcard:auto
    /devices/platform/13600000.usb* auto vfat default voldmanaged=usb:auto
    # Android fstab file.
    #<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>
    # The filesystem that contains the filesystem checker binary (typically /system) cannot
    # specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK

    # SWAP
    /dev/block/zram0 none swap defaults
    zramsize=2147483648,auto_configure


    צילום מסך 2022-11-08 142745.png
  • 160
    PLEASE NOTE: THIS PROGRAM IN ITS CURRENT STATE ONLY WORKS ON EXT4 PARTITIONS WITH THE INFAMOUS SHARED_BLOCKS READ-ONLY FEATURE!!! NEXT VERSION WILL HAVE EROFS/F2FS SUPPORT. OPEN BETA COMING SOON! ;)(y)


    If you can't get this script to work on your device check out the brand new sophisticated superrepack tool by @munjeni


    Welcome to

    logo_large.jpg

    SystemRW / SuperRW (feat. MakeRW) v1.32 by lebigmac
    NEW VERSION COMING SOON! STAY TUNED!;)(y)
    ANY TALENTED DEVELOPERS WANT TO CONTRIBUTE TO NEXT VERSION? PLEASE CONTACT ME NOW! THANKS! :love:(y)

    Creation date: February 2021
    Updated: August 2021

    Requirements:
    • rooted STOCK Android 10 or newer (custom ROM should already be R/W!)
    • 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 OR your system / product / vendor partitions depending on whether or not you've got 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've got super partition
    • flashes read/write-able images back to device using the super fast Kolibass technique (only in recovery mode)

    NOTE:
    • Before running this experimental software on your device it is recommended to make a full backup of your device (just in case you are unlucky enough to end up in an irreversible bootloop)
    • Extract BUNDLE.zip (the included sysrw_repair.zip is only for fixing error 73!)
    • 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 you've got a super partition on your device you can run this command: adb shell "ls -l /dev/block/by-name/super"
    • To check whether or not your device has the notorious 'shared_blocks' read-only feature you can run this code:
      Bash:
      adb shell
      su
      for a in /dev/block/dm-*; do tune2fs -l $a | grep -e "feat" -e "vol" && echo; done
    • To check whether or not the script worked correctly you can run this code:
      Bash:
      adb shell
      su
      for a in /dev/block/dm-*; do mount -o remount,rw $a; done
    Manual installation:
    • Extract flashable.zip and copy systemrw_*VERSION* folder into /data/local/tmp/
    • run this command to make the script executable:
      chmod +x /data/local/tmp/systemrw_*VERSION*/systemrw.sh
    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 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 included config.ini file and then save the file. Then compress the systemrw_*VERSION* and META-INF folders again as a new .zip and install it in recovery.
    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.bin and want to skip that process next time you install the .zip then put this in line #2 of config.ini :
    in=`realpath /dev/block/by-name/super` size=15
    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 (see examples below).
    If you've got a super partition I would recommend using the optional size=15 parameter as well to give some extra free space (in MB) to each partition.
    Optional script arguments:
    Replace x with your custom value
    • in=x *THIS IS IGNORED IF YOU'VE GOT 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 systemrw or the official unsparsed super.img from your downloaded firmware. (unsparse with simg2img). It's also possible to use your super partition block device as input.
      If omitted, systemrw will dump super image from phone to ./img/super_original.bin
      (path is relative to the script)
    • out=x *THIS IS IGNORED IF YOU'VE GOT NO SUPER PARTITION*
      With this argument you can specify the output path of the new patched super file.
      If omitted, default output value is ./img/super_fixed.bin
    • size=x *ONLY RECOMMENDED IF YOU'VE GOT SUPER PARTITION*
      With this parameter you can specify the extra free space (in megabytes) that will be added to each partition. There is a limit as to how much extra free space you can add per partition. Check your lpdump.txt to find out the exact maximum extra size.
      If omitted, default extra size is 0 (shrink to minimum)

    Examples:
    Bash:
    adb shell
    su
    cd /data/local/tmp/systemrw_1.32
    chmod +x ./systemrw.sh
    
    # Run this command *IF YOU'VE GOT NO SUPER PARTITION*
    ./systemrw.sh
    
    # Run this command if you're first time user *AND YOU'VE GOT SUPER PARTITION*
    # Specify the extra free space in megabytes for each partition:
    ./systemrw.sh size=15
    
    # Plug an existing super image into the script like this *ONLY IF YOU'VE GOT SUPER PARTITION*
    ./systemrw.sh in=./img/super_original.bin size=15
    
    # Specify both the input file as well as the output destination *ONLY IF YOU'VE GOT SUPER PARTITION*
    ./systemrw.sh in=./img/super_original.bin out=./custom/path/super_fixed.bin size=15
    
    # EXPERT EXAMPLE:
    ./systemrw.sh in=`realpath /dev/block/by-name/super` out=./img/super_fixed.bin size=50

    Uninstallation:
    • To free up space and keep script as well as r/w capability you can simply delete /img subfolder at /data/local/tmp/systemrw_1.32/img
    • To delete script and keep r/w capability you can simply delete whole script folder at /data/local/tmp/systemrw_1.32
    • 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 (inside /tools/ subfolder - also available in recovery).

    Troubleshooting:
    If you get error 255 in custom recovery when trying to install flashable zip then try to install it manually. If you encounter this error please send me this file /tmp/recovery.log
    Make sure the script folder was correctly extracted to:
    /data/local/tmp/systemrw_*VERSION*
    If you can't run the script try making the file executable like this: chmod +x ./systemrw.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!
    If you get bootloop after successfully flashing super_fixed.bin then you can undo bootloop simply by re-flashing original stock super image and re-enabling dm-verity and verification with the included avbctl binary (inside /tools/ subfolder - also available in recovery). Those are the only changes performed by the script.
    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 enthousiasts (links can be found in the credits section below). Therefore 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 @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! This genius also showed me how to flash a 5GB file to my partition in just under 30 seconds! Much faster than fastboot! I still can't believe it!
    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.
    More thanks @gabrielfrias for his helpful comment
    Thanks @YOisuPU and of course @topjohnwu for discovering the 'shared_blocks feature'
    Thanks @HemanthJabalpuri for assisting me in optimizing the underlying algorithm!
    Thanks @aIecxs for helping me fix some shell scripting errors (y)

    Disclaimer:
    #Disclaimer v2.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 ensue from the (inappropriate) use of this software.
    • All responsibility, liability and risk lies with the end-user. You hereby agree not to abuse this software for illegal purposes.
    • Under no circumstances shall the comments & title section of the script (lines #1 - #100) as well as the included update-binary be modified or removed by the end-user without the original author's explicit consent.
    • Under no circumstances shall the end-user steal and / or abuse my entire SystemRW project or parts thereof (including but not limited to my update-binary, my script, my program logo, my program name or the names of my functions and/or my variables and more...) only to rename and republish my SystemRW / SuperRW feat. MakeRW project (or parts thereof) as his/her own creation without even mentioning original source!!! (yes this actually happened :( perpetrated by at least 2 fellow forum members...)
    • Unverified, unauthorized re-uploads of any files contained within this project to 3rd party websites are not permitted without the original author's prior knowledge and consent (for security reasons). If you want to share this software with your friends please just send them the link to this website. Thanks.
    • The end-user is allowed to improve the underlying algorithm (as long as no malicious code is added) and post his/her improvements, results and feedback right here in the official SystemRW / SuperRW feat. MakeRW project thread @ xda-developers.com
    • If the end-user wishes to re-use my SystemRW / SuperRW featuring MakeRW project (or any parts thereof) inside his/her own project then he/she shall first contact me! Thanks!
      If you want to make a video tutorial about this project please contact me first!
      Thank you! I can give you high resolution project logo and more!

    Please make sure to post your feedback and suggestions in the official thread right here.
    Enjoy customizing your fully read/write-able Android device! And feel free to share your Android system mods with other users in this thread! Thanks!


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


    1-jpg.5235933


    working-jpg.5525671


    Confirmed working on these devices:
    Note:
    To run it in Android 12+ you must edit the systemrw.sh file with text editor.
    Simply disable sdkCheck() function at line #420
    It should look like this:
    #sdkCheck
    Now save file and run script (or repack flashable.zip and flash). Good luck! (y)


    Download v1.32 mirror #1
    Download v1.32 mirror #2
    more official download mirrors coming soon!
    current status: experimental


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

    Donate
    15
    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)
    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
    }
    9
    Is it summer holidays yet or what? So much interest in my thread right now it's crazy. I can't even keep up with every single comment there's just too many. I just want to say thank you to every single one of you for your enthousiastic interest in this amazing SystemRW / SuperRW feat. MakeRW by lebigmac project! (y)

    Guys please stop wasting your time trying to get that old version to work in Android 12 + as it was originally not designed for such a new Android version. Just be patient for a couple more days and I will officially release BRAND NEW VERSION :D(y) which has Android 12+ support out of the box, auto-resize feature and more ;)(y)
    I'm working on it hard as we speak... 🛠️

    If you're Samsung or Realme device user just send me a message and we can work on a fix! Thanks (y)
    8
    Hi @TheGhost1951 thanks for trying to help out this other user and I know you only have the best intentions but

    Please no unofficial, unverified, unauthorized reuploads of my SystemRW/SuperRW feat. MakeRW project (or any parts thereof) or else I'll have to download every single unofficial, unverified, unauthorized re-upload out there and check each individual file for any suspicious modifications by 3rd party users before I can allow it. I don't have time to do that. I prefer working on the script itself. Thanks for your understanding! (y)

    Hi @a9381 if your browser doesn't work correctly then simply try a different browser! Good luck! (y)
    And don't worry for the new version I will add at least 3 different official download mirrors for your pleasure! ;)(y)

    Don't waste your time with that old version 1.32 ! That old version only seems to work in Android 10 and Android 11.

    Brand new version with out-of-box support for A12+, auto-resize feature, next-gen Samsung devices support and more enhancements is scheduled to be released this summer! Stay tuned! ;)(y)