Created
May 19, 2016 03:16
-
-
Save rygorous/578fb796f15373700c89182b073bcda2 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/bash | |
# If we get interrupted, make sure to kill the whole process tree | |
trap 'trap - SIGTERM && kill 0' SIGINT SIGTERM | |
# Issue command to all devices in parallel | |
for DEVICE in `adb devices | awk '/\tdevice$/ { print $1 }'`; do | |
ANY_DEVICES=1 | |
# Look up pretty name from serial number | |
NAME=`grep ^$DEVICE device_names | awk '{ print $2 }'` | |
if [[ $NAME == "" ]]; then NAME=$DEVICE; fi | |
# Run adb | |
adb -s $DEVICE 2>&1 $* | sed "s/^/[$NAME]\t/g" & | |
done | |
if [[ $ANY_DEVICES != 1 ]]; then | |
echo $0: no devices connected! | |
fi | |
# Wait until all jobs are complete | |
wait |
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 | |
# Build | |
ndk-build || exit | |
ant debug || exit | |
# Install everywhere | |
./adbroadcast.sh install -r bin/NativeActivity-debug.apk | |
# Clear log | |
./adbroadcast.sh logcat -c | |
# Run activity and print log | |
./adbroadcast.sh shell am start -n com.radgametools.oodleandroid/android.app.NativeActivity | |
./adbroadcast.sh logcat -s oodle-example:* |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment