Skip to content

[Android] Download prebuilt sha256sums from URL #1290

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ The following assumes you've completed the steps for [Setting up ExecuTorch](#se

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

- [executorch.aar](https://ossci-android.s3.amazonaws.com/executorch/release/executorch-241002/executorch.aar) (sha256sum: 2546feed560cef01cc7b47260c694311346196934f41900cac08e418f4a60096)
- [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))

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.

Expand Down
8 changes: 5 additions & 3 deletions torchchat/utils/scripts/android_example.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ else
fi

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

mkdir -p ${TORCHCHAT_ROOT}/build/android

Expand Down Expand Up @@ -88,8 +88,10 @@ setup_android_sdk() {

download_aar_library() {
mkdir -p ${TORCHCHAT_ROOT}/android/torchchat/app/libs
curl "${LLAMA_AAR_URL}" -o ${TORCHCHAT_ROOT}/android/torchchat/app/libs/executorch.aar
echo "${LLAMA_AAR_SHASUM} ${TORCHCHAT_ROOT}/android/torchchat/app/libs/executorch.aar" | shasum --check --status
curl "${LLAMA_AAR_URL}" -O
curl "${LLAMA_AAR_SHASUM_URL}" -O
shasum --check --status executorch.aar.sha256sums
mv executorch.aar ${TORCHCHAT_ROOT}/android/torchchat/app/libs/
}

build_app() {
Expand Down
Loading