adb로 디버깅
https://developer.android.com/studio/command-line/adb.html?hl=ko#howadbworks
```bash
adb devices
```
adb로 DB 접근하기
```bash
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 확인
```bash
> 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. 단, 요청한 것만 되는 듯.
```bash
> adb shell pm grant com.example.umbum.recyclerviewexp android.permission.READ_EXTERNAL_STORAGE
```
'Java Stack > Android' 카테고리의 다른 글
AlertDialog, Snackbar, Toast / String resource (0) | 2018.05.20 |
---|---|
Android Context 정리 (0) | 2018.01.04 |
onClick in XML vs. onClickListener (0) | 2017.12.29 |
Android Permission 정리 (0) | 2017.12.24 |
View와 layout Inflate. + ViewHolder // kotlinx (0) | 2017.12.22 |