diff --git a/.github/workflows/dump.yml b/.github/workflows/dump.yml index ea238ee..2b37ee4 100644 --- a/.github/workflows/dump.yml +++ b/.github/workflows/dump.yml @@ -31,7 +31,7 @@ jobs: - name: Upload release assets uses: ncipollo/release-action@v1 with: - artifacts: out/*.zip* + artifacts: out/*.7z* artifactErrorsFailBuild: true body: ${{ steps.dump.outputs.body }} tag: ${{ steps.dump.outputs.tag }}_${{ github.event.inputs.name }} diff --git a/README.md b/README.md index 66d1db6..47a9773 100644 --- a/README.md +++ b/README.md @@ -2,34 +2,38 @@ * Unmodified Nothing Phone 2 OTA images archive ## Downloads -Downloads are tagged with `POST_OTA_VERSION`, NothingOS version and region, [here](https://github.com/arter97/nothing_archive/releases). +Downloads are tagged with `POST_OTA_VERSION`, NothingOS version, +[here](https://github.com/arter97/nothing_archive/releases). + +Logical partition images are uploaded separately, marked `-logical`, +so that other images can be downloaded quickly if needed. ## Usage While this is a collection of unmodified images, you still need to have the bootloader unlocked. -Please download and use the latest fastboot [directly from Google](https://developer.android.com/tools/releases/platform-tools). - - * **Magisk** +You can re-lock the bootloader after flashing images. - If you're interested in just rooting your device, download `boot.img.zip` and `vbmeta.img.zip`. After extracting both zip files, push `boot.img` to your device and proceed with Magisk installation. Optionally, if you want to disable `dm-verity`, use fastboot to flash a modified vbmeta: - - ``` bash - fastboot flash --disable-verity --disable-verification vbmeta vbmeta.img - ``` +Please download and use the latest fastboot [directly from Google](https://developer.android.com/tools/releases/platform-tools). * **fastboot** -To flash the stock, unmodified images with fastboot, extract the `*.zst` files using zstd and extract the split zip files using 7z, and supply the final `fastboot-*-image.zip` to fastboot. +To flash the stock, unmodified images with fastboot, extract the files using 7z and +use [Pong_fastboot_flasher](https://github.com/HELLBOY017/Pong_fastboot_flasher). + +If you optionally want to have `dm-verity` disabled, perform: ``` bash -fastboot update /path/to/fastboot-*-image.zip +fastboot update --disable-verity --disable-verification vbmeta.img ``` -or if you want to have `dm-verity` disabled: + * **NothingMuchROM** -``` bash -fastboot update --disable-verity --disable-verification /path/to/fastboot-*-image.zip -``` +You can use this repository to flash non-super partitions to the latest stock to be +used with [NothingMuchROM](https://xdaforums.com/t/nothingmuchrom-for-nothing-phone-2.4623411). + +Skip downloading `-logical` files, and follow the above steps but answer "N" to +`Flash logical partition images?` during [Pong_fastboot_flasher](https://github.com/HELLBOY017/Pong_fastboot_flasher)'s +installation. ### Thanks to -[luk1337](https://github.com/luk1337/oplus_archive) \ No newline at end of file +[luk1337](https://github.com/luk1337/oplus_archive) diff --git a/dump.sh b/dump.sh index e6f1571..e27b575 100755 --- a/dump.sh +++ b/dump.sh @@ -6,7 +6,7 @@ aria2c -x5 $1 -o ota.zip unzip ota.zip payload.bin mv payload.bin payload_working.bin TAG="`unzip -p ota.zip payload_properties.txt | grep ^POST_OTA_VERSION= | cut -b 18-`" -BODY="`unzip -p ota.zip META-INF/com/android/metadata | grep ^post-build= | cut -b 12-`" +BODY="[$TAG]($1) (full)" rm ota.zip mkdir ota ( @@ -21,7 +21,7 @@ for i in ${@:2}; do wait mv payload.bin payload_working.bin TAG="`unzip -p ota.zip payload_properties.txt | grep ^POST_OTA_VERSION= | cut -b 18-`" - BODY="`unzip -p ota.zip META-INF/com/android/metadata | grep ^post-build= | cut -b 12-`" + BODY="$BODY -> [$TAG]($i)" rm ota.zip ( @@ -36,21 +36,19 @@ for i in ${@:2}; do done wait -# Create a pseudo fastboot zip (split 2G, each separately compressed with zstd) -echo "board=taro" > ota/android-info.txt -cp prebuilt/super_empty.img ota/ +# Create a split 7z image mkdir out +mkdir dyn cd ota -7z a -mx9 ../out/boot.img.zip boot.img & -7z a -mx9 ../out/vbmeta.img.zip vbmeta.img & -7z a -mx0 ../out/fastboot-${TAG}-image.zip * +for f in system system_ext product vendor vendor_dlkm odm; do + mv ${f}.img ../dyn +done +7z a -mx6 ../out/${TAG}-image.7z * & +cd ../dyn +7z a -mx6 -v1g ../out/${TAG}-image-logical.7z * wait cd .. -rm -rf ota -cd out -7z a -v2G -mx0 fastboot-${TAG}-image-split.zip *-image.zip -rm *-image.zip -zstd --rm -T0 *-split.zip* +rm -rf ota dyn # Echo tag name and release body echo "tag=$TAG" >> "$GITHUB_OUTPUT" diff --git a/prebuilt/command b/prebuilt/command deleted file mode 100755 index 78bbd48..0000000 --- a/prebuilt/command +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/bash - -SUPER_SIZE=$((7 * 1024 * 1024 * 1024)) -ALIGN=$((4 * 1024 * 1024)) - -lpmake \ - -d $SUPER_SIZE \ - --metadata-size=65536 \ - --metadata-slots=3 \ - --alignment=$ALIGN \ - --alignment-offset=$ALIGN \ - --super-name=super \ - --virtual-ab \ - -g qti_dynamic_partitions_a:$(($SUPER_SIZE - $ALIGN)) \ - -g qti_dynamic_partitions_b:$(($SUPER_SIZE - $ALIGN)) \ - -p odm_a:readonly:0:qti_dynamic_partitions_a \ - -p odm_b:readonly:0:qti_dynamic_partitions_b \ - -p product_a:readonly:0:qti_dynamic_partitions_a \ - -p product_b:readonly:0:qti_dynamic_partitions_b \ - -p system_ext_a:readonly:0:qti_dynamic_partitions_a \ - -p system_ext_b:readonly:0:qti_dynamic_partitions_b \ - -p system_a:readonly:0:qti_dynamic_partitions_a \ - -p system_b:readonly:0:qti_dynamic_partitions_b \ - -p vendor_dlkm_a:readonly:0:qti_dynamic_partitions_a \ - -p vendor_dlkm_b:readonly:0:qti_dynamic_partitions_b \ - -p vendor_a:readonly:0:qti_dynamic_partitions_a \ - -p vendor_b:readonly:0:qti_dynamic_partitions_b \ - -o super_empty.img diff --git a/prebuilt/super_empty.img b/prebuilt/super_empty.img deleted file mode 100644 index 6aa7baf..0000000 Binary files a/prebuilt/super_empty.img and /dev/null differ