Can't see my App package in Android>data folder of my phone
Asked Answered
J

3

5

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.

Jujube answered 14/9, 2015 at 12:50 Comment(0)
G
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.

Georgettegeorgi answered 28/5, 2018 at 10:48 Comment(3)
Thanks. This one was did infact created a package folder for my application that I am trying to run on an actual device.Zelikow
TNX that work, but why should we do that?Backsheesh
@UnknownDeveloper Because if you don't make the directory, it doesn't exist.Georgettegeorgi
I
0

If you used fileDir, the files are stored in the data/app/packagename

By using ADB, I find my package do exist, and the files are in the data/app directory, which are not access unless rooted. And that's why you can't find your packageFiles by searching or the FileManager in your unrooted phone.

Isoclinal answered 8/10 at 2:40 Comment(1)
I used for a long time. It seems work normally, no crush and breakup. I can't find the file I created, so it's a problem to adjust the directory sturcture. And I dont know if this will occur MemoryLeak and so on.Isoclinal
S
-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.

Spillar answered 14/9, 2015 at 12:52 Comment(1)
go to FileManager>Android>Data . You can see package of different AppsJujube

© 2022 - 2024 — McMap. All rights reserved.