yashsingh1/xdaforums huggingface dataset:
[Android Software/Hacking General [Developers Only]] DeathShot9:
I woke up, finally booted up Ubuntu MATE on my laptop, thought it was going to be a nightmare to get working, then one sudo apt-get install android-sdk-platform-tools and adb devices later and I'm running the script. Script does its thing, restarts phone, './img/super_fixed.bin':no such file or directory.

Immediately I get on here, don't read your reply, and start reading through every page in the thread until I get to your reply. I updated the script version number and found my phone was at 5% battery xD

Recharging phone and laptop, going to try again in a few minutes!

Edit:

this time I got a popup saying I don't have enough storage on my drive, is there a workaround for this, or do I need to make a larger live USB with persistent storage?

Edit 2:

Tried a VM last night, it didn't work, so this time I decided to read the error more carefully, it turns out VMWare defaults to a USB 2 controller which doesn't work with my phone. Setting it up to USB 3.1, got it to work. The only thing is once it restarts and the phone reconnects it doesn't get registered in fastboot and just sits on <waiting for any device>. I guess my next step for now is to try a larger live disk.

Edit 3:

Without going into too many details, Ubuntu live managed to physically damage my laptop, and I'm very upset. Is there any way to do this without Linux?
[Android Software/Hacking General [Developers Only]] DeathShot9:
Sorry for the double post but I think at this point it's better to just start fresh.

I had to step away because the runaway shutdown script that cooked my laptop really got me upset but I got around to testing it and I am having the same problem with the live system as I did my VM. I am thinking that this might be a Sony thing. Sony has their bootloader and also their download mode which work slightly differently than a lot of other android systems.

Right now it's all speculation, so I'm uploading the logs for reference. I don't see the super_fixed.bin file anywhere. How do I preserve it or generate it so that I can try and flash it manually?
[Android Software/Hacking General [Developers Only]] lebigmac:
Hi @DeathShot9 thanks for your feedback. Apparently I didn't thoroughly test the sysrw_repair script before release 🤦‍♂️🌴

In your sysrw_repair log something is wrong. Let's solve the problem together ;)

Apparently the files were pulled correctly from phone but the paths are wrong. Please allow me to fix that for you.

Try this fixed version of the sysrw_repair script. Better luck this time!

If this actually works I'll update the first post and reupload the whole BUNDLE.

Done
[Android Software/Hacking General [Developers Only]] DeathShot9:
Running the script right now, I'll update this with the result.

Edit 1:

it's been throwing some "Invalid sparse file format at header magic" messages, but it's still doing something, since the directory size is growing, so I'm letting it run.

Edit 2:

Congratulations! Successfully flashed the super partition
Your partitions should now have rw capability

XQ-AT51:/ $ ls -l /dev/block/by-name/super
lrwxrwxrwx 1 root root 16 1970-12-27 04:34 /dev/block/by-name/super -> /dev/block/sda89
[Android Software/Hacking General [Developers Only]] samsungics1200:
The only issue i got on using this flashable fix was i cant mount vendor partition but system and product partition can be modified and are mountable im using poco m3 with super partition
[Android Software/Hacking General [Developers Only]] DeathShot9:
Same. I just finished de-bloating all the system apps but I'm stuck with "Title 3 months free trial" (yeah, that's the actual name of the app), linkedin, and some random "call of duty" that is already old. I'm crossing my finger this script might be modifiable to fix /oem, if not then I know that for the Xperia 1II the Russian firmware does not have the "/oem" partition and so if I scrap everything I've done, and flash that, I won't have to deal with it. I prefer not to use the Russian one though because I lose some functionality with my carrier in the US.

When I try mount -o remount,rw /oem I get '/dev/block/bootdevice/by-name/oem_a' is read-only
[Android Software/Hacking General [Developers Only]] gearmaker:
Well, what a nice surprise! I tried running your latest script 1.32 again, this time flashing in twrp.

It worked! On my Oneplus HD1913 7T Pro McLaren. My system is finally R/W !

Thank you so much for your efforts! By the way, what is COW error on Oneplus?

I will upload my logs in case you want to take a look. I entered the mount remount text in terminal

and it confirmed. I was also able to edit a file in /system/app/ which I was never able to do before.

Thanks again:)

Edit: This is stock OOS 10.0.13
[Android Software/Hacking General [Developers Only]] flypatriot:
Flashed script through TWRP recovery in OnePlus 8T (stock OOS 11.0.8.13).

Everything has gone well and I can mount system in rw mode as a result.

I can't modify or write files in system partition however cause of not enough space error.

Tried to flash with size 100 and 500 mb but no luck.

There is also 0 bytes super_original.bin image in img folder after successful flash (I've disabled CleanUp function to check everything is fine).

Maybe it'll be useful for researching.
[Android Software/Hacking General [Developers Only]] lebigmac:
Hi @gearmaker thanks for your log files!

That's great news! I'm happy the script works on your OnePlus device!

If you check the lpdump.txt by flypatriot above, you will notice COW group with 0 bytes size but if you check his mylog.txt you can see that the contents of COW have a very large size. This has caused an error since first version of script. I can't believe it's now finally fixed! It was very difficult for me to fix this because I don't own OnePlus device...

Hi @flypatriot thanks for your feedback.

Are you saying that v1.32 of script actually works as expected on OnePlus 8T device despite your device having COW group with 0 bytes size in lpdump.txt ?

So everything works except custom size? You can mount /, /product and /vendor as r/w now?

Did you try with very small custom size such as size=15 ?
[Android Software/Hacking General [Developers Only]] flypatriot:
Yes it is! Script works with cow group. /, /product and /vendor partitions mount as r/w. However I can't write to this partitions. Only create 0 byte (empty) files. When I try to write some code in such files I always get error about not enough space on partition.

I tried to flash script with size=15 (preinstalled config file in your script) first but it didn't work. So I changed it to 100 and then to 500 but it didn't help. And I restored super partition every time I changed the size to be sure that everything is clear.
[Android Software/Hacking General [Developers Only]] lebigmac:
Thanks for this confirmation. That means cow error is finally fixed. I still can't believe it!

That's great news for all OnePlus users!

@BlazingKahn35 @Greenspoof @abszy @rakoncwy @xatornet @Abuzar Uzair

Until I fix the custom size issue for OnePlus users, you can remount / as r/w and try deleting some system apps to free up some space. Be very careful though. One little mistake can cause bootloop. Try disabling some useless system apps first and reboot device to double check if it's safe to permanently delete. Make backups just in case. Good luck!
[Android Software/Hacking General [Developers Only]] gearmaker:
My logs have no mention of COW. Maybe not all OnePlus devices are affected?

Again, great work and thank you!
[Android Software/Hacking General [Developers Only]] lebigmac:
I think I saw some Xiaomi devices start to use 0 byte COW group recently.

Somebody said it's the same cow as in dirtycow.

I wonder if the OnePlus users will get bootloop later down the road due to missing cow group? :unsure:

I'm thinking this whole COW thing has something to do with slot A/B devices...
[Android Software/Hacking General [Developers Only]] DeathShot9:
It does. I think it has to do with A/B and their encryption thing. I remember trying to install Lineage OS with TWRP on a One Plus 6 I fixed for my father, and I kept hitting a wall.
[Android Software/Hacking General [Developers Only]] Slim2none4u:
Just ran this on my Pixel 4a and i believe it worked. Logs attached
[Android Software/Hacking General [Developers Only]] Pcsl:
Thank you very much for your software.

I'm getting this error saying that my partitions are already writable on my OnePlus 6T, but they are not.

Any tip to make it actually R/W?
[Android Software/Hacking General [Developers Only]] lebigmac:
@Pcsl what output you get if you run these commands?

Try commands above with /system, /product and /vendor and show me screenshot. Thanks.

Good luck!
[Android Software/Hacking General [Developers Only]] cass89:
Trying to run this on one plus 9 5g global

running the sh script seemed to work, I now have super_original.bin and super_fixed.bin

How do I flash it? I'm assuming just

"fastboot flash super super_fixed.bin"?

Then if it doesn't work reflash super_original.bin?

Can it be flashed with TWRP?

Don't want to brick my device lol, has anyone with OP9 tried this yet? What are the chances that super_original.bin is corrupted or won't flash, is there another way to backup my super img?
[Android Software/Hacking General [Developers Only]] Pcsl:
It seems there is no error but when trying for system twice it says mount: '/system' not in /proc/mounts
[Android Software/Hacking General [Developers Only]] phanimitra vadlamani:
failed agian with latest version.....thankfully without errors.....

it says already r/w capable......but they are not😭....im desperate to remove useless system apps
[Android Software/Hacking General [Developers Only]] lebigmac:
Hi @phanimitra vadlamani thanks for your log.

It's not 'shared_blocks feature' that's preventing your device from being mounted as r/w. There must be another 'protection feature' that's stopping you from going fully r/w.

I like how you used my script to resize your partitions that are embedded inside your super image! Good job! And device still boots to system! What a surprise!

Did you use the default size=15 custom size value in config.ini when you flashed the flashable zip in recovery?

If you run script again with size=50 you can add 50 MB of free space to each partition (/system, /product, /vendor) inside super partition.
[Android Software/Hacking General [Developers Only]] phanimitra vadlamani:
🥺 Anyway.....Thank you
[Android Software/Hacking General [Developers Only]] lebigmac:
Hi @tha_mechanic what exactly do you mean by this? Script is specifying current slot to lpunpack at runtime.

Are you getting the error 73 that many Motorola and some Xiaomi users are experiencing?

You can fix it with troubleshooting repair script version 1.32 or with @harpreet.s slot switching method (see first post troubleshooting section)

Hi @Keven11 please see my answer to @tha_mechanic above. Same thing applies to you. Did you guys try troubleshooting repair script version 1.32 on a Linux device yet?

I'm sure there's got to be another easy way to fix error 73 on the device itself without having to patch your kernel.

Hi @xiaomieu. Did you try latest v1.32 yet? What results do you get on your Xiaomi device?

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

Hi @Greenspoof did you try installing the flashable zip (latest version 1.32) in recovery?

Hi @joetbd. Congratulations for fixing error 73 successfully by first launching the script on the phone itself and afterwards running the troubleshooting repair script on a linux device. And then flashing the patched super image to your device. I know it's not the perfect solution but hey, as long as it works, right?

Yes you can delete useless system bloatware to free up some space that way. But it's very risky!

You can first disable system app, do a reboot and check for bootloop and other errors. Then you can delete it if you really want to (make a backup though!). Good luck!

Or to increase space in / you can just run script again like this:

extract flashable zip

open config.ini with text editor

write this in line #2 of config.ini and then save file

size=50 in=`ls -l /dev/block/by-name/super | awk '{print $NF}'`

You can play around with the size parameter here. Just make sure first character of line #2 is an empty space!

Now compress both META-INF and systemrw_1.32 folders into a new flashable zip (random file name)

And install this new flashable zip in your custom recovery. It should launch script without dumping super image again. This should save you some time.

Hi @LORENZ123456 I'm happy the script works on your Xiaomi Mi 11 lite 4G with Android 11.

Thank you for the kind words.

Next time try install new flashable zip version 1.32, error signal 6 should be fixed!

Hi @version-x. Thanks for your in depth feedback!

Did you try restoring your original vbmeta or using the included avbctl binary to re-enable dm-verity and verification after flashing patched super image? Maybe it just works? Sometimes messing with the vbmeta can cause a bootloop all by itself! Good luck!
[Android Software/Hacking General [Developers Only]] Keven11:
Yeah, I got it working on Moto G9+ (Odessa) using the repair script (1.31d). What have you changed in the new 1.32 script? I am just curious.
[Android Software/Hacking General [Developers Only]] tha_mechanic:
@lebigmac

Hey remember I messaged you a while back and posted on this thread that I did get it to work successfully. I also added a step by step on how I got it to work a few pages back. I believe @Keven11 got it to work as well
[Android Software/Hacking General [Developers Only]] Keven11:
I did indeed get it working. I just installed Linux Mint on my old laptop. My issue wasn't so much that I don't know how to use Linux. I was having a hard time navigating the windows file system using the Linux UI. Once I had a full Linux environment as opposed to a VM it wasn't a problem.
[Android Software/Hacking General [Developers Only]] silent27:
hello, you can add read and write to the script for the odm section, the fingerprint stops working

https://gist.github.com/silent27121984/d43703fe663f6733c121fa6c6c3b2d5e
[Android Software/Hacking General [Developers Only]] lebigmac:
Hi @silent27 thanks for your feedback. I will look into this /odm issue.
[Android Software/Hacking General [Developers Only]] silent27:
yes, the super section has sections: system, vendor, system_ext, product, odm after flashing the script, everyone got permission, except for odm

the fingerprint fell off from here, since odm read-only, stock firmware realme 7pro
[Android Software/Hacking General [Developers Only]] silent27:
Android 11
[Android Software/Hacking General [Developers Only]] lebigmac:
@silent27 Okay in next version of script I will make r/w all contents of super image and try to implement auto-resize feature.

In the meantime you can try replacing line #238 in script with this new line (not tested):

makeRW $fName;

Good luck!

@samsungics1200 why you can't mount /vendor as r/w ?

@DeathShot9 does this mean script actually works on modern Sony devices? That's great news! Where exactly is /oem partition located? Is it inside super image?

Hi @tha_mechanic yes I remember I was just revisiting some older interesting or unanswered comments ;)

Hi @Keven11 congratulations on getting it to work on your device.

Honestly I didn't even change that much in the new version. Cleaned up the code a little bit and tried to fix that damn cow error. Apparently that did the trick :D

If you got the old version to work you don't need to run the new version again unless u feel adventurous and want to resize your partitions (or you want to unlock individual partitions...)
[Android Software/Hacking General [Developers Only]] silent27:
with mounting all partitions helped, thanks

sorry the fingerprint didn't work
[Android Software/Hacking General [Developers Only]] Suryashis:
I can confirm that the flashable.zip worked for me flawlessly in 1st attempt. I am running Poco F3/ Mi 11x with Xiaomi.eu version 12.5.4.0 on android 11. Now my root is fully writable.

And fingerprint unlock is fully functioning...

But I just noticed that approx 9gb of my internal memory is consumed. Probably some backup being done as u mentioned in original thread.

Is there any way by which it can be regained?
[Android Software/Hacking General [Developers Only]] PEACH-PIT:
There was an update to the moto g 5g.

I tried v1.32 and got bootloop.

v1.31d worked fine.
[Android Software/Hacking General [Developers Only]] X - root:
im finish to flash systemrw.sh from termux, then flash super_fixed.bin from fastboot. n then reboot.

but when i opened Root Exploler, then i push button Mount R/W it doesnt change.

and when im check remount to rw section from temux, its read only too.

how possible is that?

sorry if my bad english. @lebigmac

My Device : Redmi Note 9 [Merlin]

Miui Version : 12.0.6.0 [Global]

Android OS : 10

Have Magisk : Yes. 23.0

fyi: im tried flash flashable from twrp. but it said ERROR:255 even i reflashed new twrp it doesnt change too. stuck at ERROR: 255. So i chose termux way
[Android Software/Hacking General [Developers Only]] lebigmac:
Hi @Suryashis. Thanks for your message. That's great news. Congratulations for getting it to work!

You can delete whole script folder from /data/local/tmp/

Or if you plan on running script again in the near future you can delete only img subfolder inside script folder. That's where all the data is dumped to.

Img subfolder should be recreated next time you launch script.

Hi @PEACH-PIT thanks for your input.

The only thing that changed was the script version? Everything else is the same? Or did you update phone firmware since using v1.31d ? Thanks.

I remember you used to have error 73 on your motorola device. Did you get same error 73 in new version 1.32 ?

If I understand you right then overall the script went well , gave you error 73 as usual, then you used sysrw_repair_v1.32 to create super_fixed.bin and manually flashed it to your super partition but then it gave you bootloop? Is that it?

Hi @X - root thanks for your log files.

Could you please send me this file from your custom recovery? /tmp/recovery.log

That way I can check what exactly is causing error 255 in recovery. I thought I had already fixed this error but apparently I only fixed error signal 6.

I checked your log file and you don't have shared_blocks feature so my script cannot do much other than maybe resizing your partitions... Did you check if your partitions were resized correctly? Do you have 30 MB of free space on each partition /, /product and /vendor ?

Something else is preventing your device from mounting your partitions as r/w and I don't know what it is. You must figure this out if you want to be able to mount your partitions as r/w.

Usually it's shared_blocks feature that is the culprit of read-only lock but your device don't have this feature.

Hopefully you can figure it out. Good luck!

I'm happy that despite this, your device didn't experience bootloop! That's great. You did flash the super_fixed.bin manually right?
[Android Software/Hacking General [Developers Only]] X - root:
sorry, you mean i cant mout system r/o to r/w from your file ?

im flashed new rom [NusantaraProject] 23mnt ago, so im lost log from custom recovery you want.

now i will try to use your file to this rom.

Android 11.

Partition System R/O
[Android Software/Hacking General [Developers Only]] lebigmac:
I don't know what kind of 'read-only features' your manufacturer has added to your firmware.

You could try this command and at the same time call dmesg to find out more info about what exactly is forcing your partition to stay locked in read-only mode.

Did you try different mount command yet? For example busybox mount or toybox mount?

adb shell
su
cd /data/local/tmp/systemrw_1.32
./tools/toybox mount -o rw,remount /
dmesg > ./log_new.txt
[Android Software/Hacking General [Developers Only]] X - root:
for toybox comand :

it display [block/dm-2' is read-only]

for the ask :

yes, i flashed super_fixed.bin manualy.

the Question is :

is it possible to move service.jar (smali patcher) to system/framework with other way?

i mean, this manufactur system lock by read-only so i cant write or replace any file to system manually.
[Android Software/Hacking General [Developers Only]] viva virus:
sorry i cant find the link to download the last version

i want it to edit /system file to get back blur effect in redmi 9 thx
[Android Software/Hacking General [Developers Only]] UnFrancaisDu83:
Works on Mi Note 10 Lite Android 10

THANKS !!
[Android Software/Hacking General [Developers Only]] PEACH-PIT:
That's right.

I updated moto g 5g to the latest FW.

Then I ran v1.32 on linux.

The systemrw stopped with error 73.

sysrw_repair seemed to have finished successfully.

However, a boot loop occurred.

I flashed the FW again and tried 1.31d in the same way.

The sysrw_repair finished normally and no boot loop occurred.
[Android Software/Hacking General [Developers Only]] lebigmac:
Hi @silent27

I tried to remove 'shared_blocks feature' from /odm partition on my Xiaomi device and the script can successfully remove it but then after booting into system, the /odm partition is still read-only and it still shows 'shared_blocks feature'.

What the hell!?
[Android Software/Hacking General [Developers Only]] saadm2021:
does it work on xiomi Redmi mi 10x 4g
[Android Software/Hacking General [Developers Only]] NisseGurra:
Tested 1.32 on stock zenfone 8. Still getting error 73, most likely to the pesky cow files
[Android Software/Hacking General [Developers Only]] lebigmac:
Hello. I don't know but the probability is pretty high that it will just work straight out of the box. Give it a try and let us know your results! Good luck!

Hi. I don't think error 73 and cow files are related.

I believe error 73 is caused by stubborn selinux settings. Try to completely disable it.

Could you please send me your log files so I can double check?

Log files can be found in /data/local/tmp/systemrw_1.32/log/

Thanks!

Did you try yet the included troubleshooting repair script (Linux only)? That usually fixes error 73.

Another possible way to fix error 73 is the @harpreet.s slot switching method described in first post troubleshooting section. Good luck!
[Android Software/Hacking General [Developers Only]] sarychev.rescue:
ОК на Xiaomi Redmi Note 10 Pro.

Итоговая папка systemrw_1.32_BUNDLE_proper \ systemrw_1.32_flashable \ systemrw_1.32 была помещена по пути:

данные / локальные / tmp / systemrw_1.32

Я вручную сделал папку img : data / local / tmp / systemrw_1.32 / img

Затем в Termux выполняются команды:

вс

cd /data/local/tmp/systemrw_1.32

./systemrw.sh размер = 500

После завершения скрипта в папке img находим файл super_fixed.bin

Копируем в основную память телефона super_fixed.bin и переименовываем в super_fixed.img, и вшиваем в TWRP как супер раздел.

Извините за мой плохой английский.
[Android Software/Hacking General [Developers Only]] NisseGurra:
Here are the logs, did not try the repair script yet