Reputation: 2390
I made a file on the default folder using the following code:
FileOutputStream fileOutputStream = openFileOutput("data.dat",MODE_PRIVATE);
fileOutputStream.write("Hakuna Matata".getBytes());
fileOutputStream.close();
The file is created and stored, I can read it using FileInputStream
and openFileInput
.
I want to check this file using the Android Studio Device File Explorer, I think my file was stored in a folder inside /data/user/0/
, but I can not see this /user/
folder.
It seems like I need some permissions to see this folder.
Is there any way to access my file using the Device File Explorer?
Upvotes: 0
Views: 2030
Reputation: 1006859
I think my file was stored in a folder inside /data/user/0/, but I can not see this /user/ folder.
Paths seen by apps do not necessarily match what you will see in Android Studio's Device File Explorer or in adb shell
.
Most likely, your files can be found in /data/data/.../files/
, where ...
is your application ID.
Upvotes: 1