Search code examples
javaandroideclipseddmsperspective

Project structure does not exist in the File Explorer in DDMS view


Why is my project structure not appearing on DDMS perspective when i run it in a real device?


Solution

  • 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.

    1. Run the project
    2. Go to the DDMS perspective in Eclipse
    3. Run the windows prompt (Windows R + cmd)
    4. Type "abd shell"
    5. Type "su"
    6. Type "chmod 777 /data /data/data /data/data/com.example.example /data/data/com.example.example/*"
    7. 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.