Debugging an Android Wear device via USB

Is it possible to debug a wear device via USB rather than Bluetooth? This is possible via Bluetooth, but when I connect the clock to a PC via USB, in adb I have:

adb devices List of devices attached ???????????? no permissions 
+5
source share
3 answers

I use Ubuntu 14.10 as the OS and had to follow these steps in order to recognize Wear (source: http://developer.android.com/tools/device.html in step 3):

  • Get the Wear Provider ID: http://developer.android.com/tools/device.html#VendorIds
  • Log in as root and create this file: /etc/udev/rules.d/51-android.rules
  • Add this line and replace ???? your provider ID:
    SUBSYSTEM=="usb", ATTR{idVendor}=="????", MODE="0666", GROUP="plugdev"
  • Save and execute chmod a + r / etc / udev / rules.d / 51-android.rules
  • Plug in your clothes and wait for the Permissions dialog box to appear (on your mobile phone!).

EDIT:

here is the full 51-android.rules file allowing any Android device

+11
source

Restart ADB with root privileges.

 sudo killall adb sudo adb 
+4
source

You need to enable ADB debugging in the Developer Settings on the Wear device, and after connecting the clock computer via USB, you will be asked to “allow USB” debugging for a specific PC on your phone, you click “yes”, and your “wise guy” should be visible in the list adb, you should also see the log and you can immediately deploy applications - like any phone in debug mode.

0
source

Source: https://habr.com/ru/post/1207130/


All Articles