termux-ubuntu icon indicating copy to clipboard operation
termux-ubuntu copied to clipboard

sdcard

Open ghost opened this issue 8 years ago • 13 comments

cannot access sdcard.

ghost avatar Oct 11 '17 04:10 ghost

That's an android limitation in newer versions. Accessing an external sdcard requires using the storage access framework, which plain unix tools don't support.

casept avatar Oct 12 '17 04:10 casept

See https://wiki.termux.com/index.php?search=Storage for information about storage in Termux. To setup storage see https://wiki.termux.com/wiki/Termux-setup-storage 😀

SDRausty avatar Dec 08 '17 20:12 SDRausty

Just for info, after setting up termux storage, modify the start.sh script so that termux home path is bind inside chroot environment.

shaqman avatar Feb 02 '18 04:02 shaqman

Hi, how can I use bind directory to attach dirs outside the chroot?

Sorry my ignorance, I thought I should put a symlink or a dir inside binds folder but it didn't work. And mount --bind, I have no experience on it, is not installed on my termux and requests if I want to use hmount instead.

orlleite avatar Feb 08 '18 13:02 orlleite

@orlleite Sorry, the bind dir functionality isn't really well documented. The start.sh script just sources any files that is inside this directory at a certain point. So to bind a new directory you can simply create a file inside the binds folder (with any name) and put something like the following in it: command+=" -b $HOME/drive" command+=" -b /sdcard" command+=" -b $HOME/downloads"

Neo-Oli avatar Feb 08 '18 13:02 Neo-Oli

Hi, I can't bind termux home directory from Ubuntu with the way of you mentioned. Can you please explain it more detailed? Thanks for your attention.

zcatav avatar May 19 '18 20:05 zcatav

zcatav. Create a text editor file with any name (for example, like me : hak). Write a command like this and put it in the binds folder. Start Ubuntu and the sdcard folder will appear.

command+=" -b $HOME/sdcard"

Alexei1981 avatar Oct 13 '18 17:10 Alexei1981

Hi... I already make an file with those line inside binds folder... But i got this line instead... "./ubuntu: line 11: ubuntu-binds/k: Permission denied"

ghost avatar Mar 11 '19 19:03 ghost

hi, I also experienced the same problem, but I installed ubuntu via the TermuxOS script tool from www.sideload.id so I went directly to the ubuntu-binds directory and I added a new file without formatting with nano, for example: nano acc

I initially filled with

command + = "-b $ HOME / sdcard"

and found the sdcard location error on /data/data/com.termux/files/home/ubuntu-fs

even though the sdcard should be on /data/data/com.termux/files/sdcard

so I changed the order command + = "-b $ HOME / sdcard"

Becomes:

command + = "-b / sdcard"

sasmitadn avatar Oct 03 '19 12:10 sasmitadn

zcatav. Create a text editor file with any name (for example, like me : hak). Write a command like this and put it in the binds folder. Start Ubuntu and the sdcard folder will appear.

command+=" -b $HOME/sdcard"

The folder does not appear in my home directory.

I have created a file -> BindsUbunuTermux in ubuntu-binds/ folder. The program does source it, yet does not show any folder when starting ubuntu via ./start-ubuntu.sh

Please let me know where things went wrong.

Contents of BindsUbuntuTermux are


command+=" -b $HOME/storage/dcim"
command+=" -b $HOME/storage/downloads"
command+=" -b $HOME/printer" # a directory in my termux home folder

TwistingTwists avatar Mar 20 '20 03:03 TwistingTwists

Sorry, but I don't use anymore GNU/Linux inside Termux. Only Termux is sufficient for me.

Zeki Çatav zekicatav.com

20 Mar 2020 Cum 06:11 tarihinde Abhishek Tripathi [email protected] şunu yazdı:

zcatav. Create a text editor file with any name (for example, like me : hak). Write a command like this and put it in the binds folder. Start Ubuntu and the sdcard folder will appear.

command+=" -b $HOME/sdcard"

The folder does not appear in my home directory.

I have created a file -> BindsUbunuTermux in ubuntu-binds/ folder. The program does source it, yet does not show any folder when starting ubuntu via ./start-ubuntu.sh

Please let me know where things went wrong.

Contents of BindsUbuntuTermux are

command+=" -b $HOME/storage/dcim" command+=" -b $HOME/storage/downloads" command+=" -b $HOME/printer" # a directory in my termux home folder

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Neo-Oli/termux-ubuntu/issues/13#issuecomment-601506696, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGADUXZF6APQSA7324EJTTTRILNEXANCNFSM4D6TRYVA .

zcatav avatar Mar 21 '20 12:03 zcatav

hi, I also experienced the same problem, but I installed ubuntu via the TermuxOS script tool from www.sideload.id so I went directly to the ubuntu-binds directory and I added a new file without formatting with nano, for example: nano acc

I initially filled with

command + = "-b $ HOME / sdcard"

and found the sdcard location error on /data/data/com.termux/files/home/ubuntu-fs

even though the sdcard should be on /data/data/com.termux/files/sdcard

so I changed the order command + = "-b $ HOME / sdcard"

Becomes:

command + = "-b / sdcard"

Thanks a lot

sajid1500 avatar Jul 07 '20 22:07 sajid1500

I created a text file in ubuntu-binds/ and wrote on it:

command+=" -b sdcard:/sdcard"
command+=" -b .ssh:/root/.ssh"

ingen2 avatar Oct 09 '21 17:10 ingen2