As of version 3.0, Android Studio includes the Device File Explorer, which allows you to view, copy, and delete files on an Android device. This is useful when examining files that are created by your app or if you want to transfer files to and from a device.
Note: To view files on a hardware device, you must first set up the device for development. For more information, see Run Apps on a Hardware Device.
To work with a device's file system, proceed as follows:
- Click View > Tool Windows > Device File Explorer or click the Device File Explorer button in the tool window bar to open the Device File Explorer.
- Select a device from the drop down list.
Interact with the device content in the file explorer window. Right-click on a file or directory to create a new file or directory, save the selected file or directory to your machine, upload, delete, or synchronize. Double-click a file to open it in Android Studio.
Note: Android Studio saves files you open this way in a temporary directory outside of your project. If you make modifications to a file you opened using the Device File Explorer, and would like to save your changes back to the device, you must manually upload the modified version of the file to the device.
When exploring a device's files, the following directories are particularly useful:
- Contains data files for your app stored on internal storage
- Contains user files stored on external user storage (pictures, etc.)
Note: Not all files on a hardware device are
visible in the Device File Explorer. For example, in the
directory, entries corresponding to apps on the device that are not debuggable
cannot be expanded in the Device File Explorer.