[CLOSED][SCRIPT][LINUX] Mount System as read write (Android 10+)

Status
Not open for further replies.
Search This thread

walid77dz

Senior Member
Nov 18, 2012
191
20
my device is it with super img ?
20210312_222645.jpg
 
  • Like
Reactions: lebigmac

d4ylight

Member
Mar 7, 2021
10
10
Moto G Stylus
The device does appear to have a super partition from that screenshot. And to answer your previous question, on a Linux desktop machine, enter:
Code:
echo $PATH
This will show you the PATH environment variable that your system can reference from any directory. In our case, for the purpose of executing a necessary program from any directory. In other words: making sure that adb and fastboot's file paths are in $PATH helps you and I to not have to reference the locations of where adb and fastboot are installed. $PATH is a reference of shortcuts for the operating system.
 

lebigmac

Account currently disabled
Jan 31, 2017
1,342
990
Ok folks I fixed the problem. I'm wrapping it all up and making a flashable zip and then uploading today. I promised the new universal version would be available this week. Well today is still this week ;)
I'm so done with this project lol. It was a great bash programming exercise for me but I'm happy if I can start working on something new. I spent too much time on this project already.

EDIT: Just found a genius called @Kolibass who figured out a way to flash an 8 GB large file in just under 30 seconds. Now compare this to the 2-5 minutes using traditional fastboot! Holy cow that's fast. Multithreading anyone?
 
Last edited:

lebigmac

Account currently disabled
Jan 31, 2017
1,342
990
@jhill110 thanks for your feedback but you are in the wrong thread. This thread is for Linux only version ;)
To answer your question. You did not properly copy the makesysrw_1.15 folder including all the tools and the script to the correct path.

The folder makesysrw_1.15 should be located here: /data/local/tmp/makesysrw_1.15
 
Last edited:

ronlkh1965

Account currently disabled
Feb 22, 2021
23
10
Usa
@JHill 110 thanks for your feedback but you are in the wrong thread. This thread is for Linux only version ;)
To answer your question. You did not properly copy the makesysrw_1.15 folder including all the tools and the script to the correct path.

extract the makesysrw_1.15.zip to this path: /data/local/tmp/makesysrw_1.15
I tried this method and the result is not good
 

Attachments

  • IMG_20210316_062809.jpg
    IMG_20210316_062809.jpg
    913.2 KB · Views: 55
  • Like
Reactions: lebigmac

lebigmac

Account currently disabled
Jan 31, 2017
1,342
990
Hi ronnie.
Did you do
chmod +x ./makesysrw.sh

try run the script like this:
./makesysrw.sh

you did it like this:
sh makesysrw.sh

this is wrong

which phone are you testing it with right now? with super or without super image?
 

ronlkh1965

Account currently disabled
Feb 22, 2021
23
10
Usa
Hi ronnie.
Did you do
chmod +x ./makesysrw.sh

try run the script like this:
./makesysrw.sh

you did it like this:
sh makesysrw.sh

this is wrong

which phone are you testing it with right now? with super or without super image?
Mi9Pro5G without Super.img

I tried your above method and result same
 

Attachments

  • IMG_20210316_072808.jpg
    IMG_20210316_072808.jpg
    1.4 MB · Views: 57
  • Like
Reactions: lebigmac

alecxs

Forum Moderator
Staff member
Feb 17, 2016
5,052
8
5,186
gitlab.com
one can't run bash script on android because there is no bash at all (except for lineageos and termux). write script for ash. there is a reason for bundling busybox and set up own environment before running scripts

also take care of applets, you can do extensive testing on pc before release
https://xdaforums.com/t/tool-bin-official-toybox-for-android.3290884/#post-81797803

edit: official TWRP shipped with true bash now. applets still linked toybox (or dynamic linked binaries)
 
Last edited:
  • Like
Reactions: lebigmac

lebigmac

Account currently disabled
Jan 31, 2017
1,342
990
Thank you for your interest in this project @Mikac21. Why don't you run the
BRAND NEW UNIVERSAL VERSION
The new universal version requires no computer at all!
It has never been this easy to install my new script on your device.
Simply flash the flashable.zip inside TWRP and it launches the script automatically!

This Linux version is pretty much deprecated at this point. I might give it one last update sometime in the near future if there's high demand but that's about it.

setprop this.thread.readonly = 1;
 
Last edited:

Oswald Boelcke

Senior Moderator / Moderator Committee
Staff member
Thread has been closed! The account of the author of this thread has been permanently suspended. Please, I ask everybody not to promote a banned user or his website, blog, work etc. on XDA. Thanks very much for your cooperation.

Regards
Oswald Boelcke
Senior Moderator
 
  • Like
Reactions: Austinredstoner
Status
Not open for further replies.

Top Liked Posts

  • There are no posts matching your filters.
  • 75
    This Linux-only version is pretty much deprecated at this point. Please use the BRAND NEW UNIVERSAL VERSION instead! Thank you.

    Ladies and gentlemen. Let me present to you my very first release here at the XDA forums:
    Welcome to:
    makeSystemRW v1.04
    automated bash script by lebigmac for Android 10 and above
    Creation date: February 2021
    Updated: March 2021


    Requirements:
    • LINUX ONLY!
    • Android 10 or newer
    • This version only supports devices with super image.
      Check if you have super by running
      ls -Alg /dev/block/by-name
    • phone must be rooted + bootloader unlocked + 10 GB free space on phone
    • at least 20 GB free space on computer for dumping data
    • adb and fastboot commands should be in your $PATH environment variable
    I'm not 100% sure if this is a necessary requirement but I also disabled dm-verity and verification on my device just in case by simply booting into TWRP and then executing these 2 commands:
    Code:
    adb disable-verity
    
    adb shell avbctl disable-verification

    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 image to your pc
    • extracts the embedded read-only partitions (system, vendor, product, etc...)
    • makes these partitions read-write-able
    • joins everything back together to new flashable super.img
    • flashes it to device
    User data is not affected.

    Usage:
    Simply call the script from the shell.
    Optional arguments (replace x with your custom value) :

    • in=x : With this flag you can specify an existing super.img and skip the entire dumping of the super image process. Here you can use the super_original.img which you dumped earlier with makesysrw or the official super.img from your downloaded firmware. You probably have to unsparse the official super.img first using the included simg2img tool for superunpack to recognize it properly. If omitted, makesysrw will dump super image from phone to ./super_original.img
    • out=x : With this argument you can specify the output path. If omitted, default output value is ./super_fixed.img
    • size=x : With this parameter you can specify the extra free space (in megabytes) that will be added to each partition. If omitted, default extra size is 0 (shrink to minimum)
    Examples:
    Code:
    # Run this command if you're first time user:
    # Specify the extra free space in megabytes for each partition:
    ./makesysrw.sh size=100
    
    # Plug an existing raw super image into the script like this:
    ./makesysrw.sh in=./super_original_raw.img size=100
    
    # Specify both the input file as well as the output destination:
    ./makesysrw.sh in=./super_original_raw.img out=./super_fixed.img size=100
    
    # For unsparsing the (sparse) super.img from your phone manufacturer's firmware you can do:
    ./tools/bin/simg2img ./super_sparse.img ./super_raw.img

    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 coincidentally came across a couple of very interesting threads burried deep inside the new forum interface where this technique has been described and discussed by various enthousiasts (links can be found below in the credits section). 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: Big thanks to @munjeni for allowing me to use his amazing superunpack tool instead of the default lpunpack. Source code can be found here.
    Also big thanks to @Brepro1 without your awesome tutorial guiding me I couldn't have created this script.
    Thanks @AndyYan your
    interesting thread also helped me a lot for automating the script especially the lpdump part.
    More thanks @gabrielfrias for his
    helpful comment
    Thanks @YOisuPU and of course @topjohnwu for discovering the 'shared_blocks feature'
    Thanks @bynarie for making available his
    otatools package! A part of it is now bundled with the archive

    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 and liability lies with the end-user. You hereby agree not to abuse this software for illegal purposes. Use this software at your own risk!

    Please feel free to improve this script as you see fit (as long as you don't add anything malicious)
    and make sure to post your feedback, suggestions and improvements in the official thread right here.


    3.jpg


    2.jpg


    5.jpg


    1.jpg


    0.jpg

    Mod Edit: Download link removed
    Please click my like button below if you like it! Thanks​
    4
    It would be very helpful if you guys could please give me some feedback if the script works for you.
    Which device are you using?
    Your Android version?
    Did you disable dm-verity and verification before running the script?
    Your suggestions to enhance the script. Remember this is only version 1.0
    Thanks!

    @thor_1979
    4
    Ok folks I fixed the problem. I'm wrapping it all up and making a flashable zip and then uploading today. I promised the new universal version would be available this week. Well today is still this week ;)
    I'm so done with this project lol. It was a great bash programming exercise for me but I'm happy if I can start working on something new. I spent too much time on this project already.

    EDIT: Just found a genius called @Kolibass who figured out a way to flash an 8 GB large file in just under 30 seconds. Now compare this to the 2-5 minutes using traditional fastboot! Holy cow that's fast. Multithreading anyone?
    4
    Wait a second I upload new version right now. Give me a minute.
    Don't waste your time with that old version. The new version is a whole different beast! I think it deserve a new thread ;)
    3
    Simply extract the downloaded archive and open a terminal shell in the extracted folder by right clicking inside it and select Open in Terminal

    Then run this command if you're running it for the first time
    Code:
    ./makesysrw.sh size=100

    or this command if you already have your raw super.img file
    Code:
    ./makesysrw.sh in=./existing_super_image.img size=100

    If you can't launch the script file make sure it is executable on your computer.