I followed the Gentoo USB Guide (http://www.gentoo.org/doc/en/usb-guide.xml), however, nothing gets automounted anywhere, and I'm not sure which device I need to mount. My laptop also has an SD card reader, and when I insert an SD card it works fine. Unfortunately, the Nexus Galaxy doesn't support an SD card, all of the memory is internal, and the only way to get to it is via USB cable.

Are there any other kernel modules I need to enable?

Thank you_________________There are 10 types of people, those who know binary and those who don't.

Last edited by oneself on Fri Jul 06, 2012 7:05 pm; edited 1 time in total

The Nexus does not expose it's contents as a usb drive. You can access it only via MTP. Search google for "nexus mtp linux" and you will get lots of hits._________________emerge --quiet redefined | E17 vids: I, II | Now using e from git | e18, e19, and kde4 sucks :-/

The Nexus does not expose it's contents as a usb drive. You can access it only via MTP. Search google for "nexus mtp linux" and you will get lots of hits.

++

confirmed for me at least, had to go through the same fuss with mine. Doesn't allow for the usual mounting bits - annoying. Only mtp appears to work, and I have no interest in doing things that way_________________Lost configuring your system?
dump lspci -n here | see Pappy's guide | Link Stash

to mount my galaxy nexus. It's not an automount solution but it works and is the best solution I have for now. An alternative I suppose is to root the phone and then copy files over wifi via the sshdroid app but I haven't tried this.

It seems that Android 3+ devices don't expose their storage as usb storage devices anymore and use MTP instead. While I think this is understandable as it is much more flexible and doesn't require the device to export complete block devices (which is fine for SD cards, but awkward for internal storage), I never have had much luck with MTP and linux. I have tried mtpfs and it works for me, but each file transfer is followed by a long pause, which makes transfers of lots of files (e.g. music) slow and awkward.

Luckily, I have found QuickSSHd for android which does NOT require root. I use it to access the device via sshfs, and it works without any complications. If I connect the device via USB and use USB tethering, I get very decent transfer speeds > 10MB/s. The program is available on the android market, but not for free; still, for me it has paid off.

It seems that Android 3+ devices don't expose their storage as usb storage devices anymore and use MTP instead. While I think this is understandable as it is much more flexible and doesn't require the device to export complete block devices (which is fine for SD cards, but awkward for internal storage), I never have had much luck with MTP and linux. I have tried mtpfs and it works for me, but each file transfer is followed by a long pause, which makes transfers of lots of files (e.g. music) slow and awkward.

Luckily, I have found QuickSSHd for android which does NOT require root. I use it to access the device via sshfs, and it works without any complications. If I connect the device via USB and use USB tethering, I get very decent transfer speeds > 10MB/s. The program is available on the android market, but not for free; still, for me it has paid off.

Airdroid ok, so do I use it. But over wifi is a bit slow if you want to transfer a lot of stuff._________________Gentoo Linux ~amd64, Kernel 4.5.3, Enermax 400W, Intel i7-3770, DDR3 8GB, Sapphire HD6870

@yellowhat: I activate USB tethering on the device. After establishing the connection via NetworkManager, the phone and computer are on the same network via usbnet. The device has a IP, Quicksshd shows it, I connect to it.

1) Activate USB tethering on your phone while it's connected to USB --- it's under Settings -> Networks -> Tethering (translating from german here, so I am not sure about the english labels). A usbnet device will now appear on your computer (provided you activated CONFIG_USB_USBNET and CONFIG_USB_NET_RNDIS_HOST in your kernel), you should be able to see it in ifconfig -a.

2) The device provides a dhcp server on the connection, so activate dhcp on it. You can either do it manually using dhcpcd or dhclient, or, more conveniently, if you use networkmanager in your desktop environment, an entry for the connection will appear which you can activate by clicking on it.

3) In tethering mode, the android device acts as a router and provides masquerading, so you can now access the internet using your phone's connection. As a side effect, your computer now is on a network with your device, which has an IP. The network connection is encapsulated over USB, and you can ping and ssh your phone.

4) Fire up Quicksshd. It will show a list of network interfaces and the corresponding IPs, take the one from usbnet0, rndis0 (or such, depends on your device). Start the server, connect to it, voila Be aware that Quicksshd can only run on ports >1024 without root priviledges, so you'll have to adjust your ssh and sshfs commands on your side to the correct port (2222 by default).

This sounds more complicated as it really is. It boils down to: activate tethering -> activate connection (NM should even do it automatically) -> start quicksshd -> connect. If you want to mount your device into the filesystem, you can use sshfs (in portage).

The only downside is that you will be using tethering while you are connected to your device, so take care with internet access. However, if you activate wifi on your device, you will tethering the wifi instead of your mobile connection, which is harmless to your data plan. If your computer is connected via ethernet, network manager will give it precedence over the tethered connection, so that's also fine. You can also work around this point by manually configuring routes, but that's propably more hassle than it's worth as it spoils the simplicity of the solution Also, take care to set a strong password in Quicksshd, depending on how your phone is connected to the net and your data plan provider's setup, the ssh server will be exposed over wifi and possibly even to the internet.

to mount my galaxy nexus. It's not an automount solution but it works and is the best solution I have for now. An alternative I suppose is to root the phone and then copy files over wifi via the sshdroid app but I haven't tried this.

Once this is installed and adb is in your path, you should be able to access your device via:

Code:

adb shell

This is a nice way to figure out the path you want to transfer to or create any directories. Once you're done exploring, exit the shell, and use the push command to transfer files:

Code:

adb push /path/to/local/file /sdcard/path/to/file

You can only do one file at a time, but it's easy to write a little shell for loop to move multiple files.

Well actually adb push supports pushing whole directories.

Unfortunately, if I use adb push to transfer music to my Galaxy Nexus, "Play Music" does not find them. However, I see the files on the phone when using ls in /sdcard/Music. If I connect via MTP, I don't see the files in the Music folder.

Unfortunately, I am using the Verizon Galaxy Nexus, which wants more money to tether via USB (or Wifi).

immensely curious - how are they enforcing this? If you try to enable it, does it prompt you, or is it just altogether greyed out?

That, to me, would be infuriating - having to pay money to enable a feature the OS/phone supports by default. Ergo, why I've bought the entire family the unlocked GSM Galaxy Nexus, and while we're stuck with TMO's garbage network, our phones are ours to use and abuse as we see fit._________________Lost configuring your system?
dump lspci -n here | see Pappy's guide | Link Stash