Search This thread

lebigmac

Senior Member
Jan 31, 2017
745
400
@pandavova thanks for the nice log files feedback! It's very helpful.

Error 73 on my Sony Xperia 5 ii with systemrw_1.31b.
I did flash from Android and not from TWRP (because TWRP doesn't work).
Oh no! Not Error 73 again :confused:

sysexits.h
/**
* Can't create (user) output file.
* A (user specified) output file cannot be created.
*/
#define EX_CANTCREAT 73



@sebj84 @[email protected]

SystemRW_v1.31c *NEW* is available for download HERE
I have bundled it together with the troubleshooting repair script v1.31c (Linux only) for all those unfortunate ones that still experience the mysterious lpmake error 73.

The flashable.zip is inside the bundle.zip
 
Last edited:
  • Like
Reactions: chintoocool

totmakina

Senior Member
  • Nov 13, 2013
    167
    69
    Moto G 5G Plus
    If the script works on your device please write me your phone model, Android version, script version and if you have super partition or not. Also please send me your log files.

    I will add you to the list of success and it will be helpful for further development. Thank you!
    I have flashed on my motorola g 5g plus. I have rebooted into twrp and can mount the boot, system and vendor partitions.
     

    reynaldio19

    Member
    Apr 9, 2021
    5
    5
    work fine on my device, Poco X3 Pro, if error img folder, just add img folder into flashible zip. Latest version script v1.31c
    Screenshot_2021-05-12-06-31-23.png
     
    • Love
    Reactions: lebigmac

    lebigmac

    Senior Member
    Jan 31, 2017
    745
    400
    I don't understand why this is happening. In script I have this code:
    setGlobalVars(){
    pDumpDir="./nosuper"
    sDumpDir="./img"
    mkdir -p $pDumpDir $sDumpDir

    Therefore it should create ./img folder before calling dd command...

    In the meantime try running script manually.
     
    Last edited:

    lebigmac

    Senior Member
    Jan 31, 2017
    745
    400
    Got a screenshot? Please send me your recovery log from /tmp/recovery.log

    How about you install it manually then? Manual installation instructions should be inside script (if some ruthless malicious hacker hasn't deleted them yet) or in first post of this thread.
    Good luck!
     
    Last edited:

    Ygrek178

    New member
    May 12, 2021
    1
    0
    Redmi note 9 pro(joyeuse). I recently flashed 1.31 and everything was fine, but on 1.31c such a problem:
    @pandavova thanks for the nice log files feedback! It's very helpful.


    Oh no! Not Error 73 again :confused:

    sysexits.h




    @sebj84 @[email protected]

    SystemRW_v1.31c *NEW* is available for download HERE
    I have bundled it together with the troubleshooting repair script v1.31c (Linux only) for all those unfortunate ones that still experience the mysterious lpmake error 73.

    The flashable.zip is inside the bundle.zip
    )
     

    Attachments

    • Screenshot_2021-05-12-14-54-16.png
      Screenshot_2021-05-12-14-54-16.png
      242.1 KB · Views: 42
    • Wow
    Reactions: lebigmac

    lebigmac

    Senior Member
    Jan 31, 2017
    745
    400
    Don't worry guys I will fix /img path error very soon! And I'll look into that unzip error too ;)
    In the meantime please try manual installation as described here

    or go back to v1.31
     
    Last edited:

    lebigmac

    Senior Member
    Jan 31, 2017
    745
    400
    Last edited:

    macubex1991

    New member
    May 10, 2021
    1
    0
    Can I ask something..
    Can I resize product partition and
    Add to system partition?
    My system partition free size is 44mb only while product partition is 2.2gb.
    Thank you.
    Screenshot_20210514-002041.png
    Screenshot_20210514-001916.png
     

    larsx5

    New member
    Nov 24, 2020
    2
    0
    Hi Guys! Is it possible to install this script into pixel 4a? As I understood, we don't have TWRP or other recovery options.
    Please advise.
    Have a great time!
     

    Top Liked Posts

    • There are no posts matching your filters.
    • 2
      and the v1.31d script did not work.

      This is not true. Script works perfectly when launched manually but there is a little recovery installer issue on some devices in v1.31d that I have already fixed and will be released in next version v1.32!
      If this little installer issue bothers you feel free to use the old v1.31 that is still available in original post.

      Oh you using the TWRP by that spineless thief who stole my script, deleted me from my own project and released as his own... I'm still waiting on his public apology since he first steal my script on March 14th 2021... I would NOT recommend using recovery by a cyber thief as stealing other people's hard work is not very trustworthy behavior. I mean deleting all important comments from original script such as credits, disclaimer, author name, instructions (and much much more) and replacing with meaningless words that's despicable and inacceptable behavior by itself but hacking into the update-binary and replacing original program title with a made-up bogus program title that has absolutely nothing to do with the original project? Come on seriously? Only malware would do such a misleading and malicious thing!
      Maybe this project would already be finished and 100% working on all devices if some malicious hacker would actually contribute positively to the project and help me fix any bugs rather than only hacking my update-binary and deleting only my comments from script (and renaming my functions to some bogus meaningless words) and then releasing it as if he created whole project from scratch without even mentioning original source... Not once did this spineless and ruthless cyber pirate offer to help with the original project.
      1
      Hey can confirm if works
      Nubia red magic 5s NX659J
      1
      thank you for your reply.


      Oh you using the TWRP by that spineless thief who stole my script, ...

      i am sorry to hear this.
      i really did not know about this history and i just used what i saw online.
      i should use the OrangeFox project now then.
      1
      Hi thanks for the screenshot. Script almost works as expected on your device. Did you only copy script file to /data/local/tmp/ ? Did you not copy the tools subfolder?

      Which Xiaomi device is it?
      Your device doesn't have neither super partition nor shared_blocks feature and your system can already be mounted as R/W. Please run these commands in Android terminal and send me screenshot. Thanks.

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

      Hi thanks for the screenshot. Script almost works as expected on your device. Did you only copy script file to /data/local/tmp/ ? Did you not copy the tools subfolder?

      Which Xiaomi device is it?
      Your device doesn't have neither super partition nor shared_blocks feature and your system can already be mounted as R/W. Please run these shell commands while phone is in Android mode and send me screenshot. Thanks.

      Bash:
      adb shell
      su
      mount -o remount,rw /
      mount -o remount,rw /product
      mount -o remount,rw /vendor
      Hi,thank you for quick response.im running Mi 9t with patched nethunter hasty kernel.
      I could run all of the commands above without any error except for /product
      The terminal response with : mount: '/product' not in /proc/mounts.

      By the way in response for your replied i copied all the existing file and folder which i left into /data/local/tmp/? and executed the script once more which then intructed me to connect to pc with adb.

      Will update again after i done that,but not tonight.

      Screenshot_2021-05-25-17-14-29-776_com.offsec.nhterm.jpg


      By the way i did connect to to pc,but couldnt figure out what to do.also when i tried to flash the script through recovery i got error said that the file is not a flashable zip.
      1
      I recorded a video about the manual installation of the script, but I speak russian, so if you do not understand the russian language, you can turn off the sound. And just watch the video starting at 1:01. If will there are questions, I will answer.
    • 66
      If you can't get this script to work on your device check out the brand new sophisticated superrepack tool by @munjeni



      SystemRW v1.31d
      automated bash script by lebigmac for Android 10 and above

      Creation date: February 2021
      Updated: May 2021

      Requirements:
      • rooted STOCK Android 10 or newer (custom ROM should already be R/W!)
      • Custom recovery is recommended but no longer required in latest version
      • at least 20 GB free space on phone for dumping data
      Description:
      A script for all Android power users that wish to make their read-only Android 10+ system read-write-able again to remove bloatware and make more thorough customizations to their device.

      In a nutshell this is what the script is doing:
      • dumps your existing super OR your system / product / vendor partitions depending on whether or not you have super partition
      • extracts embedded read-only partitions (system, vendor, product...) from super if applicable
      • makes these partitions read-write-able
      • joins everything back together to new super.img OR NOT depending on whether or not you have super partition
      • flashes read-write-able images back to device using the super fast Kolibass technique (only in recovery mode)
      User data is not affected.

      Manual installation:
      extract flashable.zip and copy systemrw_*VERSION* folder into /data/local/tmp/
      run this command to make the script executable:
      chmod +x /data/local/tmp/systemrw_*VERSION*/systemrw.sh
      Automatic installation:
      Installation of the script has never been this easy!
      Download the flashable zip below, do NOT enable zip signature verification and simply install it in your custom recovery (works in TWRP, OrangeFox and PBRP!)
      The installer binary will auto-detect whether or not your device has a super partition and launch the script accordingly with the proper command line arguments.

      Flashable zip custom usage:
      You can set these custom installation arguments in the included config.ini file.
      Simply extract the flashable.zip and modify the included config.ini file and make your adjustments. Then compress the systemrw_*VERSION* and META-INF folders again as a new .zip and install it in recovery.
      First line of config.ini contains the script arguments for those WITHOUT super partition.
      By default this line is completely empty (no space).
      Second line of config.ini contains the script arguments for those WITH super partition.
      For example if you already dumped your super_original and want to skip that process next time you install the .zip then put this in line #2 of config.ini :
      Code:
       in=./img/super_original.bin size=15
      Remember if you decide to use custom arguments in config.ini then the first character should always be an empty space. If no arguments are used such as by default in line #1 (no super) then the line should be completely empty, no space, nothing.

      Script usage:
      If you've got no super partition then simply call the script with no arguments from the shell.
      If you've got a super partition I would recommend using the optional size=15 parameter as well to give some extra free space (in MB) to each partition.
      The script can be run both inside custom recovery and inside Android operating system. If you run it in Android you will need to fastboot flash the patched images manually!
      Optional arguments: (replace x with your custom value)
      • in=x : *THIS IS IGNORED IF YOU HAVE NO SUPER PARTITION*
        With this flag you can specify an existing super image as input and skip the entire dumping of the super image process. Here you can use the super_original.bin which you dumped earlier with systemrw or the official unsparsed super.img from your downloaded firmware. (unsparse with simg2img). It's also possible to use your super partition block device as input.
        If omitted, systemrw will dump super image from phone to ./img/super_original.bin
        (path is relative to the script)
      • out=x : *THIS IS IGNORED IF YOU HAVE NO SUPER PARTITION*
        With this argument you can specify the output path of the new patched super file.
        If omitted, default output value is ./img/super_fixed.bin
      • size=x : *ONLY RECOMMENDED IF YOU HAVE SUPER PARTITION*
        With this parameter you can specify the extra free space (in megabytes) that will be added to each partition. There is a limit as to how much extra free space you can add per partition. Check your lpdump.txt to find out the exact maximum extra size.
        If omitted, default extra size is 0 (shrink to minimum)
      Examples:
      Code:
      # Run this command *IF YOU HAVE NO SUPER PARTITION*
      ./systemrw.sh
      
      # Run this command if you're first time user *AND YOU HAVE SUPER PARTITION*
      # Specify the extra free space in megabytes for each partition:
      ./systemrw.sh size=15
      
      # Plug an existing super image into the script like this *ONLY IF YOU HAVE SUPER PARTITION*
      ./systemrw.sh in=./img/super_original.bin size=15
      
      # Specify both the input file as well as the output destination *ONLY IF YOU HAVE SUPER PARTITION*
      ./systemrw.sh in=./img/super_original.bin out=./custom/path/super_fixed.bin size=15

      To check whether or not you've got a super partition on your device you can run this command:

      adb shell "ls -l /dev/block/by-name/super"

      Troubleshooting:
      If you get error 255 in custom recovery when trying to install flashable zip then try to install it manually. If you encounter this error please send me this file /tmp/recovery.log
      Make sure the script folder was correctly extracted into:
      /data/local/tmp/systemrw_*VERSION*
      If you can't run the script try making the file executable like this: chmod +x ./systemrw.sh
      If you still can't get it to work run which sh in your shell and replace the shebang in the first line of the script with the output of that command. Don't remove the first two #! symbols though. Then save the file and try again.
      Make sure you have full read write access to the /data/local/tmp directory and that the containing files are not encrypted in custom recovery!

      NOTE:
      I did not come up with all this by myself. After searching for a solution for countless days without success, going even as far as learning hex editing - I accidentally came across a couple of very interesting threads burried deep inside the new forum interface where this method has been described by various enthousiasts (links can be found in the credits section below). So I take absolutely no credit for the underlying core mechanisms of the script. I'm only the amateur who put it all together into a compact script so that everybody can enjoy an Android system that's read-write-able again. Just like it used to be in Android 9 or earlier. Before this annoying 'shared_blocks feature' was implemented.

      Credits:
      Huge thanks to @Kolibass for allowing me to use his partition tools for Android. Without your tools this script would not work on the Android platform! This genius also showed me how to flash a 8GB file to my partition in just under 30 seconds! Much faster than fastboot! I still can't believe it!
      Big thanks to @Brepro1 for allowing me to basically copy his awesome tutorial and make it into a script. Without your tutorial guiding me I couldn't have created this script.
      Thanks @AndyYan your great tutorial also helped me a lot for automating the script especially the lpdump part.
      Also big thanks @munjeni for allowing me to use his superunpack V1 tool in the previous version. It helped me to understand how these super images work.
      Thanks @bynarie for making available his otatools package! A part of it was bundled with the previous version which helped me to create this version.
      More thanks @gabrielfrias for his helpful comment
      Thanks @YOisuPU and of course @topjohnwu for discovering the 'shared_blocks feature'
      Thanks @HemanthJabalpuri for assisting me in optimizing the underlying algorithm!

      Disclaimer:
      This is open source software and is provided as is without any kind of warranty or support whatsoever.
      By using and viewing this software you agree to the following terms:
      Under no circumstances shall the author be held responsible for any damages or negative consequences that may arrise from the (inappropriate) use of this software.
      All responsibility, liability and risk lies with the end-user. You hereby agree not to abuse this software for illegal purposes.
      The end-user is free to improve the underlying algorithm (as long as no malicious code is added) as well as redistribute this script in his own project as long as the comment and title section of the script (lines #1 - #65) as well as the included update-binary are not modified or removed.

      Please make sure to post your feedback, suggestions and improvements in the official thread right here.
      Enjoy customizing your read-write-able Android device!


      v1-31d_01-jpg.5309953
      v1-31d_02-jpg.5309955
      v1-31d_03-jpg.5309957


      1-jpg.5235933


      Download v1.31 (deprecated)
      Download v1.31d *NEW* (if you get error signal 6 in recovery try decrypt and mount /data partition first!)
      current status: experimental
      Please click my like button below if you like my work! Thanks!

      Confirmed working on these devices :

      Xiaomi Poco X3 NFC
      Xiaomi Poco X3 Pro
      Xiaomi Poco X2 - Android 10/11
      Xiaomi Poco X2 - Android 11 (v1.24)
      Xiaomi Poco F2 Pro - Android 11 (v1.26)
      Xiaomi Mi 10 T Lite - Android 11
      Xiaomi Mi 10 T lite - Android 11 - TWRP
      Xiaomi Mi 10 - Android 11
      Xiaomi Mi 10 Ultra - Android 11
      Xiaomi Mi Note 10 Lite - Android 11 - OrangeFox
      Xiaomi Redmi 9 - Android 10
      Xiaomi Redmi 9 - Android 10 (v1.26)
      Xiaomi Redmi Note 9 Pro joyeuse - Android 10
      Xiaomi Redmi Note 9 Pro gauguin (China) - Android 10
      Xiaomi Redmi 9T - Android 11 - TWRP
      Xiaomi Redmi K30 - Android 10
      Xiaomi Redmi K30S Ultra(China), Android 11 (v1.29)

      Asus Rog Phone 3 - Android 10 - TWRP
      OnePlus Nord - Android 11 (v1.24)
      Doogee S96Pro - Android 10 (v1.26)
      F150 model B2021 - Android 10
      Realme C12 - Android 11
      6
      New version 1.20 is ready! DOWNLOAD HERE
      Good news for those that don't have TWRP or couldn't get it to work in their TWRP. Now the script can also be run directly inside Android. Keep in mind that you will have to flash the patched images manually in this case using fastboot flash.

      The zip can still be flashed in TWRP (make sure zip signature verification isn't checked). I bundled my sh program (which I used to develop the script) with the archive this time. Hopefully this will prevent avoidable sh-related syntax errors for some folks. The flashable installer binary automatically launches the script with the proper arguments using this bundled sh program (it's inside the tools folder).

      To those that were having difficulties running the previous version due to empty partitions or multiple partition groups inside their super : this has finally been fixed :D

      Please give this new version a try and let me know if it works for you or not and I will add it to the first post. Thanks for your feedback!
      5
      If the script works on your device please write me your phone model, Android version, script version and if you have super partition or not. Also please send me your log files.

      I will add you to the list of success and it will be helpful for further development. Thank you!
      5
      I try to redo the procedure, i want to change the size. but i get error, can't remove lock.

      Good news. New hotfix available HERE
      I got rid of that buggy get minimum size function and reworked the size querying algorithm a little bit. Should be more stable now.

      Next step will be to make the script compatible with those devices that have empty partitions embedded inside their super partition...
      Also ronnie was complaining about syntax error but I have yet to find the syntax error... If anyone finds it please let me know so I can fix it. Thank you!
      4
      @lebigmac
      I am happy to say that, all the things went fine with my Realme C12.

      I have removed original super.img right after lpunpack finishes. This makes me use your tool with just 15GiB free space.

      A small thing is that, in your update-binary, please create a dir /data/local/tmp if it does not exist.
      If it does not exist, your tool will fail to install.
      It will be not present if a person clean flashes your tool(wipe data).

      Also system RW works fine, but vendor RW gives operation not permitted.
      Do I need use chattr with the block of vendor?


      Also, we can use like this sh makesysrw.sh. Advantage of this is that, we don't need to make it executable and shebang is ignored.

      Thanks

      Hello HemanthJabalpuri. Did you actually get my script to work on your device? This is wonderful news.

      Thanks for the suggestion about creating /data/local/tmp folder if it doesn't exist. I will do it in the next version.

      vendor RW gives operation not permitted.
      Do I need use chattr with the block of vendor?


      Operation not permitted? I never seen this error before. Do you get this error in the script or elsewhere?
      Sorry I don't know what is chattr.

      Also, we can use like this sh makesysrw.sh. Advantage of this is that, we don't need to make it executable and shebang is ignored.

      Thank you very much for this precious piece of advice. Some people have old sh version in their twrp that don't even support basic array functions. Do you think it's possible to bundle my own sh file (that I used for development) with the flashable zip and rule out any sh compatibility issues this way?

      In the next version of the script I would like to remove twrp completely from the requirement list so that everybody can enjoy a system that's read write-able, not only those with twrp. Some devices have no twrp or orange fox available.

      No Orangefox recovery too for Oneplus 7T , unfortunately. Oneplus really messed up 7T's decryption with android 10. I'm hoping for it to fixed with OOS 11 update which too, got delayed because they didn't care for its decryption issues in the first place. Its mind boggling that the 7T doesn't have a working TWRP even after 1 ½ years of being launched.

      Hi shady_soldier
      Yes that kind of sucks I agree. I wish I knew how to actually compile recovery. Too bad I'm only an amateur!
      I tried to compile Xiaomi stock recovery the other day but no luck so far...

      @lebigmac Any chance to uninstall It?
      Thx!!

      Hi Morello12. Did you actually run the script successfully or not?
      Sure simply delete the entire folder /data/local/tmp/makesysrw_1.15c

      But is it a new version or what?
      Does it work without disabling DM-verify?

      No. Disable dm verity and verification is always a good idea!
      @Ayoub$# You could also try flashing an empty vbmeta with fastboot if you can't disable dm verity manually.

      Code:
      fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img