手機截屏
adb shell screencap -p /sdcard/1.png
截屏導出
adb pull /sdcard/1.png D:/image/1.png
操作數據庫
- adb shell
- 進入數據庫 cd data/data/com.partner.tmsdemo/databases
- 列出當前目錄的文件 ls
- 打開數據庫 sqlite3 數據庫名,例如 sqlite3 student.db,打開student.db.
- 查看該數據庫所有表 .tables
- 查看錶的創建語句 .schema 表名 ,例如 .schema student ,查看student表單的創建語句.
- 還可以執行數據庫操作 ,例如 select * from 表名 ; 查看該數據庫的所有記錄,記得最後加上分號,否則不會執行.
回到系統桌面
adb shell am start -n com.android.launcher3/com.android.launcher3.Launcher
查看當前界面的名稱
adb shell “dumpsys activity activities | grep mFocusedActivity”