Boston Linux & UNIX was originally founded in 1994 as part of The Boston Computer Society. We meet on the third Wednesday of each month at the Massachusetts Institute of Technology, in Building E51.

BLU Discuss list archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Discuss] mtpfs question

Dan Ritter <dsr at> writes:

> dan moylan wrote: 
>> great -- i've got termux installed on the tablet and sshd
>> running, but where are the kindle files on the tablet?
>> i've poked around a bit and found nothing -- of course, /data
>> and /data/data are inaccessable.
>> and when i ssh in:
>>   u0_a5 ~[40] ls
>>   The program 'ls' is not installed. Install it by executing:
>>    pkg install busybox
>>   or
>>    pkg install coreutils
>>   u0_a5 ~[41] pkg install coreutils
>>   The program 'pkg' is not installed. Install it by executing:
>>    pkg install termux-tools
>>   u0_a5 ~[42] pkg install termux-tools
>>   The program 'pkg' is not installed. Install it by executing:
>>    pkg install termux-tools

It's been awhile since I installed termux, but I don't remember having
to install coreutils myself. Plainly something is wrong if you can't run
pkg. apt-get should be there too, which works just as well, but if pkg
is not runnable my guess is that isn't working either. What does pwd and
what is your $PATH here?  /usr/bin for termux on my phone is
/data/data/com.termux/files/usr/bin/. Can you cd to that and run ./ls?

Or another thought, could you have another sshd application
running. i.e. you think you're sshing to termux's sshd when in fact
you're connecting to another one, so your uid and PATH are not termux's,
meaning you can't run anything termux. (GNU stands for GNU is not Unix
but clearly Android really is not Unix. ;) I think I had to run termux
on the phone, install sshd, and then type sshd at the shell prompt
there. Periodically I have to start it up again from the phone when
termux completely goes away.

That doesn't entirely fit either. If another application gives you sshd,
how can it not give you ls? And clearly you are in a termux shell if
it's telling you to run pkg. But maybe the above will give you debugging
ideas even if it's not on the mark.

I'm not at the machine I do my sshing from. I might be sshing as the
termux user. Could that be all it is? Wrong user?

>> on the tablet, ls and pkg work as expected -- i must be sshing
>> in wrong somehow.  hmmm ... where do i go from here?
> Very likely /sdcard.

With any luck.  My android phone has an /sdcard/Books directory that I
didn't create and the Cool Reader ebook application I use will look
in. So you'd think Kindle would put things in there or somewhere else
accessible, but who knows.

The security model on Android, IIRC, is that every application runs as a
different user (and using other Linux features for isolation,
capabilities? cgroups? selinux?) and has a directory somewhere under
/data/data (which Dan seems aware of) that's not (neccessarily?)
accessible to you as the termux user or the user your file manager runs

Maybe less so than iOS (but I don't know first hand), but Android seems
very much to make your phone not entirely your phone. This is why I'd
like to switch to debian or postmarketOS, or at least LineageOS,
whenever I figure out how to do that on my model and find a big block of
time to fiddle.

Rooting might help, but I don't understand the implications of doing
that fully enough yet to dare doing it on my main phone. I have a spare
I'm going to try it on one of these days.

Mike Small
smallm at

BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!

Boston Linux & Unix /