Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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?

like image 628
wasatch14 Avatar asked Mar 21 '12 00:03

wasatch14


2 Answers

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

like image 121
wasatch14 Avatar answered Sep 27 '22 16:09

wasatch14


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

like image 35
Satya Avatar answered Sep 27 '22 17:09

Satya