36

Device File Explorer screenshot

I want to check if a folder has been created in the External Storage.

I already added permissions inside the AndroidManifest.xml:

<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>

but it doesn't work either.

Any clue?

ricardopereira
  • 11,118
  • 5
  • 63
  • 81
BlueStar
  • 405
  • 1
  • 6
  • 10

4 Answers4

46

/sdcard is a symlink to /storage/emulated/0. You should therefore be able to see external files for your app in /sdcard/Android/data/<your app>.

akindofyoga
  • 970
  • 1
  • 9
  • 16
  • 10
    The same goes there as well. ls: /sdcard/Android/data/: Permission denied. – JanithaR Mar 09 '21 at 06:20
  • A few months later I ran into the same issue and landed on this answer again and noticed my own comment. This time it works. So I'm guessing whether this answer would work would depend on the image your emulator is using and the version of Android it is running. – JanithaR Oct 13 '21 at 12:38
  • 3
    Note that Android's wonderfully complete documentation says the files are in /data/data: https://developer.android.com/studio/debug/device-file-explorer – Phlip Jun 23 '22 at 13:24
12

Looks like you are using Google Play system image.

You need to use a standard Android (AOSP) system image (not one of the Google APIs or Google Play system images)

see details here

Mike Adamenko
  • 2,944
  • 1
  • 15
  • 28
5

cause there is system files located and for your access device file open self-> primary folder.

  • but I use 'Environment.getExternalStorageDirectory().getAbsolutePath();', Logcat see me /storage/emulated/0/xxx. Is this external stroage path? – BlueStar Nov 23 '19 at 07:52
  • if you open device explorer for emulator device then you able to view files in path you want to see,but in physical device you not able to see those file,So i think there is permission needed if your device is rooted then you will able to see files. – ankitsinh corepix Nov 25 '19 at 04:55
4

The correct location for my emulator was data/data/app_name/ as per the docs that phlip referred to.

Andrew
  • 321
  • 2
  • 11