Google Glass is not listed as Android Device by AD

2019-03-13 02:52发布

问题:

I'm trying to deploy a glassware .APK to a Google Glass device but it doesn't listed by ADB. I followed several guides which describe how to connect the Google Glass to the Windows 8 OS:

  • glassdev
  • codeproject
  • stackoverflow

I did the following in order to connect the device to my PC.

1.Installed USB driver thought Android SDK Manager

2.Updated android_winusb.inf file and included required lines to identify the device: https://dl.dropboxusercontent.com/u/83972129/android_winusb.inf

these ids I found under the device "hardware id" setting:

  • USB\VID_18D1&PID_9001&REV_0216
  • USB\VID_18D1&PID_9001

3.Connected the device and forced to use the driver above

https://dl.dropboxusercontent.com/u/83972129/android_device.png

It's look almost as in the guide expect of the fact it was installed as "Android ADB Interface" not as "Android Composite ADB Interface"

4.Then I went to ADB tool and tried to list android devices:

https://dl.dropboxusercontent.com/u/83972129/android_adb.png

the Google Glass wasn't there and not adb service restart neither system restart helped.

5.As a result IDE couldn't see the device and it is impossible to deploy .APK

How can I debug the issue? What could be wrong here?

回答1:

You must also enable debug mode on your Glass by going to

  1. Scroll to and select the settings card.
  2. Scroll to and select the “Device Info” card.
  3. Scroll over one to “Turn on debug” and press on it.
  4. Wait a moment and debugging is turned on!

As per this guide.



回答2:

Following these directions, I ran into the issue that my device was recognized, but was listed as "unauthorized" and attempting to run operations on it would get me "error: device unauthorized."

One last thing to verify, if all else fails.

  1. Plug in your glass to USB
  2. adb start-server
  3. adb devices (you should see your device mounted, but listed as "unauthorized")
  4. Attempt to use adb to operate on your device (adb install, adb shell, etc.). You will see the following in adb: "error: device unauthorized. Please check the confirmation dialog on your device."
  5. On your glass device, disable debugging and then re-enable it. After re-enabling it, glass should ask you to confirm that you want to allow this computer to debug your glass device.

Operations you try with adb should now succeed.



回答3:

For those of you folks trying this in 2017 with Windows 10...


DESCRIPTION


Even with Glass debugging on, ADB does not show Glass in the list of devices. Upon plugging Glass in via USB, Glass will chime and Windows 10 will chime, but neither act like they are connected. Glass will not show up under This PC.


FIX


I spent several hours trying everything mentioned in the other answers, but nothing worked.

Turns out you can't use the Google USB Driver that you download with the Android Studio SDK Manager anymore.

  1. Make sure Debug is on in the Glass settings, then hook Glass up to your PC.
  2. Go to Device Manager. Glass will show up as LeMobile Android Device > Android ADB Interface (or something like that).
  3. Right-click it, choose Update Driver Software.
  4. Then select Browse my computer for driver software > Let me pick from a list...
  5. Choose the Android Composite ADB Interface (or something like that; whichever one is the Composite option) and click OK.

After installing the driver, Windows 10 should notify you that Glass connected. It should show up under This PC now. Glass will ask you to allow the connected PC. After allowing, ADB will show it in the list of devices.

I'm recalling this all from memory, so names might not be 100% accurate. The important bit is that I had to select the Composite driver manually.



回答4:

I've noticed that the Hardware ID of the Google Glass device occasionally flips with firmware updates. There's a way to manually update the driver INF file to accommodate the changes as they occur.

  1. Determine Hardware ID (1 or more) for the Google Glass:

    • 1.a. Open Device Manager
    • 1.b. Open the properties for the device that the Glass shows up as
    • 1.c. Click "Details" tab
    • 1.d. Select "Hardware Ids" property
  2. Make sure the driver INF file includes one or both Hardware Ids

    • 2.a. Open ANDROID_WINUSB.INF
    • 2.b. Search for each Hardware Id as shown in step 1.d. above
    • 2.c. If not found, locate the most similar one (see comments below)
    • 2.d. Copy the most similar line and edit the copy to match the related Hardware Id. Note that the line begins with some other text that varies (see comments below) -- Be sure to place the copied text in the same "section" as the original line. If you don't know what "section" refers to, just place the copy on the line underneath the original.
    • 2.f. Repeat steps 2.d. for each section in which the most similar line can be found -- usually there are two, one for "NTx86" and the other for "NTamd64"
    • 2.e. Save the changes
  3. Update the device driver with the "Have Disk" option and the modified INF file

NOTE on "most similar line":

  • You are looking for lines that start with "%SingleAdbInterface%" and "%CompositeAdbInterface%" followed by hardware identifiers.
  • The differences will be minimal, such as a line that ends in "&MI_01" but the Hardware Id ends in "&MI_00"

Example:

  • Line in INF file: %SingleAdbInterface% = USB_Install, USB\VID_18D1&PID_9001&REV_0216
  • Hardware Id in Device Manager: USB\VID_18D1&PID_9001&REV_0216&MI_00
  • New line added: %SingleAdbInterface% = USB_Install, USB\VID_18D1&PID_9001&REV_0216&MI_00

Actual Mods (so far):

Below are the additions I've made to the "stock" ANDROID_WINUSB.INF as of April 2014. The lines are added to both the "NTx86" and "NTamd64" sections:

%SingleAdbInterface% = USB_Install, USB\VID_18D1&PID_4E11&REV_0216
%CompositeAdbInterface% = USB_Install, USB\VID_18D1&PID_4E11&MI_01

%SingleAdbInterface% = USB_Install, USB\VID_18D1&PID_9001&REV_0216
%CompositeAdbInterface% = USB_Install, USB\VID_18D1&PID_9001&MI_01

%SingleAdbInterface% = USB_Install, USB\VID_18D1&PID_9001&REV_0216&MI_00
%CompositeAdbInterface% = USB_Install, USB\VID_18D1&PID_9001&MI_00