Quick Tip: (Un)Installing Apps on Google Glass

Installing new apps (or removing) them from Google Glass doesn’t require you to use the ADT IDE. You can use a few simple command lines via ADB (Android Debug Bridge) to install/uninstall APKs.

Here’s the simple steps:

  1. Plug in your device. Ensure Debug mode is turned on. Install the USB Drivers for the device. See this post if you need help installing USB Drivers for Glass.
  2. Open a command prompt. CD into / Browse to where you installed the ADB tool kit. Its in [ADT Install Dir]/sdk/platform-tools/
  3. Place the APK you wish to install into the same directory as the ADB.exe.
  4. To install any APK, just type: ‘adb install [APK Filename.apk]‘. You should see some status messages and finally ‘Success’.
  5. Once the APK is installed, you can check the package status by using: ‘adb shell pm list packages‘. You should see a listing of all installed packages, listed by Java package. Look for your package. For example, if your project was written in the ‘com.test’ you should see it in the list.
  6. To uninstall any APK, type adb uninstall [package name]. Example: ‘adb uninstall com.test’.

A note:

  • You can’t install a package on top of one that already exists. So to update a package on Glass, you want to uninstall and then install. There’s no ‘reinstall’ or ‘update’ if you are using this command line method.

That’s it!

Google Glass: Development & GDK!

Learning the Glass Development Kit was one of my immediate goals after getting Glass. So, just like learning any new Platform, I built a  “HelloWorld” LiveCard application 🙂

The GDK itself is not finalized and is still in preview stages. Google has some decent samples here.  Turns out, getting your development environment ready is a little tricky. The Quick Start Guide is a great place to start, but I’ll summarize the entire process here:

  1. Download the ADT Bundle. This contains the SDK Manager and Eclipse based Android Development Tools (ADT) IDE.
  2. Unzip the bundle. Run the SDK Manager and install the supported Glass Android version (currently, 4.4.2). Make sure you include the SDK Platform and Glass Development Preview Kit.sdk-manager
  3. You will need to install the newest Android SDK Build-tool (currently 19.0.1). I accidentally installed 19.0 and ended up with runtime issues.
  4. Finally, install the Google USB Driver. This allows the ADT to communicate with Glass. When installed, it will be located in <your install folder>/sdk/extras/google/usb_driver/.usb driver
  5. Next, you need to prepare Glass itself to accept custom built software. Go into the “Settings” live card, then scroll until you see “Device Info”. Tap once, choose “Debug” and enable it.
  6. Unfortunately, the provided USB Driver is not compatible with Glass. You’ll have to modify the “android_winusb.inf” file to include Glass entries before Windows will accept the driver. Add the following to the [Google. NTx86] and [Google. NTamd64] sections:
    ;Google Glass
    %SingleAdbInterface% = USB_Install, USB\VID_18D1&amp;amp;PID_4E11&amp;amp;REV_0216&amp;amp;MI_01
    %CompositeAdbInterface% = USB_Install, USB\VID_18D1&amp;amp;PID_4E11&amp;amp;MI_01

    Note: The actual VID , PID, REV, and MI values must match what your actual hardware device ID says. You can get your specific values by plugging Glass into your USB port. Open up your Device Manager, browse to the Glass device that has a missing driver (marked with !). Right click, goto Properties –> Details Tab –> Hardware IDs dropdown.
    adb device

  7. Install the USB Driver to Windows.  Open up your Device Manager, browse to the Glass device. Right click and choose Update Driver. Browse to the above folder (Step 4) and proceed with the install.
  8. With Glass plugged in, go back to <your install directory>/eclipse and start Eclipse. Switch to the DDMS perspective (Window –> Open Perspective –> DDMS).
  9. You should see Glass in the Devices tab.
  10. Now you’re all set!