Why is my project structure not appearing on DDMS perspective when i run it in a real device?
-
1I think you need root for that, else you could hook your device up to ddms and see all data for all apps. It's the same reason I have to copy my database from that directory to external storage before I can pull it for debugging (>.<)/ . – dokkaebi Dec 06 '12 at 03:10
-
yes it is right. Due to security and privacy `Android` does not allow to access private data of the apps. – Mohsin Naeem Dec 06 '12 at 03:21
2 Answers
This happen when you have the emulator using? You could check the Clean Project or Restart the Eclipse

- 125
- 2
- 11
The problem was that my phone is rooted. So, I can no longer see the data/data directory. But as always, there is a way to do it. I'll show you.
- Run the project
- Go to the DDMS perspective in Eclipse
- Run the windows prompt (Windows R + cmd)
- Type "abd shell"
- Type "su"
- Type "chmod 777 /data /data/data /data/data/com.example.example /data/data/com.example.example/*"
- Return to the DDMS perspective and you will see the data. Databases, libs and sharedPreferences
I found another problem. That is, when you try to pull out a sharedPreference or database using the eclipse feature od the DDMS, you get the "Failed to pull selection" error.
In order to pull things out of the rooted phone, you need to do that in the same way you get to see the files, that is, using the command prompt with the adb shell command.
The only difference is that when you type the root, you should get to the specific file you wnat. For example, if you are looking for a database (the most obvious thing you want to verify), you should put in step 6, this:
"chmod 777 /data/data/com.example.database/databases/database.db"
That's it.

- 3,789
- 2
- 31
- 35