yashsingh1/xdaforums huggingface dataset:
[Android Software/Hacking General [Developers Only]] TheGhost1951:
finished restoring my phone, uploading an EROFS super from my OP9P and will provide a link for Lebigmac to use for testing.....go big guy and find some answers, link in a few minutes!
[Android Software/Hacking General [Developers Only]] Aitra:
When flashing sysrw_1.35.zp it creates a sysrw_1.35 directory in sdcard/sysrw_1.35 which is different from when flashing systemrw_1.32.zip will create data/local/tmp/systemrw_1.32. Can you give me an explanation for this difference?
[Android Software/Hacking General [Developers Only]] lebigmac:
The new version v1.35 will run from anywhere and has no hard-coded project path like the old version v1.32. You can for example push the sysrw_1.35 folder into /data on an encrypted device and it should still work as long as there is sufficient free space to work with in /data drive. ;)(y)

Good news for the Realme users with lots of bogus my_heytap sub-partitions where the script failed at the final auto-resize step:

The new auto-debloat() function should soon be ready ;)(y)
[Android Software/Hacking General [Developers Only]] TheGhost1951:
Simple, manual mode means you extract the zip and copy the sysrw_1.35 folder to /data/local/tmp and run the script there. When you flash the zip in recovery, the zip is located in your internal (SD card) storage the zip extracts itself to a folder in internal storage and runs from there to do the work....got it?
[Android Software/Hacking General [Developers Only]] lebigmac:
Yes the flashable zip will extract the included sysrw_1.35 folder to the same directory as the flashable .zip is located in. ;)

No problems with the update-binary so far? Somebody told me it produced a permission error but it seems I was able to fix that the other day thanks to the amazing and much appreciated feedback by the users. Hallelujah :)
[Android Software/Hacking General [Developers Only]] TheGhost1951:
If you choose size=0 that means you are not adding any extra space to the sub-partitions correct? If so why would you want to do that? I would think that a minimum of 10 would be more acceptable. Just thinking here!🤔
[Android Software/Hacking General [Developers Only]] lebigmac:
Some devices can only do size=0 (shrink2min AKA shrink 2 minimum) because they simply don't have any more free space left. Hopefully my autoDebloat() function will change that ;)
[Android Software/Hacking General [Developers Only]] lebigmac:
error fixed :)(y)
[Android Software/Hacking General [Developers Only]] flashernoob:
Hi,

tried your script 1.35 on my Redmi Note 10 Pro and it seemed to work (in OFox Recovery, started from my 64GB SDcard).

Although i have no patched super img to flash... A lot of bin & img files and the super_original.bin, but no patched one...

I'm trying a lot to debloat my phone and as such clean fastboot often, and there i would like to change the stock super img with the patched one.

Would replacing the super.img with super-patched.bin work (editing the fastboot call of course) when i get hold of the patched file?
[Android Software/Hacking General [Developers Only]] lebigmac:
@flashernoob did you flash the flashable zip in recovery? Then there is no super_patched.bin file to be found on your hard drive because the patched raw super image file get's automatically flashed to your super block device ;)(y)

That's how I currently got the config.ini set up right now inside the flashable .zip. Did it even work properly? :D

You can verify this in your log. Please feel free to share it with me and I'll take a quick look if it worked for you or not ;)(y)
[Android Software/Hacking General [Developers Only]] flashernoob:
Yup i flashed in recovery, and it seems to work (couldn't delete bloat sh*t in system, now can).

But i want to have the super image in flashable form so i can fastboot it again, and not have to fastboot the locked one and always need to RW it again. Took only a few minutes, but technically i see me doing it a few times more the next days (or weeks) cause i like to play and learn.

How can i get a fastbootable RW super image?
[Android Software/Hacking General [Developers Only]] lebigmac:
Just extract the flashable zip , find the config.ini file inside, open it up with notepad and change the out= value to where you want the patched super image to be saved. Also remove the -r parameter (raw) as you probably want to flash a sparse file with fastboot in bootloader mode. Now save the file in notepad and re-zip both the sysrw_1.35 and META_INF folders to a brand new flashable zip and flash it in recovery!

You can find your log folder here. Thanks for your feedback! (y)

/data/local/tmp/sysrw_1.35/log

On Xiaomi devices with only about 5 sub-partitions the auto-resize feature should work just fine or you can set the size value to something like size=50

That should give each sub-partition somewhere around 50 MB of free space to work with ;)

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

Can you do this now? (as root)
[Android Software/Hacking General [Developers Only]] flashernoob:
Trying to mod the zip, thanks for the help...

Can i just flash the resulting bin as img? like "fastboot flash super super-patched.bin"? Would be grrreat! :D

My log folder seems not to be where you think it is...

My zip is on my sdcard, because i can't MTP to the local memory, whyever.

/data is empty (yes it's mounted), but i have a /log folder in /sdcard1/sysrw_1.35/log with lpdump.txt, lp,ake_args.txt and sysrw_log.txt in there.

And theres a /sdcard1/sysrw_1.35/img folder with a whole bunch of *.img and *.bin files i think i can delete now, right?
[Android Software/Hacking General [Developers Only]] lebigmac:
@flashernoob You can delete all the img and bin files (or the whole sysrw folder) but please show me your logs first. :)

You can just zip the log folder and upload here or you can send me in PM if you prefer.

Without the amazing feedback of the users this program would not exist as is ;)

Thanks for your feedback! (y)

And yes the super_patched.bin file is just an .img file that just happens to be called .bin ;)
[Android Software/Hacking General [Developers Only]] flashernoob:
Tried in Terminal of OFox Recovery before the script, / gave nothing, system_ext, product and vendor gave <<mount: "xxx" not in /proc/mounts>>

The grep-line also gave nothing.

I'm obviously too stupid for this...

What do i need to give the out= line?

i tried "out=/sdcard1/sysrw_1.35/img" and "out=/sdcard1/sysrw_1.35/img/", both gave me error 73. All the other bins and imgs are created nicely.

Now trying "out=/sdcard1/sysrw_1.35/img/superrw.bin" but wife calls, X-Files is on...

When i get my files right i'll give the logs and retry the mount lines, but i could delete stuff in system which didn't work before, whereas /cust could be cleaned earlier.
[Android Software/Hacking General [Developers Only]] lebigmac:
I'm not sure I always install the project folder in either /data or /data/local/tmp

just try out=./super_patched.bin and the file should end up in the sysrw_1.35 project folder itself (wherever you installed it) ;)(y)
[Android Software/Hacking General [Developers Only]] TheGhost1951:
Where are you running the script from? SD card? or root?
[Android Software/Hacking General [Developers Only]] lebigmac:
Okay we're finally getting somewhere. Still some debugging to do but I think we're on the right track :D(y)
[Android Software/Hacking General [Developers Only]] Thisisauser6443:
@lebigmac, brilliant news! I finally got time to do a full backup of my data, and reset to disable DM-Verity and Verified Boot. Went ahead and flashed the patched super image, and it boots successfully...

And, even better...

It works :D (I don't have an ODM sub-partition, so yeah).

Now if I could only donate...

Listen, again, I really appreciate your work, and thank you for taking the time to help me out with AVB and DM-V :)
[Android Software/Hacking General [Developers Only]] lebigmac:
I'm always happy if my program works as expected on somebody else's device other than my own :D(y)

The donation page should be ready this week. Thank you for your amazing feedback and support. :love:(y)

In your screenshot you forgot to do this after remounting as rw

mount | grep dm- | head -5

According to your log the auto-resize feature worked like a charm. You should now have approximately 200 MB of free space per sub-partition. :D(y)

Enjoy customizing and debloating your fully read/write-able Android device :love:(y)
[Android Software/Hacking General [Developers Only]] Aitra:
How did you disable dm_verity?
[Android Software/Hacking General [Developers Only]] Thisisauser6443:
Whenever you'd create the patched super image, there will be 2 commands that use the "avbctl" binary. However, just to give myself time to prepare for a wipe of my data, I disabled those commands, with @lebigmac's help of course, and flashed the "vbmeta" image, with the following command:

fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img.

Also, if you have either "vbmeta_vendor" or "vbmeta_system", within your stock firmware, replace "vbmeta.img", with what you need
[Android Software/Hacking General [Developers Only]] lebigmac:
Doesn't that do exactly the same thing as what the script is doing at the beginning? :unsure:

$binDir/avbctl --force disable-verification
$binDir/avbctl --force disable-verity
[Android Software/Hacking General [Developers Only]] katanasamana:
don't laugh, i really need it, how to work in a9
[Android Software/Hacking General [Developers Only]] lebigmac:
AFAIK Android 9 and earlier doesn't have all these useless read-only restrictions such as shared_blocks or EROFS that you can see in Android 10 + ...

Here is a quick proof of concept that the run-time auto-debloat works! :D(y)

I just need to optimize the algorithm a little bit further and then I should be ready to upload it. Hopefully this brand new Auto-Debloat feature will improve the compatibility with Realme and OnePlus devices and make this program even more universal. ;)(y)
[Android Software/Hacking General [Developers Only]] Thisisauser6443:
Yeah, but, I hadn't prepared a complete backup of my data, on the first 2 attempts, so I thought I'd give myself some time, by commenting out those lines of code, getting the patched super image, creating a backup of my data, and then flashing my vbmeta image to disable DM-V and ADB.

Tedious? Imo, yeah it is (Factoring in that I'd have to do this once every month), but I kept everything intact, so I'm good with it
[Android Software/Hacking General [Developers Only]] Aitra:
Looks like Miui 14 android 13 was born to challenge systemrw, I tried everything but it didn't change anything.
[Android Software/Hacking General [Developers Only]] lebigmac:
Hi. Where is your log? And that screenshot is supposed to show me what exactly? :unsure:

What happen if you do this as root? :unsure:
[Android Software/Hacking General [Developers Only]] Aitra:
Error log after I manually install on Mi 11 lite 5g- Miui14 android 13.
[Android Software/Hacking General [Developers Only]] lebigmac:
Thanks for your feedback it really helps better understand what's going on with your device :D(y)

Ohhh yes the mi_ext_a error :D

Same error happens on slot B with mi_ext_b right? :unsure: You can try switch slots in fastboot.

I've seen this error before. Is this fake mi_ext_a partition new in MIUI 14 ?

The upcoming v1.36 with brand new Auto-Debloat feature is just around the corner and should hopefully fix this annoying mi_ext_a issue for you ;)(y)
[Android Software/Hacking General [Developers Only]] Aitra:
The above error log with size=35 configuration and '-r' removed.
[Android Software/Hacking General [Developers Only]] lebigmac:
I am happy to announce that thanks to the addition of the brand new Auto-Debloat feature (which I just created from scratch) to my integrated MakeRW / ro2rw component, my main SystemRW / SuperRW program has just reached stable status! This is a huge milestone in the development timeline of this unique and original RW project for Android. :D(y)

I would like to use this opportunity to thank God and every single one of the users out there who contributed positively to the creation & evolution of this amazing and unique RW project for Android from scratch. Without your high quality feedback throughout the past 2 years this project would not exist as is (and neither would all the unauthorized copycat clones out there).

Thank you for your support! You are simply the best! :D(y) I'd also like to thank the team at XDA for making all of this even possible in the first place by providing us with this wonderful forum that we all take for granted every day. XDA-developers.com is such an amazing place where great ideas can come together and materialize into even greater programs. :D(y)

BRAND NEW STABLE RELEASE INCOMING IN THE NEXT 24-48H ! GET READY !

I think this really might be THE version. This time for real! :D(y)

@LeeGarChat why you never told me that my unique and original RW Multi-Tool for Android is SOOOOO GOOOOD? :love:(y) I had absolutely no idea what this baby is capable of :D(y) When exactly were you planning on telling me about that? If ever? :unsure:

The RW party is just about to get started my friends! Finally. It was about time :love:(y)
[Android Software/Hacking General [Developers Only]] AnonVendetta:
@lebigmac: All the partitions within my super.img are already writable (I didn't have to use your tool, they're just writable as is). But they are ext4. Can this tool convert ext4 to f2fs?
[Android Software/Hacking General [Developers Only]] rajnimal nimal:
I am waiting😉
[Android Software/Hacking General [Developers Only]] foxhackerr:
we are waiting sir

yyooooooo hoooooo
[Android Software/Hacking General [Developers Only]] lebigmac:
Hello. Would you like to share with us your secret how you made your super.img RW ? :unsure:

The integrated MakeRW / ro2rw binary that you can find @ /bin/makerw does not yet include the official F2FS-RW patch by lebigmac which is scheduled to be released in 1. quartal 2023. Thank you for your patience.

It will offer F2FS-2-EXT4 file system conversion but if many people request it I can also add the inverse that shouldn't be a problem at all. Same goes for EXT4-2-EROFS ;)

Why would you want to go back to F2FS though? :unsure: That's just as overrated as EROFS. :LOL:

EXT4-RW is the read/write-able future. :love:(y)

@Yuki1001 has realized this 4 months ago. :LOL:
[Android Software/Hacking General [Developers Only]] AnonVendetta:
No secret, seriously. It's like I said, they quite literally are already RW, I didn't have to process them with any tools. This is for Android 13 stock roms, on a Tab S7+ and a Note 20 Ultra. With root, I can write to any of the logical partitions within super. For my devices these would be system, vendor, product, and odm.

I was just kind of thinking that f2fs is faster than ext4. Or so I've heard, anyway.

And I wouldn't be "going back" to f2fs, they are ext4 BY DEFAULT. That's the way Samsung configured them. If you don't believe me then download one of the firmwares and check for yourself. No f2fs in the super.img, and apparently no shared_blocks either.

The data partitions are the only ones on my devices that use f2fs, again BY DEFAULT, not ext4. These are Samsung's choices, not mine.

Edit: my apex (whatever that is) has shared blocks and can't be mounted as rw. But system/vendor/product/odm apparently don't. And doing a test run with your flashable zip doesn't detect any shared blocks either. So whereever this apex lives, it might not be in the super partition. And there's no reason why I would want to make changes to apex anyway.
[Android Software/Hacking General [Developers Only]] Slim2none4u:
Hmmm....maybe it didn't work?
[Android Software/Hacking General [Developers Only]] lebigmac:
@Articul8Madness please check your PM I sent you custom lpmake command for your device. Hopefully you can get it to work now. An Asus user reported success on previous page so it's not only limited to Xiaomi devices. I agree the current version is not perfect and I am working on a fix.

Maybe the programming experts @BlassGO @brigudav @kory-vadim can please give some programming assistance here but I have yet to receive a message from any of them.

@Rezrex @po_dMerOn @kalhiro can you please send me your lpdump.txt and myargs.txt from this folder? /data/local/tmp/makesysrw_1.20/

I have to investigate an issue where the lpmake command fails for some people but it works fine for others? Thanks!
[Android Software/Hacking General [Developers Only]] lebigmac:
I just checked the previous version 1.15c and it seems to have the same problem for some devices. In this case I tried with oppo lpdump.txt by @thelavip

Should I try to sparse the files before joining with lpmake? What do you think?

I checked the file sizes and they do match. Maybe something is wrong with the group size...

Can any of the affected users successfully run lpmake command manually using the excellent tutorial by @Brepro1 and the excellent tutorial by @AndyYan ? How are your lpmake arguments different from the ones auto-generated by the script?
[Android Software/Hacking General [Developers Only]] kalhiro:
@lebigmac not sure which file... here's attachment lpdump.txt
[Android Software/Hacking General [Developers Only]] nttuan:
Dear Mr. @lebigmac ,

I run the script makesysrw_1.20_flashable.zip in both TWRP and OrangeFox (on Realme 6 Pro - RMX2061) but fail. It stopped when it create the super_fixed.bin. Please see the attached files.

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

Here my files in super folder:

engineering.img

oppo_product.img

preload_common.img

super_original.bin

system.img

vendor.img

version.19720.img

version.19721.img

version.19722.img

version.19726.img

version.19728.img
[Android Software/Hacking General [Developers Only]] lebigmac:
Thanks for feedback.

Let me guess you have this error

Not enough space on device for partition version.19067 with size 601040

I am trying to fix it but it's not easy...

@nttuan In the meantime can you please try to run lpmake command manually? Check BrePro1 tutorial and AndyYan tutorial on how to do this. That way we can compare the argument values to the ones auto-generated by the script and this will help find the error. Thank you!

I just managed to squeeze some more information out of lpmake:
[Android Software/Hacking General [Developers Only]] lebigmac:
Ok guys good news I believe I found the error. I will try to fix it ASAP! Bear with me.
[Android Software/Hacking General [Developers Only]] SmartphoneOwner:
Would this work on /system/product too?
[Android Software/Hacking General [Developers Only]] sp7foy:
@lebigmac

The newest xiaomi.eu, POCO X3 and version 1.20 works perfectly. But you already know that :)

Operation time approximately 3 minutes. Before that, I already had Disable DM-Verity_ ForceEncrypt and Magisk.
[Android Software/Hacking General [Developers Only]] lebigmac:
Hi thanks for your interest in this project. Sure I don't see why it shouldn't work. Do you have super partition?

Congratulations for getting it to work! Thanks for the valuable feedback!

Alright folks who feels brave enough to beta test the new upcoming v1.21 send me a message! Thanks. I'm waiting for volunteers especially those who had lpmake error at the end. I think I finally fixed that annoying lpmake error :D

I also simplified the problematic code a little bit.
[Android Software/Hacking General [Developers Only]] Slim2none4u:
Me me me!!! :D
[Android Software/Hacking General [Developers Only]] lebigmac:
v1.21 is now available!

This is more like a lpmake error hotfix

Algorithm was only modified very slightly

Next update I will include toybox or busybox as @aIecxs suggested

for even better compatibility with 3rd party devices!

@thelavip @ronlkh1965 @nttuan

@BlazingKahn35 do you still get dirty cow error with this version?
[Android Software/Hacking General [Developers Only]] lebigmac:
I don't know about you guys but over here the new version works perfectly on my Xiaomi X3 NFC!

I just tested it with a fresh brand new read-only super and it works!
[Android Software/Hacking General [Developers Only]] Ayoub$#:
Check this out

What is the available space in the phone? I see ten gigabytes
[Android Software/Hacking General [Developers Only]] toolhas4degrees:
Could you make this magisk compatible? Is that a possibility instead of using terminal for non twrp users
[Android Software/Hacking General [Developers Only]] nttuan:
Dear Mr. @lebigmac ,

I run 1.21 and have the same issue.

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

I think the problem in the lpmake process. Maybe my phone super partition has a difference with the Xiaomi phone one.

Thanks for your effort!!!

--metadata-size 65536 --super-name super --sparse

--output /super_fixed.bin --device super:8183087104 --group qti_dynamic_partitions:8178892800

--image vendor=/vendor.img --partition vendor:none:1527885824:qti_dynamic_partitions

--image system=/system.img --partition system:none:5992308736:qti_dynamic_partitions

--image oppo_product=/oppo_product.img --partition oppo_product:none:146124800:qti_dynamic_partitions

--image version.19728=/version.19728.img --partition version.19728:none:105263104:qti_dynamic_partitions

--image version.19722=/version.19722.img --partition version.19722:none:105263104:qti_dynamic_partitions

--image version.19726=/version.19726.img --partition version.19726:none:105263104:qti_dynamic_partitions

--image preload_common=/preload_common.img --partition preload_common:none:424120320:qti_dynamic_partitions

--image version.19720=/version.19720.img --partition version.19720:none:105263104:qti_dynamic_partitions

--image version.19721=/version.19721.img --partition version.19721:none:105263104:qti_dynamic_partitions

--image engineering=/engineering.img --partition engineering:none:105082880:qti_dynamic_partitions

--metadata-slots 2

engineering.img 105,082,880

oppo_product.img 146,124,800

preload_common.img 424,120,320

system.img 5,992,308,736

vendor.img 1,527,885,824

version.19720.img 105,263,104

version.19721.img 105,263,104

version.19722.img 105,263,104

version.19726.img 105,263,104

version.19728.img 105,263,104
[Android Software/Hacking General [Developers Only]] lebigmac:
Hi. Thanks for your suggestion I'll look into it.

Guys I just noticed a small error thanks to the valuable feedback by @nttuan and @Articul8Madness

Hotfix coming tomorrow ;)

I fixed first annoying lpmake error and introduced brand new one :D

I wonder why it worked on my device though...
[Android Software/Hacking General [Developers Only]] aleksgiab:
For mi 10 ultra He does
[Android Software/Hacking General [Developers Only]] james28909:
Does not work for me. I have an armv7 and I think it is 32 bit. Maybe this is the problem? I get error 255 in twrp with no other warnings.
[Android Software/Hacking General [Developers Only]] marat2509:
Xiaomi Redmi 9 - system, Android 10, works (Mounting only from Recovery)
[Android Software/Hacking General [Developers Only]] foxhackerr:
hi sir when you want to release it?

the time is 12:07 here