SD Card , USB Storage
hdt25 opened this issue · 9 comments
Related problem
How do I access my SD card or Usb Storage (OTG)
Inside this Linux (Ubuntu)
It shows internal storage as (SD)
But don't show SD card storage Or Usb OTg
Describe the solution you'd like
It will be handy to have OTG access to Linux
Describe alternatives you've considered
No response
Additional context and details
No response
The most important point of this issue is: are you rooted?
By that I mean, do you have the root privilege for Android?
If you have root, you should be able to mount and access usb storage directly.
Otherwise, you will have to call the api manually.
Next, it will be assumed that you don't have root.
As far as I know, /mnt/media_rw/[device_id] is accessed via the Android Storage Access Framework
.
I'm sorry I can't be of much help to you.
Here are some external links that may be of help to you.
termux-usb(wiki)
termux-packages-issues(otg)
termux-app-issues(usb otg)
As the proverb goes, all roads lead to Rome (i.e. Use different means to obtain the same result).
Since direct access is a bit of a pain, try indirect access!
Since your purpose is to access usb storage, you can share them with the network in the file manager.
Some file managers can share folders with ftp
, others can use webdav
.
Certainly USB is not possible without root access. But can it access SD card as shared directory? I had seen mount 'sdcard' as Shared directory in while installation. Iam not sure about it .
What is the 'TF' in Tmoe settings?
I have installed jellyfin Server in Ubuntu container . So as media source, internal storage is not enough, so I want to access either SD card or Usb Storage.
If SD card is allowed as shared directory (SD) Then it is worth for me .
TF is the MicroSD Card.
Although rare nowadays, some mobile devices do have a TF card slot.
When the card is inserted, it is mounted to /storage/XXXX-YYYY
ps: XXXX-YYYY (e.g. 4016-19FB) is the id of the card.
# df -h | grep 4016
/dev/fuse 119G 102G 17G 86% /mnt/installer/0/4016-19FB
/dev/block/vold/public:179,1 119G 102G 17G 86% /mnt/media_rw/4016-19FB
/mnt/media_rw/4016-19FB 119G 102G 17G 86% /mnt/runtime/default/4016-19FB
# ls /storage
4016-19FB emulated self
You can then access the app directory: /storage/4016-19FB/Android/data/com.termux
Termux generates ~/storage/external-1 symlink when you use termux-setup-storage
to get storage access.
And tmoe uses this symlink to get the path of the tf.
If you have a TF card and your device has a card slot, then you can mount the symlink to /media/tf inside the container
If you see mount sdcard
in tmoe, then it refers to /sdcard
, /storage/emulated/0
or /storage/self/primary
If you see mount tf
, it is an external MicroSD, not an internal sd.
Thanks to clear my doubts. I thought sdcard is microsdcard .
But actually TF is what I was looking for.
I haven't inserted a microsdcard, so whenever I clicked TF , it would say permission denied.
So actually I have to insert a microsdcard.
Thanks 🙏
Wow
Did this , and works . That's why I deleted the comment.