6 Aralık 2012 Perşembe

"adb" Does Not Recognize My Android Device in Eclipse IDE.


Today, I will try to solve some problems that I've encountered with while I'm setting up Eclipse IDE for Android Development.
Nowadays it is really easy to configure your system for Android development. In past months, we were downloading an appropriate eclipse version and installing ADT plugin via "Install Software" and finally downloading an appropriate Android SDK for development. Configuration steps may vary for different operating systems. I've done these configurations for my Windows 7, Fedora 13, and my lovely Ubuntu 12.04 LTS. While doing these configurations, I faced with a lot of problems due to different eclipse versions such as "galileo" and "helios". If you do not really care about doing this configuration in your specific Eclipse IDE, you can download  "Android SDK ADT Bundle" from http://developer.android.com/sdk/index.html .
This bundle includes all configurations done with eclipse. Just download, extract and run eclipse!
Now let's look at our said problem: What if your Eclipse configuration does not recognize your Android device?
In Windows, it is really easy stuff, just open Android SDK Manager and download USB driver.
In Ubuntu I've just downloaded Eclipse Helios and latest ADT and SDK revisions. I plugged my Android device and everything was fine!
In my Fedora 13 since I did not want to leave my own Eclipse IDE, I have encountered a lot of problems in configuration stage. Now let's explain this Android recognition problem step by step:

First of all open a terminal and write:
adb devices
If this adb binary is not found, then you should cd to the directory where "adb" located. Hint: It's located in your "../android-sdk-linux/platform-tools/" path.
After this command, you will see
List of devices attached
???????????     device

Check your device vendor ID via "lsusb" command in terminal window.
lsusb
Bus 002 Device 009: ID 04e8:685e Samsung Electronics Co., Ltd
Vendor id is 04e8

Now let's add our device to usb list.
cd /etc/udev/rules.d/
sudo touch 51-android.rules
sudo vi 51-android.rules

Now lets manipulate this file with the line below. (Add this line to file, save and exit)

SUBSYSTEM=="usb", ATTR{idVendor}=="04e8", MODE="0666", GROUP="plugdev"

!Please be careful to write your Vendorid correctly. After saving and closing the file:

sudo chmod a+r /etc/udev/rules.d/51-android.rules
sudo service udev reload
Now we are ready to use our device with Eclipse IDE for debug purpose. See you soon!..

References
http://developer.android.com/sdk/index.html




Hiç yorum yok:

Yorum Gönder