Manipulating device files within Android Studio

This article can be read in about 3 minutes.
PR

The purpose 

After upgrading my Android version, I lost access to my app development files from the device’s file explorer.

So I investigated alternative methods. This document describes how to do it using Android Studio.

PR

Environment

model:Google Pixel 6 Pro

Android:14

PR

Manipulating device files within Android Studio

Precondition

- Install AndroidStudio

Reference

Android Studio をインストールする  |  Android Developers
Windows、macOS、Linux で Android Studio をセットアップ、インストールします。

Prepare AndroidStudio

Launch Android Studio and connect your PC to your Android device. (A USB cable is easiest, but Wi-Fi is also possible.)

Ensure the device you want to access is selected.

From the top menu, select View → Tool Windows → Device File Explorer.

Operate Device File Explorer

The following GUI will be displayed.

Right-clicking a folder or file allows you to perform various operations. 

Menu
Save Asdownload file from mobile to PC
Uploadupload file from PC to mobile
Deletedelete file

Location of the file

On Pixel devices, the root directory for the device’s file system is located in a folder like /storage/emulated/0.

(Note that Pixel phones don’t use SD cards, so this might differ from other devices.)

/sdcard

The files saved by the app are located in the following folder.

/sdcard/Android/data/アプリ名

Addition

On the Redmi Note 10 Pro, the following folders appeared to be the device’s root.

/storage/xxxx‐xxxx

*)The XXXX field is an arbitrary hexadecimal value.

PR

Reference

View on-device files with Device Explorer  |  Android Studio  |  Android Developers
Learn how to view, copy, and delete files on an Android device with the Device Explorer.

comment

Copied title and URL