How to enable a Nexus One Android phone to show up as a USB drive

3dBloke
  10 years ago
  4

Unlike a normal USB pen drive, my Nexus One absolutely refused to show up as a USB drive in LMDE.

When a USB cable is connected, the phone appeared in "computer:///" (as shown in the Nemo file manager), but (after turning on USB storage on the phone) would not open in LMDE even after the default application was set to "Files" (initially it was not set).

Here's how to fix it. Note that you need to use sudo to create and edit the new rules file.

1. Connect the phone by USB cable.

2. Determine the idVendor and idProduct values of the USB-connected phone by issuing the lsusb command.

In the following example the idVendor is 18d1 and the idProduct is 4e12.

$ lsusb

Bus 001 Device 006: ID 18d1:4e12 Google Inc. Nexus One (debug)

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Bus 005 Device 002: ID 413c:8126 Dell Computer Corp. Wireless 355 Bluetooth

Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

For more info, you may find it useful to look at log file, /var/log/messages

3. Create file /etc/udev/rules.d/51-android.rules  (you can do this using the touch command)

4. Edit the file and add a line for the Android phone. In my case I added two lines, one for debug enabled on the phone and one for no debug. Ensure that each set of details is all on one line:

# without debug enbabled on the Nexus One

SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e11", MODE="0666", GROUP="plugdev"

# with debug enbabled on the Nexus One

SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e12", MODE="0666", GROUP="plugdev"

5. After saving the edited file, restart the udev service with the following command:

$ sudo service udev restart

That should do it, but in my case the USB connectivity did not work even after rebooting my laptop, and I gave up on it for a while.

I tried it again two days later and it worked perfectly. I had rebooted my phone in the meantime, so that may have done the trick. All I know is, it works now :)

Comments
E3V3A 8 years ago

You probably need to do this as well:

sudo udevadm control --reload-rules
sudo service udev restart
sudo udevadm trigger


Hammer459 10 years ago

To make this an even more useful Tutorial, generalize it a little adding how to for any Android device. Even better for any "unsupported" device.
Otherwise good, even though the point about this being support issue has some bearing as, if generalized, it will help others for a long time after your phone is handled


jahid_0903014 10 years ago

this may be a support issue