-
-
Save chapko/473a2e5cdec82ca82219bb5e91817c07 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
dir=$(pwd) | |
pkg="com.example.ThaliTestApp" | |
activity="$pkg/.MainActivity" | |
devices=($(adb devices | awk '/\<device\>/ { print $1 }')) | |
function adb-all { | |
for device in "${devices[@]}" | |
do | |
adb -s "$device" "$@" & | |
done | |
wait | |
} | |
# cd ../ThaliTest | |
cordova build android --release --device | |
apk="./platforms/android/build/outputs/apk/android-release-unsigned.apk" | |
/usr/local/opt/android-sdk/build-tools/25.0.0/apksigner sign --ks ~/Documents/adb-release-key.jks --ks-pass="pass:123456" $apk | |
# have not tested yet | |
# adb-all install -r $apk | |
# adb-all shell pm clear $pkg | |
# adb-all shell pm grant $pkg android.permission.ACCESS_COARSE_LOCATION | |
# adb-all shell am start -n $activity |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment