Android Device Monitor File Explorer not working with emulator running API 24+

前端 未结 11 995
暖寄归人
暖寄归人 2020-12-13 12:07

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

11条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-13 13:01

    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.

提交回复
热议问题