Android Studio 3 (All Versions) - Device File Explorer Nothing To Show


Answer :

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


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


Comments

Popular posts from this blog

Converting A String To Int In Groovy

"Cannot Create Cache Directory /home//.composer/cache/repo/https---packagist.org/, Or Directory Is Not Writable. Proceeding Without Cache"

Android How Can I Convert A String To A Editable