yashsingh1/xdaforums huggingface dataset:
[Android Software/Hacking General [Developers Only]] masricky:
Spoiler content hidden.

thanks 4 everyone
[Android Software/Hacking General [Developers Only]] lebigmac:
Hi again @Revokke. Thanks for sharing your log files. Your log couldn't look any better to be honest. It looks like everything worked as expected.

Maybe in latest MIUI firmware Xiaomi introduced new force read-only feature for /vendor partition? I don't know.

I can read/write to /vendor/etc directory just fine on my Poco. I am using old stock firmware version however.

If you can read/write to /system, /system_ext and /product but NOT to /vendor partition that means that script worked as expected but something is breaking this r/w functionality on /vendor partition. To verify if script successfully removed shared_blocks read-only feature from your /vendor partition you can do this:

Please run these commands while device is booted into Android and then upload a screenshot of the results. Thanks!

adb shell
su
mount -o remount,rw /vendor

Now run these commands below and please upload this file. Thanks! /sdcard/my_output.txt

touch /sdcard/my_output.txt
mount | grep "/vendor" >> /sdcard/my_output.txt
echo >> /sdcard/my_output.txt
tune2fs -l /dev/block/dm-3 >> /sdcard/my_output.txt
[Android Software/Hacking General [Developers Only]] ahk31:
@lebigmac thank you! Your script worked on Xiaomi Mi 11 Lite 5G, Android 11, MIUI 12.5.5 :)

Here are the logs:
[Android Software/Hacking General [Developers Only]] KouaV1:
wheres the 1.31 version......................................... i need that one
[Android Software/Hacking General [Developers Only]] alexrakch:
Добрый день! Просмотрите мои файлы, будьте любезны. И, если есть правильные предложения, напишите здесь. Смартфон BQ-6430L aurora, андроид 10, клон Oukitel c21.

Всё уже сделал, и размер разные пробовал (15, 50, 100) и версию 1.29 - нет толку.

Делал как здесь https://youtu.be/NQnZNtkiISQ

Good day! Review my files, if you please. And, if there are correct suggestions, write here. BQ-6430L aurora smartphone, android 10, Oukitel c21 clone.

I have already done everything, and tried different sizes (15, 50, 100) and version 1.29 - no sense.

Did as here
[Android Software/Hacking General [Developers Only]] alexrakch:
Под видео https://youtu.be/NQnZNtkiISQ есть архив - там версия 1.29 и версия 1.31d
[Android Software/Hacking General [Developers Only]] lebigmac:
Hi @alexrakch . Thanks for your interest in this project.

If your device is still locked to read-only despite succesfully removing shared_blocks read-only feature with the script, that means your device has additional read-only protection features that must be disabled.

If you figure out why your device is still locked to read-only please let me know and I'll include it in next version of script! Thanks.

Good luck!
[Android Software/Hacking General [Developers Only]] Flashfire5606:
I don't know what I am doing wrong, device is Oneplus Nord N100 global var. flashed through test version of twrp. also I have tried setting custom size to 15, 50 and 0 all results the same. the end of the log goes as such. (just in case all files in log folder attached.)

systemrw: Joining all extracted images back into one single super image...

systemrw: Please wait and ignore the invalid sparse warnings...

Not enough space on device for partition vendor_b with size 1016492032

systemrw: Error! failed to create super_fixed.img file. Error code: 70

(edit: idk if dmesg log is needed xda wont let me upload it for some reason.)
[Android Software/Hacking General [Developers Only]] Rahamatulla:
Lebigmac, how much storage do i lose if i flash this script
[Android Software/Hacking General [Developers Only]] lebigmac:
Hi @Flashfire5606 thanks for your log files.

Hi @Rahamatulla thanks for your interest in this project.

Please keep in mind that removing shared_blocks read-only feature will duplicate lots of blocks that used to be shared. This will increase size of each partition which is embedded inside your super partition by approximately 200 MB.

Maybe that's why @Flashfire5606 gets error 70 (insufficient space) despite using size=0 (shrink to minimum).

I'm sure this can easily be fixed somehow...
[Android Software/Hacking General [Developers Only]] Flashfire5606:
that's probably why, stock vendor is 950 mb with this its showing as 1.3gb give or take.
[Android Software/Hacking General [Developers Only]] LanceLot9980:
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?
[Android Software/Hacking General [Developers Only]] alexrakch:
Спасибр за стандартный ответ
[Android Software/Hacking General [Developers Only]] jhayprince:
I really thank you..working for me REDMI NOTE 10 PRO Global....I only flash the zip file then restart the phone...then install the terminal emulator then grant permission after that type su then enter...then I type this command. mount -0 remount,rw /system_root

Now I can delete the system apps ....before when I try to delete says that read only file..
[Android Software/Hacking General [Developers Only]] LanceLot9980:
@lebigmac I asked this question in my other comment but I guess you didn't notice XD. So, here goes: If I flash another ROM on my device, would I need to run the script all over again to make a new fixed super.img or can I flash the one I made with the previous ROM?
[Android Software/Hacking General [Developers Only]] lebigmac:
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 ;)

The flashable zip gave you error 255? Don't worry I already fixed this issue in next version ;) Hopefully I can release it soon!
[Android Software/Hacking General [Developers Only]] LanceLot9980:
I see. Thanks for clarifying. Guess I'll wait for the next version of the flashable zip then.

I kinda already changed ROMs so I don't have the logs anymore :p. Also, I can't actually mount /system as r/w because I get an error saying it's not in /proc/mounts. I can, however, mount root as r/w and can edit system files that way.

Edit: I noticed there's 0B free in root partition in the new ROM. I recall that not being the case before. Is something wrong?
[Android Software/Hacking General [Developers Only]] jhayprince:
This my log files it's working perfectly...Redmi note 10 pro global version...
[Android Software/Hacking General [Developers Only]] jhayprince:
my friend we are thesame model redmi note 10 pro global miui 12.5.8...

but for me is working perfectly..

first thing i did is flash the zip file and give error...

then i restart my phone after flash the zip...and start to flash again and its working perfectly without error..but sad things i can't remove the system file...then i download terminal emulator and grant permission then i type this code su and hit enter then mount -0 remount,rw /system_root

after that i restart my phone and its work like a charm....
[Android Software/Hacking General [Developers Only]] lebigmac:
Hi again @LanceLot9980.

Yes I mean this path in Android /

Or this path in recovery /system_root

I'm happy that now you can finally mount these aforementioned paths as read/write-able and fully debloat your device :D(y)

Try running script again with larger custom size such as size=25 or size=50 for instance. And then please send me your log files. Thanks. Your feedback is useful for further development of script.

Good luck! Have fun debloating your device and make lots of backups before doing so! (y)

Hi @jhayprince. Thanks for your log files.

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

Which error was it?
[Android Software/Hacking General [Developers Only]] Daniel_47:
Hello, First of all Thank you very much for this amazing script. Sadly I couldn't get this to work on my device. Could you help me fix this error ? (look at the attachment)

Thank you.
[Android Software/Hacking General [Developers Only]] lebigmac:
Hi. Thanks for your interest in this project. Why use old deprecated version? Try latest v1.32 and please send me your log files from script folder. Thanks.

Good luck!

And keep in mind new version is coming soon!
[Android Software/Hacking General [Developers Only]] xda general:
So while trying to get this script to work again on Redmi 9 I figured out something. @lebigmac if I run the script in recovery then reboot my device to "fastbootd" mode then do the commands fastboot erase system, vendor, product. Then reboot to recovery and reflash my rom I can get vendor and product RW but still no System RW
[Android Software/Hacking General [Developers Only]] jis251:
HI and thx. Your script works great.

I just flashed it from TWRP (I have Super Partition and I didn't change size, default 15)

It took few mins and all is ok. Now I can get my phone working much better .

OnePlus Nord 2 (DN2103), android 11

Thank you very much.
[Android Software/Hacking General [Developers Only]] JLamp:
Hi there, I'm running rooted Android 11 on a Moto G Power 2021. I have tried and failed a few attempts both with the initial instructions and also the repair method you have provided. I would like to attempt using the SuperRepack process you linked to in the first post but am not sure how to apply it to your method to make it work. Could you provide some guidance on this and if possible the location of the super.bin file and what needs to be entered in the command line? Thank you and please.
[Android Software/Hacking General [Developers Only]] Nad4:
The manual method worked for Pixel 4a on Android 12 (modified script), but even tho I can mount system R/W, I only get 0kb files when copying and can't create folders anywhere. I tried with FX, Root Explorer and ADB with the same results.

My goal is install Cerberus in priv-apps, I'm rooted with Magisk.

Edit: I just noticed it shows no available space in the file system, maybe that has something to do with it ?

Edit 2: Deleting a system app did not "free space", no luck.
[Android Software/Hacking General [Developers Only]] lebigmac:
Hi @Nad4. Thanks for your log files (y). This is great news! Does this mean your device still boots after flashing the patched super image? The script actually works in Android 12? That's crazy! I'm surprised they didn't fix this System RW vulnerability in Android 12 yet?!

Which device are you using?

If you can mount your system as rw and delete system files but you cannot write into your system that means script works :love:(y) but it looks like your system has ran out of space :oops:

To increase free system space you can run script again with a larger custom size. For example size=50 or size=100

Good luck! (y)

auto-resize feature in next version should take care of such issues ;)(y)
[Android Software/Hacking General [Developers Only]] Nad4:
I tested it on Pixel 4a (Sunfish), build SP1A.211105.002

Actually after deleting a system app (from file explorer) and rebooting I got a bootloop. Flashing a stock ROM didn't work until I flashed the original super partition, the device is working now but that gave me enough of a scare to not mess with it again :(
[Android Software/Hacking General [Developers Only]] lebigmac:
Be very careful when modifying system files! One little mistake can cause a bootloop!

I'm happy that you managed to get back out of that bootloop :D(y)

Please let us know your results if you decide to try it again once you recover psychologically from that bootloop ;)(y)
[Android Software/Hacking General [Developers Only]] jhayprince:
what can i do to r/w the vendor...only system are r/w
[Android Software/Hacking General [Developers Only]] Toreton:
@lebigmac Realme Narzo 30 5G

I can remount to RW almost all important partitions (after I fixed #238 string) and I have the same problem when I used default (size=15) but with size=50 all is working fine for now!

Thx man!!!

Here are both logs:
[Android Software/Hacking General [Developers Only]] jhayprince:
hoping you help me lebigmac to analyze what is the problem why only system become rw but the vendor and system_ex and product image are cant touch .thank you
[Android Software/Hacking General [Developers Only]] lebigmac:
@jhayprince can you please run these commands below and show screenshot. Thanks! (y)

adb shell
su
# If you're in custom recovery you need to do mount -o remount,rw /system_root
mount -o remount,rw /
mount -o remount,rw /product
mount -o remount,rw /vendor
mount -o remount,rw /system_ext
[Android Software/Hacking General [Developers Only]] lebigmac:
-o (as in options) not -0... o_O
[Android Software/Hacking General [Developers Only]] jhayprince:
Is this correct now...kindly see the attached...thank you sir.
[Android Software/Hacking General [Developers Only]] lebigmac:
@jhayprince it works! Congratulations! :D(y)

One last thing you can check is this:

adb shell
su
for a in `ls /dev/block/dm-*`; do mount -o remount,rw $a; done

If you get this result:

Then you can find out more info about this particular partition like this:

tune2fs -l /dev/block/dm-9

Enjoy debloating and customizing your fully read/write-able android device! :love:(y)
[Android Software/Hacking General [Developers Only]] jhayprince:
when i run this tune2fs -l /dev/block/dm-4 kindly find attached what is the problem...thank you
[Android Software/Hacking General [Developers Only]] jhayprince:
i got this error /dev/block/dm-4......its read only...any other way to fix it?
[Android Software/Hacking General [Developers Only]] lebigmac:
To test if everything worked properly you can run each of these commands individually:

Good luck! (y)

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
[Android Software/Hacking General [Developers Only]] lebigmac:
It looks like you can mount all of your most important partitions as rw. You can write to them all except to /vendor...

This looks like an insufficient space issue to me.

Check free space for /vendor partition like this:

tune2fs -l /dev/block/dm-3
df -h /dev/block/dm-3
[Android Software/Hacking General [Developers Only]] jhayprince:
this is the result sir...
[Android Software/Hacking General [Developers Only]] lebigmac:
@jhayprince have you tried running script a second time with larger custom size? For example size=50 or size=100. That works well for Xiaomi devices. Good luck!
[Android Software/Hacking General [Developers Only]] jhayprince:
not yet sir...because i dont understand what im going to do.
[Android Software/Hacking General [Developers Only]] jhayprince:
sir you have flashable zip that contains size is 100 because i dont know what to do...thank you in advance sir
[Android Software/Hacking General [Developers Only]] lebigmac:
You can simply extract the flashable zip and modify the config.ini with text editor and then save file and create new flashable.zip with random name and flash it in recovery. It's very easy to do on your phone itself.

Or run script manually according to the official instructions.

If you have further questions just ask. Good luck!
[Android Software/Hacking General [Developers Only]] jhayprince:
Good evening sir i try size=100 it give me error 255

i try size=50 but still the system_ex and vendor are not r/w kindly see the log files sir...thanks
[Android Software/Hacking General [Developers Only]] QuaZero:
Working smoothly for MI 10T Android 10 Firmware Global 12.0.3 with argument size=100
[Android Software/Hacking General [Developers Only]] lebigmac:
Hello @QuaZero. I'm very happy that my script works smoothly on your Xiaomi device! Congratulations! (y)

Please send me your other log files from this folder /data/local/tmp/systemrw_1.32/log/

Thanks! Your feedback is very useful for further script development (y)

Enjoy debloating and customizing your fully read/write-able device! :love:(y)

Hi again @jhayprince. Thanks for your log files and screenshots. It helps to better understand your problem.

According to your latest log everything worked correctly and shared_blocks read-only feature of your most important partitions was successfully removed by script :D(y)

Don't worry error 255 it's already fixed in next version which shall be released soon ;)(y)

In the meantime you can simply launch script manually in terminal (y)

You can subscribe to the thread and you will be notified when a new version of the script will be released (y)
[Android Software/Hacking General [Developers Only]] jhayprince:
o think its working now see the screenshot..before the vendor its in RO...but now its in RW...
[Android Software/Hacking General [Developers Only]] InfaMan:
lebigmac Hello bro from Russia! Your script works without any problems on the POCO X3 PRO phone! There was a problem mounting partitions in TWRP from Nebrassy. Installed Orangefox and everything went smoothly! Thanks for your work!

P.S. size=250
[Android Software/Hacking General [Developers Only]] QuaZero:
Here you go, there is only 2 files
[Android Software/Hacking General [Developers Only]] sampei:
Hi, @lebigmac

I have facing the issue which is an error shows up. "There was a problem shrinking system.img. Please try again."

If you could tell me any instructions to solve this problem, I would very appreciate.

My device is Poco F2 pro / Android 11 MIUI 12.6

THANK YOU.
[Android Software/Hacking General [Developers Only]] Anhlatuananh:
work on pixel 4xl android 12 👍 just change the size to 50
[Android Software/Hacking General [Developers Only]] lebigmac:
Hi @sampei thanks for your log files. That's an interesting error. I don't know why it happens. Maybe ./tools subfolder doesn't have the required execution permissions?

Does your device have resize2fs binary by default?

You can try opening systemrw.sh script file with notepad and replace all instances of ./tools/resize2fs with resize2fs then save file and try again. Good luck (y)
[Android Software/Hacking General [Developers Only]] Md652:
I ran it on kingkong mini2 with android 10 I did everything required for the script to run and stone it started running and got stuck in things requiring 64 bit below error

KINGKONG_MINI2:/ $ su

KINGKONG_MINI2:/ # ./systemrw.sh size=100

/system/bin/sh: ./systemrw.sh: inaccessible or not found

127|KINGKONG_MINI2:/ # cd /data/local/mtp/systemrw_1.32/

/system/bin/sh: cd: /data/local/mtp/systemrw_1.32: No such file or directory

2|KINGKONG_MINI2:/ # cd /data/local/tmp/systemrw_1.32/

KINGKONG_MINI2:/data/local/tmp/systemrw_1.32 # ./systemrw.sh size=100

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

| 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: 100 MB

systemrw: Initiating procedure...

systemrw: Device is in Android mode. Ignoring

systemrw: Current device: CUBOT

systemrw: Current Android version: 10

systemrw: Current SELinux status: Permissive

systemrw: Current slot is: 0

systemrw: Your super partition is located at: /dev/block/mmcblk0p34

systemrw: / is read-only

systemrw: /product is read-only

systemrw: /vendor is read-only

systemrw: Adjusting permissions...

systemrw: Attempting to disable dm-verity and verification...

./systemrw.sh[454]: ./tools/avbctl: not executable: 64-bit ELF file

./systemrw.sh[454]: ./tools/avbctl: not executable: 64-bit ELF file

./systemrw.sh[454]: ./tools/lpdump: not executable: 64-bit ELF file

systemrw: Dumping super partition to: /data/local/tmp/systemrw_1.32/img/super_original.bin

systemrw: Please wait patiently...

8388608+0 records in

8388608+0 records out

4294967296 bytes (4.0 G) copied, 67.532360 s, 61 M/s

systemrw: Successfully dumped super partition to: /data/local/tmp/systemrw_1.32/img/super_original.bin

systemrw: Unpacking embedded partitions from /data/local/tmp/systemrw_1.32/img/super_original.bin

./systemrw.sh[454]: ./tools/lpunpack: not executable: 64-bit ELF file

systemrw: Please make sure the super file exists and try again.

I would be very happy if you could help me because I can not change anything and it stings me all the time

Thank you
[Android Software/Hacking General [Developers Only]] Gimmyy:
I have Poco F1 ROM MIUI a10 I have error 255 Recovery log>

"The file was not found"
[Android Software/Hacking General [Developers Only]] uvs:
No new fixed script for RN10PRO (sweet)?
[Android Software/Hacking General [Developers Only]] lebigmac:
Hello to Russia @InfaMan. Thank you for your feedback. You are welcome. Enjoy a fully read/write-able system :love:(y)

I can't believe this RW vulnerability was not fixed yet in Android 12?! Talk about lazy programmers...

@Anhlatuananh please send me your log files from script folder thanks! (y)

Hi @Md652 sorry no 32-bit version available at the moment. You're the first person in almost 1 year to ask me for 32-bit version...

Hi @Gimmyy please show screenshot of your error. Thanks (y)

Did you try running script manually yet? See instructions on first page. Good luck! (y)

Hi @uvs. Thanks for your interest in this project.

Don't worry, new version is coming soon! ;)(y)

What exactly is the issue that you are experiencing on your Xiaomi Redmi Note 10 Pro device? Please send me your log files from script folder (y)

If your device has shared_blocks read-only feature then the script can do the job.

To check if your device has shared_blocks read-only feature you can run this code in Android:

adb shell
su
tune2fs -l /dev/block/dm-0 | grep "feat"
[Android Software/Hacking General [Developers Only]] Johncaffee:
Hello 😊

Doesn't work with Oneplus 8 Pro with OOS 11.0.9.9.IN11BA.

If someone has a solution... 😊
[Android Software/Hacking General [Developers Only]] uvs:
I did not install the script, I'm waiting for a new version. Saw @jhayprince had a problem, I don't want to experience it.
[Android Software/Hacking General [Developers Only]] uvs:
I installed a script with an argument of 25 and got the system in R / W. I am attaching a log.

Thank you!
[Android Software/Hacking General [Developers Only]] Gimmyy:
I manually installed and got two files: system.img and vendor.img

Can I flash the files from recovery orangefox
[Android Software/Hacking General [Developers Only]] lebigmac:
@uvs I'm happy you got the script to work on your device.

As you can see you don't have to be afraid of running the script ;)

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

Hi Gimmyy that log looks interesting.

Could you please run the code below and send me this file

/data/local/tmp/systemrw_1.32/log/lpdump_gimmyy.txt

Thanks. (y)

adb shell
/data/local/tmp/systemrw_1.32/tools/lpdump > /data/local/tmp/systemrw_1.32/log/lpdump_gimmyy.txt

According to your log the shared_blocks read-only feature was successfully removed from both system and vendor (in /nosuper subdirectory).

I'm afraid the script forgot to automatically backup those partitions so you should do that manually before proceeding to flash those two patched files from the /nosuper folder. You can flash the files with fastboot or dd.

To backup your original partitions you can simply do

adb shell
su
dd if=/dev/block/sde48 of=/data/local/tmp/systemrw_1.32/nosuper/system_original.img
dd if=/dev/block/sde47 of=/data/local/tmp/systemrw_1.32/nosuper/vendor_original.img

Please report back your results. Good luck! (y)
[Android Software/Hacking General [Developers Only]] sampei:
Hi @lebigmac

Yes i found resize2fs in the system/bin

I will try replace all instances of this then try again.

Thanks.