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.
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.
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.
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.
© 2022 - 2024 — McMap. All rights reserved.