命令行导出数据库并用sqlite3 语句执行

bat导出数据库并用sqlite3 语句执行
- db.cmd

@echo off
cd /d %~dp0
adb exec-out "run-as PKG_NAME cat /data/data/PKG_NAME/databases/app_inspection.db" > app_inspection.db
adb exec-out "run-as PKG_NAME cat /data/data/PKG_NAME/databases/app_inspection.db-wal" > app_inspection.db-wal
adb exec-out "run-as PKG_NAME cat /data/data/PKG_NAME/databases/app_inspection.db-shm" > app_inspection.db-shm
sqlite3 -column -header app_inspection.db

参考 https://blog.csdn.net/baiyifei2016/article/details/126883454

 

posted @ 2022-11-09 11:11  MarcoReus  阅读(80)  评论(0编辑  收藏  举报