12

I've recently installed adb and fastboot:

apt-get install android-tools-adb android-tools-fastboot

After the installation finished, I connected my device and ran the following command:

$ adb devices
List of devices attached

I've enabled debugging in the phone settings.

I think am doing it wrong-- I don't know. Please explain me the correct process.

Using Ubuntu 16.01. Device: Yu Yuphoria

Update edit:

After all the frustrating attempts It's still not detected in adb. However in fastboot mode, adding the vendor id command for my device, fastboot -i 0x2a96 devices as found mentioned here works

fastboot -i 0x2a96 devices

returned

7dd91912        fastboot

Other commands in fastboot mode, as instructed in the same page mentioned above, works too when vendor id command option was added.

  • Have you already authorized the computer's RSA key? – wjandrea Dec 22 '16 at 17:53
  • Am a total newbee - can you please explain? Thanks. – spaceout Dec 22 '16 at 17:54
  • When you enable USB debugging in the phone, then attach it via USB, you should get a prompt asking if you want to allow the PC to debug the phone, and it will show you the PC's RSA key to identify it. – wjandrea Dec 22 '16 at 17:56
  • I didn't get any such prompt when I attached my phone to the computer. – spaceout Dec 22 '16 at 17:58
  • 1
    @Teekin see if this helps stackoverflow.com/questions/10086464/… – spaceout Nov 20 '18 at 9:16
12

Finally got the device detected in adb under adb devices command by restarting adb server with root privilege as mentioned here in the Troubleshooting adb section.

sudo adb kill-server
sudo adb start-server

After this adb devices returned

7dd91912      unauthorized

with a prompt on device for RSA authorize. After authorizing

adb devices now returns

72291912      device
4

Make sure you have a good USB cable and are plugged into a good port. This was always the problem I experience when using ADB and fastboot. Also make sure you update and have the latest ADB drivers.

  • 1
    ADB drivers? Aren't those only for Windows? – wjandrea Dec 22 '16 at 21:11
  • Agreed, after an entire day spent getting frustrated with my computer and phone, it turned out that the cable was the reason they weren't talking. – David Thefan Dec 22 '16 at 21:56
1

You installed the adb program correctly. The Android Debugging isn't activated by default. The activation option is hidden. You'll have to reveal it with these steps:

Goto Settings -> About phone -> (scroll to) Build number ->
 (Tap on it about 7 times) -> (You should get a notice
 You have enabled the development settings)

Now you will have a new menu item in settings called Developer options.

Go into this option and turn on the USB debugging option.

Now when you plug in the USB cable to the computer, you'll get the prompt to Authorize the connected computer.

After the debugging is turned on you may have to restart the server. You can do that with these commands:

$ adb kill-server
$ adb start-server
  • I've already turned on the 'USB debugging' option - but not getting any prompt on connecting to the computer – spaceout Dec 22 '16 at 18:11
  • Also need to add udev rules for your device – Kyle H Dec 22 '16 at 18:28
  • can you please explain how to add the udev rules – spaceout Dec 22 '16 at 18:31
  • @red_speck When you connect your device, do you get a usb file browser of the content, or the option to view the content? Also, try starting restarting the adb server with the kill-server and start-server added to my answer. – L. D. James Dec 22 '16 at 18:31
  • I don't get this clearly "do you get a usb file browser of the content, or the option to view the content?" but if I guess what you mean, I think it's the usb file browser (I can browse through the files of the phone - I've used all three available options to connect USB for my device - MTP, PTP and charge only). I've tried restarting the adb with your said commands. – spaceout Dec 22 '16 at 18:37
0

To set up device detection on Ubuntu Linux:

Using sudo, create this file: /etc/udev/rules.d/51-android.rules.

Use this format to add each vendor to the file:

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

In this example, the vendor ID is for HTC. The MODE assignment specifies read/write permissions, and GROUP defines which Unix group owns the device node.

If you do not know your vendor ID, you can get this from lsusb, it is the string after ID.

Once you have created/updated the file, execute:

sudo chmod a+r /etc/udev/rules.d/51-android.rules
  • 1
    I did all this, (vendor id for my device 2a96) and also created adb_usb.ini file in .android from this post – spaceout Dec 23 '16 at 8:49

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.