yashsingh1/xdaforums huggingface dataset:
[Android Software/Hacking General [Developers Only]] TheGhost1951:
When I first got my OP9P, I was excited because I had searched for a phone that could have the bootloader unlocked. I had been with Samsung for years and was frustrated because, even though I paid for the phone, Samsung was still there telling me what I could and couldn't do with MY phone. So I bought the OP9P and started my search for unlocking the bootloader. After finding through a Bing search a thread on how to unlock my TMO bootloader and successfully did so. Then it was search in Bing again to root my phone. Again it found an xda threads on rooting with Magisk. Ok, got that done. But to my surprise, it did not give me full root access that apps could not access the root system even though a root check app said I had root. Back to Bing to search for the answer to give me full root access with out having to search for this module or that module to work with Magisk (I did try a couple) but they did not work for what I was wanting to do. After days went by searching for an answer, the ONLY answer I could find was this thread. This is the first and original script that allowed me to do exactly what I have wanted to do for years. My hat is off to "lebigmac" for creating this script and is the soul Author of it without a doubt. Others have come and gone since, but lebigmac is the originator of this awesome script. Thank you lebigmac and looking for more great work from you!
[Android Software/Hacking General [Developers Only]] incesu571:
Hello Brother, can you teach me how to do this process for the Oneplus 9 series? I've studied the subject from the beginning, but I don't understand it. I don't speak English and I'm trying to figure it out with google translate. It's not working. I am using Android 13 stock rom. Magisk is installed and I have root access but the system is not mount. Sorry about my bad English. Thank you.
[Android Software/Hacking General [Developers Only]] DiamondJohn:
You asked for one, I gave you one. Q.E.D.
[Android Software/Hacking General [Developers Only]] TheGhost1951:
The script is not available for A13 yet. But will be soon!
[Android Software/Hacking General [Developers Only]] pr3dicament:
I can't wait for that lol. As you already know :P
[Android Software/Hacking General [Developers Only]] IamTheBRAVE:
Hey guys, just wanted to let you know. I was able to get RW on my OP9Pro on A13 ParanoidAndroid Topaz.

I used a mix of @Yuki1001 and @lebigmac 's tutorials. I don't have TWRP installed so i chose manual installation from OP.

-To avoid having the script dump my device's super, i provided the super_original.bin using yuki1001's step 1 in his thread:

dd if=%PATH_TO_SUPER_BLOCK% of=/data/local/tmp/super_orig.img bs=4096

-Renamed to super_original.bin for convenience with lebigmac's script, then proceeded with OP manual install instructions.

-Copy script folder to data/local/tmp, add super_original.bin to img folder, edit script to remove sdkcheck() function (# commenting it did not work) and launch script.

Transfer the resulting super_fixed.bin to windows pc, rename back to super_fixed.img.

Then, back to yuki1001's last step:

fastboot erase super
fastboot flash super super_fixed.img

It took a while to finish.

Rebooted and checked RW with mount command:

All partitions are rw except dm-0. Using RootExplorer, I mounted them r/w.

I successfully was able to replace bootanimation.zip in /product/media and rebooted with a custom animation. (EDIT: SolidExplorer was unable to do it because it does not have permission. Anyone know how to switch rw in SE?)

All is working well here. Thank you @lebigmac and @Yuki1001 for your efforts.
[Android Software/Hacking General [Developers Only]] Shmakhalan Shmihelson:
I'm working with Pixel 6a/Android 13.

I've commented out " #sdkCheck" from systemrw.sh and ran it using adb:

& ./adb shell
& su
# cd /data/local/tmp/systemrw_1.32
# chmod +x ./systemrw.sh
# ./systemrw.sh size=15
# ./systemrw.sh in=./img/super_original.bin size=15

I'm a bit suspicious that the input and output files are different sizes:

bluejay:/data/local/tmp/systemrw_1.32/img # ls -l
total 12936132
-rwxrwxrwx 1 root root 4702361056 2022-11-25 11:24 super_fixed.bin
-rwxrwxrwx 1 root root 8531214336 2022-11-25 11:21 super_original.bin

Is that supposed to be like that?

Should I proceed to flash "super_fixed.bin" image?
[Android Software/Hacking General [Developers Only]] IamTheBRAVE:
Yes, you added the size=15 parameter in the command line (i used 50) that's how it's supposed to be, so your partitions have enough space to do mods.

Just proceed with the last step (erase super and fastboot flash super
[Android Software/Hacking General [Developers Only]] TheGhost1951:
Wouldn't this work for any A13 firmware?
[Android Software/Hacking General [Developers Only]] IamTheBRAVE:
I suppose it would. My log shows my SELinux is permissive so maybe that helped...
[Android Software/Hacking General [Developers Only]] TheGhost1951:
Nope, it won't work for any A13 unless they went back to UFS from EROFS, that was the file system on A12.... I believe that from A12 and forward the file system is EROFS on stock roms. Custom firmware may or may not be UFS and therefore may or may not be made RW partitions.
[Android Software/Hacking General [Developers Only]] henrynezta:
after I flash, why does the boot animation change to Android, and I uninstall it, it still doesn't change ?
[Android Software/Hacking General [Developers Only]] TheGhost1951:
First off you are not giving enough information on what you have done such as phone model, firmware version what you did etc. "After I flash" , flash what? From what to what, how did you uninstall it, uninstalled what? Working on Android phone software is not like "how do I take the wrapper off this candy bar" it is more complex than that.
[Android Software/Hacking General [Developers Only]] IamTheBRAVE:
When system doesn't recognize boot animation, it displays the android one. Start again.

Also this isn't the thread to discuss bootanimations. Anything related to script: ask here, anything else, ask me in dm.
[Android Software/Hacking General [Developers Only]] TheGhost1951:
Or no animation at all. That happens to me when the animation is not configured correctly.
[Android Software/Hacking General [Developers Only]] BL0P:
I tried your script. Installed manually but run into an issue. It looks like my phone is not supported...
[Android Software/Hacking General [Developers Only]] TheGhost1951:
Currently A11 only is supported...
[Android Software/Hacking General [Developers Only]] IamTheBRAVE:
Nope. Just edit the .sh file with text editor and delete the sdkckeck() function (a couple of lines up to the empty line before the next function.)
[Android Software/Hacking General [Developers Only]] Shmakhalan Shmihelson:
Thanks. About the last step, it's not very clear, sorry if I'm asking something simple. You wrote that above:

fastboot erase super
fastboot flash super super_fixed.img

Do I run these from ADB shell? Do I need to transfer super_fixed.img to my computer? I suppose that will factory reset the phone?
[Android Software/Hacking General [Developers Only]] TheGhost1951:
Been there and done that on A12 several times with out success on my OP9P TMO LE2127.
[Android Software/Hacking General [Developers Only]] IamTheBRAVE:
Transfer the file to you adb folder, type cmd in the folder's address bar. It will open a terminal window.

Reboot your phone to fastboot. (Power off and then boot with 3 buttons)

Then type the code above. It will erase the super and flash the fixed one. It takes a lot of time, the cursor keeps blinking.. leave it for a ½ hour or more.

It does not reset your phone to factory. Just replaces the system partitions.
[Android Software/Hacking General [Developers Only]] IamTheBRAVE:
I don't know how you're doing it, but it's working for me. Already changed boot animation manually twice and created and deleted a test file in root folder.. i'm also playing with fonts now.

Maybe try it again on A13?
[Android Software/Hacking General [Developers Only]] TheGhost1951:
What firmware are you on IamTheBrave?
[Android Software/Hacking General [Developers Only]] IamTheBRAVE:
C63, i was on crdroid8, then upgraded to PixelEx 13 then Nameless 13, then ParanoidAndroid13.
[Android Software/Hacking General [Developers Only]] TheGhost1951:
File structer must be UFS then for the script to work. Stock firmware from A12 and up uses EROFS and the script doesn't work for that file structure!
[Android Software/Hacking General [Developers Only]] IamTheBRAVE:
All custom roms now are based on OOS12+ (EROFS) and i'm on A13, so yeah. The script extracts the partitions and rebuilds them as ext4 (and un-shares blocks), add a bit of space so it can switch the RO to RW.
[Android Software/Hacking General [Developers Only]] TheGhost1951:
It didn't work on LE2127 after multiple tries...unless I am doing something wrong!
[Android Software/Hacking General [Developers Only]] Mainur6:
custom roms have ext4 not erofs
[Android Software/Hacking General [Developers Only]] Mainur6:
i am also using it on custom roms but oos12.13 have erofs and custom doesn't that's the reason for working custom rom, ( CUSTOM ROM DONT HAVE EROFS ) ......
[Android Software/Hacking General [Developers Only]] Shmakhalan Shmihelson:
It worked :) Thanks a lot

Pixel 6a, unlocked bootloader, Android 13.

Do I need to re-do the steps every time there is an android update?
[Android Software/Hacking General [Developers Only]] IamTheBRAVE:
Yeah, i think so.
[Android Software/Hacking General [Developers Only]] Edgar_M:
Is there a chance to get this to work with F2FS A13 as well? (Samsung Galaxy Z Flip 4, SM721B)
[Android Software/Hacking General [Developers Only]] Zesam:
Works very well with POCOX3Pro V13.0.8.0.SJUMIXM miui 13 android 12.

Thanks!
[Android Software/Hacking General [Developers Only]] tom.android:
systemrw: Please wait and ignore the invalid sparse warnings...

Not enough space on device for partition product with size 1089863680

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

How to fix this error. Thank
[Android Software/Hacking General [Developers Only]] LeeGarChat:
remove anything from the .img system partitions before expanding the partition, and packing it into super. unfortunately the lebigmac script can't do that. 😢
[Android Software/Hacking General [Developers Only]] Tomatcree:
I don think so, I have done ota's on my pixels and it stays (its the super partition which does change with a/b) however I haven't done a/b and another a/b update so I dont know 100%. Dont worry though since its so easy to do it.
[Android Software/Hacking General [Developers Only]] IamTheBRAVE:
Not sure, but you may have -cow partitions taking up space in super (those are temp partitions created after ota) so before dumping your super from your device you need this:

In fastbootd you can see if it's present:

fastboot getvar-all

Anything ending in -cow is a temp file that can be deleted, like this:

fastboot delete-logical-partition system_a-cow

fastboot delete-logical-partition system_ext_a-cow

fastboot delete-logical-partition system_b-cow

fastboot delete-logical-partition system_ext_b-cow

fastboot delete-logical-partition system-cow

fastboot delete-logical-partition system_ext-cow

See this post:

https://xdaforums.com/t/script-andr...uring-makerw-read-write.4247311/post-85450359

Also there's Enhanced Fastboot and Payload dumper which could show you the cow partitions and let you delete them

https://xdaforums.com/t/tool-windows-fastboot-enhance-payload-dumper-image-flasher.4310553
[Android Software/Hacking General [Developers Only]] tom.android:
Thanks for you info.
[Android Software/Hacking General [Developers Only]] Dawid@pies:
Thanks! I tried to run this script on my Motorola Moto g9 Play and It works!
[Android Software/Hacking General [Developers Only]] guitouneo:
Hi everybody, perhaps someone will be able to help me...

My need is not the apply the script to a real phone but to an AVD (android virtual device) on Android Studio.

I applied the script on my AVD running on Android 11.

The script works well and I have now 5 files :

product.img

scratch.img

system.img

system_ext.img

vendor.img

super_fixed.bin

If I correctly understand, the super_fixed.bin is simply a .ZIP of all the others ? Am i right ?

Now that I have those files, I would like to recreate a new AVD with the files above.

I've noticed that the AVD uses a Google "system.img" file located in C:\Users\<ID>\AppData\Local\Android\Sdk\system-images\android-30\google_apis\x86_64.

When I unzip this system.img there are 2 files in it : 0.vbmeta.img and 1.super.img.

If I unzip the "1.super.img" file I have 4 files in it : product.img, system.img, system_ext.img and vendor.img.

My first question is : why I have that scratch.img with the script and not in the img files of Google ?

Here are all my unsuccessfull tries :

First try :

I rename the "super_fixed.bin" file in "1.super.img", overwrite the Google 1.super.img and ZIP the Google 0.vbmeta.img + 1.super.img in a new file called system.img.

I overwrite the Google system.img in C:\Users\<ID>\AppData\Local\Android\Sdk\system-images\android-30\google_apis\x86_64 with my new system.img

I try to create a new AVD in Android Studio and launched it with : emulator.exe -avd Pixel_6 -writable-system -no-snapshot

Black screen...

Second Try :

I was thinking that it can be due to scratch.img that I have in super_fixed.bin and not in Google system.img.

Then I created a ZIP with only my new product.img, system.img, system_ext.img and vendor.img.

I rename the ZIP in "1.super.img".

I ZIP the Google 0.vbmeta.img + 1.super.img in a new file called system.img.

I overwrite the Google system.img in C:\Users\<ID>\AppData\Local\Android\Sdk\system-images\android-30\google_apis\x86_64 with my new system.img

I try to create a new AVD in Android Studio and launched it with : emulator.exe -avd Pixel_6 -writable-system -no-snapshot

Black screen...

Do you know If i have a chance to succeed or am I doing something wrong in my steps ?

Best Regards,

Guillaume
[Android Software/Hacking General [Developers Only]] Tomatcree:
GOodluck on a vm 😳
[Android Software/Hacking General [Developers Only]] Littlenine:
Hi can it work on android 13?
[Android Software/Hacking General [Developers Only]] TheGhost1951:
No on stock firmware, very possible on custom firmware
[Android Software/Hacking General [Developers Only]] Tomatcree:
I disagree, I have tried on STOCK, QPR1 so it works on most pixels. Custom ROMs don't require this script as they all have resized and RW partitions.
[Android Software/Hacking General [Developers Only]] TheGhost1951:
Any firmware with EROFS file system the script will not work, the script at this time only works on UFS file systems.
[Android Software/Hacking General [Developers Only]] IamTheBRAVE:
[Removed as per OP's request]
[Android Software/Hacking General [Developers Only]] Tomatcree:
agreed, he was asking if it works on a13 i said it has nothing to do with that.....
[Android Software/Hacking General [Developers Only]] Supermatt01:
Ending with error #6 and it won't run. I am n Android 12 miui eu version 13 redmi note 10 pro
[Android Software/Hacking General [Developers Only]] ajanman:
Note 9 Pro xiaomi.eu Android 12 MIUI 13 does it work? Is there an extra situation that needs attention during installation?
[Android Software/Hacking General [Developers Only]] RedstoneHair:
I have a rooted OnePlus Nord 2T 5G and I'm wondering how to flash the zip as I can't do it in magisk
[Android Software/Hacking General [Developers Only]] TheGhost1951:
Read the instructions in the first posting...
[Android Software/Hacking General [Developers Only]] zxcvst:
hello, thanks for the tool btw.

this script works pretty well on RMX2001/REALME 6/MT6785, but the problem is /odm/etc isn't RW able. so, how to make those partition RW able?
[Android Software/Hacking General [Developers Only]] immortalwon:
Script works well when you are booted into the OS. When in TWRP custom Recovery Mode, when I try to replace a system file I backed up back to it's original folder, I get Error:1 from TWRP, which probably means I cannot write to the system folders. Shouldn't this script work in TWRP mode as well?
[Android Software/Hacking General [Developers Only]] immortalwon:
I also have the same issue on OnePlus Pro 9. This directory cannot be granted R/W even with this script. Maybe something that can be fixed soon?
[Android Software/Hacking General [Developers Only]] zxcvst:
nothing have to be fixed, as what i concern from pm & other similar post's, the script that we use is only including the system partition. so that was the reason why other partition still RO permission, and way to enable RW for other directories is we can use other tools(ofc hard to use than this tool) that can manually select what directories that we want to change permission & remove share block device.

sorry for bad explanation
[Android Software/Hacking General [Developers Only]] lebigmac:
Yes sure. The new upcoming version of my SystemRW/SuperRW feat. Makerw (read-only-2-read/write-partition converter) program will be able to convert even ODM.img and other weird partitions from read-only-2-read/write-able don't worry ;)(y)

To do this we must use the make_ext4fs binary to create brand new EXT4 .img files from scratch on the fly and then basically just copy everything over from your old partitions and repack everything and voila the dinner is served :p

Anyone have any idea how to use this make_ext4fs tool? :unsure:

Here are my results so far:

failed to find [/system/apex] in canned fs_config
loaded 535 fs_config entries
Creating filesystem with parameters:
Size: 695435264
Block size: 4096
Blocks per group: 32768
Inodes per group: 7088
Inode size: 256
Journal blocks: 2652
Label:
Blocks: 169784
Block groups: 6
Reserved block group size: 47

Anybody know what does it mean?

First it says failed to find [/system/apex] in canned fs_config even though that line is clearly there inside the system_fs_config file:

/system/apex 0 0 755

And then it says that it actually found a couple files in the fs_config file: loaded 535 fs_config entries

Then why it still throws error? :unsure:

I am executing program like this:

make_ext4fs -J -T 1230764400 -l 695435264 -a system -S config/file_context -C config/system_fs_config system_new.img /system

Am I doing it wrong? Thanks for your support! :D(y)

I found a copy of the make_ext4fs tool @ github
[Android Software/Hacking General [Developers Only]] Matteo Gamba:
Tested on Moto G52 (A12, commented sdkCheck line), verified working

Root Uninstaller didn't detect /system as RW, but manually removing app folders with solid explorer worked

VERY BIG thanks lebigmac!

Ran script from android (no twrp for G52) and flashed super_fixed.bin with fastboot

system_ext_b and vendor_b resulted as 0MB partitions, I've tried sysrw_repair but it didn't work as it searches for .img files but super_fixed was a .bin one, oh well

If you have a Moto G52 as well and want to try this script remember to set the size parameter to at least 150MB otherwise the partitions will be too small dunno why
[Android Software/Hacking General [Developers Only]] lebigmac:
Great news! Just got this damn make_ext4fs binary to work on all sub-partitions of super.img except system.img LOL

Apparently my fs_config generator tool that I just created from scratch needs a little bit more polishing to make it work with system.img too :D(y)

I'm new to this whole make_ext4fs fs_config and file_context stuff and it still blows my mind. :ROFLMAO:

Can anyone please upload their system_fs_config file here? I am curious what it's supposed to look like. Thanks! (y)
[Android Software/Hacking General [Developers Only]] TheGhost1951:
A12?
[Android Software/Hacking General [Developers Only]] zxcvst:
could you give me the directory path for dystem_fs_config?

thanks.
[Android Software/Hacking General [Developers Only]] Android developer2:
Where did the download link from the first post go?
[Android Software/Hacking General [Developers Only]] zxcvst:
hy, you can read on footer notes. theres a colored text "blablabla DOWNLOAD 1.3.2#" just click on it, but first you have to go to first page
[Android Software/Hacking General [Developers Only]] Android developer2:
I can not find

Could you direct me more precisely?
[Android Software/Hacking General [Developers Only]] zxcvst:
there it is
[Android Software/Hacking General [Developers Only]] Android developer2:
Thanks

It really didn't appear to me before

Only now it suddenly appears
[Android Software/Hacking General [Developers Only]] lebigmac:
You are aware that the old version is only compatible with EXT4 partitions right?

If anyone knows any other ways to generate those fs_config and file_context files for make_ext4fs binary then please let me know. Thanks (y)
[Android Software/Hacking General [Developers Only]] Android developer2:
The device I used then is not with me now

(Samsung A13)

I can download the official firmware of the device

that comes with F2FS

and convert it with erofsunpackrust

Will this help you?
[Android Software/Hacking General [Developers Only]] lebigmac:
Making some real good progress over here with the make_ext4fs binary :D(y)
[Android Software/Hacking General [Developers Only]] VStephen:
Didn't work for Infinix HoT 8 x650B used twrp
[Android Software/Hacking General [Developers Only]] Jazzda:
Redmi Note 9, with MTK

systemrw: Congratulations! Your image(s) should now have R/W capability

systemrw: Please reboot into bootloader and flash the file(s) manually

Now what?

fastboot or fastbootd?

fastboot flash <ToWhatPartition??> super_fixed.bin ?

Shouldn't the extension be .img?

Thanks
[Android Software/Hacking General [Developers Only]] Jazzda:
Fastbootd doesn't work

Fastboot ends after a lot of write_sparse_skip_chunk

and ends with

Sending sparse 'super' 1/33 (131068 KB) error: write_sparse_skip_chunk: don't care size 4612085084 is not a multiple of the block size 4096

error: write_sparse_skip_chunk: don't care size 4612085084 is not a multiple of the block size 4096

OKAY [ 4.500s]

Writing 'super' FAILED (remote: 'sparse chunk size is too big.')

fastboot: error: Command failed

Any hints?
[Android Software/Hacking General [Developers Only]] Vipxpert:
Work well and fast with "Mi 11 lite 5G NE" android 12. Which used to be android 11. Used Orange fox recovery 👍👍
[Android Software/Hacking General [Developers Only]] LeeGarChat:
{Mod edit. Oswald Boelcke}

And anyway, need use fastboot, not fastbootD
[Android Software/Hacking General [Developers Only]] lebigmac:
During my rw experiments using the amazing make_ext4fs binary, I noticed these differences in the newly created EXT4 file. Do you think these differences will cause any problems further down the line? Thanks for your feedback! (y)
[Android Software/Hacking General [Developers Only]] lebigmac:
Hi @LeeGarChat can you please stop your childish provocations in my thread?

Instead of your childish provocations how about actually contributing positively to my project for once rather than only trying to profit off of other's hard work all the time. And yes it's still my project. No matter how hard you try to take it away from me. It was always my project and it will always be. Call it makerw, systemrw or ro2rw . Call it whatever you want. You can rewrite my project and make it look like you came up with the whole concept all you want. In the end it will always be my project. You and me and the whole world knows it :D

Sorry leegarchat. You came a little bit too late to the rw party :LOL:👉

Lebigmac had already given teh world RW when nobody even knew that leegarchat even exists! :D

Where was leegarchat back in 2021 when the world was craving for RW ? Of course it had to be me who come up with it... Even though I am not even professional programmer. I only program for fun :D

Thank you.

Merry Christmas!
[Android Software/Hacking General [Developers Only]] Vipxpert:
You seem to take a lot of time to write these messages everytime that happens. Isn't there any better solution? Like add to the main post "Many people trying to steal my scripts and put a different name blah blah"