Making system partition RW


ntlkr

Members
Jan 3, 2024
73
20
Does anyone know how to mount the /system partition as RW while booted into system on shennong? (currently on latest twrp and 24.1.29DEV firmware)

The integrated option in twrp fails, as the partition format is not supported. The RO2RW module causes a softbrick. Tried to use DFS as prerequisite, but it doesn't work aswell.

Any ideas? I would really want to customize the boot animation and do some other tweaks, but of course this is not possible rn.
 
  • Like
Reactions: drabha
Does anyone know how to mount the /system partition as RW while booted into system on shennong? (currently on latest twrp and 24.1.29DEV firmware)

The integrated option in twrp fails, as the partition format is not supported. The RO2RW module causes a softbrick. Tried to use DFS as prerequisite, but it doesn't work aswell.

Any ideas? I would really want to customize the boot animation and do some other tweaks, but of course this is not possible rn.
i am in the same boat. cant do rw partition in mi 14 pro. hope somebody can be help
 
Hello. This is lebigmac, the original author of the unique and original System-RW / Super-RW / Make-RW / ro2rw software.
I created this unique software from scratch and I can confirm that it works with the latest MIUI 14.0.10.0 on my Redmi Note.
I wanted to try my System-RW script with the latest Hyperos v1.0.8. firmware, but I immediately uninstalled it after I saw the new HyperOS setup wizard. It just took way too long to set it all up and get the device going. And once the new software was running, the device became so slow and there was visible lag. I honestly prefer the latest MIUI firmware but that's just my personal preference. I might give HyperOS another try in the future once they made it smoother and faster, but I don't see why my System-RW script shouldn't work with it, I mean it's just another stock Android ROM after all...

I managed to do the System-RW, almost Full-RW on the latest MIUI 14.0.10.0 using my old sysrw_1.42 script...
I guess they never really closed that RW vulnerability :D

Anyways. Just a quick warning for y'all : don't fall for that fake RO2RW copycat by that dubious cyberpirate leegarchat. Just because he's on xda doesn't mean he's legit. Just saying. It could contain a keylogger or virus or whatever. I cannot guarantee that his fake version of my RO2RW project does not contain any malware. Also I cannot offer any customer support for any unauthorized, dubious stolen copies of my work. Thanks for your understanding.

You can always download the latest version of my unique and original System-RW / Super-RW / Make-RW / ro2rw software at my personal homepage. See my profile for the link. (currently doing some maintenance)

Here is the direct link to the original System-RW version 1.42 by lebigmac
Just extract the .apk like any other .zip file. Inside the /res/raw subfolder you will find a sysrw zip file. Extract it. Now you should have a sysrw_1.42 folder.
You can remove all the permissive Samsung kernels that are included to make the package smaller (~25 MB)

Once you have extracted the sysrw_1.42 folder just push it to your phone like this:
Bash:
adb push sysrw_1.42 /data/local/tmp/

Make the sysrw launcher executable:
Bash:
adb shell
cd /data/local/tmp/sysrw_1.42
chmod +x ./sysrw

Now you can launch the System-RW script:
Bash:
./sysrw

Or if you want to work with a different super.img than the one that's currently installed, just use the input parameter of the script:
Bash:
./sysrw in=img/super_new.img

If your super.img contains mostly EROFS (or F2FS) sub-partitions, then you will probably have to use the included Auto-Debloat feature since EXT4 file-system format does not use any file compression by default!
To activate Auto-Debloat mode just write auto_debloat=1 into the sysrw_1.42/options/config.ini file and save it.
And you must also write a list of all the bloatware that you would like to auto-debloat at runtime into the sysrw_1.42/options/auto_debloat.txt file and save it. (case sensitive!)

Enjoy making your System-RW and customizing your next-generation Android device however you like!
If you have any questions just ask! Yes I will make a video tutorial for the beginners when I have more time...
Good luck!
 
Last edited:
Hello. This is lebigmac, the original author of the unique and original System-RW / Super-RW / Make-RW / ro2rw software.
I created this unique software from scratch and I can confirm that it works with the latest MIUI 14.0.10.0 on my Redmi Note.
I wanted to try my System-RW script with the latest Hyperos v1.0.8. firmware, but I immediately uninstalled it after I saw the new HyperOS setup wizard. It just took way too long to set it all up and get the device going. And once the new software was running, the device became so slow and there was visible lag. I honestly prefer the latest MIUI firmware but that's just my personal preference. I might give HyperOS another try in the future once they made it smoother and faster, but I don't see why my System-RW script shouldn't work with it, I mean it's just another stock Android ROM after all...

I managed to do the System-RW, almost Full-RW on the latest MIUI 14.0.10.0 using my old sysrw_1.42 script...
I guess they never really closed that RW vulnerability :D

Anyways. Just a quick warning for y'all : don't fall for that fake RO2RW copycat by that dubious cyberpirate leegarchat. Just because he's on xda doesn't mean he's legit. Just saying. It could contain a keylogger or virus or whatever. I cannot guarantee that his fake version of my RO2RW project does not contain any malware. Also I cannot offer any customer support for any unauthorized, dubious stolen copies of my work. Thanks for your understanding.

You can always download the latest version of my unique and original System-RW / Super-RW / Make-RW / ro2rw software at my personal homepage. See my profile for the link. (currently doing some maintenance)

Here is the direct link to the original System-RW version 1.42 by lebigmac
Just extract the .apk like any other .zip file. Inside the /res/raw subfolder you will find a sysrw zip file. Extract it. Now you should have a sysrw_1.42 folder.
You can remove all the permissive Samsung kernels that are included to make the package smaller (~25 MB)

Once you have extracted the sysrw_1.42 folder just push it to your phone like this:
Bash:
adb push sysrw_1.42 /data/local/tmp/

Make the sysrw launcher executable:
Bash:
adb shell
cd /data/local/tmp/sysrw_1.42
chmod +x ./sysrw

Now you can launch the System-RW script:
Bash:
./sysrw

Or if you want to work with a different super.img than the one that's currently installed, just use the input parameter of the script:
Bash:
./sysrw in=img/super_new.img

If your super.img contains mostly EROFS (or F2FS) sub-partitions, then you will probably have to use the included Auto-Debloat feature since EXT4 file-system format does not use any file compression by default!
To activate Auto-Debloat mode just write auto_debloat=1 into the sysrw_1.42/options/config.ini file and save it.
And you must also write a list of all the bloatware that you would like to auto-debloat at runtime into the sysrw_1.42/options/auto_debloat.txt file and save it.

Enjoy making your System-RW and customizing your next-generation Android device however you like!
If you have any questions just ask! Yes I will make a video tutorial for the beginners when I have more time...
Good luck!
I think it would be much better if you made a flashable . zip like the previous version. I have not been able to run version 42 via adb on the latest version of hyperOS. Thanks anyway
 
sysrw: ¡Error fatal! El tamaño total de la partición excede el tamaño máximo de superunidad en 1654947840 bytes (1578 MB)

I finally managed to run the script but it's out of space. I've tried with the other command "./sysrw in=img/super_new.img" but it gives me an error. Let's see if you can help and make it not too complicated. Thanks
 
Last edited:
  • Like
Reactions: lebigmac
I think it would be much better if you made a flashable . zip like the previous version. I have not been able to run version 42 via adb on the latest version of hyperOS. Thanks anyway

Hola.
Did you try renaming the rommaker.apk to rommaker.zip and just flashing that in recovery? Yes it's actually a flashable zip. I know I must make the whole package smaller by default. In next version I will remove all those permissive Samsung kernels. That's obsolete.

It looks like you must activate the auto-debloat function as I already mentioned above (last paragraph) and debloat a total of 1,54 GB from your super.img. I would suggest looking into /product and /vendor for debloatable stuff. You can easily debloat 1 GB only in /product sub-partition alone I bet. Look into /product/app and /product/priv-app /product/data-app etc... Also check the /vendor sub-partition for any useless bloatware to Auto-Debloat.

A safe way to find out debloatable apps is to first disable them using a root app disabler tool and then reboot phone, test some apps and if everything still works, then that probably means that this app in question is safe to permanently remove from your super.img using the Auto-Debloat function of my Make-RW / ro2rw tool.

My auto_debloat.txt looks like this
This is just a really basic debloat of only about 500 MB I think. To free up 1.5 gigs you will need to dig even deeper than that. Be very careful because auto-debloating the wrong folder / file can cause bootloop by itself especially if it's critical to the system (and remember the content of the auto_debloat.txt file it's case sensitive) !!!

Good luck amigo!:emoji_thumbsup:
 
Last edited:
  • Like
Reactions: Feber
Well, I've tried changing the apk extension to zip and it didn't work when I tried to flash the latest HyperOS from recovery on a Mi 11 Pro. It gives an error. Previously, on a MI Note 11, also with the official rom, the flashable version 1.36 .zip worked very well (this version doesn't work on the MI 11 Pro). I hope you can help us and make 1.42 or higher also flashable. I'll be attentive to your news.
 
  • Like
Reactions: lebigmac
1.42 or higher
Yes my friends there is a PC version on the horizon but who will do the GUI for me while I focus on the underlying code? Or I will have to program the whole thing but then it will take even longer to release!

Talented GUI developers, send me your resumes through pm !
 
  • Like
Reactions: lecmngend
Yes my friends there is a PC version on the horizon but who will do the GUI for me while I focus on the underlying code? Or I will have to program the whole thing but then it will take even longer to release!

Talented GUI developers, send me your resumes through pm !
Well, I was finally able to install the zip without any problems. Previously I was running it from OTG and I moved it to the internal storage from there it worked. Then, already inside Android root exolprer when I tried to change to R/W it does nothing, that is, it doesn't seem to work, however I can copy and modify folders and permissions without error messages so I think it works. You need to polish the script a bit and fix this thing about the r/W confirmation in the application and I think it would be done. Who better than you to develop all this? You have a lot of knowledge and experience.
 
Last edited by a moderator:
  • Haha
Reactions: lebigmac
Sir. I found
````
EXPERT EXAMPLE: (WARNING! This will flash the raw patched super.img directly to your super block device! Do this at your own risk in recovery mode only!)
./sysrw in=../path/to/super.img out=`realpath /dev/block/by-name/super` -r
````
Does it mean directly replace super from modded to origin super. After that do I have rw feature directly (im on a15 current)
````
sysrw: Backups enabled
sysrw: Initiating procedure...

sysrw: Device is in Android mode
sysrw: Current device: Xiaomi haydn ()
sysrw: Current device architecture: aarch64
sysrw: Current Android version: 16
sysrw: Adjusting permissions and disabling useless security features...
verification is already disabled on slot with suffix _b.
verity is already disabled on slot with suffix _b.
sysrw: Current SELinux status: Permissive
sysrw: Dynamic partitions detected
sysrw: Your super partition is located at: /dev/block/sda29
sysrw: Current slot is: 1 (suffix: _b)
````
Hola.
Did you try renaming the rommaker.apk to rommaker.zip and just flashing that in recovery? Yes it's actually a flashable zip. I know I must make the whole package smaller by default. In next version I will remove all those permissive Samsung kernels. That's obsolete.

It looks like you must activate the auto-debloat function as I already mentioned above (last paragraph) and debloat a total of 1,54 GB from your super.img. I would suggest looking into /product and /vendor for debloatable stuff. You can easily debloat 1 GB only in /product sub-partition alone I bet. Look into /product/app and /product/priv-app /product/data-app etc... Also check the /vendor sub-partition for any useless bloatware to Auto-Debloat.

A safe way to find out debloatable apps is to first disable them using a root app disabler tool and then reboot phone, test some apps and if everything still works, then that probably means that this app in question is safe to permanently remove from your super.img using the Auto-Debloat function of my Make-RW / ro2rw tool.

My auto_debloat.txt looks like this
This is just a really basic debloat of only about 500 MB I think. To free up 1.5 gigs you will need to dig even deeper than that. Be very careful because auto-debloating the wrong folder / file can cause bootloop by itself especially if it's critical to the system (and remember the content of the auto_debloat.txt file it's case sensitive) !!!

Good luck amigo!:emoji_thumbsup:
 
Hi @lecmngend
Where is the rest of your log? Did it work? Is your phone System-RW now?

Bash:
./sysrw in=../path/to/super.img out=`realpath /dev/block/by-name/super` -r
Yes if you run the script with these parameters then it should flash the patched super.img directly to your super block device. I wouldn't recommend doing this inside Android operating system as it may cause corruption to your super partition but you can run the command using the aforementioned parameters from within TWRP or another custom recovery.

If you want to run the script while booted into Android operating system, then just run it like this:
./sysrw in=../path/to/super.img

You can also disable backups in options/config.ini file or add custom exclude values or even activate the auto-debloat feature in case you don't have enough space inside your super_patched.bin for all your modifications.
Code:
### experimental script features
threshold=
exclude=" mi_ext_a mi_ext_b "
backup=0
auto_debloat=1

Good luck!
 
Last edited: