• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!
Search This thread
Still gets that error message:

Microsoft Windows [Version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.

C:\Minimal ADB and Fastboot>adb shell
kiev:/ $ su
kiev:/ # chmod +x /data/local/tmp/makesysrw_1.21/makesysrw.sh
kiev:/ # /data/local/tmp/makesysrw_1.21/makesysrw.sh size=100
-------------------------------------------------------------------------
| makeSystemRW v1.21 automated script by lebigmac @xda ©2021 |
| Thanks @Kolibass @Brepro1 @munjeni @AndyYan @gabrielfrias @YOisuPU |
| without your help this script would not be possible! |
------------------------------------------------------------------------
makesysrw: Custom size detected: 100 MB
makesysrw: Phone is not in TWRP recovery mode. Ignoring
makesysrw: Initiating procedure...

makesysrw: Your super partition is located at: /dev/block/sde26
makesysrw: Dumping super partition to: /data/local/tmp/makesysrw_1.21/files/supe
r/super_original.bin
makesysrw: Please wait patiently...

20969472+0 records in
20969472+0 records out
10736369664 bytes (10 G) copied, 40.974039 s, 250 M/s

makesysrw: Successfully dumped super partition to: /data/local/tmp/makesysrw_1.2
1/files/super/super_original.bin
makesysrw: Unpacking embedded partitions from super...
makesysrw: Nested partitions were successfully extracted from super

makesysrw: Current size of system_a.img in bytes: 861995008
makesysrw: Current size of system_a.img in MB: 822
makesysrw: Current size of system_a.img in 512-byte sectors: 1683584

makesysrw: Increasing filesystem size of system_a.img to 2104480 512-byte sector
s...
resize2fs 1.44.4 (18-Aug-2018)
Resizing the filesystem on /data/local/tmp/makesysrw_1.21/files/super/system_a.i
mg to 263060 (4k) blocks.
The filesystem on /data/local/tmp/makesysrw_1.21/files/super/system_a.img is now
263060 (4k) blocks long.

makesysrw: The filesystem of system_a.img was successfully resized
makesysrw: Removing 'shared_blocks feature' of system_a.img...
e2fsck 1.44.4 (18-Aug-2018)
makesysrw: Read-only lock of system_a.img successfully removed

makesysrw: Shrinking size of system_a.img back to minimum size...
resize2fs 1.44.4 (18-Aug-2018)
Resizing the filesystem on /data/local/tmp/makesysrw_1.21/files/super/system_a.i
mg to 230476 (4k) blocks.
The filesystem on /data/local/tmp/makesysrw_1.21/files/super/system_a.img is now
230476 (4k) blocks long.

makesysrw: Current size of system_a.img in bytes: 944029696
makesysrw: Current size of system_a.img in MB: 900
makesysrw: Current size of system_a.img in 512-byte sectors: 1843808

makesysrw: Custom size of system_a.img in bytes: 1048887296
makesysrw: Custom size of system_a.img in MB: 1000
makesysrw: Custom size of system_a.img in 512-byte sectors: 2048608

makesysrw: Increasing filesystem size of system_a.img to 2048608 512-byte sector
s...
resize2fs 1.44.4 (18-Aug-2018)
Resizing the filesystem on /data/local/tmp/makesysrw_1.21/files/super/system_a.i
mg to 256076 (4k) blocks.
The filesystem on /data/local/tmp/makesysrw_1.21/files/super/system_a.img is now
256076 (4k) blocks long.

makesysrw: The filesystem of system_a.img was successfully resized
makesysrw: Current size of system_a.img in bytes: 1048887296
makesysrw: Current size of system_a.img in MB: 1000
makesysrw: Current size of system_a.img in 512-byte sectors: 2048608

========================================================================

makesysrw: Current size of system_b.img in bytes: 23531520
makesysrw: Current size of system_b.img in MB: 22
makesysrw: Current size of system_b.img in 512-byte sectors: 45960

makesysrw: Increasing filesystem size of system_b.img to 57450 512-byte sectors.
..
resize2fs 1.44.4 (18-Aug-2018)
Resizing the filesystem on /data/local/tmp/makesysrw_1.21/files/super/system_b.i
mg to 7181 (4k) blocks.
The filesystem on /data/local/tmp/makesysrw_1.21/files/super/system_b.img is now
7181 (4k) blocks long.

makesysrw: The filesystem of system_b.img was successfully resized
makesysrw: Removing 'shared_blocks feature' of system_b.img...
e2fsck 1.44.4 (18-Aug-2018)
makesysrw: Read-only lock of system_b.img successfully removed

makesysrw: Shrinking size of system_b.img back to minimum size...
resize2fs 1.44.4 (18-Aug-2018)
Resizing the filesystem on /data/local/tmp/makesysrw_1.21/files/super/system_b.i
mg to 5653 (4k) blocks.
The filesystem on /data/local/tmp/makesysrw_1.21/files/super/system_b.img is now
5653 (4k) blocks long.

makesysrw: Current size of system_b.img in bytes: 23154688
makesysrw: Current size of system_b.img in MB: 22
makesysrw: Current size of system_b.img in 512-byte sectors: 45224

makesysrw: Custom size of system_b.img in bytes: 128012288
makesysrw: Custom size of system_b.img in MB: 122
makesysrw: Custom size of system_b.img in 512-byte sectors: 250024

makesysrw: Increasing filesystem size of system_b.img to 250024 512-byte sectors
...
resize2fs 1.44.4 (18-Aug-2018)
Resizing the filesystem on /data/local/tmp/makesysrw_1.21/files/super/system_b.i
mg to 31253 (4k) blocks.
The filesystem on /data/local/tmp/makesysrw_1.21/files/super/system_b.img is now
31253 (4k) blocks long.

makesysrw: The filesystem of system_b.img was successfully resized
makesysrw: Current size of system_b.img in bytes: 128012288
makesysrw: Current size of system_b.img in MB: 122
makesysrw: Current size of system_b.img in 512-byte sectors: 250024

========================================================================

makesysrw: Current size of vendor_a.img in bytes: 760930304
makesysrw: Current size of vendor_a.img in MB: 725
makesysrw: Current size of vendor_a.img in 512-byte sectors: 1486192

makesysrw: Increasing filesystem size of vendor_a.img to 1857740 512-byte sector
s...
resize2fs 1.44.4 (18-Aug-2018)
Resizing the filesystem on /data/local/tmp/makesysrw_1.21/files/super/vendor_a.i
mg to 232217 (4k) blocks.
The filesystem on /data/local/tmp/makesysrw_1.21/files/super/vendor_a.img is now
232217 (4k) blocks long.

makesysrw: The filesystem of vendor_a.img was successfully resized
makesysrw: Removing 'shared_blocks feature' of vendor_a.img...
e2fsck 1.44.4 (18-Aug-2018)
makesysrw: Read-only lock of vendor_a.img successfully removed

makesysrw: Shrinking size of vendor_a.img back to minimum size...
resize2fs 1.44.4 (18-Aug-2018)
Resizing the filesystem on /data/local/tmp/makesysrw_1.21/files/super/vendor_a.i
mg to 187774 (4k) blocks.
The filesystem on /data/local/tmp/makesysrw_1.21/files/super/vendor_a.img is now
187774 (4k) blocks long.

makesysrw: Current size of vendor_a.img in bytes: 769122304
makesysrw: Current size of vendor_a.img in MB: 733
makesysrw: Current size of vendor_a.img in 512-byte sectors: 1502192

makesysrw: Custom size of vendor_a.img in bytes: 873979904
makesysrw: Custom size of vendor_a.img in MB: 833
makesysrw: Custom size of vendor_a.img in 512-byte sectors: 1706992

makesysrw: Increasing filesystem size of vendor_a.img to 1706992 512-byte sector
s...
resize2fs 1.44.4 (18-Aug-2018)
Resizing the filesystem on /data/local/tmp/makesysrw_1.21/files/super/vendor_a.i
mg to 213374 (4k) blocks.
The filesystem on /data/local/tmp/makesysrw_1.21/files/super/vendor_a.img is now
213374 (4k) blocks long.

makesysrw: The filesystem of vendor_a.img was successfully resized
makesysrw: Current size of vendor_a.img in bytes: 873979904
makesysrw: Current size of vendor_a.img in MB: 833
makesysrw: Current size of vendor_a.img in 512-byte sectors: 1706992

========================================================================

makesysrw: Current size of vendor_b.img in bytes: 0
makesysrw: Current size of vendor_b.img in MB: 0
makesysrw: Current size of vendor_b.img in 512-byte sectors: 0
./tools/bin/tune2fs: Attempt to read block from filesystem resulted in short rea
d while trying to open /data/local/tmp/makesysrw_1.21/files/super/vendor_b.img
Couldn't find valid filesystem superblock.
makesysrw: Current size of vendor_b.img in bytes: 0
makesysrw: Current size of vendor_b.img in MB: 0
makesysrw: Current size of vendor_b.img in 512-byte sectors: 0

========================================================================

makesysrw: Current size of product_a.img in bytes: 2896654336
makesysrw: Current size of product_a.img in MB: 2762
makesysrw: Current size of product_a.img in 512-byte sectors: 5657528

makesysrw: Increasing filesystem size of product_a.img to 7071910 512-byte secto
rs...
resize2fs 1.44.4 (18-Aug-2018)
Resizing the filesystem on /data/local/tmp/makesysrw_1.21/files/super/product_a.
img to 883988 (4k) blocks.
The filesystem on /data/local/tmp/makesysrw_1.21/files/super/product_a.img is no
w 883988 (4k) blocks long.

makesysrw: The filesystem of product_a.img was successfully resized
makesysrw: Removing 'shared_blocks feature' of product_a.img...
e2fsck 1.44.4 (18-Aug-2018)
makesysrw: Read-only lock of product_a.img successfully removed

makesysrw: Shrinking size of product_a.img back to minimum size...
resize2fs 1.44.4 (18-Aug-2018)
Resizing the filesystem on /data/local/tmp/makesysrw_1.21/files/super/product_a.
img to 716579 (4k) blocks.
The filesystem on /data/local/tmp/makesysrw_1.21/files/super/product_a.img is no
w 716579 (4k) blocks long.

makesysrw: Current size of product_a.img in bytes: 2935107584
makesysrw: Current size of product_a.img in MB: 2799
makesysrw: Current size of product_a.img in 512-byte sectors: 5732632

makesysrw: Custom size of product_a.img in bytes: 3039965184
makesysrw: Custom size of product_a.img in MB: 2899
makesysrw: Custom size of product_a.img in 512-byte sectors: 5937432

makesysrw: Increasing filesystem size of product_a.img to 5937432 512-byte secto
rs...
resize2fs 1.44.4 (18-Aug-2018)
Resizing the filesystem on /data/local/tmp/makesysrw_1.21/files/super/product_a.
img to 742179 (4k) blocks.
The filesystem on /data/local/tmp/makesysrw_1.21/files/super/product_a.img is no
w 742179 (4k) blocks long.

makesysrw: The filesystem of product_a.img was successfully resized
makesysrw: Current size of product_a.img in bytes: 3039965184
makesysrw: Current size of product_a.img in MB: 2899
makesysrw: Current size of product_a.img in 512-byte sectors: 5937432

========================================================================

makesysrw: Current size of product_b.img in bytes: 0
makesysrw: Current size of product_b.img in MB: 0
makesysrw: Current size of product_b.img in 512-byte sectors: 0
./tools/bin/tune2fs: Attempt to read block from filesystem resulted in short rea
d while trying to open /data/local/tmp/makesysrw_1.21/files/super/product_b.img
Couldn't find valid filesystem superblock.
makesysrw: Current size of product_b.img in bytes: 0
makesysrw: Current size of product_b.img in MB: 0
makesysrw: Current size of product_b.img in 512-byte sectors: 0

========================================================================

makesysrw: Joining all extracted images back into one single super image...
makesysrw: Please wait and ignore the invalid sparse warnings...


makesysrw: Error! failed to create super_fixed.img file
1|kiev:/ #
 

Attachments

  • 1.jpg
    1.jpg
    133 KB · Views: 37
  • 2.jpg
    2.jpg
    145 KB · Views: 29
  • 4.jpg
    4.jpg
    156.6 KB · Views: 24
  • 3.jpg
    3.jpg
    144.1 KB · Views: 30
  • 5.jpg
    5.jpg
    112.1 KB · Views: 37

lebigmac

Senior Member
Jan 31, 2017
873
507
I don't know about you guys but over here the new version works perfectly on my Xiaomi X3 NFC!
I just tested it with a fresh brand new read-only super and it works!

makesysrw_1.21_01.jpg
makesysrw_1.21_02.jpg
makesysrw_1.21_03.jpg
 
Last edited:
  • Like
Reactions: nttuan

Ayoub$#

Member
Mar 15, 2021
46
7
Still gets that error message:

Microsoft Windows [Version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.

C:\Minimal ADB and Fastboot>adb shell
kiev:/ $ su
kiev:/ # chmod +x /data/local/tmp/makesysrw_1.21/makesysrw.sh
kiev:/ # /data/local/tmp/makesysrw_1.21/makesysrw.sh size=100
-------------------------------------------------------------------------
| makeSystemRW v1.21 automated script by lebigmac @xda ©2021 |
| Thanks @Kolibass @Brepro1 @munjeni @AndyYan @gabrielfrias @YOisuPU |
| without your help this script would not be possible! |
------------------------------------------------------------------------
makesysrw: Custom size detected: 100 MB
makesysrw: Phone is not in TWRP recovery mode. Ignoring
makesysrw: Initiating procedure...

makesysrw: Your super partition is located at: /dev/block/sde26
makesysrw: Dumping super partition to: /data/local/tmp/makesysrw_1.21/files/supe
r/super_original.bin
makesysrw: Please wait patiently...

20969472+0 records in
20969472+0 records out
10736369664 bytes (10 G) copied, 40.974039 s, 250 M/s

makesysrw: Successfully dumped super partition to: /data/local/tmp/makesysrw_1.2
1/files/super/super_original.bin
makesysrw: Unpacking embedded partitions from super...
makesysrw: Nested partitions were successfully extracted from super

makesysrw: Current size of system_a.img in bytes: 861995008
makesysrw: Current size of system_a.img in MB: 822
makesysrw: Current size of system_a.img in 512-byte sectors: 1683584

makesysrw: Increasing filesystem size of system_a.img to 2104480 512-byte sector
s...
resize2fs 1.44.4 (18-Aug-2018)
Resizing the filesystem on /data/local/tmp/makesysrw_1.21/files/super/system_a.i
mg to 263060 (4k) blocks.
The filesystem on /data/local/tmp/makesysrw_1.21/files/super/system_a.img is now
263060 (4k) blocks long.

makesysrw: The filesystem of system_a.img was successfully resized
makesysrw: Removing 'shared_blocks feature' of system_a.img...
e2fsck 1.44.4 (18-Aug-2018)
makesysrw: Read-only lock of system_a.img successfully removed

makesysrw: Shrinking size of system_a.img back to minimum size...
resize2fs 1.44.4 (18-Aug-2018)
Resizing the filesystem on /data/local/tmp/makesysrw_1.21/files/super/system_a.i
mg to 230476 (4k) blocks.
The filesystem on /data/local/tmp/makesysrw_1.21/files/super/system_a.img is now
230476 (4k) blocks long.

makesysrw: Current size of system_a.img in bytes: 944029696
makesysrw: Current size of system_a.img in MB: 900
makesysrw: Current size of system_a.img in 512-byte sectors: 1843808

makesysrw: Custom size of system_a.img in bytes: 1048887296
makesysrw: Custom size of system_a.img in MB: 1000
makesysrw: Custom size of system_a.img in 512-byte sectors: 2048608

makesysrw: Increasing filesystem size of system_a.img to 2048608 512-byte sector
s...
resize2fs 1.44.4 (18-Aug-2018)
Resizing the filesystem on /data/local/tmp/makesysrw_1.21/files/super/system_a.i
mg to 256076 (4k) blocks.
The filesystem on /data/local/tmp/makesysrw_1.21/files/super/system_a.img is now
256076 (4k) blocks long.

makesysrw: The filesystem of system_a.img was successfully resized
makesysrw: Current size of system_a.img in bytes: 1048887296
makesysrw: Current size of system_a.img in MB: 1000
makesysrw: Current size of system_a.img in 512-byte sectors: 2048608

========================================================================

makesysrw: Current size of system_b.img in bytes: 23531520
makesysrw: Current size of system_b.img in MB: 22
makesysrw: Current size of system_b.img in 512-byte sectors: 45960

makesysrw: Increasing filesystem size of system_b.img to 57450 512-byte sectors.
..
resize2fs 1.44.4 (18-Aug-2018)
Resizing the filesystem on /data/local/tmp/makesysrw_1.21/files/super/system_b.i
mg to 7181 (4k) blocks.
The filesystem on /data/local/tmp/makesysrw_1.21/files/super/system_b.img is now
7181 (4k) blocks long.

makesysrw: The filesystem of system_b.img was successfully resized
makesysrw: Removing 'shared_blocks feature' of system_b.img...
e2fsck 1.44.4 (18-Aug-2018)
makesysrw: Read-only lock of system_b.img successfully removed

makesysrw: Shrinking size of system_b.img back to minimum size...
resize2fs 1.44.4 (18-Aug-2018)
Resizing the filesystem on /data/local/tmp/makesysrw_1.21/files/super/system_b.i
mg to 5653 (4k) blocks.
The filesystem on /data/local/tmp/makesysrw_1.21/files/super/system_b.img is now
5653 (4k) blocks long.

makesysrw: Current size of system_b.img in bytes: 23154688
makesysrw: Current size of system_b.img in MB: 22
makesysrw: Current size of system_b.img in 512-byte sectors: 45224

makesysrw: Custom size of system_b.img in bytes: 128012288
makesysrw: Custom size of system_b.img in MB: 122
makesysrw: Custom size of system_b.img in 512-byte sectors: 250024

makesysrw: Increasing filesystem size of system_b.img to 250024 512-byte sectors
...
resize2fs 1.44.4 (18-Aug-2018)
Resizing the filesystem on /data/local/tmp/makesysrw_1.21/files/super/system_b.i
mg to 31253 (4k) blocks.
The filesystem on /data/local/tmp/makesysrw_1.21/files/super/system_b.img is now
31253 (4k) blocks long.

makesysrw: The filesystem of system_b.img was successfully resized
makesysrw: Current size of system_b.img in bytes: 128012288
makesysrw: Current size of system_b.img in MB: 122
makesysrw: Current size of system_b.img in 512-byte sectors: 250024

========================================================================

makesysrw: Current size of vendor_a.img in bytes: 760930304
makesysrw: Current size of vendor_a.img in MB: 725
makesysrw: Current size of vendor_a.img in 512-byte sectors: 1486192

makesysrw: Increasing filesystem size of vendor_a.img to 1857740 512-byte sector
s...
resize2fs 1.44.4 (18-Aug-2018)
Resizing the filesystem on /data/local/tmp/makesysrw_1.21/files/super/vendor_a.i
mg to 232217 (4k) blocks.
The filesystem on /data/local/tmp/makesysrw_1.21/files/super/vendor_a.img is now
232217 (4k) blocks long.

makesysrw: The filesystem of vendor_a.img was successfully resized
makesysrw: Removing 'shared_blocks feature' of vendor_a.img...
e2fsck 1.44.4 (18-Aug-2018)
makesysrw: Read-only lock of vendor_a.img successfully removed

makesysrw: Shrinking size of vendor_a.img back to minimum size...
resize2fs 1.44.4 (18-Aug-2018)
Resizing the filesystem on /data/local/tmp/makesysrw_1.21/files/super/vendor_a.i
mg to 187774 (4k) blocks.
The filesystem on /data/local/tmp/makesysrw_1.21/files/super/vendor_a.img is now
187774 (4k) blocks long.

makesysrw: Current size of vendor_a.img in bytes: 769122304
makesysrw: Current size of vendor_a.img in MB: 733
makesysrw: Current size of vendor_a.img in 512-byte sectors: 1502192

makesysrw: Custom size of vendor_a.img in bytes: 873979904
makesysrw: Custom size of vendor_a.img in MB: 833
makesysrw: Custom size of vendor_a.img in 512-byte sectors: 1706992

makesysrw: Increasing filesystem size of vendor_a.img to 1706992 512-byte sector
s...
resize2fs 1.44.4 (18-Aug-2018)
Resizing the filesystem on /data/local/tmp/makesysrw_1.21/files/super/vendor_a.i
mg to 213374 (4k) blocks.
The filesystem on /data/local/tmp/makesysrw_1.21/files/super/vendor_a.img is now
213374 (4k) blocks long.

makesysrw: The filesystem of vendor_a.img was successfully resized
makesysrw: Current size of vendor_a.img in bytes: 873979904
makesysrw: Current size of vendor_a.img in MB: 833
makesysrw: Current size of vendor_a.img in 512-byte sectors: 1706992

========================================================================

makesysrw: Current size of vendor_b.img in bytes: 0
makesysrw: Current size of vendor_b.img in MB: 0
makesysrw: Current size of vendor_b.img in 512-byte sectors: 0
./tools/bin/tune2fs: Attempt to read block from filesystem resulted in short rea
d while trying to open /data/local/tmp/makesysrw_1.21/files/super/vendor_b.img
Couldn't find valid filesystem superblock.
makesysrw: Current size of vendor_b.img in bytes: 0
makesysrw: Current size of vendor_b.img in MB: 0
makesysrw: Current size of vendor_b.img in 512-byte sectors: 0

========================================================================

makesysrw: Current size of product_a.img in bytes: 2896654336
makesysrw: Current size of product_a.img in MB: 2762
makesysrw: Current size of product_a.img in 512-byte sectors: 5657528

makesysrw: Increasing filesystem size of product_a.img to 7071910 512-byte secto
rs...
resize2fs 1.44.4 (18-Aug-2018)
Resizing the filesystem on /data/local/tmp/makesysrw_1.21/files/super/product_a.
img to 883988 (4k) blocks.
The filesystem on /data/local/tmp/makesysrw_1.21/files/super/product_a.img is no
w 883988 (4k) blocks long.

makesysrw: The filesystem of product_a.img was successfully resized
makesysrw: Removing 'shared_blocks feature' of product_a.img...
e2fsck 1.44.4 (18-Aug-2018)
makesysrw: Read-only lock of product_a.img successfully removed

makesysrw: Shrinking size of product_a.img back to minimum size...
resize2fs 1.44.4 (18-Aug-2018)
Resizing the filesystem on /data/local/tmp/makesysrw_1.21/files/super/product_a.
img to 716579 (4k) blocks.
The filesystem on /data/local/tmp/makesysrw_1.21/files/super/product_a.img is no
w 716579 (4k) blocks long.

makesysrw: Current size of product_a.img in bytes: 2935107584
makesysrw: Current size of product_a.img in MB: 2799
makesysrw: Current size of product_a.img in 512-byte sectors: 5732632

makesysrw: Custom size of product_a.img in bytes: 3039965184
makesysrw: Custom size of product_a.img in MB: 2899
makesysrw: Custom size of product_a.img in 512-byte sectors: 5937432

makesysrw: Increasing filesystem size of product_a.img to 5937432 512-byte secto
rs...
resize2fs 1.44.4 (18-Aug-2018)
Resizing the filesystem on /data/local/tmp/makesysrw_1.21/files/super/product_a.
img to 742179 (4k) blocks.
The filesystem on /data/local/tmp/makesysrw_1.21/files/super/product_a.img is no
w 742179 (4k) blocks long.

makesysrw: The filesystem of product_a.img was successfully resized
makesysrw: Current size of product_a.img in bytes: 3039965184
makesysrw: Current size of product_a.img in MB: 2899
makesysrw: Current size of product_a.img in 512-byte sectors: 5937432

========================================================================

makesysrw: Current size of product_b.img in bytes: 0
makesysrw: Current size of product_b.img in MB: 0
makesysrw: Current size of product_b.img in 512-byte sectors: 0
./tools/bin/tune2fs: Attempt to read block from filesystem resulted in short rea
d while trying to open /data/local/tmp/makesysrw_1.21/files/super/product_b.img
Couldn't find valid filesystem superblock.
makesysrw: Current size of product_b.img in bytes: 0
makesysrw: Current size of product_b.img in MB: 0
makesysrw: Current size of product_b.img in 512-byte sectors: 0

========================================================================

makesysrw: Joining all extracted images back into one single super image...
makesysrw: Please wait and ignore the invalid sparse warnings...


makesysrw: Error! failed to create super_fixed.img file
Check this out
adb shell "ls -Alg /dev/block/by-name | grep 'super'"
What is the available space in the phone? I see ten gigabytes
 
Last edited:
  • Haha
Reactions: lebigmac
Check this out

What is the available space in the phone? I see ten gigabytes
It's 128GB internal, 118GB free. But check this....


Microsoft Windows [Version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.

C:\Minimal ADB and Fastboot>adb shell "ls -Alg /dev/block/by-name | grep 'super'
"
lrwxrwxrwx 1 root 16 1970-03-06 07:05 super -> /dev/block/sde26

C:\Minimal ADB and Fastboot>
 
  • Like
Reactions: Facebooook

nttuan

Member
Jan 26, 2018
26
3
Dear Mr. @lebigmac ,

I run 1.21 and have the same issue.

makesysrw: Joining all extracted images back into one single super image...
makesysrw: Please wait and ignore the invalid sparse warnings...


makesysrw: Error! failed to create super_fixed.img file

I think the problem in the lpmake process. Maybe my phone super partition has a difference with the Xiaomi phone one.

Thanks for your effort!!!

--metadata-size 65536 --super-name super --sparse
--output /super_fixed.bin --device super:8183087104 --group qti_dynamic_partitions:8178892800
--image vendor=/vendor.img --partition vendor:none:1527885824:qti_dynamic_partitions
--image system=/system.img --partition system:none:5992308736:qti_dynamic_partitions
--image oppo_product=/oppo_product.img --partition oppo_product:none:146124800:qti_dynamic_partitions
--image version.19728=/version.19728.img --partition version.19728:none:105263104:qti_dynamic_partitions
--image version.19722=/version.19722.img --partition version.19722:none:105263104:qti_dynamic_partitions
--image version.19726=/version.19726.img --partition version.19726:none:105263104:qti_dynamic_partitions
--image preload_common=/preload_common.img --partition preload_common:none:424120320:qti_dynamic_partitions
--image version.19720=/version.19720.img --partition version.19720:none:105263104:qti_dynamic_partitions
--image version.19721=/version.19721.img --partition version.19721:none:105263104:qti_dynamic_partitions
--image engineering=/engineering.img --partition engineering:none:105082880:qti_dynamic_partitions
--metadata-slots 2


engineering.img 105,082,880
oppo_product.img 146,124,800
preload_common.img 424,120,320
system.img 5,992,308,736
vendor.img 1,527,885,824
version.19720.img 105,263,104
version.19721.img 105,263,104
version.19722.img 105,263,104
version.19726.img 105,263,104
version.19728.img 105,263,104
 
Last edited:
  • Wow
Reactions: lebigmac

lebigmac

Senior Member
Jan 31, 2017
873
507
Could you make this magisk compatible? Is that a possibility instead of using terminal for non twrp users
Hi. Thanks for your suggestion I'll look into it.

Guys I just noticed a small error thanks to the valuable feedback by @nttuan and @Articul8Madness
Hotfix coming tomorrow ;)

I fixed first annoying lpmake error and introduced brand new one :D

I wonder why it worked on my device though...
 
Last edited:

nttuan

Member
Jan 26, 2018
26
3
I tried version 1.22 and still the same issue. Please see the attached files.
 

Attachments

  • lpdump.txt
    3.2 KB · Views: 10
  • myargs.txt
    1.6 KB · Views: 11
  • recovery.log
    34 KB · Views: 12
  • Wow
Reactions: lebigmac

kory-vadim

Member
Dec 12, 2016
17
15
@nttuan can you successfully run lpmake command manually?
Check the excellent Brepro1 tutorial and the excellent AndyYan tutorial on how to do this. Thanks.

@nttuan I have a possible solution for you. Your group size is not large enough to fit all the individual partitions inside in raw format. The solution is to convert all files into sparse before running lpmake command.
This is easier said than done though. I know it's possible because I've done it before in version 1.04 and earlier but right now I'm facing this problem:

Code:
lpmake --metadata-size 65536 --super-name super --metadata-slots 2 --sparse --output ./super_fixed.bin --device super:8589934592 --group qti_dynamic_partitions:8254596872 --image system=./system_sparse.img --partition system:none:2771027928:qti_dynamic_partitions --image product=./product_sparse.img --partition product:none:1186084560:qti_dynamic_partitions --image vendor=./vendor_sparse.img --partition vendor:none:1297484384:qti_dynamic_partitions
lpmake I 04-01 00:13:56 14374 14374 builder.cpp:1012] [liblp]Partition system will resize from 0 bytes to 2771030016 bytes
lpmake I 04-01 00:13:56 14374 14374 builder.cpp:1012] [liblp]Partition product will resize from 0 bytes to 1186086912 bytes
lpmake I 04-01 00:13:56 14374 14374 builder.cpp:1012] [liblp]Partition vendor will resize from 0 bytes to 1297485824 bytes
lpmake E 04-01 00:14:03 14374 14374 images.cpp:338] [liblp]Image for partition 'system' is greater than its size (2887667712, expected 2771030016)
I've already told you several times that you don't need to convert to sparse, because lpmake will still write a raw image to super.img.
Also, why are you merging the super section into a file? It takes time and a lot of space, pull the images directly from the super section.
 

quanqw

Senior Member
Oct 10, 2011
346
23
30
Viet Nam
@nttuan can you successfully run lpmake command manually?
Check the excellent Brepro1 tutorial and the excellent AndyYan tutorial on how to do this. Thanks.

@nttuan I have a possible solution for you. Your group size is not large enough to fit all the individual partitions inside in raw format. The solution is to convert all files into sparse before running lpmake command.
This is easier said than done though. I know it's possible because I've done it before in version 1.04 and earlier but right now I'm facing this problem:

Code:
lpmake --metadata-size 65536 --super-name super --metadata-slots 2 --sparse --output ./super_fixed.bin --device super:8589934592 --group qti_dynamic_partitions:8254596872 --image system=./system_sparse.img --partition system:none:2771027928:qti_dynamic_partitions --image product=./product_sparse.img --partition product:none:1186084560:qti_dynamic_partitions --image vendor=./vendor_sparse.img --partition vendor:none:1297484384:qti_dynamic_partitions
lpmake I 04-01 00:13:56 14374 14374 builder.cpp:1012] [liblp]Partition system will resize from 0 bytes to 2771030016 bytes
lpmake I 04-01 00:13:56 14374 14374 builder.cpp:1012] [liblp]Partition product will resize from 0 bytes to 1186086912 bytes
lpmake I 04-01 00:13:56 14374 14374 builder.cpp:1012] [liblp]Partition vendor will resize from 0 bytes to 1297485824 bytes
lpmake E 04-01 00:14:03 14374 14374 images.cpp:338] [liblp]Image for partition 'system' is greater than its size (2887667712, expected 2771030016)
It don't work on my g8 android 10. It show error: 225.
 

quanqw

Senior Member
Oct 10, 2011
346
23
30
Viet Nam
:/ $ su
# ./makesysrw.sh
-------------------------------------------------------------------------
| makeSystemRW v1.22 automated script by lebigmac @xda 2021 |
| Thanks @Kolibass @Brepro1 @munjeni @AndyYan @gabrielfrias @YOisuPU |
| without your help this script would not be possible! |
------------------------------------------------------------------------
makesysrw: Phone is not in TWRP recovery mode. Ignoring
makesysrw: Initiating procedure...

makesysrw: Unable to locate super partition on device. Ignoring
makesysrw: Partition detected: product_a @ /dev/block/sda26
makesysrw: Dumping product_a to: /data/local/tmp/makesysrw_1.22/files/nosuper/product_a.img
4194304+0 records in
4194304+0 records out
2147483648 bytes (2.0 G) copied, 29.128942 s, 70 M/s
makesysrw: Successfully dumped product_a

makesysrw: Current size of product_a.img in bytes: 2147483648
makesysrw: Current size of product_a.img in MB: 2048
makesysrw: Current size of product_a.img in 512-byte sectors: 4194304

makesysrw: Increasing filesystem size of product_a.img to 5242880 512-byte sectors...
resize2fs 1.44.4 (18-Aug-2018)
Resizing the filesystem on /data/local/tmp/makesysrw_1.22/files/nosuper/product_a.img to 655360 (4k) blocks.
The filesystem on /data/local/tmp/makesysrw_1.22/files/nosuper/product_a.img is now 655360 (4k) blocks long.

makesysrw: The filesystem of product_a.img was successfully resizedmakesysrw: Removing 'shared_blocks feature' of product_a.img...
e2fsck 1.44.4 (18-Aug-2018)
makesysrw: Read-only lock of product_a.img successfully removed

makesysrw: Shrinking size of product_a.img back to minimum size...
resize2fs 1.44.4 (18-Aug-2018)
Resizing the filesystem on /data/local/tmp/makesysrw_1.22/files/nosuper/product_a.img to 472989 (4k) blocks.
The filesystem on /data/local/tmp/makesysrw_1.22/files/nosuper/product_a.img is now 472989 (4k) blocks long.

makesysrw: Current size of product_a.img in bytes: 1937362944
makesysrw: Current size of product_a.img in MB: 1847
makesysrw: Current size of product_a.img in 512-byte sectors: 3783912

========================================================================

makesysrw: Please reboot into bootloader and flash the file(s) manually
makesysrw: Partition detected: product_b @ /dev/block/sda27
makesysrw: Dumping product_b to: /data/local/tmp/makesysrw_1.22/files/nosuper/product_b.img
4194304+0 records in
4194304+0 records out
2147483648 bytes (2.0 G) copied, 27.364214 s, 75 M/s
makesysrw: Successfully dumped product_b

makesysrw: Current size of product_b.img in bytes: 2147483648
makesysrw: Current size of product_b.img in MB: 2048
makesysrw: Current size of product_b.img in 512-byte sectors: 4194304
./tools/bin/tune2fs: Bad magic number in super-block while trying to open /data/local/tmp/makesysrw_1.22/files/nosuper/product_b.img
makesysrw: Current size of product_b.img in bytes: 2147483648
makesysrw: Current size of product_b.img in MB: 2048
makesysrw: Current size of product_b.img in 512-byte sectors: 4194304

========================================================================

makesysrw: Please reboot into bootloader and flash the file(s) manually
makesysrw: Partition detected: system_a @ /dev/block/sda24
makesysrw: Dumping system_a to: /data/local/tmp/makesysrw_1.22/files/nosuper/system_a.img
7856128+0 records in
7856128+0 records out
4022337536 bytes (3.7 G) copied, 54.771102 s, 70 M/s
makesysrw: Successfully dumped system_a

makesysrw: Current size of system_a.img in bytes: 4022337536
makesysrw: Current size of system_a.img in MB: 3836
makesysrw: Current size of system_a.img in 512-byte sectors: 7856128

makesysrw: Increasing filesystem size of system_a.img to 9820160 512-byte sectors...
resize2fs 1.44.4 (18-Aug-2018)
Resizing the filesystem on /data/local/tmp/makesysrw_1.22/files/nosuper/system_a.img to 1227520 (4k) blocks.
The filesystem on /data/local/tmp/makesysrw_1.22/files/nosuper/system_a.img is now 1227520 (4k) blocks long.

makesysrw: The filesystem of system_a.img was successfully resized
makesysrw: Removing 'shared_blocks feature' of system_a.img...
e2fsck 1.44.4 (18-Aug-2018)
makesysrw: Read-only lock of system_a.img successfully removed

makesysrw: Shrinking size of system_a.img back to minimum size...
resize2fs 1.44.4 (18-Aug-2018)
Resizing the filesystem on /data/local/tmp/makesysrw_1.22/files/nosuper/system_a.img to 680479 (4k) blocks.
The filesystem on /data/local/tmp/makesysrw_1.22/files/nosuper/system_a.img is now 680479 (4k) blocks long.

makesysrw: Current size of system_a.img in bytes: 2787241984
makesysrw: Current size of system_a.img in MB: 2658
makesysrw: Current size of system_a.img in 512-byte sectors: 5443832

========================================================================

makesysrw: Please reboot into bootloader and flash the file(s) manually
makesysrw: Partition detected: system_b @ /dev/block/sda25
makesysrw: Dumping system_b to: /data/local/tmp/makesysrw_1.22/files/nosuper/system_b.img
7856128+0 records in
7856128+0 records out
4022337536 bytes (3.7 G) copied, 53.732777 s, 71 M/s
makesysrw: Successfully dumped system_b

makesysrw: Current size of system_b.img in bytes: 4022337536
makesysrw: Current size of system_b.img in MB: 3836
makesysrw: Current size of system_b.img in 512-byte sectors: 7856128

makesysrw: Increasing filesystem size of system_b.img to 9820160 512-byte sectors...
resize2fs 1.44.4 (18-Aug-2018)
Resizing the filesystem on /data/local/tmp/makesysrw_1.22/files/nosuper/system_b.img to 1227520 (4k) blocks.
The filesystem on /data/local/tmp/makesysrw_1.22/files/nosuper/system_b.img is now 1227520 (4k) blocks long.

makesysrw: The filesystem of system_b.img was successfully resized
makesysrw: Removing 'shared_blocks feature' of system_b.img...
e2fsck 1.44.4 (18-Aug-2018)
makesysrw: Read-only lock of system_b.img successfully removed

makesysrw: Shrinking size of system_b.img back to minimum size...
resize2fs 1.44.4 (18-Aug-2018)
Resizing the filesystem on /data/local/tmp/makesysrw_1.22/files/nosuper/system_b.img to 224148 (4k) blocks.
The filesystem on /data/local/tmp/makesysrw_1.22/files/nosuper/system_b.img is now 224148 (4k) blocks long.

makesysrw: Current size of system_b.img in bytes: 918110208
makesysrw: Current size of system_b.img in MB: 875
makesysrw: Current size of system_b.img in 512-byte sectors: 1793184

========================================================================

makesysrw: Please reboot into bootloader and flash the file(s) manually
makesysrw: Partition detected: vendor_a @ /dev/block/sda22
makesysrw: Dumping vendor_a to: /data/local/tmp/makesysrw_1.22/files/nosuper/vendor_a.img
3481600+0 records in
3481600+0 records out
1782579200 bytes (1.6 G) copied, 23.576392 s, 72 M/s
makesysrw: Successfully dumped vendor_a

makesysrw: Current size of vendor_a.img in bytes: 1782579200
makesysrw: Current size of vendor_a.img in MB: 1700
makesysrw: Current size of vendor_a.img in 512-byte sectors: 3481600

makesysrw: Increasing filesystem size of vendor_a.img to 4352000 512-byte sectors...
resize2fs 1.44.4 (18-Aug-2018)
Resizing the filesystem on /data/local/tmp/makesysrw_1.22/files/nosuper/vendor_a.img to 544000 (4k) blocks.
The filesystem on /data/local/tmp/makesysrw_1.22/files/nosuper/vendor_a.img is now 544000 (4k) blocks long.

makesysrw: The filesystem of vendor_a.img was successfully resized
makesysrw: Removing 'shared_blocks feature' of vendor_a.img...
e2fsck 1.44.4 (18-Aug-2018)
makesysrw: There was a problem removing the read-only lock of vendor_a.img
1|:/data/local/tmp/makesysrw_1.22 #
Can you please post screenshots and a copy of the lpdump.txt and the myargs.txt files in the folder. Also, do you have TWRP or did you flash it through fastboot. Thanks!
I run it via terminal.
 
  • Wow
Reactions: lebigmac

lebigmac

Senior Member
Jan 31, 2017
873
507
I've already told you several times that you don't need to convert to sparse, because lpmake will still write a raw image to super.img.
Also, why are you merging the super section into a file? It takes time and a lot of space, pull the images directly from the super section.

@kory-vadim you are absolutely right. Lpmake will automatically convert from sparse to raw before writing new super_fixed.bin so there is no point in using img2simg before running lpmake. I can confirm this.

The reason why I am dumping original super partition to image file on local storage is for backup purposes before new super_fixed.bin is flashed irreversibly to block device. Feel free to deactivate the dd function if you want ;)

@quanqw thanks for your log. It's looking good. Apparently system_a.img and system_b.img have been successfully patched. Did you try flashing them yet in fastboot?
Please make a backup of the original files first.

For flashing you can do
Bash:
adb pull /data/local/tmp/makesysrw_1.22/files/nosuper
adb reboot bootloader
fastboot flash system_a ./system_a.img
fastboot flash system_b ./system_b.img
 
Last edited:

quanqw

Senior Member
Oct 10, 2011
346
23
30
Viet Nam
@quanqw thanks for your log. It's looking good. Apparently system_a.img and system_b.img have been successfully patched. Did you try flashing them yet in fastboot?
Please make a backup of the original files first. For some reason my script forgot to backup your original files.

You can make backup like this
dd if=/dev/block/sda25 of=./system_b_original.img
This is my error.
Code:
makesysrw: The filesystem of vendor_a.img was successfully resized

makesysrw: Removing 'shared_blocks feature' of vendor_a.img...

e2fsck 1.44.4 (18-Aug-2018)

makesysrw: There was a problem removing the read-only lock of vendor_a.img
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 2
    is there any tutorial on how to use sysrw_repair_v1.32 ? :

    1- Sorry for spamming the thread.
    2- Thank you Keven11 and lebigmac
    3- Finally I got it, first flashed the stock rom (android 11) and started it just to create the /data/media/ folder. Right after that I turned off the device, flashed the twrp and magisk, and placed the systemrw_1.32 in the /data/local/tmp/ folder. I started the script from the twrp terminal "sh /data/local/tmp/systemrw_1.32/systemrw.sh size=15. After getting the error "73" screen, I started sysrw_repair_v1.32 in vmware emulating linux mint... And everything went really well! :)

    View attachment 5425517
    It is definitely a journey. Well worth the work, and time invested in then end. Also, it helps many people understand their devices just that much more. I am glad that you were successful.

    Also, everytime a person manages to get this to work for themselves, and explains how they did. That alone helps many others. So thank you for putting in the work, and sharing your experience.
    2
    1- Sorry for spamming the thread.
    2- Thank you Keven11 and lebigmac
    3- Finally I got it, first flashed the stock rom (android 11) and started it just to create the /data/media/ folder. Right after that I turned off the device, flashed the twrp and magisk, and placed the systemrw_1.32 in the /data/local/tmp/ folder. I started the script from the twrp terminal "sh /data/local/tmp/systemrw_1.32/systemrw.sh size=15. After getting the error "73" screen, I started sysrw_repair_v1.32 in vmware emulating linux mint... And everything went really well! :)

    c74256c2706c6e8f74e5858e4aa85f57.gif
    2
    Thanks. But you can tell in more detail. Where to get the super_original.bin and super_fix files. Please write detailed instructions.
    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!
    1
    Hola, [USER = 11816235] @Ricardo Cruz [/ USER]. Envíeme sus archivos de registro desde esta carpeta. Gracias.
    /data/local/tmp/systemrw_1.32/log / [/ ICODE] Simplemente conecte el teléfono a la computadora usando un cable usb-c a usb-a. [URL='https://forum.xda-developers.com/t/script-android-10-universal-mount-system-read-write-r-w.4247311/page-23#post-84901531'][B]Aquí[/B][/URL] puede encontrar las instrucciones oficiales del script de reparación de resolución de problemas (solo Linux). [/QUOTE] Hello, sorry for the delay, I imagine that these are the files that you ask me [/QUOTE]
    1
    I had a error with previous version about cow error. But with last version, no cow error. The script worked! Thx again ;)
  • 101
    If you can't get this script to work on your device check out the brand new sophisticated superrepack tool by @munjeni


    logo_large.jpg

    *NEW* SystemRW v1.32 *NEW*
    automated bash script by lebigmac for Android 10 and above

    Creation date: February 2021
    Updated: August 2021

    Requirements:
    • rooted STOCK Android 10 or newer (custom ROM should already be R/W!)
    • at least 10+ 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've got 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've got 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.

    NOTE:
    • Extract BUNDLE.zip (the included sysrw_repair.zip is only for fixing error 73!)
    • Before launching script make sure you've got full read/write access to the /data partition by first decrypting and then mounting /data partition as R/W!
    • The script can be run both inside custom recovery and inside Android operating system.
      If you run script in Android mode you will need to fastboot flash the patched image(s) manually!
    • 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"
    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 then save the file. 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.bin and want to skip that process next time you install the .zip then put this in line #2 of config.ini :
    in=`ls -l /dev/block/by-name/super | awk '{print $NF}'` 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 (see examples below).
    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.
    Optional script arguments:
    Replace x with your custom value
    • in=x *THIS IS IGNORED IF YOU'VE GOT 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'VE GOT 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'VE GOT 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:
    Bash:
    adb shell
    su
    cd /data/local/tmp/systemrw_1.32
    chmod +x ./systemrw.sh
    
    # Run this command *IF YOU'VE GOT NO SUPER PARTITION*
    ./systemrw.sh
    
    # Run this command if you're first time user *AND YOU'VE GOT 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'VE GOT 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'VE GOT SUPER PARTITION*
    ./systemrw.sh in=./img/super_original.bin out=./custom/path/super_fixed.bin size=15
    
    # EXPERT EXAMPLE:
    ./systemrw.sh in=`ls -l /dev/block/by-name/super | awk '{print $NF}'` out=./img/super_fixed.bin size=50

    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 to:
    /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!
    If you experience bootloop after successfully flashing super_fixed.bin then your device probably has additional protection features that prevent it from booting modified super images. Try to undo bootloop simply by flashing original stock super image. You might have to flash stock vbmeta as well. Good luck!

    About:
    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). Therefore 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 5GB 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. It's still part of the troubleshooting repair script to fix error 73.
    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:
    #Disclaimer v2.0​
    This open source software 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 that may ensue 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.
    • Under no circumstances shall the comments & title section of the script (lines #1 - #65) as well as the included update-binary be modified or removed by the end-user without the original author's explicit consent.
    • Under no circumstances shall any files included in this project be re-uploaded to 3rd party websites without the original author's explicit consent. That means NO RE-UPLOADS of my files please! Thank you!
    • Under no circumstances shall the end-user disrespect, abuse or steal my project for his own disturbed purposes! The end-user also agrees not to steal my program logo or program name or the names of my functions and variables (and more) only to re-publish them as his/her own without even mentioning the original source.
    • The end-user is encouraged to improve the underlying algorithm (as long as no malicious code is added) and post his/her modifications, results and feedback right here in the official SystemRW project thread @ xda-developers.com
    • If the end-user wants to re-publish my work in his/her own project then he/she shall first ask me (the original author) for permission.
      If you want to make a video tutorial about my script please contact me first!
      Thank you! I can give you high resolution project logo and more!

    Please make sure to post your feedback and suggestions in the official thread right here.
    Enjoy customizing your fully read/write-able Android device! And feel free to share your Android system mods with other users in this thread! Thanks!


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


    1-jpg.5235933


    Confirmed working on these devices :

    Download v1.32 mirror #1
    Download v1.32 mirror #2
    current status:
    experimental
    If you like this project and want to support further development of this project & the creation of more amazing projects like this then please feel free to donate to the developer by clicking the link below. Thanks! Your support is very much appreciated!

    Donate
    9
    If the script works on your device please send me your log files from this folder:
    /data/local/tmp/systemrw_1.32/log/

    Then I can add you to the list of successful devices and it will be helpful for further development. Thank you!
    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). This time I bundled my device's stock sh binary (which I used to develop the script) with the archive. Hopefully this will prevent avoidable sh-related syntax errors for some folks. The flashable zip installer update-binary automatically launches the script with the proper arguments using this bundled sh program (it's inside the tools subfolder).

    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
    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
    Great news! Flashable zip is almost ready! I'll upload it later today. Any volunteers want to beta test the new flashable zip to help me iron out any bugs? Please send me a message. Thanks!

    Installing the script has never been this easy. Simply swipe with finger inside TWRP and it's automatically installed to correct location on your phone.
    Then it checks a config file for any custom script execution arguments and launches the script with these arguments depending on whether or not your phone has a super partition.

    Let me tell you it was not easy to create this flashable zip installer but I had lots of fun learning about this whole flashable zip concept the past few days.