illuminatus
illuminatus

Reputation: 2086

How to access local files of the filesystem in the Android emulator?

I want to know whether there is a method to access local files (say text files, web pages) of the filesystem in Android emulator.

I'm using Ubuntu 10.04 for Android development.

Upvotes: 111

Views: 161206

Answers (7)

F.A. Botic
F.A. Botic

Reputation: 101

Now days you can use any Android Studio (I would say even in Ubuntu) and follow the steps below to store / open or delete data from an Android emulator:

  1. Open device manager.
  2. Highlight your device and press button "Open this device in the Device File Explorer".
  3. Usually all client relevant data should be in the "storage directory" as shown on the picture below.
  4. Right click on any file in the "Device File Explorer" will offer additional options such as "Open / save / delete".

enter image description here

Upvotes: 2

Murat Gungor
Murat Gungor

Reputation: 125

To open the Device Explorer, select View > Tool Windows > Device Explorer or click the Device Explorer button in the tool window bar.

https://developer.android.com/studio/debug/device-file-explorer

Select a device from the drop-down list.

Interact with the device content in the file explorer window: Right-click a file or directory to create a new file or directory. Save, upload, delete, or synchronize the selected file or directory to your machine.

Double-click a file to open it in Android Studio.

Upvotes: 0

DrMcCleod
DrMcCleod

Reputation: 4053

In Android Studio 3.5.3, the Device File Explorer can be found in View -> Tool Windows.

It can also be opened using the vertical tabs on the right-hand side of the main window.

Upvotes: 6

user3561494
user3561494

Reputation: 2342

In Android Studio 3.0 and later do this:

View > Tool Windows > Device File Explorer

Upvotes: 112

dev4life
dev4life

Reputation: 11394

Update! You can access the Android filesystem via Android Device Monitor. In Android Studio go to Tools >> Android >> Android Device Monitor.

Note that you can run your app in the simulator while using the Android Device Monitor. But you cannot debug you app while using the Android Device Monitor.

Upvotes: 1

Organic Advocate
Organic Advocate

Reputation: 919

In addition to the accepted answer, if you are using Android Studio you can

  1. invoke Android Device Monitor,
  2. select the device in the Devices tab on the left,
  3. select File Explorer tab on the right,
  4. navigate to the file you want, and
  5. click the Pull a file from the device button to save it to your local file system

Taken from Working with an emulator or device's file system

Upvotes: 49

Cristian
Cristian

Reputation: 200080

You can use the adb command which comes in the tools dir of the SDK:

adb shell

It will give you a command line prompt where you can browse and access the filesystem. Or you can extract the files you want:

adb pull /sdcard/the_file_you_want.txt

Also, if you use eclipse with the ADT, there's a view to browse the file system (Window->Show View->Other... and choose Android->File Explorer)

Upvotes: 113

Related Questions