Skip to content

Commit 11dcbeb

Browse files
authored
[Android] Download prebuilt sha256sums from URL (#1290)
1 parent 41bc70c commit 11dcbeb

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,7 @@ The following assumes you've completed the steps for [Setting up ExecuTorch](#se
477477

478478
1. Download the AAR file, which contains the Java library and corresponding JNI library, to build and run the app.
479479

480-
- [executorch.aar](https://ossci-android.s3.amazonaws.com/executorch/release/executorch-241002/executorch.aar) (sha256sum: 2546feed560cef01cc7b47260c694311346196934f41900cac08e418f4a60096)
480+
- [executorch.aar](https://ossci-android.s3.amazonaws.com/executorch/release/executorch-241002/executorch.aar) ([sha256sums](https://ossci-android.s3.amazonaws.com/executorch/release/executorch-241002/executorch.aar.sha256sums))
481481

482482
2. Move the downloaded AAR file to `torchchat/edge/android/torchchat/app/libs/`. You may need to create directory `torchchat/edge/android/torchchat/app/libs/` if it does not exist.
483483

torchchat/utils/scripts/android_example.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ else
3131
fi
3232

3333
LLAMA_AAR_URL="https://ossci-android.s3.amazonaws.com/executorch/release/executorch-241002/executorch.aar"
34-
LLAMA_AAR_SHASUM="2546feed560cef01cc7b47260c694311346196934f41900cac08e418f4a60096"
34+
LLAMA_AAR_SHASUM_URL="https://ossci-android.s3.amazonaws.com/executorch/release/executorch-241002/executorch.aar.sha256sums"
3535

3636
mkdir -p ${TORCHCHAT_ROOT}/build/android
3737

@@ -88,8 +88,10 @@ setup_android_sdk() {
8888

8989
download_aar_library() {
9090
mkdir -p ${TORCHCHAT_ROOT}/android/torchchat/app/libs
91-
curl "${LLAMA_AAR_URL}" -o ${TORCHCHAT_ROOT}/android/torchchat/app/libs/executorch.aar
92-
echo "${LLAMA_AAR_SHASUM} ${TORCHCHAT_ROOT}/android/torchchat/app/libs/executorch.aar" | shasum --check --status
91+
curl "${LLAMA_AAR_URL}" -O
92+
curl "${LLAMA_AAR_SHASUM_URL}" -O
93+
shasum --check --status executorch.aar.sha256sums
94+
mv executorch.aar ${TORCHCHAT_ROOT}/android/torchchat/app/libs/
9395
}
9496

9597
build_app() {

0 commit comments

Comments
 (0)