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

lebigmac

Senior Member
Jan 31, 2017
940
556
restore , you mean install firmware or what??
can you explain please im currently locked out of my phone with twrp saying data partition 0mb
should i format data or wipe everything or what should i do

Twrp should have avbctl binary by default.

Bash:
adb shell
avbctl enable-verity
avbctl enable-verification

Now fastboot flash your stock read-only super image to your super partition and you have just undone all changes that the script has done to your device. Congratulations.

If you ask me you shouldn't have installed that OTA since script was working fine in previous firmware version. Maybe Asus closed this R/W vulnerability in their latest OTA?
 
Last edited:
  • Like
Reactions: JimmyMX

JimmyMX

Member
Jun 29, 2012
37
9
36
Tripoli
Google Nexus 5
Huawei Nexus 6P
Twrp should have avbctl binary by default.

Bash:
adb shell
avbctl enable-verity
avbctl enable-verification

Now fastboot flash your stock read-only super image to your super partition and you have just undone all changes that the script has done to your device. Congratulations.

If you ask me you shouldn't have installed that OTA since script was working fine in previous version.
ok
thanx for the reply
im currently extracting payload.img
should i excute avbctl commands in twrp terminal or adb on pc
and can you give me the command to fastboot flash the super image exactly

and for the OTA i cant stay not updated updates bring battery improvements and secuity patches thats all


Edit: i executed the avb commands in twrp , i first ran the commands Get-
on slot a and slot b to know the status of dm-verity and verification slot a gave disabled and slot b gave enabled

and after that i rebooted to slot a twrp which is different than slot b twrp one is 3.1.51 and one is 3.1.52

then i rebooted into slot a system without flashing stock super img ,

now im back on android but the system is not rw anymore ,

what should i do now to get rw system ??

by the way your a life saver i cant thank you enough , but MAY THE FORCE BE WITH YOU ❤️❤️❤️❤️❤️❤️



and for the record this is exactly what happend to me a year ago when i told you i HAD to wipe , it was back then my fault not to ask for help

anyway thank you sir
 
Last edited:

JimmyMX

Member
Jun 29, 2012
37
9
36
Tripoli
Google Nexus 5
Huawei Nexus 6P
Hi All, It is odd but thats how it is working for me -

For phones with A and B partition , one way to make it work is upgrade both partitions to same version, make partition B as active and then run script fresh that will work perfectly.

Or just make partition B as active and then run script fresh that can also work.

When partiton A is active, this is the failure.

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

makesysrw: Joining all extracted images back into one single super image...
makesysrw: Please wait and ignore the invalid sparse warnings...


makesysrw: Error! failed to create super_fixed.img file


No change , only swap active partition to B , and it is success !!
========================================================================

makesysrw: Joining all extracted images back into one single super image...
makesysrw: Please wait and ignore the invalid sparse warnings...

Invalid sparse file format at header magic
Invalid sparse file format at header magic
Invalid sparse file format at header magic
Invalid sparse file format at header magic
Invalid sparse file format at header magic
Invalid sparse file format at header magic
Invalid sparse file format at header magic
Invalid sparse file format at header magic
Invalid sparse file format at header magic
Invalid sparse file format at header magic

makesysrw: Successfully created patched super image @
makesysrw: /data/local/tmp/makesysrw_1.24/files/super/super_fixed.bin
makesysrw: Congratulations! Your images should now be rw
makesysrw: Please reboot into bootloader and flash the file(s) manually
#

Slot swapping can be done from fastboot -
#command to check current active
.\fastboot.exe getvar current-slot

#command to swap , below will set active slot to b
./fastboot --set-active=b
hello
it is odd indeed
i tried this method on asus ROG III with a b partitions but everytime i set active slot to b and boot into recovery twrp is telling me that it cannot mount data and data partition is 0mb

do you have any idea about how to fix this
im running it on android 11 stock
thanx
 

Kira565

Member
Oct 13, 2021
9
2
"Be careful with this comment" Yesterday I published that the script worked very well on my motorola one fusion and yes and what I did later was change my bootanimation but after trying several it brikeo me and I tried to copy the original bootanimation and remove the one that I had placed but the recovery at the time of doing the process told me that it only had reading not writing and I gave it the option to mount but it only left me in reading I could not modify it in conclusion I had to install the software again since I formatted it And it did not work for me well I installed the android again today I already did it root I installed the recovery and now that I try to use the script again it gives me error # 73 both in the recovery and the manual installation I would appreciate if you can give me help on how use the repair.zip to see if it helps me fix my problem. Edit excuse my English I am using a translator. Again I would appreciate your help with that error 73 Thank you.
 
  • Like
Reactions: JimmyMX

lebigmac

Senior Member
Jan 31, 2017
940
556
Hi @Kira565 to fix error 73 use the included sysrw_repair script (linux only)
sysrw_repair script instructions



and for the record this is exactly what happend to me a year ago when i told you i HAD to wipe , it was back then my fault not to ask for help
A year ago this script didn't exist yet ;)



not working anymore on Android 12 Miui on Mi 11 Ultra :(
@season 8 @012345678 Did you try adding Android 12 support in script yet?
Simply add these 2 lines between line #403 and #404, save file and try again. Good luck!
Bash:
elif (( $sdkVersion == 31 )); then
        android=12



Lo probé en mi motorola one fusion y funcionó muy bien para mí, gracias por esa contribución.
Hello @Kira565 thank you for the nice words. Congratulations! I am happy that my script works well on your motorola one fusion device. Did you experience error 73 during the process?
Have fun optimizing and customizing your fully read/write-able device! :love:(y)

Please send me your log files from this location thank you! (y)
/data/local/tmp/systemrw_1.32/log/



Test in Pixel 2XL , Android 10 sucess! Thanks a lot!!!

130|taimen:/data/local/tmp/systemrw_1.32 # ./systemrw.sh
--------------------------------------------------
| SystemRW v1.32 automated script by lebigmac |
| @xda ©2021 Big thank you to @Kolibass @Brepro1 |
|@munjeni @AndyYan @gabrielfrias @YOisuPU @bynarie |
| without your help this would not be possible! |
--------------------------------------------------

systemrw: Initiating procedure...

systemrw: Device is in Android mode. Ignoring
systemrw: Current device: Google
systemrw: Current Android version: 10
systemrw: Current SELinux status: Permissive
systemrw: Unable to locate super partition on device. Ignoring
systemrw: /system is already R/W capable. Ignoring
systemrw: /product is already R/W capable. Ignoring
systemrw: /vendor is read-only
systemrw: Adjusting permissions...
systemrw: Attempting to disable dm-verity and verification...
verification is already disabled on slot with suffix _b.
verity is already disabled on slot with suffix _b.
systemrw: Partition detected -> system_a @ /dev/block/sda7
systemrw: Dumping system_a to: /data/local/tmp/systemrw_1.32/nosuper/system_a.img
5242880+0 records in
5242880+0 records out
2684354560 bytes (2.5 G) copied, 29.424051 s, 87 M/s
systemrw: Successfully dumped system_a

systemrw: Current size of system_a.img in bytes: 2684354560
systemrw: Current size of system_a.img in MB: 2560
systemrw: Current size of system_a.img in 512-byte sectors: 5242880

systemrw: 'shared_blocks feature' detected @ system_a.img

systemrw: Increasing filesystem size of system_a.img...
resize2fs 1.45.4 (23-Sep-2019)
Resizing the filesystem on /data/local/tmp/systemrw_1.32/nosuper/system_a.img to 819200 (4k) blocks.
The filesystem on /data/local/tmp/systemrw_1.32/nosuper/system_a.img is now 819200 (4k) blocks long.

systemrw: Removing 'shared_blocks feature' of system_a.img...
e2fsck 1.44.4 (18-Aug-2018)
systemrw: Read-only lock of system_a.img successfully removed

systemrw: Shrinking size of system_a.img back to minimum size...
resize2fs 1.45.4 (23-Sep-2019)
Resizing the filesystem on /data/local/tmp/systemrw_1.32/nosuper/system_a.img to 132001 (4k) blocks.
The filesystem on /data/local/tmp/systemrw_1.32/nosuper/system_a.img is now 132001 (4k) blocks long.

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

systemrw: Partition detected -> system_b @ /dev/block/sda8
systemrw: Dumping system_b to: /data/local/tmp/systemrw_1.32/nosuper/system_b.img
5242880+0 records in
5242880+0 records out
2684354560 bytes (2.5 G) copied, 29.835570 s, 86 M/s
systemrw: Successfully dumped system_b

systemrw: Current size of system_b.img in bytes: 2684354560
systemrw: Current size of system_b.img in MB: 2560
systemrw: Current size of system_b.img in 512-byte sectors: 5242880

systemrw: 'shared_blocks feature' detected @ system_b.img

systemrw: Increasing filesystem size of system_b.img...
resize2fs 1.45.4 (23-Sep-2019)
Resizing the filesystem on /data/local/tmp/systemrw_1.32/nosuper/system_b.img to 819200 (4k) blocks.
The filesystem on /data/local/tmp/systemrw_1.32/nosuper/system_b.img is now 819200 (4k) blocks long.

systemrw: Removing 'shared_blocks feature' of system_b.img...
e2fsck 1.44.4 (18-Aug-2018)
systemrw: Read-only lock of system_b.img successfully removed

systemrw: Shrinking size of system_b.img back to minimum size...
resize2fs 1.45.4 (23-Sep-2019)
Resizing the filesystem on /data/local/tmp/systemrw_1.32/nosuper/system_b.img to 614530 (4k) blocks.
The filesystem on /data/local/tmp/systemrw_1.32/nosuper/system_b.img is now 614530 (4k) blocks long.

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

systemrw: Partition detected -> vendor_a @ /dev/block/sde14
systemrw: Dumping vendor_a to: /data/local/tmp/systemrw_1.32/nosuper/vendor_a.img
1024000+0 records in
1024000+0 records out
524288000 bytes (500 M) copied, 6.126449 s, 82 M/s
systemrw: Successfully dumped vendor_a

systemrw: Current size of vendor_a.img in bytes: 524288000
systemrw: Current size of vendor_a.img in MB: 500
systemrw: Current size of vendor_a.img in 512-byte sectors: 1024000

systemrw: 'shared_blocks feature' detected @ vendor_a.img

systemrw: Increasing filesystem size of vendor_a.img...
resize2fs 1.45.4 (23-Sep-2019)
Resizing the filesystem on /data/local/tmp/systemrw_1.32/nosuper/vendor_a.img to 160000 (4k) blocks.
The filesystem on /data/local/tmp/systemrw_1.32/nosuper/vendor_a.img is now 160000 (4k) blocks long.

systemrw: Removing 'shared_blocks feature' of vendor_a.img...
e2fsck 1.44.4 (18-Aug-2018)
systemrw: Read-only lock of vendor_a.img successfully removed

systemrw: Shrinking size of vendor_a.img back to minimum size...
resize2fs 1.45.4 (23-Sep-2019)
Resizing the filesystem on /data/local/tmp/systemrw_1.32/nosuper/vendor_a.img to 98513 (4k) blocks.
The filesystem on /data/local/tmp/systemrw_1.32/nosuper/vendor_a.img is now 98513 (4k) blocks long.

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

systemrw: Partition detected -> vendor_b @ /dev/block/sde28
systemrw: Dumping vendor_b to: /data/local/tmp/systemrw_1.32/nosuper/vendor_b.img
1024000+0 records in
1024000+0 records out
524288000 bytes (500 M) copied, 5.473983 s, 91 M/s
systemrw: Successfully dumped vendor_b

systemrw: Current size of vendor_b.img in bytes: 524288000
systemrw: Current size of vendor_b.img in MB: 500
systemrw: Current size of vendor_b.img in 512-byte sectors: 1024000

systemrw: 'shared_blocks feature' detected @ vendor_b.img

systemrw: Increasing filesystem size of vendor_b.img...
resize2fs 1.45.4 (23-Sep-2019)
Resizing the filesystem on /data/local/tmp/systemrw_1.32/nosuper/vendor_b.img to 160000 (4k) blocks.
The filesystem on /data/local/tmp/systemrw_1.32/nosuper/vendor_b.img is now 160000 (4k) blocks long.

systemrw: Removing 'shared_blocks feature' of vendor_b.img...
e2fsck 1.44.4 (18-Aug-2018)
systemrw: Read-only lock of vendor_b.img successfully removed

systemrw: Shrinking size of vendor_b.img back to minimum size...
resize2fs 1.45.4 (23-Sep-2019)
Resizing the filesystem on /data/local/tmp/systemrw_1.32/nosuper/vendor_b.img to 98543 (4k) blocks.
The filesystem on /data/local/tmp/systemrw_1.32/nosuper/vendor_b.img is now 98543 (4k) blocks long.

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

systemrw: Congratulations! Your image(s) should now have R/W capability
systemrw: Please reboot into bootloader and flash the file(s) manually
Hello @EveryYest thank you for your log file. It's unusual to have no super partition but WITH shared_blocks feature on all partitions!
Did you end up fastboot flashing all those .img files from the /nosuper/ subfolder? And phone actually booted afterwards? That is amazing news! I can't believe the script actually works on your Pixel 2 XL (2017) device!
Congratulations! Enjoy a fully read/write-able device! :love:(y)

Could you please run the code below and send me this file thank you (y) /sdcard/my_lpdump.txt
/data/local/tmp/systemrw_1.32/tools/lpdump>/sdcard/my_lpdump.txt
 
Last edited:
  • Like
Reactions: JimmyMX

JimmyMX

Member
Jun 29, 2012
37
9
36
Tripoli
Google Nexus 5
Huawei Nexus 6P
Hi @Kira565 to fix error 73 click here


A year ago this script didn't exist yet ;)

@season 8 @012345678 Did you try adding Android 12 support in script yet?
Simply add these 2 lines between line #403 and #404, save file and try again. Good luck!
Bash:
elif (( $sdkVersion == 31 )); then
        android=12
sorry for the misinformation , i got so exited and i had so much fun having my phone sysrw i felt it was a year maybe 😁😁😁😁😁 , anyway
trying out your linux method fix for the repair zip using linux mint
i will report that im currently waiting for the script to flash super_fixed.bin at bootloader 😵😵😵😵😵

it booted into bootloader but in terminal its saying waiting for any device and its taking so long ,
should i do something or should i wait???


Edit : things are happening ,

after the script sysrw.sh repacked the super fixed partition on linux it restarted to bootloader to flash the super partition but didnt finish i unplugged the phone and returned to windows and flashed the super fixed.bin via fastboot and finally it flashed all 21/21 in my case,

the command was : fastboot flash super super_fixed.bin
afterwards i rebooted into twrp and i re-enabled virity and verification on slot b then slot a
then i rebooted into android and BANG mount -o remount,rw / worked on terminal
and finally i have RW System on latest stock android 11 on asus ROG III

A/B partitions

thanx @lebigmac thanx @poyiqqq thanx @harpreet.s

😵 😵 😵 😵 😵 😁😁😁😁😁
 
Last edited:
  • Haha
Reactions: lebigmac

lebigmac

Senior Member
Jan 31, 2017
940
556
@JimmyMX
Congratulations! I can't believe you actually got it to work in the end using the harpreet workaround :ROFLMAO:
What was the problem? Did you experience error 73 or what?
Could you please send me all your log files from this folder? Thanks! It helps with fixing bugs.
/data/local/tmp/systemrw_1.32/log/
Enjoy a fully read/write-able device! :love:(y)

You've been using the script for almost a year now? That's great! How do you like the project so far?
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 Donate button on front page. Thanks! Your support is very much appreciated! (y)



Alguien ayúdeme. ¿Cómo ejecuto el script para el error 73 en una máquina virtual Linux?
Hi @Kira565 please see my reply to you here

Try this:
Extract sysrw_repair_v1.32_proper.zip on your computer
Open Terminal window inside this folder ./sysrw_repair_v1.32_proper/sysrw_repair_v1.32/
Make repair script executable: chmod +x ./sysrw_repair.sh
Execute the repair script in your Linux terminal app: ./sysrw_repair.sh
After repair script finishes you can fastboot flash super super_fixed.bin
 
Last edited:

Kira565

Member
Oct 13, 2021
9
2
[USER = 4712662] @JimmyMX [/ USER]
¡Felicidades! No puedo creer que al final lo hayas conseguido con la solución alternativa de Harpreet : ROFLMAO:
¿Cual fue el problema? ¿Experimentó el error 73 o qué?
¿Podría enviarme todos sus archivos de registro de esta carpeta? ¡Gracias! Ayuda a corregir errores.
/data/local/tmp/systemrw_1.32/log / [/ ICODE] ¡Disfrute de un dispositivo con capacidad de lectura / escritura! :amor:(y) ¿Has estado usando el guión durante casi un año? ¡Eso es genial! ¿Qué te parece el proyecto hasta ahora? Si le gusta este proyecto y desea apoyar un mayor desarrollo de SystemRW y la creación de proyectos más asombrosos como este, no dude en donar al desarrollador haciendo clic en el botón Donar en la página principal. ¡Gracias! ¡Tu apoyo es muy apreciado!(y) [HR] _ [/ HR] Hola, [USER = 11850077] @ Kira565 [/ USER], consulta mi respuesta [URL='https://forum.xda-developers.com/t/script-android-10-universal-mount-system-read-write-r-w.4247311/post-85816321'][B]aquí.[/B][/URL] Prueba esto: Extraiga sysrw_repair_v1.32_proper.zip en su computadora Hacer ejecutable el script de reparación: [ICODE] chmod + x sysrw_repair_v1.32_proper / sysrw_repair_v1.32 / sysrw_repair.sh [/ ICODE] Ejecute el script de reparación en su aplicación de terminal de Linux: [ICODE] sysrw_repair_v1.32_proper / sysrw_repair_v1.32 / sysrw_repair.sh [/ ICODE] Una vez que finalice el script de reparación, puede [ICODE] flash super_fixed.bin [/ ICODE] fastboot [/QUOTE] gracias hermano, pero no funciona para mí, no sé si soy yo, lo estoy haciendo mal, pero cuando lo ejecuto en la terminal de Linux, no me da, tal vez lo estoy haciendo mal, no saber mucho sobre linux
 

dna1982

Senior Member
Mar 12, 2011
100
30
Finally succeeded on OnePlus 8 Pro (Android 11 OOS_11.0.9.9.IN11AA).
But I still need to run "mount -o remount,rw /system_root" in TWRP to get /system_root to be writable.
Is this normal?
 
Finally succeeded on OnePlus 8 Pro (Android 11 OOS_11.0.9.9.IN11AA).
But I still need to run "mount -o remount,rw /system_root" in TWRP to get /system_root to be writable.
Is this normal?
Did the script run, and flash the super_fixed.bin file all correctly/successfully? If yes, then you don't need to run that from recovery. Termux or most other full featured terminal emulators work fine for this.
 
Last edited:

trunghaut1

Member
Oct 20, 2015
8
3
Ho Chi Minh
Successfully flashed on Redmi Note 10 Pro MIUI 12.5 android 11 without error. I can change /system to RW.
But I can only rename or delete files in /system, moving files to /system fails on Root Explorer app (magisk root), reboot is still working at this time.
Then I try to move the file in twrp file manager with "rw remount" command and it works, but my phone gets bootloop when reboot :((
 
Jan 11, 2018
37
5
Xiaomi Poco X3 NFC
Hi. I'm not surprised it works perfectly on Xiaomi Poco X3 NFC. That's the device I used to develop the script ;)
What do you mean it failed but still worked? Can you please show me your Orangefox error? Was it error 255? You can find recovery log file @ /tmp/recovery.txt or /sdcard/Orangefox/log.txt. Thanks!


If you see these errors after successfully running script that's completely normal. Those are TWRP related errors and I can't do anything about that!

Are you sure your Custom ROM... crdroid 7.10 cannot mount your partitions as R/W by default without running my script? Custom ROM's should be able to do that straight out of the box. If your custom ROM cannot mount your partitions as R/W then it's missing some important features. Just my 2 ¢
Yes I'm sure I'm on Crdroid 7.10......And it can't mount R/W without your script...
And the flashing error was my fault.... systemrw_1.32_flashable.zip and sysrw_repair_v1.32_proper.zip were in the same zip....
I flashed without extracting.
Thank You
 
  • Like
Reactions: lebigmac

lebigmac

Senior Member
Jan 31, 2017
940
556
Successfully flashed on Redmi Note 10 Pro MIUI 12.5 android 11 without error. I can change /system to RW.
But I can only rename or delete files in /system, moving files to /system fails on Root Explorer app (magisk root), reboot is still working at this time.
Then I try to move the file in twrp file manager with "rw remount" command and it works, but my phone gets bootloop when reboot :((

Hi @trunghaut1. Thanks for your feedback.
Congratulations! I am happy that script works as expected on your Redmi Note 10 Pro device running MIUI 12.5 (Android 11). :love: (y)
Please send me your log files from this folder, thanks (y)
/data/local/tmp/systemrw_1.32/log/*
Don't forget bootloop can always happen if you modify the wrong system file ;) Always make lots of backups! What kind of bootloop was it? Stuck at the MIUI logo?

It looks like you ran script without custom size parameter or with size=0. By default this will shrink each partition to minimum size before flashing super partition. Then you can only delete stuff from /system path but not copy stuff to it. You get the annoying insufficient space error in your file explorer app.
To fix this try running script again with larger custom size.
On Xiaomi devices size=25 or size=50 seems to work well. Good luck!

Enjoy a fully read/write-able device! :love:(y)



Finally succeeded on OnePlus 8 Pro (Android 11 OOS_11.0.9.9.IN11AA).
But I still need to run "mount -o remount,rw /system_root" in TWRP to get /system_root to be writable.
Is this normal?
First run script in TWRP, got 73 error. Then run repair script in Debian 11, create and flash super_fixed.bin file successfully.
Now you can debloat the hell out of it.
Hi @dna1982
Thanks for your feedback.
Congratulations! I am happy that script works as expected on your OnePlus 8 Pro device running (Android 11 OOS_11.0.9.9.IN11AA) :love:(y)

Error 73 is mysterious. It only happens on about 50% of devices I believe.
Please send me your log files from this folder. Thanks! (y)
/data/local/tmp/systemrw_1.32/log/*

Enjoy a fully read/write-able device! :love:(y)



Did the script ran successfully and flash the super_fixed.bin file all correctly/successfully? If yes, then you don't need to run that from recovery. Termux or most other full featured terminal emulators work fine for this.
Hi @Keven11 thanks for chiming in.
That's true. Script can be run both in Android and custom recovery mode ;) (y)



Yes I'm sure I'm on Crdroid 7.10......And it can't mount R/W without your script...
And the flashing error was my fault.... systemrw_1.32_flashable.zip and sysrw_repair_v1.32_proper.zip were in the same zip....
I flashed without extracting.
Thank You
Successfully flashed and working on Redmi 9 power (MIUI 12.0.10)
Flashed via Orange Fox
Hi @Ringsofsaturn777
Thanks for your feedback.
Congratulations! I am happy that script works as expected on your Redmi 9 power device running MIUI 12.0.10 - Android 11 :love: (y)
How did you like the script?
Please send me your log files from this folder. Thanks! (y)
/data/local/tmp/systemrw_1.32/log/*

Enjoy customizing your fully read/write-able stock Android device! :love:(y)
 
Last edited:

Hippie459MN

Senior Member
With the help of lebigmac in private chat, I got this somewhat figured out and the script ran perfect but my new Sony Xperia 1 iii does not have a custom recovery yet so I have to flash the file manually in fastboot/bootloader. Silly question, so I dont screw something up here, what would the proper flash command procedure be for this? Thanks.
 

xpxc

New member
Oct 28, 2021
3
0
systemrw: Initiating procedure...

systemrw: Device is in Android mode. Ignoring
systemrw: Current device: samsung
systemrw: Current Android version: 10
systemrw: Current SELinux status: Enforcing
systemrw: Unable to locate super partition on device. Ignoring
systemrw: /system is already R/W capable. Ignoring
systemrw: /product is already R/W capable. Ignoring
systemrw: /vendor is already R/W capable. Ignoring
systemrw: Adjusting permissions...
systemrw: Attempting to disable dm-verity and verification...
systemrw: Partition detected -> system @ /dev/block/sda22
systemrw: NO 'shared_blocks feature' detected @ system. Ignoring
systemrw: Partition detected -> vendor @ /dev/block/sda23
systemrw: NO 'shared_blocks feature' detected @ vendor. Ignoring
systemrw: There was a problem removing read-only restriction(s) of your device. Abort



He did not execute successfully
 

Top Liked Posts

  • 1
    -o (as in options) not -0... o_O
    Is this correct now...kindly see the attached...thank you sir.
    1
    To test if everything worked properly you can run each of these commands individually:
    Good luck! (y)
    Bash:
    adb shell
    su
    for a in `ls /dev/block/dm-*`; do mount -o remount,rw $a; done
    var="it's work!"
    echo $var>/test.txt
    echo $var>/product/test.txt
    echo $var>/vendor/test.txt
    echo $var>/system_ext/test.txt
    cat /test.txt && cat /product/test.txt && cat /vendor/test.txt && cat /system_ext/test.txt
    rm -f /test.txt /product/test.txt /vendor/test.txt /system_ext/test.txt
    1
    Working smoothly for MI 10T Android 10 Firmware Global 12.0.3 with argument size=100
  • 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
    @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.
    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)
    1
    Flashable Zip, worked PERFECTLY on ASUS ROG Phone 5 [ASUS_I005D] running Android 11 (R) with TWRP!!! :love:

    Code:
    Current device: asus ASUS_I005D
    systemrw: Current Android version: 11

    Here's a screenshot of being able to mount system as RW and modifying it using adb shell su:

    explorer_C9LwL9ooKK.png


    One suggestion - make the script so it resizes partitions to have a bit more than just 15 MB extra space by default? Would help a lot incase I didn't have anything I could delete inside system partition to free up space.

    Would there be any issues if the script resizes more than 15 MB by default? Most recent phones will have atleast 32GB internal storage which is plenty to expand with say 256 MB or 512 MB?

    At first I was very very afraid of bricking my new phone but I took a backup of super img using adb shell su and dd command myself and made sure that even if something does get bricked, I'll be able to restore it manually using "flashboot flash super super_backup.img"

    I've gone through a lot of pages from the start and the end of this thread in the last few days, to make sure I wasn't missing anything too important. After seeing users report no problems for Android 11 (R), I just went for it and I'm glad I finally did!

    Luckily, your perfect script didn't have any problems making the system RW. I am able to mount system as RW and I have successfully deleted apps in /system/priv-app/ which I don't need, and copied a folder over too!

    I thought I'll have to manually disable AVB/dm-verity but I forgot about it, until I saw it in the TWRP log as the image was flashing, to realize that the script does this itself! :D

    Code:
    systemrw: Attempting to disable dm-verity and verification...
    Successfully disabled verification on slot with suffix _a. Reboot the device for changes to take effect.
    Successfully disabled verity on slot with suffix _a. Reboot the device for changes to take effect.

    To change the emoji font file in "/system/fonts/NotoColorEmoji.ttf" which, in android using total commander, I kept getting errors, and after copying using adb shell first, the resulting file was just 668 KB (instead of 17 MB or something), I had to delete some unused preinstalled apps to free up enough space (I have no idea why Yandex browser was in priv-app, it's not even installed anywhere, just sitting in system, taking up 140MB+ of space)

    Changed emojis work perfectly (which is why I wanted to make system rw in the first place... ah the risks I take for the simplest little things that make my phone truly my own 😂)

    I was forgetting I had to chmod 644 on the copied file, because default permission was 600 after copying with adb shell su, and I think no apps were able to read the emoji file at all.

    Would love to see the script as a magisk module, making it even more easy to get on any new devices I might have in the future ^^

    I don't have any other Android 10+ phones as of now, and I won't be updating or changing anything big on my current phone after I set it up perfectly, but either way - I'd love to help you test and improve the script if I ever get the chance!

    Logfile is attached ^^
    Thanks a lot @lebigmac ! 😌
    Also thanks to everyone else who helped test the script! 😄
  • 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 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:
    • 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
    more official download mirrors coming soon!
    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!