aboutsummaryrefslogtreecommitdiff
path: root/qc/qc
diff options
context:
space:
mode:
Diffstat (limited to 'qc/qc')
-rwxr-xr-xqc/qc28
1 files changed, 28 insertions, 0 deletions
diff --git a/qc/qc b/qc/qc
new file mode 100755
index 00000000..876ee762
--- /dev/null
+++ b/qc/qc
@@ -0,0 +1,28 @@
+#!/bin/bash
+
+set -e
+
+user_path=data
+file=contacts2.db
+pass=""
+
+adb root && adb wait-for-device
+
+while getopts "theqvpu:" opt; do
+ case "$opt" in
+ t|h|e|q|v)
+ pass="$pass -$opt"
+ ;;
+ p) # Open profile DB instead.
+ file=profile.db
+ ;;
+ u) # Open for a secondary user
+ user_path="user/$OPTARG"
+ ;;
+ *)
+ exit 1
+ esac
+done
+shift $(($OPTIND - 1))
+
+$(dirname "$0")/qdb $pass /data/$user_path/com.android.providers.contacts/databases/$file "$*"