Add datasets/android/compile.sh
This commit is contained in:
parent
92aa5a3558
commit
9af3b32820
25
datasets/android/compile.sh
Executable file
25
datasets/android/compile.sh
Executable file
@ -0,0 +1,25 @@
|
||||
SDK_FOLDER=/usr/lib/android-sdk
|
||||
PLATFORM=$SDK_FOLDER/platforms/android-33
|
||||
BUILD_TOOLS=$SDK_FOLDER/build-tools/30.0.3
|
||||
|
||||
mkdir -p build/gen build/apk
|
||||
|
||||
"$BUILD_TOOLS/aapt" package -f -m -J build/gen/ -S res \
|
||||
-M AndroidManifest.xml -I "$PLATFORM/android.jar"
|
||||
javac --release 11 -classpath "$PLATFORM/android.jar" -d build/obj \
|
||||
build/gen/net/hanshq/hello/R.java java/net/hanshq/hello/MainActivity.java
|
||||
|
||||
"$BUILD_TOOLS/d8" --release --lib "$PLATFORM/android.jar" \
|
||||
--output build/apk/ build/obj/net/hanshq/hello/*.class
|
||||
|
||||
"$BUILD_TOOLS/aapt" package -f -M AndroidManifest.xml -S res/ \
|
||||
-I "$PLATFORM/android.jar" \
|
||||
-F build/Hello.unsigned.apk build/apk/
|
||||
|
||||
"$BUILD_TOOLS/zipalign" -f -p 4 \
|
||||
build/Hello.unsigned.apk build/Hello.aligned.apk
|
||||
|
||||
"$BUILD_TOOLS/apksigner" sign --ks keystore.jks \
|
||||
--ks-key-alias androidkey --ks-pass pass:android \
|
||||
--key-pass pass:android --out build/Hello.apk \
|
||||
build/Hello.aligned.apk
|
Loading…
x
Reference in New Issue
Block a user