Mount /sdcard with Linux I have two Android 4.x devices, one 4.0.2 and another 4.4.2. On both, I have installed SSHelper to push data to and from the device using rsync. It worked, but the new environment does not even have a usable rm. I would like to switch over to something that works better and possibly faster.

My next attempt was to use MTP over USB with mtpfs, but that does not work, it freezes. simple-mtpfs is not packaged for Ubuntu 13.10. KDE KIO is able to read from the device over MTP, but that does not help me at all, since I want to write my own script using rsync, and it is not able to write to it.

Then I tried sshfs, I do not get any errors mounting it, but I get IO-errors whenever I even try to cd into the mountpoint. I guess the environment with SSHelper lacks something. It does not work with HTTPS and FTPS Server either. The SFTP provided with the latter works with Filezilla, though.

So how can I get /sdcard to be mounted somewhere on my Linux machine and copy and delete files from it like I want?
If you want to give adbfs a try, here are some instructions. You need to take care to grab the right one, as there are two projects around: one is simply called adbfs, I couldn't get that to work correctly. The other is adbfs-rootless:


go to the projects github page
on that page, at the right-hand side in about the middle of the page, you find a button labeled Download ZIP. Click that to download the sources.
create a new directory, e.g. mkdir ~/adbfs-rootless, and extract the .zip to it
now first install the dependencies: sudo apt-get install libfuse-dev
change to the directory (cd ~/adbfs-rootless), and build the binaries by simply running make
copy the resulting adbfs binary into your $PATH, where your adb binary is located (for ADB, see Is there a minimal installation of ADB?)


Now you're ready to go. Another one-time job is to create a mountpoint, e.g. mkdir ~/droid. After that, connect your Android device via ADB (after having enabled USB debugging, of course). Then mount it using adb ~/droid, and do whatever you wanted to do (e.g. running rsync, copying stuff, whatever). When you're done, don't forget to disconnect: fusermount -u ~/droid.

To make things easier, I created two aliases:

alias mdroid="adb ~/droid"
alias udroid="fusermount -u ~/droid"


So I only need to type mdroid to mount, and udroid to unmount the device.

Enjoy the fun!