tested on openbsd 6.4 with simple-mtpfs 0.3.0
first, find your uid and gid:
$ id -u
1000
$ id -g
1000
$
connect your phone, camera, or any other mtp compatible device to your computer. set the device to mtp mode.
for example, on android 8.0 it's called transfer files.
then as root install simple-mtpfs and mount a file system via mtp with your
uid:
# pkg_add simple-mtpfs
quirks-3.16 signed on 2018-10-12T15:26:25Z
simple-mtpfs-0.3.0p0:libusb1-1.0.21p1: ok
simple-mtpfs-0.3.0p0:libmtp-1.1.15: ok
simple-mtpfs-0.3.0p0: ok
# mkdir -p /mnt/mtp
# simple-mtpfs --device 1 /mnt/mtp -o uid=1000 -o gid=1000 -o allow_other
#
use the file system as a regular user:
#
$ df /mnt/mtp
Filesystem 512-blocks Used Avail Capacity Mounted on
fusefs 291042488 42956896 248085592 15% /mnt/mtp
$ touch /mnt/mtp/test
$ ls -l /mnt/mtp/test
-rw-r--r-- 1 romanzolotarev romanzolotarev 0 Nov 5 16:29 /mnt/mnt/test
$
to unmount run as root:
# umount /mnt/mtp
#