4

I am working on Android Studio and I cannot see my package inside Android>Data folder of my device when I run apk on it. I am unable to run monkey without it. I have also mentioned installLocation="auto" in manifest and gave WRITE_EXTERNAL_STORAGE permission still cannot see my package name.

Andrea
  • 11,801
  • 17
  • 65
  • 72
Ravi Kumar
  • 51
  • 1
  • 4

2 Answers2

10

This is an old question, but I decided to answer it for future readers.

To be able to see your package in /storage/emulated/0/Android/data/ you first have to write to it (create a file or folder in that directory).

You can do so by doing the following:

File directoryToStore;
    directoryToStore = getBaseContext().getExternalFilesDir("TestFolder");
    if (!directoryToStore.exists()) {
        if (directoryToStore.mkdir()) ; //directory is created;
    }

Once you have created a folder like above you will be able to see the following:

/storage/emulated/0/Android/data/yourPackageName/files/TestFolder/

I think what @Devsil meant was that only rooted devices can access data/data/packageName. Two completely different directories.

ClassA
  • 2,480
  • 1
  • 26
  • 57
-1

I believe in order to get into the Data folder your device will need to be rooted. Otherwise nothing will be shown there when you attempt to browse to that location.

Devsil
  • 598
  • 3
  • 16