Android Studio 3 (All Versions) - Device file explorer nothing to show
Asked Answered
D

2

25

When opening the Device file explorer window in Android Studio Preview 3, I don't see the device's files (There is a message "Nothing to show").
I searched this topic a lot but couldn't find anything that is relevant to this issue.

I'm using my test device:

Android Galaxy S5 running Android OS 6 (API 23) - Rooted

The specific build of Android Studio I'm using is:

Android Studio 3.0 Beta 6
Build #AI-171.4333198, built on September 13, 2017
JRE: 1.8.0_152-release-915-b01 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows 10 10.0

Any idea's how to solve this issue?

Durbin answered 28/9, 2017 at 5:18 Comment(5)
Have you solved this problem?Indolent
@Indolent Unfortunately not... as you can see nobody responded...Durbin
Same issue with the stable release of 3.0 and a rooted Lanix X110 herePinite
@henengel Could you edit the title of this question to better indicate that it applies to all versions of Android Studio 3.x (at least as far as v3.3)Lisbethlisbon
@Lisbethlisbon Done... Thank you for the suggestions...Durbin
L
41

After struggling with this for a day, the answer for me was associated with disabling SuperUser permissions for the ADB shell on my Android Device.

If you have rooted your device and are using an app like SuperSU, try disabling the SU permission for ADB shell in the apps view list.

  1. First disconnect your Android device from the computer running Android Studio
  2. On your Android device open SuperSU and select the apps tab.
  3. Click on ADB shell and select Access:'deny'
  4. Reconnect your device to your dev computer using a USB cable
  5. In Android Studio open the "Device File Explorer".

You should now see a list of files on the device, including files in /data/data/ and its subfolders

You would think that having SU permissions would be a good thing: but in this case, no.

Disable ADB shell's SU permissions in SuperSU

Lisbethlisbon answered 9/1, 2018 at 10:51 Comment(5)
Thanks it worked, I'd really love to know why SU affects File Explorer access though.Peary
It would be a reasonable guess that rooted devices are just not part of Google's test suite. I expect that AndroidStudio3 has a set of test conditions before allowing access to the normally protected folders, and a rooted device happens to fail one of those conditions.Lisbethlisbon
this solution may be for SU rooted devices. are there any other solutions?Ansley
Thanks it's worked for me. It should be the accept answerCrippen
I didn't have ADB Shell in the apps list in SuperSU, so I just switched off SuperSU altogether in SuperSU -> Settings -> Enable superuser. After that Device File Explorer started working.Bargello
I
9

AS file explorer will execute su 0 sh -c 'ls -l /' to list the files. For unknown reason, SuperSu remove the single quotes and the actual command are su 0 sh -c ls -l /. In such case, the -l will not work. AS file explorer may have some problem to parse the output. So there is nothing to show. You can check the log of AS to get such behavior. Open the log from: help -> show log in explorer

Intramundane answered 8/8, 2018 at 7:47 Comment(1)
how did you find out this info re: What AS file explorer sends to ADB?Roughhouse

© 2022 - 2024 — McMap. All rights reserved.