來到/data/data/package.name/目錄下,根據需要可以刪除cache、database以及shared_prefs三個文件夾,達到清理測試環境的效果。
通過adb shell命令實現(要求,有root權限,即在cmd窗口中輸入adb shell 後 顯示“#”而非"$")
adb shell
cd data/data/packageName
rm -r cache
rm -r database
rm -r shared_prefs
來到/data/data/package.name/目錄下,根據需要可以刪除cache、database以及shared_prefs三個文件夾,達到清理測試環境的效果。
通過adb shell命令實現(要求,有root權限,即在cmd窗口中輸入adb shell 後 顯示“#”而非"$")
adb shell
cd data/data/packageName
rm -r cache
rm -r database
rm -r shared_prefs
2 備註 2.1 會用到pywinauto包嗎? 我們會用到pywinauto包,這個庫還是很好的,2019年仍然在進行維護;
https://www.jianshu.com/p/c3ba4e3b2f0a?from=singlemessage
Adb shell 關於進程的常用操作命令,其實就是Linux關於進程的操作命令:Adb shell ps // 查看所有的進程信息 Adb she