I am trying to retrieve the database file from the phone. I am using the cmd and adb shell to do this. After access data/data when i do ls, it shows permission denied. I have phone my rooted. USB debugging is on. My CMD image is attached. Please guide where i am wrong. Thanks in advance
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
To list all databases that you have:
adb shell run-as com.example.myapp ls /data/data/com.example.myapp/databases/
To download them, first, copy them to sdcard and then, pull it:
adb shell run-as com.example.myapp cp /data/data/com.example.myapp/databases/DATABASE_NAME /sdcard/
adb pull /sdcard/DATABASE_NAME
NOTE:
Remember to replace com.example.myapp
by package name from your app.
Replace com.example.myapp
by package marked in your AndroidManifest.xml
<manifest
package="com.example.myapp"/>
....
</manifest>