Skip to content

Releases: ChromiumOS-Guy/SuperPatcherGSI

v1.8.7

12 Apr 11:59
84c34fc
Compare
Choose a tag to compare

news:

  1. merged Linux & Windows Python Scripts into one

new features:

  1. the -i and -p flag are merged you can now input a file or a path into the script via the -i flag on the python script
  2. can now skip img manipulation stage

bugs fixed:

  1. when checking for valid path it now checks if directory is valid instead of if its not "" (path != "") which was a hotfix I forgot in.

note:
windows version needs to be executed with the contents provided in the Windows-x86_64.zip in the same directory as the python script

Log (input as file) - Linux(453b1e3):

$ ./SuperPatcherGSI-x86_64.AppImage -i input.img -o output.img -s 2
flags successfully verified and appear to be correct, error code (OK)
============================
        unpacking...
============================
Sparse image detected.
Process conversion to non sparse image ....[ok]
Extracting partition [vendor_a] .... [ok]
Extracting partition [system_a] .... [ok]
============================
      img manipulation 
============================
Replace/Delete/Add (Y/n): n
============================
device size (super.img size) in bytes must be evenly divisible by 512, default (6892830720) bytes: 
metadata size in bytes must be evenly divisible by 512 default=~0.5KiB: 
make sparse (flashable with fastboot) ? (Y/n): 
============================
    using these flags:
============================
 --device-size=6892830720 --metadata-slots=2 --output output.img --metadata-size 512000 --sparse --partition=vendor_a:none:3443855360 --image=vendor_a=/home/ChromiumOS-Guy/Work/AppImages/.temp/vendor_a.img --partition=system_a:none:3443855360 --image=system_a=/home/ChromiumOS-Guy/Work/AppImages/.temp/system_a.img
============================
04-12 14:55:57.534 57807 57807 I lpmake  : builder.cpp:1093 [liblp] Partition vendor_a will resize from 0 bytes to 3443855360 bytes
04-12 14:55:57.534 57807 57807 I lpmake  : builder.cpp:1093 [liblp] Partition system_a will resize from 0 bytes to 3443855360 bytes
Invalid sparse file format at header magic
Invalid sparse file format at header magic
============================
        cleaning...
============================
OK

v1.6.6

13 Feb 13:09
b1fea51
Compare
Choose a tag to compare

news:
1. Ported Linux Version To Windows

bugs fixed:
1. when choosing options in img manipulation choosing a character instead of a number would result in an loop that's now fixed
2. when choosing a empty folder with the -p flag img manipulation options would still let you choose option
1&2 which would get you stuck and necessitate termination of script

note:
no example log as it behaves exactly like v1.6.4
windows version needs to be executed with the contents provided:
lpmake.exe, lpunpack.exe and cygwin1.dll
in the same directory as the python script

v1.6.4

23 Aug 01:02
05122c9
Compare
Choose a tag to compare

new features:

  1. the input flag (-i) can now take both directories and .img files

bugs fixed:

  1. now catches KeyboardInterrupt so when you cancel it firsts cleans .temp then exits

note:
no example log as it behaves exactly like v1.5.3

v1.5.3

07 Aug 12:10
5ad4733
Compare
Choose a tag to compare

Binaries where updated to latest release:
(https://ci.android.com/builds/submitted/10448490/aosp_cf_x86_64_phone-bazel_disabled/latest/cvd-host_package.tar.gz)

new features:

  1. ability to delete an IMG
  2. ability to add an blank IMG

bugs fixed:

  1. totalsize = 512000000 -> totalsize = 5120000 was not necessary to be 0.5G idk why it was that large

changes:

  1. changed tmp to .temp (less likely to interfere with existing file structure)

example log:

$ ./SuperPatcherGSI-x86_64.AppImage -i super.img -o output.img -s 2
flags successfully verified and appear to be correct, error code (OK)
============================
        unpacking...
============================
Sparse image detected.
Process conversion to non sparse image ....[ok]
Extracting partition [product_a] .... [ok]
Extracting partition [product_b] .... [ok]
Extracting partition [system_a] .... [ok]
Extracting partition [system_b] .... [ok]
Extracting partition [vendor_a] .... [ok]
Extracting partition [vendor_b] .... [ok]
============================
  img manipulation 
============================
Chosse Operation:
1. Delete Partition
2. Replace Partition
3. Add Partition
select: 3
Input Partition Name: test
Input Partition Size: 0
name: test
size: 0
Is This Correct? (Y/n): 
0+0 records in
0+0 records out
0 bytes copied, 0.000343481 s, 0.0 kB/s
Replace/Delete/Add another (Y/n): y
Chosse Operation:
1. Delete Partition
2. Replace Partition
3. Add Partition
select: 1
option number 0 product_a.img size of (1810976768) bytes
option number 1 product_b.img size of (0) bytes
option number 2 vendor_b.img size of (0) bytes
option number 3 system_a.img size of (3871707136) bytes
option number 4 vendor_a.img size of (1148772352) bytes
option number 5 system_b.img size of (765292544) bytes
option number 6 test.img size of (0) bytes
Please Choose: 6
Partition Deleted!
Replace/Delete/Add another (Y/n): y
Chosse Operation:
1. Delete Partition
2. Replace Partition
3. Add Partition
select: 2
option number 0 product_a.img size of (1810976768) bytes
option number 1 product_b.img size of (0) bytes
option number 2 vendor_b.img size of (0) bytes
option number 3 system_a.img size of (3871707136) bytes
option number 4 vendor_a.img size of (1148772352) bytes
option number 5 system_b.img size of (765292544) bytes
Please Choose: 3
Please Input Path To Replacment Partition:
/home/ChromiumOS-Guy/Desktop/lineage-20.0-20230715-UNOFFICIAL-gsi_arm64_vN.img 
Are you sure this is the path to file (Y/n): 
Partition Replaced!
Replace/Delete/Add another (Y/n): 
============================
device size (super.img size) in bytes must be evenly divisible by 512, default (6529925120) bytes: 
metadata size in bytes must be evenly divisible by 512 default=~0.5KiB: 
make sparse (flashable with fastboot) ? (Y/n): 
============================
    using these flags:
============================
 --device-size=6529925120 --metadata-slots=2 --output output.img --metadata-size 512000 --sparse --partition=product_a:none:1810976768 --image=product_a=/home/ChromiumOS-Guy/Desktop/.temp/product_a.img --partition=product_b:none:0 --partition=vendor_b:none:0 --partition=system_a:none:2799763456 --image=system_a=/home/ChromiumOS-Guy/Desktop/.temp/system_a.img --partition=vendor_a:none:1148772352 --image=vendor_a=/home/ChromiumOS-Guy/Desktop/.temp/vendor_a.img --partition=system_b:none:765292544 --image=system_b=/home/ChromiumOS-Guy/Desktop/.temp/system_b.img
============================
08-07 17:20:13.580 78066 78066 I lpmake  : builder.cpp:1093 [liblp] Partition product_a will resize from 0 bytes to 1810976768 bytes
08-07 17:20:13.580 78066 78066 I lpmake  : builder.cpp:1093 [liblp] Partition system_a will resize from 0 bytes to 2799763456 bytes
08-07 17:20:13.580 78066 78066 I lpmake  : builder.cpp:1093 [liblp] Partition vendor_a will resize from 0 bytes to 1148772352 bytes
08-07 17:20:13.580 78066 78066 I lpmake  : builder.cpp:1093 [liblp] Partition system_b will resize from 0 bytes to 765292544 bytes
Invalid sparse file format at header magic
Invalid sparse file format at header magic
Invalid sparse file format at header magic
Invalid sparse file format at header magic
============================
        cleaning...
============================
OK

v1.3.2

06 Jun 13:21
cba1336
Compare
Choose a tag to compare

Binaries where updated to latest release:
(https://ci.android.com/builds/submitted/10267132/aosp_cf_x86_64_phone-userdebug/latest/cvd-host_package.tar.gz)

new features:

  1. added exceptions
  2. can now replace more than one partition
  3. calculate size flag unless user input

bugs fixed:

  1. ValueErrors in Flags would crash script.
  2. fixed string editing so partitions with . in the name won't get cut in half because it recognizes as an extension, example:
    old:
    partition.name.img --> partition
    new:
    partition.name.img --> partition.name

example log:

$ ./SuperPatcherGSI-x64.AppImage -i super.img -o test.img -s 2 
flags successfully verified and appear to be correct, error code (OK)
============================
        unpacking...
============================
Sparse image detected.
Process conversion to non sparse image ....[ok]
Extracting partition [product_a] .... [ok]
Extracting partition [product_b] .... [ok]
Extracting partition [system_a] .... [ok]
Extracting partition [system_b] .... [ok]
Extracting partition [vendor_a] .... [ok]
Extracting partition [vendor_b] .... [ok]
============================
  choose img to replace 
============================
option number 0 product_a.img size of (1810976768) bytes
option number 1 system_a.img size of (3878178816) bytes
option number 2 product_b.img size of (0) bytes
option number 3 vendor_a.img size of (1150812160) bytes
option number 4 vendor_b.img size of (0) bytes
option number 5 system_b.img size of (764735488) bytes
Please Choose: 1
Please Input Path To Replacment Partition:
/home/chromiumos/example_log/lineage-19.1-20221122-UNOFFICIAL-arm64_bvS.img 
Are you sure this is the path to file (Y/n): y
Img replaced!
replace another (Y/n): n
============================
device size (super.img size) in bytes must be evenly divisible by 512, default (6324903936) bytes: 
metadata size in bytes must be evenly divisible by 512 default=~0.5KiB: 
make sparse (flashable with fastboot) ? (Y/n): 
============================
    using these flags:
============================
 --device-size=6324903936 --metadata-slots=2 --output test.img --metadata-size 512000 --sparse --partition=product_a:none:1810976768 --image=product_a=/home/chromiumos/example_log/tmp/product_a.img --partition=system_a:none:2086379520 --image=system_a=/home/chromiumos/example_log/tmp/system_a.img --partition=product_b:none:0 --partition=vendor_a:none:1150812160 --image=vendor_a=/home/chromiumos/example_log/tmp/vendor_a.img --partition=vendor_b:none:0 --partition=system_b:none:764735488 --image=system_b=/home/chromiumos/example_log/tmp/system_b.img
============================
lpmake I 06-06 18:37:47 70727 70727 builder.cpp:1093] [liblp] Partition product_a will resize from 0 bytes to 1810976768 bytes
lpmake I 06-06 18:37:47 70727 70727 builder.cpp:1093] [liblp] Partition system_a will resize from 0 bytes to 2086379520 bytes
lpmake I 06-06 18:37:47 70727 70727 builder.cpp:1093] [liblp] Partition vendor_a will resize from 0 bytes to 1150812160 bytes
lpmake I 06-06 18:37:47 70727 70727 builder.cpp:1093] [liblp] Partition system_b will resize from 0 bytes to 764735488 bytes
Invalid sparse file format at header magic
Invalid sparse file format at header magic
Invalid sparse file format at header magic
Invalid sparse file format at header magic
============================
        cleaning...
============================
OK