summaryrefslogtreecommitdiff
path: root/run.sh
diff options
context:
space:
mode:
authorParménides GV <parmegv@sdf.org>2013-05-28 19:03:10 +0200
committerParménides GV <parmegv@sdf.org>2013-05-28 19:03:10 +0200
commitbe9dc79cff4b04b2bb6af6dbbe679a0c8a5f6df4 (patch)
tree4fb870431fad185c2bbd1005847877e38ad80f26 /run.sh
parent14935459df410017f97428b0d98e0710b4141b63 (diff)
Added new file: run.sh
It just runs the emulator, installs leap_android and runs it. No debugger session is returned.
Diffstat (limited to 'run.sh')
-rwxr-xr-xrun.sh28
1 files changed, 28 insertions, 0 deletions
diff --git a/run.sh b/run.sh
new file mode 100755
index 00000000..eace457e
--- /dev/null
+++ b/run.sh
@@ -0,0 +1,28 @@
+#!/bin/bash
+
+if [ -z "$2" ]
+then
+ echo Usage: run.sh \"avd name\" \"project folder\"
+ exit 0;
+fi
+avd_name=$1
+PROJECT_FOLDER=$2
+localport=`expr $RANDOM % 65536`
+
+wait_until_booted() {
+ OUT=`adb shell getprop init.svc.bootanim`
+ RES="stopped"
+
+ while [[ ${OUT:0:7} != 'stopped' ]]; do
+ OUT=`adb shell getprop init.svc.bootanim`
+# echo 'Waiting for emulator to fully boot...'
+ sleep 5
+ done
+
+ echo "Emulator booted!"
+}
+
+emulator -wipe-data @$avd_name & # If you want to test the app from scratch
+wait_until_booted
+adb install -r $PROJECT_FOLDER/bin/LEAP\ Android-debug.apk # Install the new version of the application
+adb shell am start se.leap.leapclient/.Dashboard # Run app