Page 1 of 1

Mount Phone in GhostBSD via MTP

Posted: Thu Jan 04, 2018 2:23 pm
by Jes
This is useful to get access to your phone device mounted as a MTP device using FUSE-MTPFS. In case your phone has a SD CARD it would be accessible too (both phone emulated filesystem and SD filesystem are accessible at once).

You'll need FUSE.

In /boot/loader.conf:

Code: Select all

# Filesystems in Userspace
Then install the package:

Code: Select all

pkg install simple-mtpfs
Create a script to automate the process of mount the phone. Mine is called 'freebsd_mountphone':

Code: Select all


S=`which simple-mtpfs`

mkdir -p ~/Phone

echo "To unmount:"
echo "umount -f ~/Phone"

$S -o direct_io  ~/Phone

ls ~/Phone
Create the directory:

Code: Select all

mkdir ~/Phone
Then connect you phone via USB and execute the previous script. Your phone will be mounted in ~/Phone (one directory for the internal storage and another one for the sd card if available).

Re: Mount Phone in GhostBSD via MTP

Posted: Fri Jan 05, 2018 12:28 am
by NevilleGoddard
Nice work!

You can also install android-file-transfer-qt4 and do the same thing.

Re: Mount Phone in GhostBSD via MTP Solved using QT5

Posted: Fri Jan 08, 2021 6:32 am
by wb7odyfred ... pfs.75653/ FreeBSD forum post 75653 about using MTPFS ... e-transfer Fresh Ports description Github Source code from Whoozle ... nux/ubuntu This Linux snap has a picture of operating the GUI Android File Transfer

Code: Select all

sudo pkg install sysutils/android-file-transfer-qt5
command line to install android-file-transfer-qt5

Example of issuing the above command line
Updating GhostBSD repository catalogue...
GhostBSD repository is up to date.
All repositories are up to date.
The following 1 package(s) will be affected (of 0 checked):

Installed packages to be UPGRADED:
android-file-transfer-qt5: 3.9 -> 4.1 [GhostBSD]

Number of packages to be upgraded: 1

194 KiB to be downloaded.

Proceed with this action? [y/N]: y
[1/1] Fetching android-file-transfer-qt5-4.1.txz: 100% 194 KiB 198.9kB/s 00:01
Checking integrity... done (0 conflicting)
[1/1] Upgrading android-file-transfer-qt5 from 3.9 to 4.1...
[1/1] Extracting android-file-transfer-qt5-4.1: 100%
How to Start using MTP transfer. First plug your Android phone in to a usb cable to the usb input on the computer. Then with the phone, swipe down and change from usb Charge this device to usb Transfer files. Verify that your cable has data wires and is NOT a usb charge only cable.
Menu Applications ---> System Tools --> Android File Transfer

Remember to Unmount your device after using it before shutting down the computer.

Example of using the command line interface.
sudo android-file-transfer
upload worker started
current text color value: 0 , guessed theme: "light"
probing device...
probing device...
probing device...
probing device...
probing device...
probing device...
probing device...
probing device...
probing device...
probing device...
Android Phone connection is on /media/ugen0.2
df -h
/dev/fuse 0B 0B 0B 100% /var/run/user/1002/gvfs
/dev/fuse 0B 0B 0B 100% /var/run/user/1003/gvfs
/dev/fuse 0B 0B 0B 100% /root/.cache/gvfs
/dev/fuse 11G 11G 0B 100% /media/ugen0.2
ls -l /dev/fuse*
crw-rw-rw- 1 root operator 0x4e Jan 8 02:41 /dev/fuse

Re: Mount Phone in GhostBSD via MTP

Posted: Sun Jan 10, 2021 6:13 am
by slawul
Great method, thanks Fred. It would be good to update because even the link ... roid#p2229 a little obsolete.