Termux + SD Card (not install termux to it, but allow termux to write/read files from it)
Okay so, I have a phone, which I want termux to be able to read and write it's files via cmd line/whatever. I mount my SD Card, run and it sets up all fine and dandy. I cd into storage, then into external-1, just to see nothing in there, even though I know for a fact my phones SD Card is full of some random B.S. I attempt to mkdir a file into it and check to see if it appears on the phone, and it doesnt, what could be the problem and what is the solution. Is this even possible with termux.
10 Replies
Note ^: I did allow the storage perm for termux
sdcard should be named something like
/storage/9016-4EF8
Yeah it doesn't appear like that.
I attempted to re run the tmux setup storage cmd, but nope
as far as i know, you can't access sdcard storage without root access
but i think you don't need root access for that, since it's not mounted with perm root:root
you can try a file manager and then copy path from any random file/directory that's inside the sdcard storage, it should return
/storage/<hex>-<hex>/...
I've been at it for a while now with this and with some research I know people have had success, using Google files I copied the lath and got the number/hex/whatever, what should I do with it? Paste it into tmux with some command or what?
you wanted to access the sdcard storage right? why don't you cd into it
Well, yes, I do want that, thing is I cannot cd, (no such file or dir, ofc) that's the reason I'm asking the question above. It doesn't show up under
dir
either
SOLVED
I was able to cd into it via cd [XXXX-XXXX]
- Don't know why I didnt think of that before, but yeah, thanks for all the help mates!Unknown User•3w ago
Message Not Public
Sign In & Join Server To View
~/storage/external-1
actually points to /storage/XXXX-XXXX/Android/data/com.termux/files
.
If that's the case for you, then to get to the actual sdcard, the foolproof command should be cd $(realpath ~/storage/external-1)/../../../..
.It's been long from the time I solved this, but if my memory serves me, I just went to a filemanager copied the SD Card dir, then just pasting it into termux