7

I am using Ubuntu 18.04. From Android Studio with the following code I am getting file directory

Context ctx = getApplicationContext();
final File filesDir = ctx.getFilesDir();

which is /data/user/0/com.example.ipfs/files/. I am running my app on Android Emulator. How do I go to the /data/user/0/com.example.ipfs/files/ folder from my PC?

1

2 Answers 2

17

For this, Android Studio has the feature called Device File Explorer that will allow you to view the connected device or emulator internal files. This is useful especially when you are utilising the getFilesDir() as a path to save your app generated files & hence are not able to see them with the standard File Manager.

From the main menu, go to View -> Tool Windows -> Device File Explorer. You can then select your device / emulator from the drop down list.

To access /data/user/0/com.example.ipfs/files/, just go to the directory data/data/com.example.ipfs/files from the list displayed in the Device File Explorer once your device / simulator is connected.

0
0

I am using Ubuntu 22.04 right now I tried this solution using AndroidStudio2022 and it's work and I figure out it was pointing to a hidden files below..

PATH: /home/[user]/.cache/Google/AndroidStudio2022.1/device-explorer/[device_emulator_name]/data/user/0/[project_name]

Example: /home/awen/.cache/Google/AndroidStudio2022.1/device-explorer/Pixel_5_API_32 [emulator-5554]/data/user/0/com.example.html_pdf_demo

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .