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

lebigmac

Senior Member
Jan 31, 2017
929
553
Hello, @lebigmac,

I think you shoud advise in the first post that this great solution works while you are using normally your rom. But may be you must say that this script is not permanent. I mean, if you have to flash every week your favorite beta rom, you MUST do it again all process.
But, I see that everytime you do this, the dump /temp partition where is created the new super image, IS GROWING a little bit each time you flash the script.
So, my questions is: ¿ There is a way to avoid the increase of the new partition ? ¿ It is possible to return to original size before the script or delete it to start from new?

Thank you, mate.

By the way : Ole tu polla means something like: "wow, you had two big balls for do that !"

Hello, @lebigmac,

I think you shoud advise in the first post that this great solution works while you are using normally your rom. But may be you must say that this script is not permanent. I mean, if you have to flash every week your favorite beta rom, you MUST do it again all process.
But, I see that everytime you do this, the dump /temp partition where is created the new super image, IS GROWING a little bit each time you flash the script.
So, my questions is: ¿ There is a way to avoid the increase of the new partition ? ¿ It is possible to return to original size before the script or delete it to start from new?

Thak you, mate.

By the way : Ole tu polla means something like: "wow, you had two big balls for do that !"
Hola amigo! Thanks for that translation! That made my day.

Every week you flash a new beta rom?
Well then I guess you will have to flash my flashable script every week then :D
You will become a regular user of my script ;)

In the next version of the script, it will automatically delete all the *.img files inside the folder: /files/super/
after it has finished doing its job. I hope this will help reduce the size on disk.
The cleanUp function is already present in the script. I just haven't been using it enough lately.

You can always manually delete the entire makesysrw_1.15c folder inside /data/local/tmp/ and when you swipe to install it will simply reinstall itself to that location and initiate the procedure.

Good job ! it worked like a charm !
Got RW in System partition in my MI 10. I just tested it making a new colorized reboot menu. You can see this result.
3739473-23be6f3b5c75dd8cb93c7c2044d57866.jpg
3739475-338409f4f3fca047b610440a0896ffcb.jpg

By the way how did you do this? Can you please share with me? I want this feature too! It looks very useful. I need the reboot to fastboot, recovery buttons! How to get them on my Xiaomi X3 NFC?
 
Last edited:
  • Like
Reactions: The_Eniac

The_Eniac

Member
Mar 5, 2021
7
6
Barcelona
It
Hola amigo!
jajaja thanks for that translation! That made my day.

Every week you flash a new beta rom?
Well then I guess you will have to flash my flashable script every week then :D
You will become a regular user of my script ;)

In the next version of the script, it will automatically delete all the *.img files inside the folder: /files/super/
after it has finished doing its job. I hope this will help reduce the size on disk.
The cleanUp function is already present in the script. I just haven't been using it enough lately.

You can always manually delete the entire makesysrw_1.15c folder inside /data/local/tmp/ and when you swipe to install it will simply reinstall itself to that location and initiate the procedure.



By the way how did you do this? Can you please share with me? I want this feature too! It looks very useful. I need the reboot to fastboot, recovery buttons! How to get them on my Xiaomi X3 NFC?
It is just change one file called "powermenu" located at \system\media\default\. Once you can change the location make RW you only have to put the one modified.
I can let you my modified file if you have a Xiaomi device. I don't know if it will work. But try it out.
You ll tell me.

Here the link to download : https://drive.google.com/file/d/10EstgTpqoXNz0OyUkkbmTKjjfWwCNmAq/view?usp=sharing
 
Last edited:
  • Like
Reactions: lebigmac

The_Eniac

Member
Mar 5, 2021
7
6
Barcelona
Hola amigo!
jajaja thanks for that translation! That made my day.

Every week you flash a new beta rom?
Well then I guess you will have to flash my flashable script every week then :D
You will become a regular user of my script ;)

In the next version of the script, it will automatically delete all the *.img files inside the folder: /files/super/
after it has finished doing its job. I hope this will help reduce the size on disk.
The cleanUp function is already present in the script. I just haven't been using it enough lately.

You can always manually delete the entire makesysrw_1.15c folder inside /data/local/tmp/ and when you swipe to install it will simply reinstall itself to that location and initiate the procedure.



By the way how did you do this? Can you please share with me? I want this feature too! It looks very useful. I need the reboot to fastboot, recovery buttons! How to get them on my Xiaomi X3 NFC?
If you have a poco x3, may be is possible to enable this feature in settings\additional settings\developer options. I don't know if this is the same like in my Mi 10.
 
  • Like
Reactions: lebigmac

lebigmac

Senior Member
Jan 31, 2017
929
553
To those with syntax error try this:

Line #234
change this
Code:
arr=(`ls -Alg /dev/block/by-name | awk '{print $(NF-2)"|"$NF}'`)

to this
Code:
arr=`ls -Alg /dev/block/by-name | awk '{print $(NF-2)"|"$NF}'`

I can't believe nobody else noticed it much earlier. The error was so obvious lol.

If it works I'll include this in the next hotfix.

@ronlkh1965 @thelavip
 
Last edited:

ronlkh1965

Member
Feb 22, 2021
21
10
To those with syntax error try this:

Line #234
change this
Code:
arr=(`ls -Alg /dev/block/by-name | awk '{print $(NF-2)"|"$NF}'`)

to this
Code:
arr=`ls -Alg /dev/block/by-name | awk '{print $(NF-2)"|"$NF}'`

I can't believe nobody else noticed it much earlier. The error was so obvious lol.

If it works I'll include this in the next hotfix.

@ronlkh1965 @thelavip
it says 235 syntax error : bad substitution
for x in "${arr[@]}"; do
 
  • Wow
Reactions: lebigmac

lebigmac

Senior Member
Jan 31, 2017
929
553
@ronlkh1965
Apparently your shell doesn't support arrays for some reason! That's why you get syntax error. Now it all makes sense.

It will get triggered only if no super partition is detected right?
That's why may be all people haven't noticed it.

Thanks

Hi @HemanthJabalpuri. Thanks for your interest in this project. I see you've been studying my script thoroughly recently. That's great ;) Please keep in mind I am only a beginner at scripting so the script is not perfect yet ;) To be honest this is my very first bash script project ever! I know it's unbelievable!
Also thanks for noticing at line #204 that the string can be replaced with an already existing variable. I'll include that minor optimization with the next hotfix.

How can this script be executed on a device like the OnePlus 7t, which doesn't have a fully functioning twrp?

Thank you.
Hi shady_soldier. Thanks for your interest in this project.
Is there OrangeFox recovery available for your device?
 
Last edited:

Lossyx

Senior Member
Jan 14, 2014
1,527
778
OnePlus 7T Pro
How can this script be executed on a device like the OnePlus 7t, which doesn't have a fully functioning twrp?

Thank you.
Haven't checked the script and not sure where is stores the files. But if it requires data decryption (i.e use of internal storage), then no it's not possible. You have to directly modify each partition manually. **If on OOS**

With that said, you could try pushing zip to /tmp or /cache and flash from there.
 

lebigmac

Senior Member
Jan 31, 2017
929
553
it says 235 syntax error : bad substitution
for x in "${arr[@]}"; do

@ronlkh1965 @thelavip

Good news! I've finally found the solution for all those that were experiencing syntax error at line # 234 and 235
This is what it should look like:
Code:
arr=`ls -Alg /dev/block/by-name | awk '{print $(NF-2)"|"$NF}'`
for x in $arr; do

If it works I'll include it in the next update!
 
Last edited:
  • Like
Reactions: baxal0

lebigmac

Senior Member
Jan 31, 2017
929
553
Poco X3 with Android 11 custom rom (ArrowOS).

"There was a problem removing the reading-only lock of system.img"

Any solution?

Thanks! Good job!View attachment 5255849


View attachment 5255839

Amigo thanks for trying my script and for the nice screenshots and feedback but if you use custom ROM like Arrow OS then your system partition is most likely already read write!
Check it by doing
Code:
mount -o remount,rw /

If you get no error that means your device is already read write so you don't really need to run my script unless you want to play around with resizing your individual partitions inside your super partition that is ;)

If you really want to know exactly what went wrong try running this command manually on your phone:
Code:
e2fsck -y -E unshare_blocks /data/local/tmp/makesysrw_1.15c/files/super/system.img

I hope this helps.
 
Last edited:

zelipukin

Senior Member
Aug 24, 2009
159
40
Jackson
lebigmac, Thank you ! (can repeat this 10000 times) You made me feel 10 years younger - returned to the era when people rule their phones.

my phone (one of) is F150 (sub of Oukitel) model B2021 mt6765 6/64 Andr10 avs

Right after installiation I run into some troubles: Yes, I could make system R/w and manipulate with files, but there were some bad simptoms like Magisk FC, settings FC, etc

I went into TWRP and flashed backup of my Super made just before your script installation.
Surprisingly, after that I have fully functional phone with all the R/W bells and whistles !
 

lebigmac

Senior Member
Jan 31, 2017
929
553
lebigmac, Thank you ! (can repeat this 10000 times) You made me feel 10 years younger - returned to the era when people rule their phones.

my phone (one of) is F150 (sub of Oukitel) model B2021 mt6765 6/64 Andr10 avs

Right after installiation I run into some troubles: Yes, I could make system R/w and manipulate with files, but there were some bad simptoms like Magisk FC, settings FC, etc

I went into TWRP and flashed backup of my Super made just before your script installation.
Surprisingly, after that I have fully functional phone with all the R/W bells and whistles !
Hello @zelipukin. Thanks for your message.
Are you saying that my script actually worked on your device?
You sir have made my day. Everytime my script works on somebody else's device it makes me happy :)
Of course the script is not perfect yet. Still lots of work to do...

Did the script itself give you any errors? Did you run it manually or with the flashable zip installer?

Is this your device? It looks good. A little bit more rugged than mine & same price range as my Xiaomi X3 NFC!
The specs are not bad for that price range! And it has NFC just like mine! Look at that battery capacity! I'm jealous! I think I want one. I mean 100 bucks? That's such a great deal! That's even better price to hardware ratio than Xiaomi lol

Technical Specifications

  • Battery: 8000mAh
  • Display: 5.86-inch 1520x 720 pixel HD+ U-Notch Display
  • CPU: MediaTek Helio G25 octa-core processor
  • GPU: IMG PowerVR GE8320
  • RAM: 6GB
  • ROM: 64GB expandable to 256GB using a microSD card
  • Rear camera: 13MP+2MP+2MP+VGA quad-camera array
  • Front camera: 8MP
  • Charging: USB-C and standard 5v2a, compatible with 9v2a 18W fast charging
  • Slots: Dual-SIM slots + Dedicated microSD card slot
  • Certification: IP68 and IP69K rating and MIL-STD-810G
  • Customizable button
  • One Operating System, Two Modes
  • Colors: Black and Sahara Yellow
  • Supports NFC

1200-775-696x450.jpg
 
Last edited:

lebigmac

Senior Member
Jan 31, 2017
929
553
Good news to all those unfortunate ones who couldn't get it to work in their TWRP version or they don't even have TWRP for their device or stuck on OrangeFox!
I am thinking about releasing Android only version! No TWRP required.
You will have to flash the partitions manually though!
 
  • Like
Reactions: baxal0 and Ayoub$#

HemanthJabalpuri

Senior Member
@lebigmac
I am happy to say that, all the things went fine with my Realme C12.

I have removed original super.img right after lpunpack finishes. This makes me use your tool with just 15GiB free space.

A small thing is that, in your update-binary, please create a dir /data/local/tmp if it does not exist.
If it does not exist, your tool will fail to install.
It will be not present if a person clean flashes your tool(wipe data).

Also system RW works fine, but vendor RW gives operation not permitted.
Do I need use chattr with the block of vendor?

If you can't run the script try making the file executable like this: chmod +x ./makesysrw.shIf you still can't get it to work run which sh in your TWRP 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.
Also, we can use like this sh makesysrw.sh. Advantage of this is that, we don't need to make it executable and shebang is ignored.

Thanks
 
Last edited:
  • Love
Reactions: lebigmac

shady_soldier

Member
Dec 14, 2013
23
4
Thane
@ronlkh1965
Apparently your shell doesn't support arrays for some reason! That's why you get syntax error. Now it all makes sense.



Hi @HemanthJabalpuri. Thanks for your interest in this project. I see you've been studying my script thoroughly recently. That's great ;) Please keep in mind I am only a beginner at scripting so the script is not perfect yet ;) To be honest this is my very first bash script project ever! I know it's unbelievable!
Also thanks for noticing at line #204 that the string can be replaced with an already existing variable. I'll include that minor optimization with the next hotfix.


Hi shady_soldier. Thanks for your interest in this project.
Is there OrangeFox recovery available for your device?
No Orangefox recovery too for Oneplus 7T , unfortunately. Oneplus really messed up 7T's decryption with android 10. I'm hoping for it to fixed with OOS 11 update which too, got delayed because they didn't care for its decryption issues in the first place. Its mind boggling that the 7T doesn't have a working TWRP even after 1 ½ years of being launched.
 
  • Like
Reactions: lebigmac

Top Liked Posts

  • There are no posts matching your filters.
  • 3
    i use poco m3 rom xtrv hellas....your script is rock..i remove permanently bloatware with root explorer...nice job
    Hi @masricky I'm happy you like the script. Please send me your log files from this folder. Thanks (y)
    /data/local/tmp/systemrw_1.32/log/

    Enjoy tinkering with your fully read/write-able device and make lots of backups before modding stuff! :love:(y)

    Yes it's true. I wrote this script but it wouldn't exist as such without
    Thank you to everyone who contributed positively to this project! :D(y)
    Also keep in mind script is not perfect for all devices out there yet. Rest assured I'm always working hard on next version ;)(y)
    2
    Thanks! It works flawlessly (although I had to do it manually, it's easy enough). My device is a Redmi Note 9S (curtana). If I update my device, do I need to remake the fixed super.img or should I flash the one made before the update?
    Hi @LanceLot9980. Congratulations for getting the script to work on your device! Enjoy a fully read/write-able device! :love:(y)
    If you upload your log files from script folder and a screenshot of your system mounted as r/w then I can add you to the list of successful devices on front page ;)(y)

    @LanceLot9980 yes I noticed your question but I was on the road.
    If you update OTA this will most likely restore the shared_blocks read-only feature on your super partition which means you will have to run script again if you want to go full r/w again ;)
    Thanks! It works flawlessly (although I had to do it manually, it's easy enough). My device is a Redmi Note 9S (curtana). If I update my device, do I need to remake the fixed super.img or should I flash the one made before the update?
    The flashable zip gave you error 255? Don't worry I already fixed this issue in next version ;) Hopefully I can release it soon!
    2
    hi and thank's for your work...
    I have an issue with your script, I flash it on twrp on my renoir on A11 LOS and the flash is correct but at the end got these errors messages
    failed to mount system/ext/product/vendor (invalid argument) here are the logs and the ss...

    when I try to copy a .xml on vendor partition got, no more space available and it copy a .xml but empty..
    Hello @rayman95. You're welcome. Thanks for your log files and the screenshot (y)
    Don't worry about this TWRP related error at the very end. This has nothing to do with the script. This only means you must reboot the device. That's all ;)(y)
    Failed to mount '/system_ext' (Invalid argument)
    Failed to mount '/product' (Invalid argument)
    Failed to mount '/vendor' (Invalid argument)

    According to your log it looks like everything worked as expected but I think you must run script again with larger custom size. Which custom size did you use? I can't see it in the log :(
    Hopefully I can release that new version soon. The included auto-resize feature should fix this kind of issue in next version ;)(y)



    it worked great on poco x3 pro, but vendor didn't, when I try to edit an XML located in "vendor/etc/device_features" it doesn't work, even so, thank you very much for the work.
    Hi @Revokke. You're welcome. Thanks for your feedback.
    Please feel free to send me your log files from this folder and I'll have a look at your specific issue. Thanks (y)
    /data/local/tmp/systemrw_1.32/log/

    Which MIUI version number are you using? Official stock MIUI or Xiaomi.eu ROM ?
    What do you mean it doesn't work? I just tried it on my device and it just works. I can create and delete files in this directory /vendor/etc/device_features
    Make sure you remount /vendor partition as rw before copying or deleting files.
    If you can only write empty files to /system, /product or /vendor that means you must run script again with larger custom size. Good luck! (y)
    2
    @tids2k için çok fazlaki geri bildiriminiz için teşekkür edilir. Evet, bu bootloop bekleniyordu. Sanırım bu, [2470925]@Hippie459MN[/KULLANICI]'nın birkaç gün önce genel Sony Xperia amiral gemisi yemekta aynı inatçı çekirdekli paniksi.
    gerçek betiğin bir sürüm, Almanya'da kötü durumdaki 255, motorola sürücüsündeki can sıkıcı 73 ve bu inatçı hata siniri gibi bu sorunlardan bazılarını çözecektir. Tam Android 12 olur de harika olurdu.




    Merhaba [KULLANICI=11226285]@kafeinsiz[/KULLANICI] geri bildiriminiz için teşekkürler! Senaryomun Xiaomi azda çok memnunum. Tebrikler! Okunabilir/yazılabilir bir ürünlerden çıkarılabilir!:Aşk :()

    mevcut özel boyutlar=25 (MB) mi kullandınız?

    Android 11 çalıştırdığınızdan emin misiniz? Günlüğünüzde söylüyor diyor ki:
    Evet kesinlikle A11. A10 bir hata nedeniyle burada görünüyor.
    1
    Can you please look into my logs. It shows successful but not got rw capabilities. In twrp after last line of mylog.txt there were two line warning regarding something Mount related
  • 110
    If you can't get this script to work on your device check out the brand new sophisticated superrepack tool by @munjeni


    logo_large.jpg

    SystemRW© v1.32 by lebigmac

    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 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:
    • Extract BUNDLE.zip (the included sysrw_repair.zip is only for fixing error 73!)
    • Before launching script make sure you've got full read/write access to the /data partition by first decrypting and then mounting /data partition as R/W!
    • 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)
    • 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 these commands in Android:
      Bash:
      adb shell
      su
      touch /sdcard/my_tune2fs_output.txt
      for i in `seq 0 5`; do tune2fs -l /dev/block/dm-$i>>/sdcard/my_tune2fs_output.txt; 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=`ls -l /dev/block/by-name/super | awk '{print $NF}'` 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=`ls -l /dev/block/by-name/super | awk '{print $NF}'` 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 @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 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.
    Big thanks @munjeni for allowing me to use his 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!

    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 - #65) 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 my variables and more...) only to rename and republish my SystemRW project (or parts thereof) as his / her own without even mentioning original source or original credits!!! (yes this actually happened :( perpetrated by a fellow forum member...)
    • Unauthorized re-uploads of any files contained within this project to 3rd party websites are not permitted without the original author's prior consent!
    • 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 project thread @ xda-developers.com
    • If the end-user wants to integrate my SystemRW project into his/her own project then he/she shall first ask me (the original author) for permission.
      If you want to make a video tutorial about my script 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_02-jpg.5309955
    v1-31d_03-jpg.5309957


    1-jpg.5235933


    Confirmed working on these devices:




    Download v1.32 mirror #1


    Download v1.32 mirror #2

    current status: experimental

    If you like this project and want to support further development of SystemRW & the creation of more amazing projects like this then please feel free to donate to the developer by clicking the button below.

    Thanks! Your support is very much appreciated!

    Donate
    12
    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!
    6
    New version 1.20 is ready! DOWNLOAD HERE
    Good news for those that don't have TWRP or couldn't get it to work in their TWRP. Now the script can also be run directly inside Android. Keep in mind that you will have to flash the patched images manually in this case using fastboot flash.

    The zip can still be flashed in TWRP (make sure zip signature verification isn't checked). This time I bundled my device's stock sh binary (which I used to develop the script) with the archive. Hopefully this will prevent avoidable sh-related syntax errors for some folks. The flashable zip installer update-binary automatically launches the script with the proper arguments using this bundled sh program (it's inside the tools subfolder).

    To those that were having difficulties running the previous version due to empty partitions or multiple partition groups inside their super : this has finally been fixed :D

    Please give this new version a try and let me know if it works for you or not and I will add it to the first post. Thanks for your feedback!
    5
    I try to redo the procedure, i want to change the size. but i get error, can't remove lock.

    Good news. New hotfix available HERE
    I got rid of that buggy get minimum size function and reworked the size querying algorithm a little bit. Should be more stable now.

    Next step will be to make the script compatible with those devices that have empty partitions embedded inside their super partition...
    Also ronnie was complaining about syntax error but I have yet to find the syntax error... If anyone finds it please let me know so I can fix it. Thank you!