0

I m trying to run the android application project on my phone htc explorer,developers mode on when I run it shows unknown serial number when i check my devicesI ma getting an error message when I connect my device and see the console in adt it's not detecting my device

user202476
  • 3
  • 2
  • 7

1 Answers1

1

You are basically having a "no permissions" error, where your PC's adb is not able to identify the device that you're connecting. As you said, you have a HTC Explorer, which I do too, with KitKat ;) So here's how you'd be fixing this "no permissions" error:

First, you'd need to create (if inexistent), the 51-android.rules file. Since you have a HTC Device, we'll just be adding the "rules" for a HTC device, so that your adb can identify your device correctly.

First, obtain superuser permissions using:

sudo su

and type in your password. Note that you can't see the password being typed, but its still being typed. Then, create the file, if not exists, using the following command:

touch /etc/udev/rules.d/51-android.rules

This basically creates a 51-android.rules file in the appropriate place, if it doesn't exist.

Now, for adding the rules, we'll just append some text to the file, a correct config, which can be done using the following command:

echo "SUBSYSTEM==\"usb\", ATTR{idVendor}==\"0bb4\", MODE=\"0666\", GROUP=\"plugdev\"" >> /etc/udev/rules.d/51-android.rules

This basically appends the following text, to the 51-android.rules file.

SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", MODE="0666", GROUP="plugdev"

What the above text is, is the appropriate permissions for a HTC Device.

Now, disconnect your device, kill your adb-server, if running, using

adb kill-server

and, reconnect device. Now, try running the following command, to see if your device's actually connected :)

adb devices

You should see an output similar to:

List of devices attached
XXXXXXXXXXXX    device

Hope this helps :)

P.S. In case you're searching for rules for other android devices, this link at source.android.com might help: Initializing a Build Environment. Look for the "Configuring USB Access" section :)

Also note: A better option would be to install the "android-tools-adb" and "android-tools-fastboot" packages available in the Ubuntu repositories. This can be done using the following commands:

sudo apt-get install android-tools-adb android-tools-fastboot
Izzy
  • 91,166
  • 73
  • 343
  • 943
thewisenerd
  • 419
  • 2
  • 3
  • ^edited... :) and, this would actually work, for I have the device too :p – thewisenerd Feb 08 '14 at 07:51
  • If you've got a different device, see my answer here (includes the steps for how to find the VendorID). – Izzy Feb 08 '14 at 13:54
  • "a better option": those tools do not automatically create the rules. And to me it looks like OP already has the complete SDK installed, in which case these two packages are redundant, as their tools are already included. // Thanks for your update, Vineeth! – Izzy Feb 08 '14 at 14:01