yashsingh1/xdaforums huggingface dataset:
[Android Software/Hacking General [Developers Only]] lebigmac:
Hi warhawk971

Thanks for trying it. Unfortunately the script was not successfully launched by the installer for some reason. Try launching it manually (in recovery shell or adb shell while phone is in recovery)

Extract the makesysrw folder and copy it into /data/local/tmp/

it should look like this: /data/local/tmp/makesysrw_1.15c

Now make the script executable like this:

chmod +x /data/local/tmp/makesysrw_1.15c/makesysrw.sh

If you've got super partition run the script like this:

/data/local/tmp/makesysrw_1.15c/makesysrw.sh size=100

If you haven't got super partition run it like this:

/data/local/tmp/makesysrw_1.15c/makesysrw.sh

I hope this helps. Please report back if it works or not.
[Android Software/Hacking General [Developers Only]] Ayoub$#:
It worked with me on another phone, thanks lebigmac:love:
[Android Software/Hacking General [Developers Only]] jroki:
trying out this on samsung device with android 12 but unfortunate for me the super_fixed image file does not contain the system image but rather only vender, product and odm
[Android Software/Hacking General [Developers Only]] izsdeaman:
Nubia redmagic 5g

after many bootloop I also succeed :)[
[Android Software/Hacking General [Developers Only]] Minhdanlc:
Help me
[Android Software/Hacking General [Developers Only]] JohnTheFarm3r:
It doesn't work for you. And seem like you don't have a Super partition either.
[Android Software/Hacking General [Developers Only]] Minhdanlc:
is there another way?
[Android Software/Hacking General [Developers Only]] JohnTheFarm3r:
Nope. Eventually, try a different ROM for your phone and try doing it again with SystemRW.
[Android Software/Hacking General [Developers Only]] Spl1tz:
Hi, i used your flashable script, which says it succeeded. I tried creating a file in system but it fails.

Then ran the "mount -o remount,rw /" command.

On Realme GT Neo2. Rooted etc..
[Android Software/Hacking General [Developers Only]] Minhdanlc:
i think you should send him the log file
[Android Software/Hacking General [Developers Only]] Minhdanlc:
How can I know which rom supports systemRW
[Android Software/Hacking General [Developers Only]] Minhdanlc:
su

mount -o remount,rw /
[Android Software/Hacking General [Developers Only]] Spl1tz:
Apologies.

Wasn't sure if the above was enough.

Attached the logs i could find inside systemrw_1.32/log
[Android Software/Hacking General [Developers Only]] jroki:
Please anyone have been successful with mounting system as rw in android 12 with F2FS file system. Because mine went successful but after flashing the fixed super file the phone ends up in bootloop when I tried to extract the super-fixed.bin I realized it has only vendor, product and odm.

No system and system_ext
[Android Software/Hacking General [Developers Only]] JohnTheFarm3r:
You don't. SystemRW is not an official tool with a list of supported ROMs or devices. It's about figuring out. Try some and see if it works out.
[Android Software/Hacking General [Developers Only]] username_loophole:
Xiaomi Mi 11 Ultra MIUI 12.5.11.0, it works.

The command "mount -o remount,rw /" works but, for example, /vendor/etc is still read only while /system/etc is rw.

But I remember reading a post here which said it's because of dynamic partitions or something (anybody with more knoledge?)

Thank you.
[Android Software/Hacking General [Developers Only]] Furak07:
Hi, an eu rom I'm already on already has read and write change permission for root files like system vendor already.

How can I turn it off, By what actions can I eliminate this permission and restrict access to the root files ? Are there methods for this, such as a module or a file?

İn short how can i I lock SystemRW like read,write,copy,change permission for root folders ?
[Android Software/Hacking General [Developers Only]] lebigmac:
:oops: It looks like next version will be released in May 2022 then (y)

⌛Time goes by way too fast... ⏩

The final release candidate version needs a little bit more debugging...

Hi @jroki that's weird. Why would it not contain the system.img :unsure:

Hi thanks for the logs. (y)

Good news! Working on a Samsung and Realme fix as we speak 😃(y)

Hi. You forgot to type su ;)(y)

Your Samsung Galaxy A6+ (2018) cannot mount as rw by default?

Try this:
[Android Software/Hacking General [Developers Only]] lebigmac:
Congratulations! Enjoy fully debloating and customizing your fully read / write-able device! :love:(y)

@mhddonip yes that is correct if you flash clean stock OTA then you will go back to original read-only stock state.

@izsdeaman what do you mean you succeed? My SystemRW / SuperRW feat. MakeRW by lebigmac script actually works on Nubia devices? That's wonderful news! Can you please send me your log files from your Nubia device? Then I can add your device to front page to the list of officially supported devices. Thank you for your feedback! :D(y)
[Android Software/Hacking General [Developers Only]] Spl1tz:
That is fantastic news : )

Thanks for getting back to me. I'll look forward to it!
[Android Software/Hacking General [Developers Only]] calrloca:
Hi,

tested on Mi 10T lite (android 12), finally got NO error, but system is not RW as expected,

waiting for official release...

thanks a lot
[Android Software/Hacking General [Developers Only]] lebigmac:
Did you flash the super_fixed.bin as the screenshot suggests before remounting as rw ?
[Android Software/Hacking General [Developers Only]] umair.irfan786155:
Thanks, it worked perfectly on my POCO M2 PRO (gram) running on stock MIUi ROM 12.5.3 based on A11.
[Android Software/Hacking General [Developers Only]] calrloca:
Well, i didn't, but now it's DONE!

i can mount as RW now with Android 12...

unfortunately my goal was to move my app into system/priv-app because of the need of privileges,

i can make folder into system and copy my stuff, but every time i reboot its all flushed away (image TWRP etc.) it looks like there is some kind of integrity control...

ok, rolling back for the moment..

thanks a lot anyway, GREAT WORK!
[Android Software/Hacking General [Developers Only]] oberonlive:
@lebigmac, can you edit your script to make possible resizing of /product, /system, /vendor (and/or /system_ext) by different sizes?

I tried to rewrite your script but stuck (I'm not linuxoid so have some troubles with that) - one bug after another...

I tried to:

1) write super image to a file just once and use it in my tries to avoid flash killing with big writes;

2) resize different partitions with different numbers.

Because my tries mostly stuck in "no more space" phase I tried to resize with slow raising numbers (but it leads to a lot of flash writes and killing cells). I try to find a numbers that will raise partitions to a max possible sizes and avoid "no memory" when converting apps to a system apps (and integrating app updates). I have Redmi 9T with TWRP 3.6.0_10-1 (brigudav) and there is the same option as I understand "convert ROM to RW", it shrinks partitions and adds 100Mb to /product, 100Mb to /system, 100Mb to /system_ext and 100Mb to /vendor... It's a joke...

I flashed original ROM, brigudav TWRP, converted super to RW, tried to integrate updates, but "no space", ok, then I deleted some apps (Yellow pages, weather, quicksearchbox etc) and found that free space in TitaniumBackup raised just a little, because some of the apps was in /vendor, some in /product, some in /system_ext (/system). I run "convert ROM to RW" from TWRP again and... it shrinked then added 100Mb to each of them and now I have almost zero free space.

So I with to use ALL of the available space in super, for example, add 512Mb to /product, 256Mb to /vendor (maybe I will flash OpenGapps later?), 512-768Mb to /system_ext and as much as possible to /system?

My super image is 8Gb, but current shrinked sizes of product + system + system_ext + vendor is 5411Mb... 2781Mb is unused.

Can you help me?

My broken code in spoiler, I've failed.

Spoiler content hidden.
[Android Software/Hacking General [Developers Only]] lebigmac:
Hello. New version of script has fully working auto-resize feature. I wanted to release it long time ago but something is always causing the release to be delayed...

I set myself a goal to release it this month. Hopefully I can do it. Just hang in there. (y)

Yes I know every month I say this month but this time I really mean it :ROFLMAO:
[Android Software/Hacking General [Developers Only]] oberonlive:
I decided by all means to beat that today :D Found a way to unpack TWRP recovery, found .zip with rom->rw script, checked it, compared in my head with your realisation, did some tests and understand where I was wrong when tried to upgrade your script. For that moment I have dumped rom, extracted and shrinked partition images and try to understand how to work with lpmake, what is lpdump output (can't understand it... super size is 8589934592 - 8Gb; qti_dynamic_partitions (?) - 6094856192 - ~5.676Gb, total shrinked img's size - 5675421696 BUT lpmake'd image of this images 5511312648 (164109048 bytes less), where is the my limit of total im's size - is it "qti_dynamic_partitions" size or "super" size and why lpmake'd file is smaller and how it is corresponds with "qti/super" sizes...).

Hard to understand without a ton's of papers/RTFMs, so just trying something and watching what happens.
[Android Software/Hacking General [Developers Only]] lebigmac:
@oberonlive I like your enthousiasm and I wish I had the time right now to give you a full reply.

Gosh that lpmake binary can be very tricky I agree. One little error somewhere in the arguments and it will go crazy. Just send me your logs and some screenshots and I'll look into it. I'll also take a look at your changes in the script and run it through a diff when I find more free time :)
[Android Software/Hacking General [Developers Only]] oberonlive:
I understand that lpmake output is like compressed or something. I raised partitions product, system_ext and vendor for some and lpmake output just little bigger than with shrinked partitions. Didn't touched system.img, left it for final.

Am I right if I must create all that 4 images in total size exactly as "super" size? Or as "qti_dynamic_partitions"?

Spoiler content hidden.

PS: currently I used to edit TWRP script and going to not add some megabytes but resize to manually calculated size:

/product - from original 1 377 697 792 (after deleting some system apps 940 498 944) to 1728Mb [+31.5%]

/system - from original 2 987 872 256 (after deleting 2 786 242 560) to 3520Mb [+23.5%]

/system_ext - from original 600 657 920 (after deleting 496 058 368) to 1024Mb [+78.7%]

/vendor - from original 1 556 975 616 (after deleting 1 452 621 824) to 1920Mb [+29.3%]

pps: with this config lpmake send me to deep a$$: "Not enough space on device for partition vendor with size 2013265920"

lpmake --metadata-size 65536 --super-name super --sparse --output /data/local/super2rw/obraz/super_mod.bin --device super:8589934592 --metadata-slots 2 --image product=/data/local/super2rw/obraz/vendor.img --partition vendor:none:2013265920:qti_dynamic_partitions --group qti_dynamic_partitions:8589934592

but after lowering 3520 to 3420 lpmake didn't shouted me, so I tried 3519Mb for system and it was ok, maybe there is some overhead

Now I try to flash it...

upd: flashed successfully, trying to boot system... It boots.

But something strange, I can't mount -o rw,remount /; .. /product; ../vendor: "not user mountable in fstab".

Before my experiments it was ok.

Oh, I forgot "su" after "adb shell". It's Ok. I'm happy! Ton of free space. Hope it will be enough for all I need. It's time to duplicate my old Redmi 5 to 9T.

Thank you! Your original script was the first point in hacking 9T. 5 or 6 months it just lying down on the table.
[Android Software/Hacking General [Developers Only]] mrrocketdog:
@calrloca , not tryimg to but in just a thought. if your recovery has A/B dont you have to flash an A/B retention.zip to make twrp stick?

and in apps moved to system/priv-app the folder has to have the correct perms and the app inside the folder has to have the correct perms.

i'm certainly not a dev and maybe talking out the side of my neck.

AND you may have already done all this , just a thought i had.

good luck. hope you het it working.:good:
[Android Software/Hacking General [Developers Only]] izsdeaman:
Thank you . my way is to install manually because install in twrp error 255 , i after have super_fixed.img i go to twrp and use install image and success

Works on Android 10 and Android 11
[Android Software/Hacking General [Developers Only]] calrloca:
regarding the permissions the system/priv-app trick does the job on Android 11,

never used retention.zip and never lost TWRP before, what i've got after every attempt to move files in system/priv-app in Android 12 is a recovery screen in chineese language.
[Android Software/Hacking General [Developers Only]] lebigmac:
Anything is possible ;)

Do you want to specify a unique custom size for each subpartition embedded inside super.img ?

What unit do you want to specify it in? % of total size?

Total super size should be greater or equal to sum of all subpartitions ;)(y)

I'm happy you got it to work in the end :love:(y)

I know lpmake can be very tricky.

Don't worry upcoming version of my script already has fully working auto-resize feature which should fix your problem permanently 😃(y)

This month is marked as the month of release in my calendar ;)🤞

Hello. You want to change read/write-able partition to read-only?

I'm sure there are many ways to skin this cat.

I guess you could try official stock MIUI firmware (Android 10+) ? That should be read-only by default.

Or you could try to do the opposite of the unshare_blocks command? Deduplicate shared blocks anyone?

Or are you looking for chmod ? I am not a Linux expert but as root you should be able to restrict access to certain locations for certain users by using chmod or similar. If you find a solution to your specific problem please let us know how you got it to work. Thanks (y). Good luck! 😃(y)
[Android Software/Hacking General [Developers Only]] Furak07:
Hello, i am currently on the global Android 10 miui version and have limited read and write. My request is to be able to lock the same restricted read and write permissions in some way on eu or different custom roms, such as on the same android 10 global rom to be able to restrict
[Android Software/Hacking General [Developers Only]] Zelio11:
I got this error with incorrectly defined size of system.img partition (it has a negative value, with a minus symbol at the beginning).

Maybe because I tried to copy some file to this partition before.

Spoiler content hidden.
[Android Software/Hacking General [Developers Only]] eduardvi995:
Hi, I tried your script, and everything went great while flashing, but no r/w capability on modified partitions when the device booted up. I flashed twice, with the second time adding a custom size (100) to the script successfully, but it was the same result with the r/w.

This is a copy of the flashing log, which was flashed on custom recovery

Xiaomi Redmi 9A Global ROM MIUI 12.0.18 (Android 10) (Magisk 24.3)

Be aware that I made sure that dm-verity was disabled before and after flashing the script.

(First time)

Spoiler content hidden.

and the second time with the same result (besides size change)

Spoiler content hidden.
[Android Software/Hacking General [Developers Only]] jerk0v:
Just to be up front, got no idea what im doin. Unlocked and rooted lg v60. Worked great. Followed this guide to get rid of bloatware. I ran into some issues when it rebooted into fastboot to flash super_fixed.bin it didn't see my device. Ended up just flashing bin directly. Now im in kernel panic loop mode freaking out. I am able to get into fastbootd and sometimes see the device in adb but usually get errors about server # not matching. Can get into 9008 mode in qfil. Dont have the original super.bin because im dumb. Can get into recovery thru fastbootd. If i choose mount option i get error saying "Logical partition metadata has invalid geometry magic signature" and i dont even know if factory reset is an option or bad idea. Looking for any advice or help because im stuck. Thanks.
[Android Software/Hacking General [Developers Only]] eduardvi995:
Download full rom and flash it through fastboot, specifically super.img. Dont flash userdata or you will lose all information.
[Android Software/Hacking General [Developers Only]] jerk0v:
Thanks for quick response. Im a little new to this. You mean a custom rom? I didnt think v60 could take custom roms yet. Or do you mean any rom and extract super.img in qfil to flash?
[Android Software/Hacking General [Developers Only]] eduardvi995:
No, when I said full rom i was talking about your stock rom. Download your firmware (or fastboot flashable rom) and flash the super.img partition (a file inside the zip you will download) with this command on fastboot:

Fastboot flash super super.img

You will have all bloatware back though, but it will revert this process.
[Android Software/Hacking General [Developers Only]] jerk0v:
Gotcha. Found it. Downloading now. Thanks. I'll live with the bloatware. Should have left it. Just got this phone 2 days ago to replace my pixel 3xl. I need sleep.

Also, should I do anything to remove new partition first or does flashing overwrite all that? New super is like 20gb.
[Android Software/Hacking General [Developers Only]] eduardvi995:
Man, If you flashed this script just to remove some bloatware, let me tell you that Magisk has a module to remove bloatware systemlessly, and its completely safe. Just download "Fox's Magisk Module Manager" and there you will find it.
[Android Software/Hacking General [Developers Only]] jerk0v:
Ill have to look for that. If i ever get this sh*tfest fixed first.
[Android Software/Hacking General [Developers Only]] jerk0v:
Yeah, so giving up. Tried getting super.img from stock rom and flashing in fastboot and still cant get past kernel crash screen. Tried factory reset in recovery and cant even do that because it gets stuck at kernel crash screen. Only thing left I can find to try is refurb through lgup with stock rom and hope that works unless anyone else has better ideas. I should have just left it alone.
[Android Software/Hacking General [Developers Only]] eduardvi995:
By the way, make sure the rom you are downloading right now is the same your device has,otherwise you will loose data to make it work, as you'll need to flash full rom.

Flash the rom then, not only super through fastboot. Flash each file in the rom.
[Android Software/Hacking General [Developers Only]] lebigmac:
Hi @TNSMANI. Thanks for cleaning up the thread. (y)

I'm not hurt by the words of that harmless dude that's acting entitled...
[Android Software/Hacking General [Developers Only]] BakaValen:
Hello @lebigmac

Trying to do this manually on Asus ROG Phone 5S Pro. A12 installed.

Used to work via twrp on A11 but since the "upgrade" it needs to be re-done and manually at that as TWRP wont read A12 yet.

I attempted ./systemrw.sh size 15 (im pretty sure this means i have super partition {lrwxrwxrwx 1 root root 16 1970-01-02 06:05 /dev/block/by-name/super -> /dev/block/sda19})

i got back

--------------------------------------------------

| 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: Custom size detected: 15 MB

systemrw: Initiating procedure...

systemrw: Device is in Android mode. Ignoring

systemrw: Current device: asus

systemrw: Your Android version is not supported yet. Abort

Any ideas please?
[Android Software/Hacking General [Developers Only]] lebigmac:
Try this

Good luck! (y)
[Android Software/Hacking General [Developers Only]] eduardvi995:
Hey @lebigmac

Sorry to bother, but did you happen to check my question above? I dont really know what to do now.
[Android Software/Hacking General [Developers Only]] BakaValen:
Boom! She's alive!

Thanks man!
[Android Software/Hacking General [Developers Only]] lebigmac:
I found your question on previous page:

Thanks for your log (y). It looks normal. I can't find anything unusual. Does your stock firmware have the notorious shared_blocks read-only feature in the super.img to begin with? I can't find any shared_blocks in the log.

Device boots and you can successfully resize your partitions with my script but still none of the subpartitions inside super.img are RW? How sad :(. Did you try it on other device? I think you should mark this summer in your calendar. That's when the happy summertime edition 😃 is scheduled for release. Let's pray that it will do the trick for you then ;)(y)

Not to be confused with the happy springtime edition 😃 which is scheduled to be released in the next 2 weeks ;)(y)

You're welcome (y)

And? It's work?

I wonder why nobody bothered to fix this RW vulnerability in Android 12 and newer...
[Android Software/Hacking General [Developers Only]] BakaValen:
yes sir. seems to be working.
[Android Software/Hacking General [Developers Only]] lebigmac:
Can you do this now?
[Android Software/Hacking General [Developers Only]] Zelio11:
This script doesn't work on Redmi 9A, can confirm.
[Android Software/Hacking General [Developers Only]] furomin:
Up and running on Xiaomi Mi 11 (venus) on Android 12! Thanks!!! 👍👍👍👍
[Android Software/Hacking General [Developers Only]] Shun_5377:
Hi. My ROG Phone 5 is running on Android 12 (Version WW-31.0810.1226.77) with root access obtained from patching the boot.img with Magisk version 24.3. Thank you very much for your work and code in #1,597. I have now successfully gained write and read permissions to the System folder (I just want to update the build.prop). 🥳✌️
[Android Software/Hacking General [Developers Only]] eduardvi995:
Also dont try flashing super_fixed.bin on fastboot, as it bricks the phone, requiring restore of a previous backup or stock .img file (basically android mode doesn't work either on redmi 9A). Maybe because resulting super_fixed file was way more smaller than original super (1.4gb vs 4.6gb).

However, using android mode returned a different log output, this time stating that all 3 partition were r/o at the beginning of the script, which did not happen on twrp.
[Android Software/Hacking General [Developers Only]] JohnTheFarm3r:
The file size difference is NORMAL, one is RAW and another one is Sparse.
[Android Software/Hacking General [Developers Only]] hack_111:
It works for me !! but after I flashed the image, mount -o remount,rw system or vendor, I can not create new file,

prompt:

lime:/vendor/bin # mkdir a

mkdir: 'a': No space left on device

what`s the problem?

Redmi note9 4g , miui 12.5.6
[Android Software/Hacking General [Developers Only]] lebigmac:
You need to run script again with larger custom size

Or wait for next version (should be released in the next 2 weeks) which has auto-resize feature (y)

Congratulations! Enjoy customizing and debloating your read/write-able device :love:(y)
[Android Software/Hacking General [Developers Only]] hack_111:
cool !!!
[Android Software/Hacking General [Developers Only]] khaiyang:
Hi, I have a problom, my device is xperia 5 ii, android 12.

I use this 'sysrw_repair.sh' on linux, and it can works R/W on system_ext, product and vendor.

Then, sony 'thermal-engine.conf' is in /oem folder, but /oem folder has oem_a and oem_b, so I can't edit this text.

Someone can solve this problom?

/oem folder position is on picture.
[Android Software/Hacking General [Developers Only]] ShadoV90:
I guess you forgot to type su, then enter, and after that you will be able to type mount etc.
[Android Software/Hacking General [Developers Only]] I'm Boo:
Which command?