r/androiddev • • Aug 04 '17

TIL: You can access connected Android device's file explorer from Android Studio itself.

http://imgur.com/a/le0Fc
239 Upvotes

26 comments sorted by

23

u/instantbitsapps Aug 04 '17

Is that only for the new version? I don't see that on mine (2.3.3).

12

u/[deleted] Aug 04 '17

On the screenshot you can see, its Android Studio 3.0 Canary 9

25

u/instantbitsapps Aug 04 '17

I know you can see that, that is why I asked. OP didn't specify whether it was unique to 3.0, the title made it sound like it had been there all along.

2

u/cricket007 Aug 05 '17

it is there in the DDMS view still

0

u/[deleted] Aug 04 '17

[deleted]

1

u/TheRealKidkudi Aug 05 '17

He's asking about the version of Android Studio.

1

u/joaquini Aug 06 '17

Let's get back to developing in Eclipse /s

7

u/[deleted] Aug 04 '17

Can you open the data folder? Because if you cant, its kinda not very useful.

9

u/gentoozer Aug 04 '17

Yes you can, unlike the file file explorer of android device monitor.

This saves some time by not doing run-as package in the device shell

3

u/[deleted] Aug 04 '17

About fucking time!

2

u/lordVader1138 https://prashamhtrivedi.in/ Aug 05 '17

It works only on Debug apps. I can see data>data directory, but further expansion only happens for Debug mode apps.

Like your own apps you develop or Nova launcher's companion app(Nova launcher has Google Now support, it works for any launcher other then GNL if other launcher is System app or has Debug app, Nova launcher distributes a separate debug app to have google launcher), you can see shared prefs of that debug app in file explorer

1

u/incorporateapps Aug 05 '17

what if the device is rooted, can you open everything? System and data on all apps?

1

u/lordVader1138 https://prashamhtrivedi.in/ Aug 06 '17

Haven't tried, to be frank. What I know is they use run-as package command to open directories.

1

u/Nilzor Aug 05 '17

Stupid question: Why is that useful?

5

u/[deleted] Aug 05 '17

To open the sql database.

7

u/anonbrah Aug 05 '17

Stetho + Chrome inspect ;)

2

u/Atraac Noone important Aug 05 '17

To see if files you read or write to from code exist.

13

u/redditsoaddicting Aug 04 '17

That's interesting considering there's no good API that I know of to do that. AFAIK, they'd have to run commands like ls and parse the output (which I wouldn't trust to be in the same format on every phone) to build up the directory structure.

6

u/der_RAV3N Pixel 2 | Nexus 7 | Nexus 4 Aug 04 '17

God, I hope there will be a proper support for file exploring on Mac some time. Windows is quite okay, but also has it's flaws. But you even need an extra program for Mac.

5

u/russjr08 Beginner Dev Aug 05 '17

Which had the really nice side effect of crashing the whole Mac out of random for a while...

2

u/AshTheGoblin Aug 06 '17

This is beautiful. I don't know what I'll use it for, but it's beautiful.

1

u/siddharth-shah Aug 05 '17

I didn't know that many people didn't know that.

1

u/djiboutiivl Aug 30 '17

Heads up that any modifications are to local files, and you have to right-click on the containing folder and re-uploading (i.e. "push") the file back to the emulator/device. Kind of annoying. You'd think it would have an option to push when saving locally, but at least it's something...

-1

u/imguralbumbot Aug 04 '17

Hi, I'm a bot for linking direct images of albums with only 1 image

https://i.imgur.com/yzOIt3o.png

Source | Why? | Creator | ignoreme | deletthis

-1

u/lordVader1138 https://prashamhtrivedi.in/ Aug 05 '17

This was one of the WHOA addition in Android Studio 2.4 preview, right now they have all 2.4 changes in 3.0...