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

[Bug]: termux-setup-storage doesn’t create external-1 for USB drive on GrapheneOS #4819

@Cletip

Description

@Cletip

Problem description

Hello,

I just want to get access, as specified in the wiki, to the “Termux-private folder” inside a external drive (usb in my case) :

Internal and external storage

Symlink to a Termux-private folder on external storage (only if external storage is available).
~/storage/external-1

My setup:
Termux 0.118.3
Android 16, GrapheneOS
USB drive formatted in exFAT, correctly recognized by the standard file explorer
I’ve granted Termux all media access permissions.
I ran the command “termux-setup-storage”, and the shared, etc. folders were created.

I’ve already checked some related issues, such as:

#71
#3120
#3647

But nothing is completely clear.

The clearest explanation is from @agnostic-apollo, who wrote:

The */Android/data/com.termux paths on stable storages are created when getExternalFilesDirs() is called. It won’t be created for external hard drives like already mentioned. You can use the mount command to search for mounted volumes. It should ideally be mounted under /mnt/media_rw as is and then likely mounted with sdcardfs under /storage for apps to use with SAF.

However, I know that on my Android 13 device with Termux 0.118.1, this folder external-1 exists, and I can access my USB drive with external-1. So why isn’t that the case here?
Is it due to Android 16? Or GrapheneOS? Or other factors ?

And, I have access to /mnt/media_rw/XXXX-XXXX/, but I can't do a simple
git clone /mnt/media_rw/XXXX-XXXX/path/to/a/gitdirectory $HOME/locale/
Why ?

Another related but secondary question: the wiki says,
“External storage: external SD cards or USB hard drives. Typically read-only, except the Termux private directory.”
Does that mean the folder should be accessible just like the internal one?
If this is indeed an issue, would it at least be possible to clarify the wiki?

Thanks in advance for your help.

Steps to reproduce the behavior.

  • USB drive formatted in exFAT, correctly recognized by the standard file explorer
  • Grant Termux all media access permissions.
  • Run “termux-setup-storage”
  • Say "yes", and check that there is no "storage/external-1"

What is the expected behavior?

"external-1" folder being created, to access the

System information

  • Termux application version: 0.118.3
  • Android OS version: 16 (Grapheneos)
  • Device model: Pixel 9 Pro XL

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions