yashsingh1/xdaforums huggingface dataset:
[Android Software/Hacking General [Developers Only]] midozalouk:
Hello sir

I'm using the in= and out= option so i can use custom input and output

and the script detect cutom input detected with my input and custom ouptut detected with my output

but unfortunately it igonres it and starts dumping the original super image in the data/loca/tmp etc

can you please solve it ?
[Android Software/Hacking General [Developers Only]] xxXDarkNightXxx:
You can't delete or change anything and you found that the system is rw Why is that what is the problem?
[Android Software/Hacking General [Developers Only]] lebigmac:
yes this new v1.34 is still WIP and I will do my best to fix all the errors and add all the missing features such as auto-resize and all the good stuff in the upcoming days :)

The in=, out=, size= arguments should work in this version but I haven't yet added the disable auto-backup feature or the -r parameter in this one ;)

Wait what version are you using?

According to your screenshot your system and vendor partitions are fully RW ;)(y)

To make the /product RW you need to find out where it is mounted as read-only overlay and change it there to RW ;)(y)

I hope this helps.
[Android Software/Hacking General [Developers Only]] Thisisauser6443:
Seems to have flashed, but it seems to have bricked my device (Dw, I was able to get out of it, by flashing my bootloader(?)).

I noticed during the output that verification was disabled, and if I remember, from around when Magisk had the Android Verified Boot 2.0 header issue, turning that off meant I had to reset my phone - Is that what the script is doing here, 'cause I just want to make sure that I'm doing everything right :)

Also went ahead and attached my logs, as well

Device - Google Pixel 4a 5G

ROM - Stock ROM from Google

Android Ver. - 13 (Though the script thought it was Android 14?)

Build - TQ1A.23105.001 (January 2023 Update)

Script Ver. - 1.33

Edit: Forgot to say, thanks for the help :)
[Android Software/Hacking General [Developers Only]] xxXDarkNightXxx:
for me /product is only R/O so I can't edit anything you can change the quality to RW
[Android Software/Hacking General [Developers Only]] lebigmac:
Hi thanks for the log files. Looking at your log I can't see any errors. Can you?

Regarding the bootloop. I'm not sure why exactly it happens on your specific device.

It looks like you ran v1.33 of my script. If you want you can try the latest v1.34 and since it's open source you can comment out the part where dm-verity and verification is disabled in the script. Maybe that works better for you but I doubt it. The more of these useless security features are disabled at run-time the less problems the script will have at doing its job.
[Android Software/Hacking General [Developers Only]] Thisisauser6443:
Yeah, I was just trying to see if there were any issues on creating the RW super image. AFAIK, it seems to have gone well, so if you can't see anything wrong, I'll follow on with that

Also, just checking, I've found a file, named "avbctl", within "\sysrw_1.34\bin" - I haven't got a clue, where DM-Verity and Verification are located, but is that the file I'm looking to remove?
[Android Software/Hacking General [Developers Only]] lebigmac:
no you don't want to remove the file itself as you will probably need it later on but you can comment it out in the superw script file itself with notepad ;)

#printf "$app: Attempting to disable dm-verity and verification...\n"
#$binDir/avbctl --force disable-verification
#$binDir/avbctl --force disable-verity

I doubt that this will help fix your bootloop though. To the contrary. I get bootloop if I don't disable dm-verity and verification on my Redmi Note 12 5G...

Hence why I added it ;)(y)

I hope this makes more sense now.
[Android Software/Hacking General [Developers Only]] Thisisauser6443:
Alright, found the lines - I'll try again, and get back to you at some point
[Android Software/Hacking General [Developers Only]] BigEmpty:
Tried this script for the first time today. Appears to have been successful. Ran from running system, not recovery, using only this command line argument:

./sysrw size=0

Because I wanted all of the sub partitions to remain the same size.

Question: does the script only convert super_patched.bin back to sparse format, and not the individual sub partitions? The file sizes of the sub partitions are much bigger now, I assume because they are not individually each in sparse format like the original sub partitions were. This also means that they can't be flashed individually using fastbootd.

If I want the patched sub partitions to be in sparse format, I'd need to so that myself, externally from this script?
[Android Software/Hacking General [Developers Only]] lebigmac:
The individual sub-partitions are in raw format by default but if you want in next version I can add an -s parameter to my official MakeRW / ro2rw sub-partition converter/resizer tool (which is an integral part of this larger SystemRW / SuperRW SUPER partition converter tool) that way you can just do

makerw in=myfile.img size=50 -s out=myfile_new.img

and then it should output a fully read/write-able sub-partition in sparse format ;)(y)
[Android Software/Hacking General [Developers Only]] BigEmpty:
That would great!

But why would size=50 be used?
[Android Software/Hacking General [Developers Only]] lebigmac:
Well if you want to add 50 MB of extra space to the sub-partition you can do that but you don't have to. If you skip the size parameter the file will be shrinked to its minimum size by default (shrink2min). That's like writing size=0

I wish we could discuss this sub-partition conversion topic in the official MakeRW / ro2rw sub-partition converter thread but sadly it was locked :(
[Android Software/Hacking General [Developers Only]] xxXDarkNightXxx:
It is possible to make the /product partition as RW
[Android Software/Hacking General [Developers Only]] BigEmpty:
Ah, cool. So I shouldn't I watch your other thread to your official MakeRW / ro2rw sub-partition converter/resizer tool for an update that includes the -s parameter? I notice it states that an update is coming in the first quarter of 2023? You'll mention it here instead?
[Android Software/Hacking General [Developers Only]] lebigmac:
Well since that thread was locked for some reason I won't be able to update it :( so it's probably best to just keep an eye on my personal website for the new MakeRW / ro2rw sub-partition converter/resizer update ;)

You can flash raw files with fastboot too ;)

yes it should be possible as I already mentioned in my previous message. Just check the .rc scripts in your system partition maybe you can find out where exactly /product is mounted as read-only overlay. Once you found it it's only a matter of changing the overlay mount from ro to rw with notepad ;)

Please share your results with us here in this thread. Good luck! :D(y)
[Android Software/Hacking General [Developers Only]] BigEmpty:
I'll try again. I attempted to flash the raw vendor file using fastbootD, but after 10 minutes and no confirmation of flashing success, I gave up and just flashed the patched super using regular bootloader fastboot (after rebooting into bootloader fastboot).
[Android Software/Hacking General [Developers Only]] lebigmac:
Sorry I'm not very familiar with fastbootD I only use regular fastboot. What's the difference? :unsure:

And what happens after you flash super_patched.bin ? Phone boots?
[Android Software/Hacking General [Developers Only]] BigEmpty:
Yup, it's all good. Boots fine and I'm able to remount every partition as rw. Thanks for all your work and help.
[Android Software/Hacking General [Developers Only]] xxXDarkNightXxx:
What is the name of this file because I can't find it
[Android Software/Hacking General [Developers Only]] lebigmac:
I gave you all the hints on the previous page. Now it's up to you to do some real good detective work on this! Please do report back your discoveries here once you find them so that I can integrate your findings into the main script & automate the whole process for next time. Thanks (y). You will be properly credited of course. ;)

Good luck in your research! 🍀(y)
[Android Software/Hacking General [Developers Only]] Bogdkdkd:
I think, this is a good idea
[Android Software/Hacking General [Developers Only]] lebigmac:
1.35 is coming later today as a flashable zip :D(y)

Please be patient !
[Android Software/Hacking General [Developers Only]] Aitra:
Very much looking forward to the new version will support Mi 11 lite 5g with my f2fs memory.
[Android Software/Hacking General [Developers Only]] foxhackerr:
we waiting sir :D
[Android Software/Hacking General [Developers Only]] Thisisauser6443:
Yeah, sadly it didn't work, because after I flashed "super_fixed.bin" to the "super" block", my device reported that it was corrupt, and as a result, wouldn't go any further than the Google splash screen, at boot. Seems like I will need to do a reset of my phone, to disable AVB and DM-Verity, after all

Oh well, I guess this is why people always say to take a full backup (Don't worry, I didn't lose my data :D) ¯\_(ツ)_/¯
[Android Software/Hacking General [Developers Only]] BigEmpty:
{Mod edit: Quoted post has been deleted. Oswald Boelcke}

I don't what kind of thoughts your mind is having, but fastbootd is the userspace version of fastboot (as opposed to the bootloader version of fastboot). At least on some devices.

It was added so as to allow updating of the individual partitions within the dynamic super partition.

See: https://source.android.com/docs/core/architecture/bootloader/fastbootd
[Android Software/Hacking General [Developers Only]] lebigmac:
Porting the auto-resize and auto-backup feature from v1.33 to v1.35 as we speak ;)(y)

Soon the world shall witness the full beauty of my proprietary source code ;)

It is like a piece of art.
[Android Software/Hacking General [Developers Only]] TheGhost1951:
OK, patience is the virtue to success. Using "lebigmac's" latest script, I have been able to convert my TMO OnePlus 9 Pro from RO 2 RW adding 100mb of space to each partition. In so doing I was able to copy a 2+ mb bootanimation to the TMO media folder and paste it successfully. The process was painless and simple. Straight forward and cleaner than any other process I have tried. One thing I believe in is, if you buy a phone, it is your phone and you should be able to customize it any way you choose. If you brick it, it is by your choice. No one else's fault. Many cheers and thanks go out to lebigmac for a great job. Congratulations Mr. Lebigmac, job well done. 🍻

🍻🍻🍻👌👍👍👍🤠
[Android Software/Hacking General [Developers Only]] lebigmac:
Thanks @TheGhost1951 for all the awesome feedback you gave me regarding the COW Oneplus out of space error :D(y) Without your precious feedback and that of all the other users in this thread this latest version probably wouldn't even exist as is.

I'm uploading it in the next 30 minutes :D with auto resize , flashable zip and all the good stuff :D And open source so my many competitors can learn something :D

Just converting the update-binary to unhackable GOD mode real quick before I drop it :D
[Android Software/Hacking General [Developers Only]] TheGhost1951:
Congratulations Mr. Lebigmac! :cowboy:
[Android Software/Hacking General [Developers Only]] lebigmac:
New version 1.35 is live

I think this might be THE version lol. Fingers crossed. 🤞

You can find the Download button in bottom of first post of this thread!

I hope it works for y'all! Good luck! 🍀

Please report back your feedback right here. Thanks.

And most importantly have fun with it but please don't rip it apart and recycle the best parts for your own unauthorized copycat imitations without mentioning original source because that's not what open source is all about. Thank you :D(y)

Enjoy!
[Android Software/Hacking General [Developers Only]] TheGhost1951:
Not sure but not likely. Someone else may have ideas.
[Android Software/Hacking General [Developers Only]] TheGhost1951:
Search for it, but you won't find it I'm sure....
[Android Software/Hacking General [Developers Only]] Bogdkdkd:
New version stopped at Partition must have a valid size error😢
[Android Software/Hacking General [Developers Only]] lebigmac:
lol what the hell?

Can you please send me your whole log subfolder? Thanks (y)

Everytime I think it's perfect a new error pops up :LOL:

Also that auto resize looks really ugly on your phone. Looks like this on mine:

Why is your result so different?! :unsure:

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

sysrw: Initiating Auto-Resize procedure...

Resizing the filesystem on ./bin/../img/product.img to 450084 (4k) blocks.
The filesystem on ./bin/../img/product.img is now 450084 (4k) blocks long.

Resizing the filesystem on ./bin/../img/system.img to 915228 (4k) blocks.
The filesystem on ./bin/../img/system.img is now 915228 (4k) blocks long.

Resizing the filesystem on ./bin/../img/system_ext.img to 275931 (4k) blocks.
The filesystem on ./bin/../img/system_ext.img is now 275931 (4k) blocks long.

Resizing the filesystem on ./bin/../img/vendor.img to 453858 (4k) blocks.
The filesystem on ./bin/../img/vendor.img is now 453858 (4k) blocks long.

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

How did you call the script ? Just like this?

./sysrw

How about calling it like this

./sysrw size=20

your problem happens in the auto-resize. And if the script is launched without custom size parameter it will automatically go into auto-resize mode.

Apparently the auto-resize is not working properly on your device. I'll have to fix that later but first it's time for a snack :p

I'll be watching this thread while enjoying some popcorn :D
[Android Software/Hacking General [Developers Only]] katanasamana:
Hey bro,so what about android 9, how can it switch from read-only to read-write
[Android Software/Hacking General [Developers Only]] TheGhost1951:
Try extracting the zip, copy the folder sysrw_1.35 and past it to /data/local/tmp root folder, open the folder, install termux and start it, type su enter, type cd /data/local/tmp/sysrw_1.35 enter, type chmod 777 ./sysrw, then type ./sysrw size=50 enter "see if that works"!
[Android Software/Hacking General [Developers Only]] Bogdkdkd:
I called like ./sysrw
[Android Software/Hacking General [Developers Only]] TheGhost1951:
./sysrw size=50
[Android Software/Hacking General [Developers Only]] lebigmac:
@Bogdkdkd I notice an error right away. Why you got negative size values in your lpmake arguments? :unsure: Maybe the files are corrupt?

--device super:10200547328
--group cow:10200547328
--group qti_dynamic_partitions_a:10200547328
--partition vendor_a:none:1112143463:qti_dynamic_partitions_a
--image vendor_a=./bin/../img/vendor_a.img
--partition system_a:none:984864359:qti_dynamic_partitions_a
--image system_a=./bin/../img/system_a.img
--partition product_a:none:-86313369:qti_dynamic_partitions_a
--image product_a=./bin/../img/product_a.img
--partition odm_a:none:1691444839:qti_dynamic_partitions_a
--image odm_a=./bin/../img/odm_a.img
--partition my_product_a:none:462415463:qti_dynamic_partitions_a
--image my_product_a=./bin/../img/my_product_a.img
--partition my_engineering_a:none:-99740057:qti_dynamic_partitions_a
--image my_engineering_a=./bin/../img/my_engineering_a.img
--partition system_ext_a:none:1360537191:qti_dynamic_partitions_a
--image system_ext_a=./bin/../img/system_ext_a.img
--partition my_stock_a:none:1959851623:qti_dynamic_partitions_a
--image my_stock_a=./bin/../img/my_stock_a.img
--partition my_heytap_a:none:1324263015:qti_dynamic_partitions_a
--image my_heytap_a=./bin/../img/my_heytap_a.img
--partition my_company_a:none:-99781017:qti_dynamic_partitions_a
--image my_company_a=./bin/../img/my_company_a.img
--partition my_carrier_a:none:-99740057:qti_dynamic_partitions_a
--image my_carrier_a=./bin/../img/my_carrier_a.img
--partition my_region_a:none:-96283033:qti_dynamic_partitions_a
--image my_region_a=./bin/../img/my_region_a.img
--partition my_preload_a:none:914847335:qti_dynamic_partitions_a
--image my_preload_a=./bin/../img/my_preload_a.img
--partition my_manifest_a:none:-99051929:qti_dynamic_partitions_a
--image my_manifest_a=./bin/../img/my_manifest_a.img
--partition my_bigball_a:none:962700903:qti_dynamic_partitions_a
--image my_bigball_a=./bin/../img/my_bigball_a.img
--output ./bin/../img/super_patched.bin

other than that the arguments look good. Maybe you can check the file sizes manually and update the arguments and call the lpmake command manually to make sure that it works manually.

To get the actual file sizes you can do stat -c "%s" /path/to/system_a.img

or just call the whole script again with a custom size value as suggested by @TheGhost1951

./sysrw size=20 (the lower the custom size value the higher the chances of success, especially if you got lots of sub-partitions lol.
[Android Software/Hacking General [Developers Only]] TheGhost1951:
I really don't know what you are up to, but the conversation is getting boring.
[Android Software/Hacking General [Developers Only]] Bogdkdkd:
@lebigmac With size=20 script stops at not enouth space on device for partition my_preload_a error. My phone has 70 gb free space. What the hell?
[Android Software/Hacking General [Developers Only]] lebigmac:
Okay you pretty much only have 1 option left now. Shrink to minimum (shrink2min)

./sysrw size=0

That means to free up space inside your system partition you will have to debloat some useless stuff.

Yes you got that amount of free space in /data partition but lpmake is complaining about fitting all those fake partitions into your tiny super partition which is only 9.5 GB ;)

Can't we just skip all those fake my_heytap partitions like we skipped the COW ones or would that end up in bootloop? :unsure:
[Android Software/Hacking General [Developers Only]] TheGhost1951:
Have an idea, what if you downloaded an A12 firmware update package and extracted the super from that to check and see what is being installed. In my A11 msm tool the super only contains 5 images such as system system_ext product vendor and I believe one other. It would be interesting to see what an A12 super contains...🤔
[Android Software/Hacking General [Developers Only]] lebigmac:
I am currently developing this on a Redmi Note 12 5G with the infamous EROFS read-only restriction running MIUI 13.0.3 (Android 12) ;)(y)

@Bogdkdkd if you check your lpmake_args.txt from your previous message and add up all the sizes you will see that it equals 11.182228088 GB and your super image can only hold 9.5 GB

Right now the auto-resize calculates the free space and distributes it equally to all sub-partitions. Maybe this is wrong. How about calculcating all available free space and only giving it to system/product/vendor ? :unsure:

In that case I'd have to optimize the auto-resize algorithm.
[Android Software/Hacking General [Developers Only]] Bogdkdkd:
Unfortunately, the same thing happened
[Android Software/Hacking General [Developers Only]] lebigmac:
Okay so this is with shrink2min AKA size=0 right?

I counted and now you're at 10.889259338 GB which is still 1.4GB over your maximum super size. So we will have to either skip one of those fake partitions or mount your individual sub-partitions in real-time and debloat the hell out of them programmatically before putting everything back together :D Everything is possible my friend. I will experiment a little bit with a couple of possible options ;)
[Android Software/Hacking General [Developers Only]] Bogdkdkd:
I don't know
[Android Software/Hacking General [Developers Only]] Bogdkdkd:
Yes
[Android Software/Hacking General [Developers Only]] lebigmac:
I guess those files somehow got corrupted within the auto-resize() process. Don't worry about it. With next hotfix I will add a check there to prevent this file corruption from happening next time. Something like: If totalsize > Supersize then don't do autoresize LOL but do the debloat() procedure instead ;)(y)

We need to free up at least 1.4GB of space inside your 9.5GB super image...

These EROFS image files seem to be highly compressed.

Can you please browse around on your phone for locations that we could safely debloat at run-time and send me a list? Thank you (y)
[Android Software/Hacking General [Developers Only]] rajnimal nimal:
How can I flash super-patched.bin Samsung A73 5g phone?
[Android Software/Hacking General [Developers Only]] lebigmac:
F2FS support coming 1st quartal 2023 ;)(y)

Hang in there. Soon I do the FULL-RW magic for the Samsung users ;)
[Android Software/Hacking General [Developers Only]] rajnimal nimal:
Thanks bro😉
[Android Software/Hacking General [Developers Only]] Bogdkdkd:
my_heytap

my_preload
[Android Software/Hacking General [Developers Only]] SpatialDistortion:
not work on my Realme 8 5G A12 RUI3 Ver C.06, i'm using version 1.35
[Android Software/Hacking General [Developers Only]] ay0ks:
Hello, is there a way to save the backup to sd card (or to save everything script does to sd card, and then flash patched super image from it)? Because I don't have available 10GB of internal storage, but have almost empty 64GB sd card

Thanks in advance
[Android Software/Hacking General [Developers Only]] jonas.ska:
Could you expand on what Allwinner soc. is is it a usb chip? We're currently looking into any possible solutions to enable USB host, maybe by modifying hardware or smth. Anything helps.
[Android Software/Hacking General [Developers Only]] ttritium:
Thanks for the great job.

Works fine with Samsung A226B.
[Android Software/Hacking General [Developers Only]] xxXDarkNightXxx:
I have looked at these files init.rc And nowhere is there find /system -t file -name "*.rc"

Maybe it just needs to be written somewhere? Maybe it just needs to be written somewhere?
[Android Software/Hacking General [Developers Only]] lebigmac:
Hi thanks for the log files (y)

Your log couldn't look any better. I am surprised how well the script itself ran on your Realme device despite all those bogus partitions. I can't find any errors in your log. (y)

What do you mean not work? Did you fastboot flash the super_patched.bin to your super partition yet? :unsure:

And? Phone boots? What happens if you do this? (as root of course)
[Android Software/Hacking General [Developers Only]] lebigmac:
Maybe all you have to do is edit the bin/superw file with notepad and change the imgDir= path to your external sdcard? and also use out= parameter when launching script to save the patched super.img to external sdcard. That should work. Good luck! :D(y)
[Android Software/Hacking General [Developers Only]] SpatialDistortion:
hello, sorry, lebimagac, after I reinstalled via twrp, now my realme 8 5g is already rw, with a note that I have to enable verification via twrp so I don't lose the signal before rebooting after installing the script, but I confused about is why I can't delete the application in the "products" folder ? and one more thing is it ok if i delete the "img" folder like the one in the screenshot?
[Android Software/Hacking General [Developers Only]] lebigmac:
yes you can delete everything after successfully flashing the super_patched.bin :D

Do this and show me screenshot please. Thank you :D(y)

Then we should see what is the problem with your /product

Maybe it's mounted read-only overlay like that other guy on previous page?
[Android Software/Hacking General [Developers Only]] TheGhost1951:
I am going to redo my phone in order to get an erofs super for lebigmac can use to test with from my OnePlus 9 pro TMO variant. Even though I have it fully working with RW now. Lebigmac is the best!
[Android Software/Hacking General [Developers Only]] SpatialDistortion:
like this? only vendors and products that cannot be RW
[Android Software/Hacking General [Developers Only]] lebigmac:
Congratulations! Enjoy debloating & customizing your fully read/write-able system! :love:(y)

if you look closely /product is rw too only /vendor has a read-only problem for some reason?! Maybe you can find out more info if you run dmesg after remounting /vendor as rw ...

Why would it say operation not permitted even though you are root? :unsure:
[Android Software/Hacking General [Developers Only]] SpatialDistortion:
but thank you, at least I managed to remove some of the bloatware