yashsingh1/xdaforums huggingface dataset:
[Android Software/Hacking General [Developers Only]] krasevalex:
=== Moto G Power (2020) XT2041-4-SS FIRMWARE: Android 10 "SOFIA_RETAIL_QPMS30.80-109-5" ===

1)

systemrw_1.32 (./makesysrw.sh size=50) => error code 73 (either way auto or manual)

2)

sysrw_repair_v1.32 (USB stick Ubuntu Mate 21.4) => Successfully created patched super image at /media/ubuntu-mate/Drive-C/sysrw_repair/img/super_fixed.bin

3)

"fastboot flash super super_fixed.bin" (in FASTBOOTD) => was sent 8 sparses SUPER out of 8, no errors

4)

restarted phone => OK

5)

adb shell

su

mount -o remount,rw /

mount -o remount,rw /system

mount -o remount,rw /product

mount -o remount,rw /vendor

6)

weird things started appear...

build.prop 0 Kb and copying saved earlier file build.prop to /system does not help it stays empty... I could change permissions in properties but it didn't help build.prop empty and nothing I could do... I repeated system rw remount but now I started getting bad returns like "mount: '/system' not in /proc/mounts" as I never flashed rw super image...

7)

flashed super image again in FASTBOOTD => same results: build.prop empty and nothing you can do with it

8)

flashed super image again now just in BOOTLOADER but weirdly in bootloader there were only 6 sparses SUPER out of 6 (in FASTBOOTD there were 8 sparses out of 8) => same results: build.prop empty and nothing you can do with it

9)

flashed and restored my FIRMWARE: SOFIA_RETAIL_QPMS30.80-109-5 (without erasing: boot, recovery, metadata and user data partitions) phone is fine but ROOT the same RO :(

-----------------------------------------

P.S. I was afraid to flash SUPER to slots A and B like:

fastboot flash super_a super_fixed.bin

fastboot flash super_b super_fixed.bin

and I didn't do it even though I remember some guy mentioned that it helped with two slots...

I didn't take a chance... :) I just got my phone back after being dead bricked from Motorola service... in the bricked phone i had perfect touch screen in TWRP (3.5.0_10) damn! in the phone of the same model they send me back TWRP touch screen does not work... (looks like the different drivers are set for the touch screen)
[Android Software/Hacking General [Developers Only]] Ricardo Cruz:
ready and the script is active, thank you very much for everything.
[Android Software/Hacking General [Developers Only]] lebigmac:
Hi @Ricardo Cruz. Thanks for your feedback. It looks like your device is not recognized by adb?

Did you get the sysrw_repair script to work inside your Linux environment? What was the problem?

Was super_fixed.bin created successfully and did you fastboot flash it to your super partition yet?

What is the result? Can you do this now?

Hi @krasevalex. Thanks for your feedback. Please send me your log files from this folder. Thanks.

/data/local/tmp/systemrw_1.32/log/

You can successfully boot device after flashing super_fixed.bin AND you can remount partitions as R/W? That sounds like a success to me. Congratulations!

I think you need to run script again with larger custom size and generate new super_fixed.bin with the repair script and fastboot flash it manually to your super partition.

After that everything should work as expected.

adb shell
su
cd /data/local/tmp/systemrw_1.32
./systemrw.sh in=`ls -l /dev/block/by-name/super | awk '{print $NF}'` size=50

/system is only in Android 9 and earlier. In Android 10+ it's called /
[Android Software/Hacking General [Developers Only]] Ricardo Cruz:
Well, in my case, the device was not detected when running the script in linux lubuntu live, what I did was create a usb with permanent storage. but later I faced the problem of the space in the usb for the img files, and passed the sysrepair folder to the Windows hard disk, where there was space. I ran the script, rebooted in fastboot and when finished reboot. I probe with root xplorer and I was able to switch to r / w, in fact I already modified an xml file in the vendor folder and I keep the changes on save and reboot. Thanks.
[Android Software/Hacking General [Developers Only]] krasevalex:
in fact I ran script with size=50 but as I wrote I have got an error code 73... i flashed super_fixed.bin manually besides i did it twice, first from FASTBOOTD (it was sent 8 sparses out of 8) and second time i flashed it from just BOOTLOADER (strangely only 6 sparses out of 6)... anyway in both cases i had problems with build.prop file and RW system and in both cases I executed command:

mount -o remount,rw /

here is an attached zip file with my logs...
[Android Software/Hacking General [Developers Only]] Pachacouti:
Can this be adapted better using this method in anyway?

I continue to use my back up pulled, have tested countless methods, then found a way for your script to work better for me, but that's out of my league, I hope you can use this:

https://xdaforums.com/t/hahahack-dis-no-magisk-required.4337361/post-85683523
[Android Software/Hacking General [Developers Only]] lolvatveo:
except using lucky patcher to modify system apps on android 6.0.1 and android 7, i can't modify in any way, need help because above guide is only for android 10
[Android Software/Hacking General [Developers Only]] flaxx187:
- extract Bundle

- Flash the flashable file

- beeing happy

amazing work

testet with Poco F1

on /system/media I can create/rename new Files, but not move via root explorer why ?

on my redmi Note 10 Pro I got an error via TWRP, so I did it via adb

what is a super partition ?how I can check it ?

tried:

adb shell

cd /data/local/tmp/systemrw_1.32

chmod +x sytemrw.sh

./systemrw.sh

finally I got my rw system

I don't have to do this:

su

mount -o remount,rw /

mount -o remount,rw /system

mount -o remount,rw /product

mount -o remount,rw /vendor

right ?
[Android Software/Hacking General [Developers Only]] lebigmac:
Hi. Thanks for your feedback.

on /system/media I can create/rename new Files, but not move via root explorer why ?

Usually if you can only rename system files or create empty system files this means you must run script again with larger custom size. Try for example size=50 or size=100

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

Regarding error 255 in some recoveries this is already fixed in next version ;)

Enjoy a fully read/writeable device!
[Android Software/Hacking General [Developers Only]] flaxx187:
so shall I do it again with adb shell but write ?:

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

50 mbmore ? that would be helpfull :D

thanks I helps :D

but i have still issue, but it is bc the app or my zip file idk.

The Size is now there, thanks made !
[Android Software/Hacking General [Developers Only]] Pachacouti:
Is it possible to make the system partition contained in super to auto resize itself using your script?

I was reading how to resize system and cottoned on to a method to have the available space adjust itself automatically, like if I deleted the product partition, the system would adapt to the availble space?

From what Ive read here, we're one step away from a completely rw system in this so called ro system...

It's like this as I see it:

So we resize, and change the format to a rw format, this is to make it rw perm, and have the resize we need to adjust automatically to any freed up space on the fly

Found:

For those looking for the actual resizepart command, I think this is what the OP had in mind: sudo parted /dev/mmcblk0 resizepart 3 100% where /dev/mmcblk0 is the drive and 3 is the partition

Can the above be added/adapted to the script? (for each partition within super?) - oh, and to super itself?? (random idea, mount bind super.img to super.img on sdcard...)

Ps, this will fix no space left problems :)

Ps, found here:

Auto expand last partition to use all unallocated space, using parted in batch mode

Long story short, I need to perform this all automatically on boot (embedded system). Our engineers will flash images to production devices. These images will contain a small partition table. On b...

unix.stackexchange.com
[Android Software/Hacking General [Developers Only]] lebigmac:
Yes auto-resize feature is easy to do. Don't worry I will add it soon when I have more time ;)

If you check the amazing superrepack tool by @munjeni (link in first post) he has already implemented this special feature long time ago. I'm only beginner programmer but that guy is a real expert (y)
[Android Software/Hacking General [Developers Only]] The_Tablet:
hey @lebigmac! i finally figured out the issue. basically, i'd extracted systemrw_1.32_flashable.zip into a folder in /data/local/tmp called "systemrw_1.32", making the directory structure look like this:

data/
├─ local/
│ ├─ tmp/
│ │ ├─ systemrw_1.32/
│ │ │ ├─ systemrw_1.32/
│ │ │ │ ├─ tools/
│ │ │ │ ├─ config.ini
│ │ │ │ ├─ systemrw.sh

as a result, systemrw.sh was unable to find the tools directory because it was actually located in a subdirectory within the expected directory, which the script obviously doesn't know about as the location is hardcoded as "/data/local/tmp/systemrw_1.32/".

so after moving everything in that rogue subdirectory up one directory, so it looked like this (as intended) :

data/
├─ local/
│ ├─ tmp/
│ │ ├─ systemrw_1.32/
│ │ │ ├─ tools/
│ │ │ ├─ config.ini
│ │ │ ├─ systemrw.sh

the script finally worked! (see attached logs).

i booted into twrp and flashed the images, and my system is now finally(!) r/w!

sorry for the wild goose chase there, and i send my sincerest thanks over to you and everyone else who made this possible! :3
[Android Software/Hacking General [Developers Only]] krasevalex:
I repeated all procedure (./systemrw.sh size=50 => error code 73 in the phone => repair script in Ubuntu) and result this time is very good. The system is RW, nothing wrong with build.prop. Now I have full root. :)

So far everything's great. Thank you very much for this script.
[Android Software/Hacking General [Developers Only]] fire7ly:
sir I`m tried this earlier but I'm not getting Success I'm try it again today and got error 255

idk why it occur..

my device Spec are:-

Realme C3 RMX2027 Helio G70

rn on Realme UI 1.0 Android 10.
[Android Software/Hacking General [Developers Only]] Pachacouti:
This error is a twrp error I believe, seems twrp no longer correctly interprets the adb sideloaded file name as package.zip, notice package zip in log?

Bet your sideloaded zip was NOT called package.zip, I've seen this in stock recovery too

Something is trying to flash a zip, or has renamed your file, or is looking for a file called flashable.zip, most likely a typo in the script.. or twrp... or recovery lol.. I'm betting incorrectly imported twrp recovery...img
[Android Software/Hacking General [Developers Only]] fire7ly:
I'm using pbrp sir it`s something mounting issue I guess.
[Android Software/Hacking General [Developers Only]] Pachacouti:
Yup, the file package.zip not found :) because no file called package.zip exists.

(Should say name of zip being used, not 'package.zip')

I find exploit's, I dont know how to patch them, because they're patched as soon as I mention them..
[Android Software/Hacking General [Developers Only]] fire7ly:
@lebigmac sir one more update I'm run this script in system mode and it did rebuild my super but when I'm flash super_fixed as fastboot flash super super_fix.img my device not boot anymore it always reboot to bootloader I'm disable all vbmeta verity and verification too but it give reboot to bootloader it seems Realme UI custom partition My_Product massed or corrupt coz driver not loading from that. Can you help me.. I Wanna be make it r/w.. thanks in advance logs attached here..
[Android Software/Hacking General [Developers Only]] fire7ly:
I`m run this in system and result here!
[Android Software/Hacking General [Developers Only]] lebigmac:
Hi @fire7ly thanks for your log files.

I noticed you made a little mistake with the file path but script still worked nevertheless when launched manually. I'm surprised.

According to your script log everything went well. All read-only restrictions have been successfully removed from your super image. I'm not sure what exactly is causing bootloop on your device. Some devices don't like modified super images... There must be some kind of special protection feature inside your device that prevents it from booting into the super image if it has been modified. That's my guess. You could try to check logcat while device is trying to boot to find out more info about the exact bootloop reason.

Can you undo bootloop simply by flashing original stock super image? You might have to flash stock vbmeta as well. Good luck!
[Android Software/Hacking General [Developers Only]] fire7ly:
sir as you say I'm take log and my dev friend read and say me its problem from My_Product partition which is causing issue that My_Product is custom partition by Rui inside super, script decrease size of that partition. I'm flashed all vbmeta to disable verification & verity. this is the right path as you suggest in your tutorial I'm using "*" coz idk right name of folder that time... this have version name too so I'm just add * to assume to get right path by chmod command..

main thing is was under /data/local/tmp/systemrw_1.32/systemrw.sh

can you look into this again in attached my device log earlier..

thanks in advance
[Android Software/Hacking General [Developers Only]] Dobrozol:
Great job! Tell me, how can I return the system to read-only mode?
[Android Software/Hacking General [Developers Only]] fire7ly:
flash super_orignal.bin from fastboot

as you flash super_fix from fastboot
[Android Software/Hacking General [Developers Only]] Dobrozol:
Thanks. But you can tell in more detail. Where to get the super_original.bin and super_fix files. Please write detailed instructions.
[Android Software/Hacking General [Developers Only]] fire7ly:
this script have 2 mode one is from recovery flash as zip second have run it in android environment.

if you run this in recovery then it patch and flash super automatically.

second if you run it in android environment with as mention location of /data/local/tmp/here_your_script_folder/here_script.sh then it create a "img" folder inside of script folder then pull super from your device make a backup and rename that to super_orignal.bin then extract that super and patch r/w capability then make that again super and rename it as super_fix.img so simply you get two bin files inside "img" folder

if you wanna r/w your device flash super_fix.img from bootloader.

if you wanna go back to original state "flash super_orignal.bin" from bootloader.

directory tree will like this :-

data/
├─ local/
│ ├─ tmp/
│ │ ├─ systemrw_1.32/
│ │ │ ├─img/
│ │ │ │ ├─super_orignal.bin
│ │ │ │ ├─super_fix.bin
│ │ │ ├─ tools/
│ │ │ ├─ config.ini
│ │ │ ├─ systemrw.sh

thanks this for @The_Tablet

That's it!
[Android Software/Hacking General [Developers Only]] fire7ly:
@lebigmac sir I'm unpack super with lunpack and compare both of super_fix.bin and manually pulled one super.img

and there are something like mounting issue. partition name not show its just show version.0001.img insted of my_company.img can you check this out.. idk what`s wrong with it..I can send compare list to you..

soon..
[Android Software/Hacking General [Developers Only]] daintycloud:
thank for sharing
[Android Software/Hacking General [Developers Only]] Jr.17:
so I did Everything ran First Script gave error code 73 so booted up my linux ran recovery script it after 10-15 minutes said it was succesful and it was all unlock so i did a quick check on my phone and im still locked.

went back to the P.C did a remount

mount -o remount,rw /

and gave me no output checked phone again same thing files looked so i assume i missed something
[Android Software/Hacking General [Developers Only]] Jr.17:
I'm dumb I have the same phone how did you set yours up?
[Android Software/Hacking General [Developers Only]] fire7ly:
So, I'm Successfully make my system R/W...

I want to describe my device spec again so you guys take a look into this..

Device:- Realme C3

Vendor:- Realme Stock Vendor

Android Version:- Android 10

SDK:- 29

Running UI Version:- Realme Stock UI ( Realme UI 1.0 ) A65 ( Latest At Experiment Time Now A67 )

SOC:- MediaTek Helio G70

Ram / Rom:- 4 / 64

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Summery

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

I'm try this script approx 2 months ago that time it not work for me so I'm leave a reply and wait for script update version..

as update come I'm try again and it give me same error in pbrp so I'm decided to try this in android environment. and flash from bootloader mode but it not work for me I'm make again and flash from bootloader it works but I'm get error not enough space on system so I'm create patch super again with custom size and try to flash with bootloader but it not work this time I'm try with vbmeta still fail to boot it reboot back to bootloader I'm confuse to much. so I'm decided to make with lower custom size so I'm choose 20 still same method same problem, after many tickle I'm find the problem of vbmeta and auto resize partition problem coz As I'm say I'm use Realme UI so Realme implemented oppo_product partition of 7mb and when I'm use custom size it become fatty 😂

so I'm decide to use custom size of 2 mb and make it again and flash via bootloader again but it still fail..

now I'm very disappointed. now I think if I'm flash super via sp tool.. And after successful flash it work.. Without any problem..

I'm recommend to all of you Take a nan droid backup of rom and try sp tool method to flash super so no error you get like dm-verity corrupt loop to recovery loop to bootloader actually I'm get many loop to recovery and bootloader and many time dm-verity corruption error.

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Screen Shot​

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

My Old Posts:-

july 21:-

First Attempt

july 24:-

Try From Recovery But No luck

Sept 27:-

Tried From Recover

Tried From System

Sept 28:-

oppo_product Error But Actually Was Encryption

sept 30:-

Blindly compare stock and edited partitions

https://xdaforums.com/t/script-andr...t-system-read-write-r-w.4247311/post-85708413
[Android Software/Hacking General [Developers Only]] hendrysetiadi:
i have amlogic s905x2 android tv box which has 8gb storage, 2gb RAM running android 10. that device currently only using stock recovery. can i run this flashable zip file from fastboot mode? i'm sure the device storage is not enough space for the result bin files. can i put in & out folder to external storage?
[Android Software/Hacking General [Developers Only]] Keven11:
Yes, you can just write the command to out=(path_to_external). You can execute the script from Franco Kernel Manager. Just be sure make the script executable, and set permissions for the script to 0755 and SELinux to permissive(not sure it's required but it won't hurt). So from terminal/shell: setenforce=0, then chmod +x /data/local/tmp/systemrw_%VERSION%/systemrw.sh to make it executable. Next, cd to the script by: cd /data/local/tmp/systemrw_v1.32 (which is where you need to extract the script folder to). Finally, execute/call the script with: ./systemrw.sh out=./(path_to_external_sd)/img/super_fixed.bin size=(whatever you need the value to be). Once completed you will need to manually flash the super_fixed.bin via fastboot. Sorry for the confusing explanation. I hope it helps, and you're picking up what I am attempting to lay down.
[Android Software/Hacking General [Developers Only]] JesusChrist<3:
dont work for me :( Moto g9 plus odessa. Error code 73
[Android Software/Hacking General [Developers Only]] Keven11:
I can help you with this one. I got the flashable zip to finally work from beginning to end with no errors on Odessa. The key for me was to edit the config file to 65mb instead of the default 15(75 is too much and 50 isn't enough). Make sure you save it. Then flash it from TWRP. Let me know if you have any questions. I can walk you through running it manually also.
[Android Software/Hacking General [Developers Only]] JesusChrist<3:
Big thanks for the help man! I try to run script in twrp and manually... However even with the custom 65mb, is the same result... I using stock rom with android 11
[Android Software/Hacking General [Developers Only]] hendrysetiadi:
hi.. thanks for the explanation..

i tried to fastboot unlock flashing, but why it said remote unlock_ability is 0 can not unlock? my device is amlogic s905x2 tv box running stock android 10.
[Android Software/Hacking General [Developers Only]] Pachacouti:
It would be cruel not to let you know... I have continued testing SystemRW, and have come to the conclusion that it clearly works on PIE superimage, but creates problems in android 10, no space. Even when deleting files, the freed up space is NOT registering. So I cant WRITE in a rw system.

I see in the other rw thread that there are many complaints regarding 'this is not a superimage' - but the op thinks it's the user's fault, so I'll point this out, Yes, the other ops rw can turn PIE rw, but NOT android 10, because he never considered that the super image in other os's may be entirely different. (they are, so 'this is not a supe image' is shown to the user)

In a nutshell, after reading the docs, it's true, there are hidden partitions on MY fone that only appear using SwDownload-4.1811.23.11, and after learning that the hash's for EVERY file, size, dimensions, partners phone number... yup, are all pointed to BY vbmeta, vbmeta_system and vbmeta_vendor...

So while your all wiping this 'other' directory pointing to every file in the super, (vbmeta) -it occured to me none of you are wiping vbmeta_system...? Which you would need to do to use the system image, correct?

I mean, if we need to wipe vbmeta to flash a recovery, surely then we'd need to wipe vbmeta_system because we modified system?

I dont wipe vbmeta. I do

fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img 2>nul >nul

I do NOT flash blank vbmetas. I use the above, and can change bootloaders/recoveries without any reflash of vbmeta afterwards.

And again, Parted is what you need, because parted offers the option of either size=100% or size=auto, meaning we delete product, and system adjusts accordingly.

If your rw'ing your script, swap to parted.

In my tests, even with magisk'd root, I cannot write because the disk is full, but hey, I can SEE rw, shame I can use it (yet ) ;)
[Android Software/Hacking General [Developers Only]] hendrysetiadi:
you didn't explain on how i cannot execute fastboot unlock flashing while fastboot unlock oem & fastboot unlock critical_data was OKAY.

before doing flashing modified boot by magisk i need to unlock the bootloader, but failed..
[Android Software/Hacking General [Developers Only]] JesusChrist<3:
is there any tutorial on how to use sysrw_repair_v1.32 ? :/
[Android Software/Hacking General [Developers Only]] Pachacouti:
I'll answerr here because you asked here, Fastboot flashing unlock is the command for unlocking my bootloader. You need to find the command for yours, and that's down to you, google how to unlock bootloader for YOUR fone :)

Ps, this is not my thread ;)
[Android Software/Hacking General [Developers Only]] Keven11:
I wonder if the OP's script does not work on A10, as you say. How is it that it works flawlessly for myself and many others on A10 and A11 on a plethora of devices? I think the problem in this case may reside within the wet-ware. Just my opinion.

Don't bother replying, as the question posed was rhetorical.