1

There are many paths to internal storage:

/sdcard

/storage/sdcard0

/storage/emulated/0

/storage/emulated/legacy

/mnt/sdcard

/data/media/0

Several questions:

  • Which ones are most consistent (present) across devices?

  • Which ones are most likely to have Read+Write permissions? Do the symlinks alter this behavior?

  • Which one is the true storage location, where the rest of the symlinks point to? Does this also vary across devices?

  • Is there a final objective of yours that would be completed by knowing a consistent cross-device symlink among thousands of devices? – Firelord Feb 7 '16 at 14:37
0

To answer all of that, one needs to know all (or at least most) of the devices available. So all I can give is an "educated guess".

Permissions should not be altered by symlinks. And yes, what's there varies across devices, Android versions and even ROMs used.

Find the "real one" using df or mount at the command prompt (either via a terminal app, or using adb shell). Starting with around Android 4.2, a few of your listed locations should be pretty much standard:

  • /storage/emulated/0
  • /storage/emulated/legacy

The others, as I wrote, may vary between devices, Android versions and ROMs.

Concerning read/write permissions: All of them have. Question is just: for whom? The average app, or root? This changed a lot between Android versions, especially since Kitkat, and again might be handled differently by device, Android version, and ROM. Before Kitkat, an app just needed the WRITE_EXTERNAL_STORAGE permission. With Kitkat, on most ROMs it was restricted to its own directory in Android/data/, and with Lollipop that changed again.

For a reference, please also see Confused by the many locations of the virtual /sdcard/.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.