How to: Sideload Google Glass apps using ADB on a Mac

Google now has a decent number of apps listed in the Glassware section of MyGlass, but due to certain restrictions, many apps are currently not eligible to be listed in the Glassware collection. If you want to install these non-Glassware apps and other software, you’re required to put in a little more effort than just flipping a switch in the MyGlass app. This tutorial is going to teach you, step-by-step, how to set up ADB on your Mac and how to use it install and uninstall sideloaded apps on Google Glass.

First off – what is ADB? ADB stands for Android Debug Bridge and is a part of the Android SDK (Software Development Kit). This will allow us to sideload packages to Glass from our Mac using the command line – giving us the ability to install these apps on our device.

How to download and install ADB on Mac

sdk pic

  1. Download the Android SDK ADT Bundle for Mac.
  2. Once downloaded you will have a file that looks exactly or very similar to this: adt-bundle-mac-x86_64-20131030.zip. You want to double click that file after it has finished downloading to get a folder containing the Android SDK files.
  3. Once you have the file unzipped, open up the folder and you will see two more folders: eclipse and sdk. We will be working with the sdk folder today. Keep the eclipse folder somewhere you will remember though, as it can be handy if you need to do some coding later.
  4. Feel free to rename the sdk folder to a something else of your choice. For this demonstration we will rename it to “Android SDK.” Be sure to place this folder in a location where you won’t lose it. I recommend placing it in your Documents or your home folder (i.e. spencerkleyweg or the name you chose when setting up your Mac).

Next, I’ll walk you through how to add the “adb” command to your PATH. This will allow you to use the adb command from any directory within your terminal shell.

Adding adb to your PATH

  1. Open Terminal. You can find this basic command prompt app in “Utilities” in your Application folder, or by typing “Terminal” in spotlight.
  2. Type:

export PATH=${PATH}:

2.  Don’t press Enter yet. Use Finder to locate the directory within the “sdk” folder which includes the “adb” file:

 

platofrm tools

3.  Drag the folder, which should be “platform-tools” to the terminal window. This will append the directory location of platform-tools to the end of the command we entered earlier. For me, my final command looks like this:

export PATH=${PATH}:/Users/(your home folder name)/androidsdk/sdk/platform-tools

4.  Press Enter.

5.  Type:

adb version

6. Press Enter.

7.  If “adb” was successfully added to your PATH, you should see the following or something similar:

Android Debug Bridge version 1.0.31

8.  You’re now ready to continue with the tutorial.

The Android SDK and ADB are now installed on your Mac. Next, I’ll teach you how to install and uninstall apps on your Google Glass.


How to install apps on Google Glass

  1. Be sure you have followed the steps above on how to install the Android SDK on your Mac.
  2. Put on Google Glass and swipe all the way to the left and click on the Settings bundle. Next, navigate to the right and click on the Device Info card. Swipe once to right and you will want to tap the “Turn on debug” card, giving our computer access to Glass once plugged in.
  3. Next, plug your Google Glass into your Mac using the Micro-USB cable provided by Google. I highly recommend using the cable provided by Google because Explorers using third-party cables have run into problems in some cases where their computer won’t recognize Glass.
  4.  Open Terminal. You can find this basic command prompt app in “Utilities” in your Application folder, or by typing “Terminal” in spotlight.
  5.  Once you have a Terminal window open, type the following and press enter:

adb devices

You should see something similar to screenshot below.

adb devices

6. Locate the APK file of the app you would like to install (Linked below is a Google Docs spreadsheet of known Google Glass apps with APK files). For this example we will be using +Virginia Poltrack‘s Glass Vignettes as our app.

7. To install an app you will simply type the following:

adb install yourapp.apk
(where “yourapp.apk” is the location of the app’s .apk file)

Press Enter.

Alternatively, you can use the following method which is a little easier. Type:

adb install (insert a space)

And then drag the APK file into the command line.

Press Enter.

You should see “Success” on screen if you installed the app correctly.

install success

How to uninstall apps on Google Glass

Uninstalling apps on Google Glass is not as easy as installing them, but it will become natural after you’ve run through the steps a few times. You would think doing the same process with “uninstall” rather than “install” would work, but there are a few steps you need to complete to successfully uninstall an app from Google Glass.

  1. Make sure Glass is in debug mode and plugged into your Mac as demonstrated above.
  2. Open up Terminal and type:

adb shell

Press Enter.

3.  We need to find the package name to uninstall which is not yourapp.apk. In your terminal window type:

pm list packages -f

This will preset you with a list of packages that are on your Google Glass device. It may take a little while to find the correct package name needing to be uninstalled. You will know what the package name is because it will be formatted somewhat like this:

com.company.glass.app

The name will come right after an equal sign (=). Copy this name because we will need to use it to uninstall the app.

4.  Open a new terminal window and type:

adb uninstall *package name*

Press Enter.

Much like after installing, you should see “Success” printed on screen after a few seconds.

uninstall success

This is the official GoogleGlassFans guide to setting up ADB on a Mac and installing/uninstalling apps on Google Glass. We hope that this guide as well as potential future guides can help brighten your experience with Google Glass. Let us know what you think of our How-To guides in the comments below and be sure to let us know what you would like to see in the future!

List of sideloadable Google Glass apps: Google Glass APK List

Stephen Hall contributed to this article.