Android eclipse DDMS - 无法访问数据/数据/在手机上拉文件 [英] Android eclipse DDMS - Can't access data/data/ on phone to pull files
问题描述
在测试我的应用程序时,我使用模拟器和自己的手机来查看一切是否正常。我的应用程序也将数据写入共享首选项和文本文件。
While testing my apps, I use emulators and my own phone to see if everything is working ok. My apps are also writing data to shared preferences and a text file.
我可以通过 DDMS
在eclipse中,所以我可以读取我的电脑上的数据文件,但是当我尝试通过我的手机上的 DDMS
打开这些文件夹,没有任何反应。我点击数据文件夹,没有任何反应。
I can pull the data from my emulators through the DDMS
in eclipse so I can read the data files on my computer, but when I try to open those folders through the DDMS
on my phone, nothing happens. I click the data folder and nothing happens.
我的手机是根植的。有什么办法可以从手机拉出文件吗?我知道Android保持这些文件夹是私有的,但必须有办法。
My phone is rooted. Is there any way I could pull the files from my phone? I know that Android keeps these folders private, but there must be a way. The emulator is just way too slow.
推荐答案
在根设备上您可以这样做:
On rooted device you can do this:
- 打开cmd
- 键入
adb shell
-
su
- 在设备上按 li>
-
chmod 777 / data / data / data /data/data/com.application.package/data/data/com.application.package/*$c$ c>
- 转到Eclipse中的DDMS视图
- Open cmd
- Type
adb shell
su
- Press 'Allow' on device
chmod 777 /data /data/data /data/data/com.application.package/data/data/com.application.package/*
- Go to the DDMS view in Eclipse
此后,您应该可以浏览设备上的文件。
After this you should be able to browse the files on the device.
要获取数据库:
-
chmod 777 /data/data/com.application.package/databases /data/data/com.application.package/databases / *
chmod 777 /data/data/com.application.package/databases /data/data/com.application.package/databases/*
如果它返回权限被拒绝
在code> su
If it returns permission denied
on su
转到设置
> 开发人员选项
> 根访问
> Apps和ADB
这篇关于Android eclipse DDMS - 无法访问数据/数据/在手机上拉文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!