mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-20 22:26:54 +01:00
change adb utility scripts so they work with more than just one set of apps.
This commit is contained in:
parent
d6dd851349
commit
524a288999
3 changed files with 7 additions and 18 deletions
|
@ -18,20 +18,7 @@ DIRNAME=$(basename $(pwd))
|
||||||
ADB="$(which adb)"
|
ADB="$(which adb)"
|
||||||
MAIN=MainActivity
|
MAIN=MainActivity
|
||||||
|
|
||||||
case $DIRNAME in
|
PKG=$(xmlstarlet sel -T -t -m "/manifest" -v @package -n AndroidManifest.xml)
|
||||||
XWords4-dbg)
|
|
||||||
PKG=xw4dbg
|
|
||||||
;;
|
|
||||||
XWords4-bt)
|
|
||||||
PKG=xw4bt
|
|
||||||
;;
|
|
||||||
XWords4)
|
|
||||||
PKG=xw4
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
usage "running in unexpected directory $DIRNAME"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
while [ $# -ge 1 ]; do
|
while [ $# -ge 1 ]; do
|
||||||
case $1 in
|
case $1 in
|
||||||
|
@ -76,7 +63,7 @@ for DEVICE in $DEVICES; do
|
||||||
ls -l $APK
|
ls -l $APK
|
||||||
$ADB -s $DEVICE install -r $APK
|
$ADB -s $DEVICE install -r $APK
|
||||||
$ADB -s $DEVICE shell am start \
|
$ADB -s $DEVICE shell am start \
|
||||||
-n org.eehouse.android.${PKG}/org.eehouse.android.${PKG}.${MAIN}
|
-n ${PKG}/${PKG}.${MAIN}
|
||||||
done
|
done
|
||||||
COUNT=$((COUNT+1))
|
COUNT=$((COUNT+1))
|
||||||
done
|
done
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
set -e -u -x
|
set -e -u
|
||||||
|
|
||||||
# use this: adb -s 04bd25af2523aae6 shell "pm list packages" | grep org.eehouse
|
# 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 " [--apk <path/to/apk>] # default is to use package names of all known apks"
|
||||||
echo " [--pkg-name tld.whatever.more] # explicit package name"
|
echo " [--pkg-name tld.whatever.more] # explicit package name"
|
||||||
echo " [--serial <serial>] # default is to use all attached devices"
|
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
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -72,7 +72,9 @@ esac
|
||||||
|
|
||||||
# if we're running for the first time in this directory/variant,
|
# if we're running for the first time in this directory/variant,
|
||||||
# generate local.properties
|
# 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
|
# If this fails, the "set -e" above means we won't try to install anything
|
||||||
[ -n "$CMDS" ] && ant $CMDS
|
[ -n "$CMDS" ] && ant $CMDS
|
||||||
|
|
Loading…
Reference in a new issue