这是indexloc提供的服务,不要输入任何密码
Skip to content

BUG? Cannot read /storage: permission denied - Android 11 #1926

@nathaneltitane

Description

@nathaneltitane

Problem description

Previously, using 'termux-setup-storage' to enable storage permissions and accessing /storage for reading or listing was permitted.
I use that method to provide access to my external microSD card and link it to whaterver Termux/CHROOT location i desire.
Now that I have upgraded my device to Android 11, after enabling storage permissions (by script or manually, an error results after attempting to read /storage:

example error output:

ˋˋˋ$ ls /storage
ls: cannot open directory '/storage': Permission denied
$ˋˋˋ

Steps to reproduce

open up a fresh/clean instance of termux
run ˋtermux-setup-storageˋ manually or programatically
allow permissions
attempt reading /storage directory contents manually or programatically (i.e.: ˋls storageˋ
error

Expected behavior

If storage permissions are allowed for tha app to access and manipulate storage, no error hould be triggered when attempting to access previously unauthorized or restricted storage directories (as was the behavior prior to Android 11 in my case)

Additional information

  • Termux application version: latest
  • Android OS version: Android 11
  • Device model: Samsung Galaxy Tab S7+ SM-T970

Screenshot_20210209-165725_Settings

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions