Android Device Monitor File Explorer not working w

2020-02-07 19:18发布

So, just as question states. Android device monitor is not showing anything in the File Explorer view. This is only occuring on Virtual Devices running Android API Level 24+.

Any solution?

enter image description here

11条回答
何必那么认真
2楼-- · 2020-02-07 19:56

Try some methods:

  1. Click on the triangle icon at the device window then choose "reset adb."
  2. Turn off the emulator then turn it back on.
  3. You can use Genymotion, the best simulator now.
查看更多
可以哭但决不认输i
3楼-- · 2020-02-07 20:01

A workaround using the adb command line tool:

root@mypc ~ $ adb kill-server
root@mypc ~ $ adb start-server
root@mypc ~ $ adb root

Now you can browse through the file system using the linux ls command:

root@mypc ~ $ adb shell ls -all /
total 3688
drwxr-xr-x  15 root   root         0 2017-04-21 11:11 .
drwxr-xr-x  15 root   root         0 2017-04-21 11:11 ..
drwxr-xr-x  29 root   root         0 2017-04-21 11:11 acct
drwxrwx---   6 system cache     4096 2017-01-06 12:11 cache
lrwxrwxrwx   1 root   root        13 1970-01-01 01:00 charger -> /sbin/healthd
...
-rw-r--r--   1 root   root      4853 1970-01-01 01:00 ueventd.rc
lrwxrwxrwx   1 root   root        14 1970-01-01 01:00 vendor -> /system/vendor
查看更多
【Aperson】
4楼-- · 2020-02-07 20:04

A temporary solution, which worked at least for my needs, was to install file manager .apk (I used Astro file manager .apk) - just drag/drop .apk to emulator window. Another very useful utility - ImDisk - which let's mount sdcard .img of virtual device. If you mount it as readonly ejectable device, you can have realtime access to virtual device file system

查看更多
Emotional °昔
5楼-- · 2020-02-07 20:06

It probably has to do with the new Android folder permissions. As posted in another answer you can use:

root@mypc ~ $ adb root

to gain root access to your emulator (no need to restart the adb). Then you can see all the folders on the device with DDMS file explorer or through the shell. The other option is to wait for a new file explorer that was promised in version 2.4 of Android Studio.

If you need to refresh the gallery after that as I did you could use:

root@mypc ~ $ adb shell "am broadcast -a android.intent.action.MEDIA_MOUNTED -d file:///mnt/sdcard"

This will simulate mounting of a SD card which will trigger media rescan.

查看更多
来,给爷笑一个
6楼-- · 2020-02-07 20:09

This is bug in Android Device Monitor and has been reported to google.

According to Post this thread will be updated when the patch is released.

查看更多
▲ chillily
7楼-- · 2020-02-07 20:10

I also faced same problem in the Android Device Monitor.

The emulator we use is very high level like Nougat 24+, so to over come this, we have to just run emulator in level level i.e., Lollipop 22

查看更多
登录 后发表回答