yashsingh1/xdaforums huggingface dataset:
[Android Software/Hacking General [Developers Only]] lebigmac:
I will remove automatic reboot in next version. @Francescohub also suggested this. Thanks for feedback.

EDIT: new v1.26 uploaded to first post

Not much has changed since last version. I added automatic logging capability. Now log will automatically be saved to /data/local/tmp/makesysrw_1.26/mylog.txt

Automatic reboot has been disabled

code was cleaned up a little bit

I have not yet figured out why some folks get error 255 when flashing zip in recovery?

Also have not yet fully understood why script works on some A/B devices but others not.

If you've got A/B device and script fails with lpmake error try this workaround discovered by @harpreet.s

And @uvzen has discovered that you can only use custom size up to a certain point with the size parameter.

For example size=100 works great with Xiaomi devices to give 100MB extra space to each embedded partition but as soon as you use size=1024 or greater this will likely cause lpmake error at the end because the files simply won't fit into the super partition anymore.

For some Oppo devices even size=100 is too much! In next version I will change this to size=50 by default
[Android Software/Hacking General [Developers Only]] crazyrootless:
I'm able to mount System/Media with RW priveleges using Root Explorer so this script works on Poco F2 Pro with the latest update. (MIUI 12.2.5.0 RJKEUXM Stable EU ROM).

Thanks @lebigmac
[Android Software/Hacking General [Developers Only]] Christos2714:
God bless you!

Works like a charm on Doogee S96Pro android 10.

After makong super.img rw I have to put stock recovery and do a factory reset. After that put TWRP again. If I dont do that han I get a TWRP loop.

Thanks again!!!

Keep up the good work!!!
[Android Software/Hacking General [Developers Only]] -CALIBAN666-:
This is great work and awesome,works perfect on my Redmi 9 with Miui 12,thanx for your work itakes the life more easy lol.Cheers!!!!
[Android Software/Hacking General [Developers Only]] m3nty:
Error! Failed to create super_fixed.img file

Moto g stylus Android 10

Screenshot from twrp:
[Android Software/Hacking General [Developers Only]] Lathi:
This has worked on Poco x3 but when I unroot or unroot it doesn't work I change services.jar on the system, and services.jar changes to original
[Android Software/Hacking General [Developers Only]] NoRue:
Yes！SONY can't use it !

Device : Xperia 1 Mark II
[Android Software/Hacking General [Developers Only]] thatguyreese86:
Confirmed working on my moto g power (sofia) XT2041-4ss (Super Partition)

Confirmed working on my moto g7 (river) XT1961-1 (No Super)

Nice work!! Keep it up🤪
[Android Software/Hacking General [Developers Only]] mrsergey:
PS C:\adb> adb shell "ls -Alg /dev/block/by-name | grep 'super'"

lrwxrwxrwx 1 root 16 1970-02-02 16:40 super -> /dev/block/sda23

POCO X3 pro, doesn't work
[Android Software/Hacking General [Developers Only]] Simich007:
Similar story I have, everything goes successfully, but after downloading to the system any file manager with rut access can't change system, vendor, product. Tried to stitch created super_fixed.bin as an image through adb, everything has passed successfully, but there is no result. Ulefone armor x7pro, 10 android.
[Android Software/Hacking General [Developers Only]] lebigmac:
Hi. Please give more info about your specific error and share your log files thank you.

Thanks for the log files. That's weird.

Your log looks pretty good to me.

Try unpacking super_fixed.bin with lpunpack

adb shell
cd /data/local/tmp/makesysrw_1.27
./tools/bin/lpunpack ./files/super/super_fixed.bin

and see if you can mount it as read write in linux. If you don't have linux installed simply boot into a ubuntu live installation disk

adb pull /data/local/tmp/makesysrw_1.27/files/super/system.img
sudo su
mkdir /mnt/dir
mount -t ext4 -o loop,rw ./system.img /mnt/dir
[Android Software/Hacking General [Developers Only]] f1^ter:
Hello dear! Android 11, Sony xperia 1 Mark II. Here is the log, what is the problem, a fix file is not created? My log files. If you need to provide something-let me know!
[Android Software/Hacking General [Developers Only]] Simich007:
Unfortunately, I'm not very much in this. Here's a link https://drive.google.com/file/d/1xkvqOs7vPC5uTWgY9qSZhK57o3dpJgH2/view?usp=drivesdk
[Android Software/Hacking General [Developers Only]] zgfg:
A question please regarding to Xiaomi.eu - did you use it with the recent MIUI 12.6 like 21.4.1 or 21.4.7

And actually more important question - did you try to update Xiaomi.eu from e.g. 21.4.1 to 21.4.7 while having the previous system mounted as read-write?

Xiaomi.eu does not update by OTA but by downloading and flashing the zip file from TWRP, but I'm interested if dirty flashing the new Xiaomi.eu zip file works fine when the previous Xiaomi.eu was mounted read-write and wether maybe the newly flashed (updated) Xiaomi.eu automatically remains writable?
[Android Software/Hacking General [Developers Only]] saginesht:
I tried it on latest xiaomi miui 12.6 roms.... Working..... Tried dirty flashing weekly 21.4.7 rom over rw system partitions and it makes the system read only... U have to make it rw again ....
[Android Software/Hacking General [Developers Only]] ITGrouch:
I have a Moto G Power and get the same error message. Nothing in the log file what the problem was.
[Android Software/Hacking General [Developers Only]] ITGrouch:
I have a Moto G Power and I get Error! Failed to create super_fixed.img file. I am on stock Android 10 and rooted. Since we have the same phone, Did you ever run into the same problem as I did and how did you fix it? Or did it complete without the error?
[Android Software/Hacking General [Developers Only]] lebigmac:
To those with error creating super_fixed.bin

Did you try harpreet workaround?
[Android Software/Hacking General [Developers Only]] ITGrouch:
Tried it and I get the same error creating super_fixed.bin I am about the throw in the towel and forget about it.
[Android Software/Hacking General [Developers Only]] chintoocool:
Can any one help mylogs! Oneplus 8 android 11
[Android Software/Hacking General [Developers Only]] lebigmac:
Simich007 did you try mounting your partitions as read write?

su

mount -o remount,rw /
mount -o remount,rw /vendor
mount -o remount,rw /product

Please don't give up yet. Don't worry sooner or later we will fix this problem and everybody will be happy ;)

I am working on a possible solution but I need more feedback from people with slot A/B device. Thanks.

@chintoocool are you using stock android or custom ROM? Can you please post output of this command? Thanks.

mount
[Android Software/Hacking General [Developers Only]] chintoocool:
Stock android
[Android Software/Hacking General [Developers Only]] Kherham:
WOW. I'm searching for something like this for days. But let me do a noob question.

At this momento am using a custom MIUI rom with Android 10. I tried to use another rom with A11 but ever got my storage encrypted and ever when I need to update my rom, need to do that fk@#$#$% format data as you can see in my screenshot. After installing this script my storage will be decrypted ever? Ever when I back to recovery everything will be there (decrypted)? I really hope so.

Thanks for your work bro.
[Android Software/Hacking General [Developers Only]] lebigmac:
Try boot into Android system, setup PIN code and then reboot to TWRP and enter PIN code to decrypt /sdcard

You can also try installing the flashable zip from /data/local/tmp/
[Android Software/Hacking General [Developers Only]] Kherham:
I will try it here. Better way to know. hehehe

Thanks bro for all your hard work here.
[Android Software/Hacking General [Developers Only]] lebigmac:
@thelavip @BlazingKahn35 @nttuan @kpykpy @harpreet.s @m3nty @f1^ter @ITGrouch @Articul8Madness @Xiaoleng

Please try the new v1.29

I have finally fixed the bug where lpmake produces no output @ end of script.

Hopefully this will give more info about what's wrong with slot A/B devices.
[Android Software/Hacking General [Developers Only]] 120503:
Works on Redmi Note 9 Pro(gauguin, China Edition, 12.0.11.0.QJSCNXM, Miui 12, Android 10. There is a super partition). Thanks so much
[Android Software/Hacking General [Developers Only]] Xiaoleng:
Not working on my Xperia 10 II (XQ-AU52); factory-shipped Android 10 with super; shows "repacking super failed" tried both in twrp and in terminal emulator; logs attached below
[Android Software/Hacking General [Developers Only]] Xiaoleng:
Not sure the attached file is uploaded or not? Hereby the backup log link https://drive.google.com/folderview?id=10NH4l33UW1w3XOqs-wdO_pN5YY7sk0df
[Android Software/Hacking General [Developers Only]] f1^ter:
After version 1.29, everything worked out! BUT, after turning on the device, the system does not have a boot. After the logo, restart and so on again. Is there any way to restore the original .bin? I attach logs.
[Android Software/Hacking General [Developers Only]] BingdianCN:
Xiaomi Redmi K30S Ultra(China), Android 11, ScriptVer:v1.29, super=sda32. Pass!
[Android Software/Hacking General [Developers Only]] BlazingKahn35:
Tried again with version 1.29 still no luck my current bootslot it B
[Android Software/Hacking General [Developers Only]] lebigmac:
To restore original super image you can do

adb pull /data/local/tmp/makesysrw_1.29/files/super/super_original.bin

adb reboot bootloader

fastboot flash super super_original.bin

Or you can flash it back from recovery

To those that get bootloop :

Did you successfully disable dm-verity and verification? My script attempt to do this automatically when launched from recovery using these 2 commands:

avbctl disable-verification
avbctl disable-verity

If you have no custom recovery or your recovery have no avbctl binary you can try to flash empty vbmeta file like this (you can find empty vbmeta file here at XDA forum)

fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img
[Android Software/Hacking General [Developers Only]] gessler2244:
I installed the zip 1.29, all went fine except these two errors in log:

There was an error of removing the read-only lock of system.img. Ignoring

and

There was an error of removing the read-only lock of vendor.img. Ignoring

I have an Poco X3 NFC and use Arrow OS Vanilla newest build.

Any ideas what could cause that? Thanks in advance and many thanks to lebigmac for the scipt.
[Android Software/Hacking General [Developers Only]] lebigmac:
Hi gessler2244 thanks for your feedback. Could you please post your log? Thanks.

These 2 errors probably happened because there is no shared_blocks flag to remove from those files because you're using custom ROM that already has read-write capability.

Did you run the script in recovery? Was the super image still flashed properly despite these 2 errors? And did you get a bootloop at all or was it able to boot into Android system successfully?
[Android Software/Hacking General [Developers Only]] lebigmac:
@f1^ter @mrsergey

You can try to disable dm-verity and verification like this:

ALWAYS MAKE BACKUP OF ORIGINAL VBMETA FIRST!

fastboot --disable-verity --disable-verification flash vbmeta vbmeta_disabled.img
[Android Software/Hacking General [Developers Only]] gessler2244:
I'll try this later At home, Image was flashed as far as I remember, and no bootloop,, booted fine, I run the script in twrp recovery Last version from brigudav.
[Android Software/Hacking General [Developers Only]] gessler2244:
Flashed via fasrboot The Vbmeta Image, flashed fine, then I rebooted to recovery and run the script again, but no luck it seems, what I find strange also is in the hw info app under partitions /vendor it states : /dev/blockdm-2 fs:read-only. Is this normal, can it be changed? Thousand thanks.
[Android Software/Hacking General [Developers Only]] lebigmac:
Thanks for sharing your log. It looks good. Also your phone is still booting normally into Android after flashing super_fixed.bin and even after flashing empty vbmeta. This is good sign.

Did you try the most obvious thing yet? This should work since you are using custom ROM...

adb shell
su
mount -o remount,rw /
mount -o remount,rw /vendor
mount -o remount,rw /product

If your custom ROM cannot do this I suggest going back to stock Android and try again my script ;)

Good luck!
[Android Software/Hacking General [Developers Only]] gessler2244:
Yes I tried all that, and just tried after these commandos if I can write in /vendor , this is possible, but I can´t write in /vendor/etc , and trying mount -o remount,rw /vendor/etc gives error: /vendor/etc not found in proc/mounts. Well maybe switching to any other custom is better..... But MIUI I don´t really want again. Anyway thanks a lot and script seems to work good on most devices.
[Android Software/Hacking General [Developers Only]] yoshijulas:
I tried using the script, but it gets stop at ./tools/bin/resize2fs: No such file or directory, but i can see that the file resize2fs exists in that folder path, i dont underestand whats is wrong, i also tried changing it to /data/local/tmp/makesyswr_1.92/tools/bin/resize2fs and still doesnt work

Hope it has a fix
[Android Software/Hacking General [Developers Only]] lebigmac:
Open script with text editor and replace all instances of ./tools/bin/resize2fs with resize2fs

Save file and try again

And please show screenshot and log. Thanks.
[Android Software/Hacking General [Developers Only]] yoshijulas:
It worked, but only for resize2fs

it stopped now at ./tools/bin/simg2img: No such file or directory

Do i change it for every single tool?

Edit: I changed resize2fs and simg2img and it worked, and finished, thx

Xiaomi Redmi 9A - makesyswr v1.29 - PBRP (Pitch Black Recovery Project) instead of TWRP - Android 10
[Android Software/Hacking General [Developers Only]] yoshijulas:
The script said that i need to reboot, and after that, i tried the command "mount -o remount,rw /"

But it says /dev/block/dm-1 is read-only

I did something wrong? or what do i need to do?
[Android Software/Hacking General [Developers Only]] Xiaoleng:
Hi,

I ran the script under TWRP; seems it returned the same error (failed to create super_fixed);

attached the logs of v1.29 here!

Thank you!
[Android Software/Hacking General [Developers Only]] lebigmac:
Your log couldn't look any better.

I don't know why you still can't mount as rw. Maybe your device have some extra protection? What device is it?

Did you try disabling selinux before mount as rw? setenforce 0

And did you try that mount as rw command from recovery as well?

@Xiaoleng your log looks good too except that unknown lpmake error at the end. Why lpmake give output for @yoshijulas but for @Xiaoleng it give no output?

What you can try to do is pull extracted image files to computer and run lpmake for linux from otatools package with the arguments from myargs.txt (adjust paths accordingly) and it should tell you more about your specific lpmake error. It must have something to do with slot A/B
[Android Software/Hacking General [Developers Only]] Keven11:
I

I am also stuck at the exact same spot with the exact same issue. If you happen to make some headway can you please let me know?

I will do the same.
[Android Software/Hacking General [Developers Only]] lebigmac:
@bobbyp1086 you are in the wrong thread. Please post again your log in the thread by munjeni

Hi @Keven11 you are stuck at lpmake error at end of script?

It is up to you and other slot A/B device users to show me the actual error so I can try to fix it.

Without knowing what causes lpmake to fail on your slot A/B device I cannot fix it.

Keep in mind my Xiaomi device that I used for development is slot A only so this whole slot A/B thing is still a mystery to me.

There are 2 ways you can figure out your specific lpmake error:

You can try to launch lpmake manually on your phone using the lpmake arguments from myargs.txt:

adb shell
cd /data/local/tmp/makesysrw_1.29

#run lpmake for android like this
./tools/bin/lpmake COPY_PASTE_YOUR_ARGUMENTS_HERE

#or like this
./tools/bin/lpmake `cat ./myargs.txt`

Or if that still doesn't give any error output then you can download the otatools package for linux by bynarie and pull all unpacked .img files from /data/local/tmp/makesysrw_1.29/files/super/

as well as /data/local/tmp/makesysrw_1.29/myargs.txt

from your phone to your computer

and then run the lpmake command with the arguments from myargs.txt on your computer. You have to adjust the file paths in myargs.txt accordingly

for i in `adb shell "ls /data/local/tmp/makesysrw_1.29/files/super/*.img"`; do adb pull $i; done
adb pull /data/local/tmp/makesysrw_1.29/myargs.txt

#run lpmake for linux like this
./otatools/bin/lpmake COPY_PASTE_YOUR_ARGUMENTS_HERE

#or like this
./otatools/bin/lpmake `cat ./myargs.txt`

If you don't have linux simply boot into ubuntu live installation disk without installing it. You might need platform-tools for adb pull to work though.
[Android Software/Hacking General [Developers Only]] bobbyp1086:
I'm sorry buddy, xda keeps freezing up in app so did it from pc, although I thought I did post it on the right one lol
[Android Software/Hacking General [Developers Only]] DBx13:
Hi,

I did something wrong?

Thank you
[Android Software/Hacking General [Developers Only]] lebigmac:
Hi. Your log looks good. Did you manually flash super_fixed.bin yet with fastboot? What device is this?

Also check your fstab inside your boot.img

Use unpack_bootimg from otatools to unpack your boot.img and show me your fstab please. Thanks.
[Android Software/Hacking General [Developers Only]] yoshijulas:
I had to change 3 lines in your script because it didn't worked

Changed '#!/system/bin/sh' for '#!/sbin/sh'

Changed every './tools/bin/resize2fs' for 'resize2fs'

Changed every './tools/bin/simg2img' for simg2img'

This worked in my phone, but can't remount, because read-only

I notice that the original super is 4.5G and the super_fixed is 3.2G(on windows), 3.5G(on Linux) so, way smaller

I typed the command to mount as rw in recovery, and didnt give me any output, but after rebooting into system, its still read-only, maybe fstab is forcing it (im a linux user, but i have no idea about android, android is new to me)

And about the 255 error by trying to flash the .zip in recovery i get this output, *Attached in files*

My phone is a Xiaomi Redmi 9A (I think 2021), MIUI 12 Global, Android 10
[Android Software/Hacking General [Developers Only]] DBx13:
Thank you for your generous response.

Yes, i flash manually with fastboot.

Redmi 9 ID Miui 12.
[Android Software/Hacking General [Developers Only]] lebigmac:
Congratulations for getting the script to work.

It's normal that super_fixed.bin (sparse format) is smaller than super_original.bin (raw format).

If you can do this in recovery that means it worked. I don't think you can mount system as rw in recovery with shared_blocks read-only lock still enabled (with stock firmware).

You can also try mounting your other partitions like this:

mount -o remount,rw /vendor

mount -o remount,rw /product

If you can mount system as read write in recovery but in Android it doesn't work then there must be another read-only protection layer inside Android. Did you try disable selinux?

Please upload mymount.txt output from this command:

mount > /data/local/tmp/mymount.txt

@DBx13 thanks for your effort but there are some small mistakes in your screenshot ;)

If you successfully flashed your super_fixed.bin then try this. Good luck!
[Android Software/Hacking General [Developers Only]] yoshijulas:
I disabled selinux, but still doesn't work

Here are my mounts, one typed in recovery, the another one in normal system, using termux
[Android Software/Hacking General [Developers Only]] toolhas4degrees:
@lebigmac

Here is an example of script in magisk module

https://xdaforums.com/t/mdmtweak-br...o-you-backed-up-with-thoughts.4262959//unread
[Android Software/Hacking General [Developers Only]] thatguyreese86:
No, I flashed the zip again after flashing the new images and just took the .bin file in the temp folder and changed it to .img and flashed that. The g7 did the entire process.
[Android Software/Hacking General [Developers Only]] lebigmac:
If any slot A/B users with lpmake error creating super_fixed.bin would like to beta test the new upcoming version please send me a message. Thanks. I think we are very close to fixing that annoying lpmake error.

Thanks. I checked the files but couldn't find any shared_blocks feature...

It looks like something else is preventing you from mounting your system as read-write inside your Android.

Thank you for your suggestion but I don't really see the point of making a systemless module out of this project.

The whole point of this script is to NOT have systemless root but to have systemfull root if you know what I mean. Just like it used to be before all this systemless hype came along ;)
[Android Software/Hacking General [Developers Only]] overlimit1:
lm using redmi note 10 pro with super partition detected, when l tried to install flash makesysrw_1.29_flashable.zip in twrp its failed... it said :

Updater process ended with signal: 6

E : unable to open block device /dev/block/loop181: No such device or address

Error installing zip file '/sdcard/makesysrw_1.29_flashable.zip'

Updating partition details...

Failed to mount '/data' (Invalid argument)

...done

Unable to mount storage

l need to unlock vendor partition to simulator my nfc card. please help @@
[Android Software/Hacking General [Developers Only]] lebigmac:
Hi overlimit1. Please show screenshot of your error. Thanks.

Try installing and launching script manually as described in the script's very important comments section or in first post of this thread.

# Manual installation: extract flashable.zip and copy makesysrw_*VERSION* folder into /data/local/tmp/
# run this command to make the script executable: chmod +x /data/local/tmp/makesysrw_*VERSION*/makesysrw.sh

Now launch script like this:

./makesysrw.sh #(THIS IS RECOMMENDED FOR PEOPLE THAT HAVE NO SUPER PARTITION ON THEIR DEVICE)
./makesysrw.sh size=50 #(this one is recommended for first time users THAT HAVE SUPER PARTITION)
[Android Software/Hacking General [Developers Only]] PEACH-PIT:
This did not work with moto g 5g.

The super partition exists, but the standalone super.img does not exist on the moto g 5g, so I can't modify the r/o.
[Android Software/Hacking General [Developers Only]] yoshijulas:
I'm going to keep searching, if i found a solution, I will share that here

Thanks anyways

Also, i'm trying this script next time I flash the stock ROM
[Android Software/Hacking General [Developers Only]] toolhas4degrees:
But you can use it to perm flash

I thought magisk was just the vessel I'm sure there are ways to perm flash with it.

Also I thought the script was temporary
[Android Software/Hacking General [Developers Only]] lebigmac:
@thelavip @BlazingKahn35 @nttuan @kpykpy @harpreet.s @m3nty @f1^ter @ITGrouch @Articul8Madness @Xiaoleng

Here is v1.30_gamma for anyone who wants to beta test it. I added some additional slot A/B functionality. Please let me know if it works for you or not. Thank you.
[Android Software/Hacking General [Developers Only]] Slim2none4u:
Pixel 4a5g

Just ran the script 1.30beta

Looks like everything went fine. I now have a file "super_fixed.bin" that is 5.95Gb in size

and a file "super_origonal.bin" that is 9.0Gb in size.

How do I flash the bin file?
[Android Software/Hacking General [Developers Only]] PEACH-PIT:
moto g 5g does not work v1.30b either.

The img file is output, but there is no way to flash it.

There is no twrp on this device.

It is not possible to flash the output img file from fastboot.
[Android Software/Hacking General [Developers Only]] chintoocool:
Super_fixed.bin size almost double

same issue after flash bootloop.
[Android Software/Hacking General [Developers Only]] Slim2none4u:
adb reboot bootloader

fastboot flash super super_fixed.bin

fastboot reboot
[Android Software/Hacking General [Developers Only]] PEACH-PIT:
super_fixed.bin is not output.

Only the .img file will be output.
[Android Software/Hacking General [Developers Only]] ardasher:
Please instructional video
[Android Software/Hacking General [Developers Only]] walid77dz:
not working