Most of the apps are now not permitted to access /sdcard/data

  • the only app i know which can access this folder is Files(not files by google)[com.google.android.documentsui]
  • a few days ago i see this app called X-plore
~ $ ls /emulated/0/Android/data/
ls: cannot access '/emulated/0/Android/data/': No such file or directory

~ $ ls /sdcard/Android/data/
ls: cannot open directory '/sdcard/Android/data/': Permission denied

It asked the permission to access this folder, with files like allowing access to newly inserted memory card,

is there a way to make termux ask to allow access to that folder

or, is there a command to do it like, termux-setup-storage

Or is there a way to do it directly with am command

And I'm not a rooted user

  • Does this answer your question? no write permission to memory card storage from termux
    – alecxs
    Commented Mar 10, 2022 at 7:56
  • you have misconception here /sdcard is actually not your (external) MicroSD Card unless you formatted it as adoptable-storage which makes it (internal) shared storage
    – alecxs
    Commented Mar 10, 2022 at 7:59
  • your question lacks basic information about phone and can't be answered
    – alecxs
    Commented Mar 10, 2022 at 8:01
  • there is no confusion between /storage/emulated/0 = /sdcard but confusion with "newly inserted memory card" (/storage/FFFF-FFFF)
    – alecxs
    Commented Mar 10, 2022 at 8:22
  • you still did not mention phone model and android version. works fine on Poco M3 MIUI 12 Android 10 i.sstatic.net/Sc25g.jpg
    – alecxs
    Commented Mar 10, 2022 at 10:52

1 Answer 1


I believe that you are talking about /sdcard/Android/data instead of /sdcard/data.

From what I gathered, this is an intentional "security" feature. It is possible to bypass by root, but that is not an option for you.

There is the permission MANAGE_EXTERNAL_STORAGE, so if you manage to grant it to termux it should theoretically work, but may require some app patching to the manifest beforehand.

The last thing you can do is use adb on yourself using localhost with adb over network and edit the files from adb shell, that however requires the use of the run-as command which only works for debuggable apps.

I will look into more solutions and edit this answer later.

  • MANAGE_EXTERNAL_STORAGE applies to scoped storage android 11 (unrelated to MicroSD Card)
    – alecxs
    Commented Mar 10, 2022 at 9:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .