aboutsummaryrefslogtreecommitdiff
path: root/qc/qc
blob: 876ee7624e3282eb7f48497c2a19433a008e5d5e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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 "$*"