Android Eclipse DDMS - Can't pull file from rooted device

半腔热情 提交于 2020-01-20 04:14:25

问题


I am testing my app on a rooted Nexus S phone. I finally have access to the /data/data folder thanks to some awesome help from this answer.

Problem is when I try to use DDMS to "pull a file from the device" I get this error:

[2012-03-20 18:15:26] Failed to pull selection
[2012-03-20 18:15:26] (null)

Anyone know how to pull a copy of the database so I can look at it in a SQLite editor?


回答1:


I found out that to pull the actual database file (my_database.db) you have to use chmod on that specific file in the adb shell. So you need to explicitly define the path to the database you want to access.

For example, if the database file were my_database.db and the application package was com.example.database, you would need to call the following:

1) In cmd type: adb shell
2) Type: su
3) Press "allow" on the rooted phone
4) In cmd type: chmod 777 /data/data/com.example.database/databases/my_database.db
5) Go to DDMS in Eclipse
6) Navigate to the my_database.db file and select it
7) Choose "pull a file from the device" and choose where to save it




回答2:


Restart your eclipse once. I hope that will fix this issue



来源:https://stackoverflow.com/questions/9797019/android-eclipse-ddms-cant-pull-file-from-rooted-device

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!