Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Kunin <dkunin@mapswith.me>2013-07-10 12:53:24 +0400
committerAlex Zolotarev <alex@maps.me>2015-09-23 01:58:45 +0300
commit235c6b746539aeaf2c053aafa160427352c9e6fb (patch)
treecd7e46f69e22207dd3496886a5909749dc704477 /android/script
parentb4e59f194c7a1f31e8bad594c33e0ac35206eb6f (diff)
[android] Set of utility scripts.
Diffstat (limited to 'android/script')
-rwxr-xr-xandroid/script/for_all_devices.sh22
-rwxr-xr-xandroid/script/remove_mwm_data.sh8
-rwxr-xr-xandroid/script/uninstall_lite.sh8
-rwxr-xr-xandroid/script/uninstall_pro.sh8
4 files changed, 46 insertions, 0 deletions
diff --git a/android/script/for_all_devices.sh b/android/script/for_all_devices.sh
new file mode 100755
index 0000000000..86276612c5
--- /dev/null
+++ b/android/script/for_all_devices.sh
@@ -0,0 +1,22 @@
+#/bin/bash
+
+START=$(date +%s)
+# get all ids, but not the first line
+devices=$(adb devices | cut -f1 | grep -v List)
+if [ -z "$devices" ]; then
+ echo "Could not fine any connected devices, try: adb kill-server; adb start-server"
+fi
+count=$(echo "$devices" | wc -l | tr -d ' ')
+echo "Found $count devices and $# action to run"
+
+# run each script with each device's id
+for scr_name in $@; do
+ for id in $devices; do
+ echo "Running $scr_name at $id"
+ sh $scr_name $id
+ done
+done
+
+END=$(date +%s)
+DIFF=$(( $END - $START ))
+echo "Done in $DIFF seconds"
diff --git a/android/script/remove_mwm_data.sh b/android/script/remove_mwm_data.sh
new file mode 100755
index 0000000000..aedc6896df
--- /dev/null
+++ b/android/script/remove_mwm_data.sh
@@ -0,0 +1,8 @@
+#!/bin/bash
+
+MWM_DATA_PATH=/sdcard/MapsWithMe
+if [ -z $1 ]; then
+ adb shell rm -r $MWM_DATA_PATH
+else
+ adb -s "$1" shell rm -r $MWM_DATA_PATH
+fi
diff --git a/android/script/uninstall_lite.sh b/android/script/uninstall_lite.sh
new file mode 100755
index 0000000000..d9594ce91f
--- /dev/null
+++ b/android/script/uninstall_lite.sh
@@ -0,0 +1,8 @@
+#!/bin/bash
+
+LITE=com.mapswithme.maps
+if [ -z $1 ]; then
+ adb uninstall $LITE
+else
+ adb -s "$1" uninstall $LITE
+fi
diff --git a/android/script/uninstall_pro.sh b/android/script/uninstall_pro.sh
new file mode 100755
index 0000000000..c56628fea0
--- /dev/null
+++ b/android/script/uninstall_pro.sh
@@ -0,0 +1,8 @@
+#!/bin/bash
+
+PRO=com.mapswithme.maps.pro
+if [ -z $1 ]; then
+ adb uninstall $PRO
+else
+ adb -s "$1" uninstall $PRO
+fi