Last active
November 23, 2016 10:57
-
-
Save andrew-aladev/5c23a79b273c3b3578a914abdd038060 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=("ENU7N16425000183" "ENU7N16425000206") | |
function command { | |
for device in "${devices[@]}" | |
do | |
adb -s "$device" $1 & | |
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 | |
command "install -r $apk" | |
command "shell pm clear $pkg" | |
command "shell pm grant $pkg android.permission.ACCESS_COARSE_LOCATION" | |
command "shell am start -n $activity" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment