Skip to content

Commit

Permalink
Provide hash files
Browse files Browse the repository at this point in the history
Signed-off-by: Juhyung Park <[email protected]>
  • Loading branch information
arter97 committed Jan 3, 2024
1 parent ee5ca43 commit 54167c3
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/dump.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: Setup
run: |
sudo apt update
sudo apt -y install aria2 zstd p7zip-full
sudo apt -y install aria2 zstd p7zip-full parallel openssl xxhash
- name: Dump
id: dump
Expand All @@ -31,7 +31,7 @@ jobs:
- name: Upload release assets
uses: ncipollo/release-action@v1
with:
artifacts: out/*.7z*
artifacts: out/*
artifactErrorsFailBuild: true
body: ${{ steps.dump.outputs.body }}
tag: ${{ steps.dump.outputs.tag }}_${{ github.event.inputs.name }}
Expand Down
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,17 @@ 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.

## Integrity check
You can check downloaded file's integrity with one the following commands:

``` bash
md5sum -c *-hash.md5
sha1sum -c *-hash.sha1
sha256sum -c *-hash.sha256
xxh128sum -c *-hash.xxh128
```

xxh128 is usually the fastest.

### Thanks to
[luk1337](https://github.com/luk1337/oplus_archive)
6 changes: 6 additions & 0 deletions dump.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@ wait
mkdir out
mkdir dyn
cd ota
# Calculate hash
for h in md5 sha1 sha256; do
ls * | parallel openssl dgst -$h -r | sort -k2 -V > ../out/${TAG}-hash.$h &
done
ls * | parallel xxh128sum | sort -k2 -V > ../out/${TAG}-hash.xxh128 &
wait
for f in system system_ext product vendor vendor_dlkm odm; do
mv ${f}.img ../dyn
done
Expand Down

0 comments on commit 54167c3

Please sign in to comment.