Post

adb로 디버깅

https://developer.android.com/studio/command-line/adb.html?hl=ko#howadbworks

1
2
adb devices

adb로 DB 접근하기

1
2
3
4
5
6
7
8
D:\AndroidSDK\platform-tools>adb shell
root@generic\_x86:/ # cd data/data/com.example.umbum.openweatherexp/databases
root@generic\_x86:/data/data/com.example.umbum.openweatherexp/databases #
sqlite3 user.db
SQLite version 3.8.6.1 2015-05-21 17:24:32
Enter ".help" for usage hints.
sqlite>

adb로 퍼미션 확인

requested/granted permission 확인

1
2
3
4
5
6
7
8
9
> adb shell dumpsys package com.example.umbum.sqliteankoexp | findstr /i "permission"
installPermissionsFixed=true installStatus=1
requested permissions:
android.permission.WRITE\_EXTERNAL\_STORAGE
android.permission.READ\_EXTERNAL\_STORAGE
runtime permissions:
android.permission.READ\_EXTERNAL\_STORAGE: granted=true
android.permission.WRITE\_EXTERNAL\_STORAGE: granted=true

permission grant/revoke. 단, 요청한 것만 되는 듯.

1
2
> adb shell pm grant com.example.umbum.recyclerviewexp android.permission.READ\_EXTERNAL\_STORAGE

This post is licensed under CC BY 4.0 by the author.