[SOLVED] Eclipse can’t see my Android Device on Ubuntu
Are you seeing this on eclipse when you plug your Android device to your Ubuntu box?
Serial Number: ??????????
AVD Name: N/A
Target: unknown
State: ??

Here’s the solution:
1. Create a script to fix this next time it happens, let’s call it “android_device_reset” and save it on a folder contained on your $PATH environment variable.
#!/bin/bash # android_device_reset script sudo adb kill-server sudo service udev stop sudo adb start-server sudo adb devices
Save it and make it executable
chmod +x android_device_reset
2. Open this file /etc/udev/rules.d/51-android.rules
Make sure it looks something like this
SUBSYSTEMS=="usb", SYSFS{idVendor}=="0bb4", MODE=="0666"
SUBSYSTEMS=="usb", SYSFS{idVendor}=="22b8", MODE=="0666"
Each line represents a different android device. If you have just one, the file should be one line long.
On that example I’ve configured the rules for a Motorola Droid and a Nexus One.
If you need to know the idVendor numbers for your Android device go here
developer.android.com/guide/developing/device.html#VendorIds
3. Whenever the problem happens, just open a terminal and type
android_device_reset
It’ll ask you for your password, only administrative users will be able to execute the script.
Hope this helps.













January 17th, 2011 at 8:05 am
Thank you it worked for me and my Nexus S!
March 9th, 2011 at 5:47 am
can you tell me where to put this script? i’m on a debian squeeze machine. i put the script in the “/etc/” folder and when i execute it, it tells me:
adb: command not found
Stopping the hotplug events dispatcher: udevd.
and please tell me if i have to write:
SUBSYSTEMS==”usb”, SYSFS{idVendor}==”0bb4″, MODE==”0666″
or:
SUBSYSTEMS==”usb_device”, SYSFS{idVendor}==”0bb4″, MODE==”0666″
since i’m not on ubuntu (i know it’s based on debian).
many thanks!
March 13th, 2011 at 1:27 am
excellent !!!….
thank you very much…worked for my lg p500…..
April 6th, 2011 at 10:58 am
put the script somewhere on your $PATH
April 26th, 2011 at 9:00 am
@binary
make this:
#!/bin/bash
# android_device_reset script
sudo ./adb kill-server
sudo service udev stop
sudo ./adb start-server
sudo ./adb devices
June 5th, 2011 at 5:08 pm
Hi
I have the same problem but on Windows 7 with Huawei U8230.
can you tell me how to solve this ??
thanks
June 29th, 2011 at 4:42 am
This also worked for me and a Samsung Galaxy Tab.
Thank you very much!
August 9th, 2011 at 9:32 am
Worked very well for Nexus S .
Thank you.
August 25th, 2011 at 6:04 pm
Thanks!!!
November 2nd, 2011 at 11:58 pm
(1)……
/etc/udev/rules.d/51-android.rules
the above file not found….
the “rules.d” folder contains only these files given below:
11-hplj10xx.rules 70-persistent-cd.rules README
40-hplip.rules 70-persistent-net.rules
(2)……..
Whenever the problem happens, just open a terminal and type
android_device_reset
but this results that “command not found”
I have made the same script as told and set the path already…..
Can anybody help regarding these two problems….?
November 4th, 2011 at 3:17 pm
/etc/udev/rules.d/51-android.rules not there?
I guess things must have changed with all the updates ever since.
you should probably read this
http://developer.android.com/guide/developing/device.html
January 21st, 2012 at 6:09 am
Thanks, it worked for me on Archlinux 64 bit. I had only to adjust the command in android_device_reset accordingly to my system:
sudo /home/vincenzo/android-sdk-linux_x86/platform-tools/adb kill-server
sudo /etc/rc.d/udev stop
sudo /home/vincenzo/android-sdk-linux_x86/platform-tools/adb start-server
sudo /home/vincenzo/android-sdk-linux_x86/platform-tools/adb devices
but this is also because the android-sdk folder is not in my path.