Mount Phone in GhostBSD via MTP

Add your Tips and tricks to configure and tweak your GhostBSD System here.
Post Reply
Posts: 42
Joined: Sun Dec 25, 2016 2:43 pm
Location: Spain
Has thanked: 0
Been thanked: 0

Mount Phone in GhostBSD via MTP

Post 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).

Posts: 514
Joined: Thu Dec 22, 2016 10:30 pm
Location: Japan
Has thanked: 8 times
Been thanked: 14 times

Re: Mount Phone in GhostBSD via MTP

Post by NevilleGoddard »

Nice work!

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

Posts: 68
Joined: Sat Nov 12, 2016 5:44 pm
Has thanked: 0
Been thanked: 4 times

Re: Mount Phone in GhostBSD via MTP Solved using QT5

Post 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

Posts: 8
Joined: Sun May 17, 2020 5:41 am
Has thanked: 0
Been thanked: 0

Re: Mount Phone in GhostBSD via MTP

Post by slawul »

Great method, thanks Fred. It would be good to update because even the link ... roid#p2229 a little obsolete.

Post Reply