Device file explorer 提示run-as package 「com.xxx.xxx" is not debuggablehtml
方法1:用ES修改data\data的下權限android
方法2:shell
adb shell
cd \data\data
su
chmod 777 *
如今能夠用DDMS訪問了,至於Android studio的 Device File Explorer 仍是不能訪問的其餘我還找到方法,先用ddms訪問吧bash
問題:仍是沒有辦法經過ddms 把文件pull出來。用es把文件先copy到sd卡後,在copy出來markdown
stackoverflow上提供了新不須要root的解決辦法app
https://stackoverflow.com/questions/13006315/how-to-access-data-data-folder-in-android-device
Accessing the files directly on your phone is difficult, but you may be able to copy them to your computer where you can do anything you want with it. Without rooting you have 2 options:ide
If the application is debuggable you can use the run-as
command in adb shelloop
adb shell
run-as com.your.packagename
cp /data/data/com.your.packagename/複製代碼
Alternatively you can use Android's backup function.spa
adb backup -noapk com.your.packagename複製代碼
You will now be prompted to 'unlock your device and confirm the backup operation'. It's best NOT to provide a password, otherwise it becomes more difficult to read the data. Just click on 'backup my data'. The resulting 'backup.ab' file on your computer contains all application data in android backup format. Basically it's a compressed tar file. This page explains how you can use OpenSSL's zlib command to uncompress it. You can use the adb restore backup.db
command to restore the backup.debug