Solved How to transfer files from android to FreeBSD?

I have searched the forum and read some posts, but still don't know how to transfer files from android to FreeBSD, tutorial is needed, thanks!
 
I am using "primitive ftp" on the phone. What you may want to do is connect a USB-C hub to the phone with a RJ45 on it and use the cable. It is a lot faster than wifi. So for a complete backup, or if you want to download a lot of data (offline navigation, hint hint), use this.
 
Older Android versions offered USB mass storage; the problem with this was that it needs exclusive access to the transmitted file. So nowadays that's gone.

Android offers normally MTP or PTP, which is just for photos. So the builtin Android way to go is normally using MTP. Thing is though that MTP will for sure not expose the whole file system.
 
how to transfer files from android to FreeBSD, tutorial is needed
sysutils/fusefs-jmtpfs, over USB cable, the Androids file system mounted on FreeBSD.

Connect android device on FreeBSD machine, as root execute jmpfs, on android device allow access, mount file system: jmpfs /mnt -o allow_other, as user browse file system by terminal, file manager, perform file transfer operations.

Another method, synchronize over Wifi at a local network (or internet by mobile data) with Syncthing one or multiple directories. Needs the Syncthing app on Android and net/syncthing on FreeBSD installed. On FreeBSD side the configuration is made over a browsers web user interface after the service is started.

The Syncthing app doesn't need to run continuously, only when needed. I'am using both myself.
 
sysutils/fusefs-jmtpfs, over USB cable, the Androids file system mounted on FreeBSD.

That sounds very cool.

Another method, synchronize over Wifi at a local network (or internet by mobile data) with Syncthing one or multiple directories. Needs the Syncthing app on Android and net/syncthing on FreeBSD installed. On FreeBSD side the configuration is made over a browsers web user interface after the service is started.

So does that. Thanks, I'll have a look at both of these.

I've been getting by using an OTG cable with USB sticks between my Galaxy J5 and two laptops, for bulk file transfers either way.

Not so instant, and a little cumbersome for such as copying quick texts, email or screenshots to or from the phone, but provides benefit of backup at the same time.
 
sysutils/fusefs-jmtpfs, over USB cable, the Androids file system mounted on FreeBSD.

Connect android device on FreeBSD machine, as root execute jmpfs, on android device allow access, mount file system: jmpfs /mnt -o allow_other, as user browse file system by terminal, file manager, perform file transfer operations.

Another method, synchronize over Wifi at a local network (or internet by mobile data) with Syncthing one or multiple directories. Needs the Syncthing app on Android and net/syncthing on FreeBSD installed. On FreeBSD side the configuration is made over a browsers web user interface after the service is started.

The Syncthing app doesn't need to run continuously, only when needed. I'am using both myself.
I use jmtpfs also and it works well.
 
I'll have a look at both of these.
With Syncthing be careful with the "Folder Type" on Android and FreeBSD. One of them is "Send & Receive" (besides "Send Only", "Receive Only"). With that option set on both (or all) devices, any file deleted on one of the synchronized devices will be deleted on all other. Ensure it's the right file before deleting.

I'm sure you make regular backups, but I still want to point out how important it is to have some working backups. Just in case.
 
I'm recommending a different way: SFTP/SSHFS. There's no need to install anything on FreeBSD - just use SSH. I'm using f.e. the Ghost Commander with its SFTP-Plugin from F-Droid (an open source app repository ("free play store")). So I'm using the phones file manager to exchange files, and not the desktops file manager.
 
when I run jmtpfs /mnt -o allow_other in terminal, I get a message "No mtp devices found".
Check if the USB cable is properly attached on both devices. On the FreeBSD side try another USB port. Try another USB cable.

Before trying to mount the Android device run jmtpfs without arguments.

What kind of Android device is it you are trying to access? Brand, model, Android version? I have 5 Android devices, phones and tablets, 3 different brands, Android version 6, 7, 8, 11, all work as expected.
 
I have searched the forum and read some posts, but still don't know how to transfer files from android to FreeBSD, tutorial is needed, thanks!
Four ways to do so:
  1. [easy] connect the device to your box with a USB cable. Mount the volume(s) and browse the files in your file manager on the box. There are basically two volumes on the droid: one for the system and one for the user files. When used also for the SD-card holding personal files. If you don't see the droid volumes, do as root camcontrol devlist and you'll see the connected volumes even when not mounted. Mount them as root with mount /dev/<droidname_from_devlist> /media/droid. You might have to make a new dir for that or use some-dir else;
  2. [tech] search the IP address of the device, and approach it over ssh from the box. Maybe you have to install something on the droid to use ssh on that side. The IP address of the droid is in the settings and wifi connection panel on the device;
  3. [21st century] use email (smaller a/o less files) or some cloud storage to transfer via an intermediate volume. Your Google Drive is default on the droid and will do fine, and can be accessed from your FBSD box in a web browser;
  4. [1990's] copy the wanted files on the droid to an SD card on the device, pull out the card and mount it in a card reader on your box.
 
jmtpfs works fine
connect your android device in file tranfer mode and run as root
jmtpfs -o allow_other [mountpoint]
and your can browse your android files from a FM
 
maybe my phone's mtp was disabled by the manufacturer, my phone said he can't transfer files to the computer.
 
On my android, once you connect via USB, you have to tap the indicator and choose to allow file transfer. This is a Motorola Edge, but it was the same on my old phone. It says charging this device using USB and has a little down arrow. I hit that and it says tap for more options and one of the options is use USB for file transfer. I have to hit that radio button for it to show up in jmtpfs. I think you also have to have the fuse module loaded. Is it possible you're overlooking something similar to that?
 
Back
Top