[Android Tips] 10. Pull out /data/data/${package_name} files without root access

#!/usr/bin/env bash
PACKAGE_NAME=com.your.package
DB_NAME=data.db
rm -rf ${DB_NAME}
adb shell "run-as ${PACKAGE_NAME} chmod 666 /data/data/${PACKAGE_NAME}/databases/${DB_NAME}"
adb pull /data/data/${PACKAGE_NAME}/databases/${DB_NAME} /tmp/
adb shell "run-as ${PACKAGE_NAME} chmod 600 /data/data/${PACKAGE_NAME}/databases/${DB_NAME}"
sqlite3 /tmp/${DB_NAME

 

[Android Tips] 10. Pull out /data/data/${package_name} files without root access

上一篇:数据结构——串(KMP)


下一篇:学习安卓开发过程中遇到关于R.Java文件的问题