LoginSignup
7
6

More than 5 years have passed since last update.

adbにgoogle glass explorerを認識させる(Windows, Linux)

Last updated at Posted at 2014-02-26

【追記(2014/04/29)】Linuxでの認識方法を追記。

現象

Google glassはandroidデバイスですので、開発の手順として、Android SDKをインストールしたのちにglassをUSB接続し、adb (Android Debug Bridge)に認識させることになります。このとき、glassを接続したのちにusb_driverを指定してもドライバがインストールされず、「不明なUSBデバイス」のままとなってしまい、adbから認識できない場合があります。
このような現象が発生する要因として考えられるのは、Android SDKで配布されているusb_driverのinfファイルにgoogle glass explorerのプロダクト情報が入っていないことです。

解決策(Windows)

usb_driverが参照するinfファイルにglassのプロダクト情報を追記します。対象となるファイルは以下の通り。
* {Android SDKをインストールしたディレクトリ}\extras\google\usb_driver\android_winusb.inf

android_winusb.inf
[Google.NTx86]
...
; Google Glass Explorer (x86)
%SingleAdbInterface% =  USB_Install, USB\VID_18D1&PID_9001
%CompositeAdbInterface% =  USB_Install, USB\VID_18D1&PID_9001&MI_01

[Google.NTamd64]
...
; Google Glass Explorer (AMD64)
%SingleAdbInterface% =  USB_Install, USB\VID_18D1&PID_9001
%CompositeAdbInterface% =  USB_Install, USB\VID_18D1&PID_9001&MI_01

なお、上記のプロダクト情報(VID_18D1&PID_9001)は2013年に配布されたexplorerのものです。次の世代のgoogle glassではおそらく変更になりますので、デバイスマネージャーでプロダクト情報を参照[*1]し、infファイルに記載する必要があります。

解決策(Linux)

Linuxの場合は、Windowsと比較してより簡単にadbにexplorerを認識させることができます。Android Developersサイト[*2]にあるように、/etc/udev/rules.d/51-android.rulesに以下のようにUSB VendorIDにGoogle (18d1)を指定した行を追加します(はじめてAndroidの開発をする場合はファイルがないので新たにファイルを作成します)。

/etc/udev/rules.d/51-android.rules
SUBSYSTEM=="usb", ATTR(idVendor)=="18d1", MODE="0666", GROUP="plugdev"

そして、USBを再認識させます。Ubuntu 13.10の場合は以下のコマンドです。

$ sudo chmod a+r /etc/udev/rules.d/51-android.rules 
$ sudo udevadm control --reload

参考

7
6
4

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
7
6