# Android device not detecting



## mod3777 (Mar 25, 2019)

I am a college student, from non-tech background. I don't know much about FreeBSD, but I have a HTC M8 that I use to transfer movies, photos from FreeBSD to phone and vice versa over MTP support on Debian. But it is not working under FreeBSD now since I wiped Debian completely from hard disk and replaced with FreeBSD.

Expected behavior: Connect USB cable to HTC M8, check usb detection via `pciconf -lv`or `dmesg` or `camcontrol devlist,` if detected, a menu should pop up on phone screen, select MTP Files transfer (or any other desired option, such as tethering) and it should work.

Producible behavior: Connect USB cable to HTC M8 from FreeBSD, check usb detection via `pciconf -lv` or `dmesg` or `camcontrol devlist`, device not listed there. Check again with another Debian/Ubuntu/Fedora box, it shows a menu on phone screen, select MTP Files transfer (or any other desired option, such as tethering) and it should do what is expected to do.

Installed packages:
`pkg query -e "%a=0" %o | sort -u | curl -F file=@- 0x0.st`
Manually installed

/boot/loader.conf
`% cat /boot/loader.conf | curl -F file=@- 0x0.st`
loader.conf

Also I have a Linux based USB modem, from where I use wired Internet connections via tethering. In each reboot, I need to hot-plug em in order to get detected. I have the following added in rc.conf


```
ifconfig_ue0="inet 192.168.1.101 netmask 255.255.255.0"
defaultrouter="192.168.1.1"
```

Am I missing something or Android is not well supported under FreeBSD? Without my phone, I won't able to update my machine. I do not like Linux distros, so I would love to get a viable solution here. Thanks in advance


----------



## linux->bsd (Mar 26, 2019)

The packages I use to back up my Android phone are devel/android-tools-adb, and sysutils/fusefs-simple-mtpfs. Haven't tried sysutils/android-file-transfer yet.


```
pkg install fusefs-simple-mtpfs android-tools-adb
adb devices
adb start-server
adb kill-server
adb root
adb devices
adb pull /source/ /backups/
```

One of those should solve your "phone not being detected" problem, at least in part. I also use my Android phone for tethered Internet access on a FreeBSD laptop, but I don't think it required any additional packages.


----------



## mod3777 (Mar 26, 2019)

linux->bsd said:


> The packages I use to back up my Android phone are devel/android-tools-adb, and sysutils/fusefs-simple-mtpfs. Haven't tried sysutils/android-file-transfer yet.
> 
> 
> ```
> ...



That worked!


----------



## uii (Mar 26, 2019)

Have you tried:
https://www.freshports.org/sysutils/dsbmd/

There is also a GUI:
dsbmc GTK+ client
https://www.freshports.org/sysutils/dsbmc-cli/

Here you can find a HOWTO:








						GitHub - mrclksr/DSBMD: A mounting daemon for FreeBSD
					

A mounting daemon for FreeBSD. Contribute to mrclksr/DSBMD development by creating an account on GitHub.




					github.com
				




I use it to transfer Photos, Music and Movies to my Android phone.


----------



## meine (Mar 26, 2019)

You could use plain `ssh` and/or `sftp`, `scp` instead -- cordless solution (!)

In my home network, my smartphone has a fixed IP address and is listed in /etc/hosts on my main box, so I can connect the usual way on my FreeBSD box (maybe you'll have to 'wake up' your phone to make the connecion active over wi-fi/WLAN). You could make an `rsync` string that automatically transfers all directories and files to your phone and back (and make an alias of it for easiness).

Both work well between my FreeBSD box and smartphone (my Jolla with SailfishOS has default ssh, scp). On Android there are several apps to make this happen -- see for example:

ssh -- https://play.google.com/store/search?q=ftp&authuser

ftp -- https://play.google.com/store/search?q=ftp&authuser

on 'scp' there are several hits on the play store, but you'll have to look further for the apps that support the protocol ment.


----------

