hisham hm

🔗 Mounting the SD card from your Android device on Linux over WiFi

Quick-and-dirty notes so I remember how to do it later. This is may all be mostly automatic in some distros (Ubuntu?) but here’s how to do it “by hand”. I may streamline the process myself for my machine in the future, but this is a minimal process that works.

My setup:

The steps:

  1. Install Droid NAS on your phone. Their description say it “most probably […] won’t work” on Linux, but it is based on Bonjour (aka mDNS protocol) and SMB, and there are Linux clients for that.
  2. Create a directory for your local mount point (mine is /Mount/Phone) and then mount it like this:

    mount -t cifs -o port=7777 //"SD Card" /Mount/Phone

    (You can find your phone’s IP with avahi-browse -altr, if avahi-daemon is running).

TODO: convince mount.cifs to use a logical name instead of IP there. Might need to use avahi and nss-dns for that; by the way, if you get an error such as “Connection “:1.10” is not allowed to own the service “org.freedesktop.Avahi” due to security policies in the configuration file” when using avahi-daemon, follow the instructions found here).

  1. mdo

    Thursday, August 15, 2013 - 08:43:36

    Brilliant - thank you for that. Worked like a charm. No-one else seems to know that you can mount your Android card like this on Linux.

    As you say, it would be an improvement if you could use logical names rather than the IP address, but this is still incredibly useful.

Add comment

Fill out the form below to add your own comments.

CAPTCHA imageReload imageAudible version of CAPTCHA-image