Re: mount phone for file transfer?

From: Gary Aitken <freebsd_at_dreamchaser.org>
Date: Fri, 24 Oct 2025 19:07:11 UTC
On 10/20/25 11:54, Jin Guojun[VFF] wrote:
> On 10/19/25 20:40, Gary Aitken wrote:
>> On 10/19/25 11:47, Jin Guojun[VFF] wrote:
>>> On 10/19/25 10:13, Gary Aitken wrote:
>> 
>>>> How does one mount a phone (android) to transfer files? I can
>>>> do this on a lynix system but can't figure out how on my fbsd
>>>> 13.5. I have urndis loaded:
>> ...
>>> # kldload fusefs.ko
>>> 
>>> # jmtpfs -o allow_other /mnt
>>> 
>>> Make sure the phone is allowed other device to access its
>>> storage: usually, the phone will ask this permission when
>>> jmtpfs command is issued.
>> 
>> 
>> # jmtpfs -o allow_other /mnt/memstick Device 0 (VID=04e8 and
>> PID=6860) is a Samsung Galaxy models (MTP). # ls -l /mnt/memstick 
>> ls: /mnt/memstick: Input/output error # umount /mnt/memstick
>> 
>> It acted like it worked... phone dinged when plugged in The phone
>> is set to: Use USB for: Transferring files/AndroidAuto USB
>> controlled by: This device (I can't seem to change it)
>> 
>> Once or twice I saw the notice for Allow/Disallow access and
>> allowed, but always after things didn't work; now I can't find it: 
>> plug in phone ding ... no dialog, even with no apps on screen 
>> Swipe up, down, left, right... nada Swipe down, I see "USB for
>> file transfer", as if it's ok as is / already allowed, but ls
>> still fails. Thoughts? Samsung Galaxy A15

> This is a setting issue cross different phones, even between Samsung
> phones, who is controlling the File Transfer (F/T).
> 
> To make things simpler, ignore who controls the F/T and repeat the
> same process twice with a umount in between.
> 
> #  jmtpfs -o allow_other /mnt                 ; mount may fail due
> to the phone is not ready to do F/T
> 
> wait for phone to ask Allow/Deny and press Allow
> 
> # ls /mnt may see nothing but Input/output error because mounting
> process was done before phone allows F/T
> 
> # umount /mnt
> 
> #  jmtpfs -o allow_other /mnt              ; this time mount should
> be successful
> 
> if phone asks Allow/Deny again due to some kind timing issue, try to
> do umount and jmtpfs mount one more time.

Getting back to this...
I have several mount points under /mnt, which is where I was trying to mount.
As I was having trouble, I made a fresh mount point at /newmnt

Originally I saw no allow prompt on the phone.
I thought the I/O error meant it didn't work, so issued umount but left it plugged in.
A few minutes later reopened the phone and the allow prompt was there.
Hit allow, then tried again and it worked.

I'm thinking it's the procedure, not the mount point, which made the difference.

Gary