change adb utility scripts so they work with more than just one set of apps.

This commit is contained in:
Eric House 2016-07-26 22:08:29 -07:00
parent d6dd851349
commit 524a288999
3 changed files with 7 additions and 18 deletions

View file

@ -18,20 +18,7 @@ DIRNAME=$(basename $(pwd))
ADB="$(which adb)"
MAIN=MainActivity
case $DIRNAME in
XWords4-dbg)
PKG=xw4dbg
;;
XWords4-bt)
PKG=xw4bt
;;
XWords4)
PKG=xw4
;;
*)
usage "running in unexpected directory $DIRNAME"
;;
esac
PKG=$(xmlstarlet sel -T -t -m "/manifest" -v @package -n AndroidManifest.xml)
while [ $# -ge 1 ]; do
case $1 in
@ -76,7 +63,7 @@ for DEVICE in $DEVICES; do
ls -l $APK
$ADB -s $DEVICE install -r $APK
$ADB -s $DEVICE shell am start \
-n org.eehouse.android.${PKG}/org.eehouse.android.${PKG}.${MAIN}
-n ${PKG}/${PKG}.${MAIN}
done
COUNT=$((COUNT+1))
done

View file

@ -1,6 +1,6 @@
#!/bin/bash
set -e -u -x
set -e -u
# use this: adb -s 04bd25af2523aae6 shell "pm list packages" | grep org.eehouse
@ -17,7 +17,7 @@ usage() {
echo " [--apk <path/to/apk>] # default is to use package names of all known apks"
echo " [--pkg-name tld.whatever.more] # explicit package name"
echo " [--serial <serial>] # default is to use all attached devices"
echo "uninstall crosswords variant"
echo "uninstall apps based on known .apk or package name"
exit 1
}

View file

@ -72,7 +72,9 @@ esac
# if we're running for the first time in this directory/variant,
# generate local.properties
[ -e local.properties ] || ../scripts/setup_local_props.sh
if [ -e ../scripts/setup_local_props.sh ]; then
[ -e local.properties ] || ../scripts/setup_local_props.sh
fi
# If this fails, the "set -e" above means we won't try to install anything
[ -n "$CMDS" ] && ant $CMDS