How to install native apps on Glass

The apps you can write with the version of Glass that Google shipped to the original explorers only has one documented API for developers. This is the Mirror API, a REST model that provides little in the way of user interaction and is primarily focused on beaming information to your eye. The really fun stuff you can do with Glass is done through what is being called “Native” apps, which are basically Android applications that are side-loaded and run on Glass. These applications have full access to the hardware and can do anything an Android application can do – that is, everything.

What is more important for those who have never developed for Android is: “How do I install and use these applications”? This is the topic of this post. This should be a step by step guide that gets you up and side-loading native applications onto Glass using a Windows computer as quickly as possible. This guide assumes no prior knowledge of debugging on Android so anybody should be able to use it. So let’s get to it!

Enabling Debug Mode on Glass
The first thing you need to do is tell Glass that you want to be able to debug on it. This is supported via a setting directly accessible from the stock Glass UI.

  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!


Installing Drivers for Glass

So unfortunately, the stock android drivers for Windows does not properly support Windows. You can modify the drivers that come packaged with the android SDK to get this to work by following the instructions here, or you can use these drivers that I prepared, downloadable here.

Once you have downloaded the drivers or done the modifications, you will need to plug your Glass into your PC via a MicroUSB plug. Now, follow the instructions found here, using the drivers you downloaded where they are referenced. Please note that if you are using Linux or Apple, you will not need to install any drivers, you can just use the instructions found at that link to get past this step.

When you are done, your Device Manager window should look like this:


Using ADB

Normally ADB comes packaged as part of the Android SDK. However, you can get a standalone version here. Once you have grabbed this, follow these instructions:

  1. Extract the standalone ADB you obtained into some directory that you can come back to at a future date. Copy the directory path to your clipboard.
  2. Open a command prompt. You can do this on Windows 7 by pressing the Start Key, typing ‘cmd’ and hitting Enter. In Windows XP, open the start menu, click on “Run” and type “cmd”.
  3. Type `cd “`, then right click on the command prompt and click “Paste” to copy the directory path from Step (1). Type `”` and press Enter. (Command should be `cd “<directory>”`)
  4. Type `adb devices`. Verify that adb runs and that your glass shows up as a device. It should show up as just a seemingly random jumble of numbers and letters under “List of devices attached”. If all you see is “List of devices attached”, you have not installed the drivers properly.
  5. You’re up and running! You will need to repeat steps (2) and (3) every time you want to use adb.

OK, so you have ADB installed and it can talk to you Glass! Now, what do you do? Well, you came here to load some native apps, so lets do that! My recommendation for your first app is Launchy, an app that allows you to launch other native Glass applications by accessing the Settings card. You can find more information about Launchy and it’s brilliant author here. You can download a binary copy of it here.


Installing Native Apps

I’m sure anyone who has gotten this far already knows this, but it is worth rehashing just in case. Android apps are stored in files with the extension .apk. These files contain all of the program data necessary to run apps on your Android smartphone and on Glass. They are also easily loadable to a device connected via a USB cable using ADB. One of the magic things about Glass is that it is just an Android smartphone at heart, so you can theoretically load any Android application onto it, provided you can come across an APK file for that application. This opens up some exciting possibilities. I strongly urge you to watch this video from Google IO 2013 if this excites you!

So you’ve found an APK you want to install on your Glass, lets push that thing onto your device!

  1. Ensure your Glass is connected to your computer via a USB cable.
  2. Extract or place the APK file in the same directory as adb.exe.
  3. Follow steps (2) and (3) from “Using ADB” above.
  4. Type `adb install <your apk file>`, replacing <your apk file> with the APK filename from step (2).
  5. Verify that the command prompt reports “Success”.
  6. Launch the App to activate it.

So, about step (6). A clever thing that Google did with Android apps is it requires the user to launch an Android (or Glass) app before that app can actually do anything useful. This is a fundamental part of the operating system that no developer can get around. Even if the app doesn’t even do anything in the foreground, it must be launched by the user before it can do whatever it does in the background. Developers familiar with Android can launch apps using adb, but I’m trying to make this guide as easy as possible. So, I recommend you install Launchy, from the links above, which will assist you in easily launching applications.

OK James, you say, I’ll install Launchy, but how am I supposed to launch IT? Simply, using adb. For Launchy, and Launchy alone, you can use this command to start the program: `adb shell am start -n com.mikedg.android.glass.launchy/.MainActivity`. This will launch and activate Launchy.

 

Uninstalling Native Apps

This is probably the most unfortunate part of this whole series in that it is not exactly easy to write up a tutorial on how to uninstall native apps. To uninstall a native app, you will need to use adb and you will need to know the apps “package name”. This is the internal system identifier for the app. Every app I post here (at least until Google provides a better interface for this) I will include the package name so that you can use the following steps to uninstall it if you do not like it. The package name for Launchy is “com.mikedg.android.glass.launchy”. Steps to uninstall an app from Glass:

  1. Ensure your Glass is connected to your computer via a USB cable.
  2. Follow steps (2) and (3) from “Using ADB” above.
  3. Type this command `adb uninstall <package name>`.
  4. Verify “Success”.

 

So, you know how to install/uninstall native apps! Keep following this blog as I post some of my own!

 

Caution!

I feel compelled to mention this – APK’s are true and bonified Android apps. Since you cannot see the permissions (easily) that you are granting them when you sideload them in to your device, they could, feasibly, be doing anything. Be sure you know and trust the author of any APK you choose to sideload into your device before you do it. One beauty of Android is that there really isn’t any such a thing as a virus as long as your device isn’t rooted. If you unintentionally install a malicious program, it is as easy as uninstalling it to get rid of it. However, it’s best not to install the malicious program to begin with.

When it comes to apps from a stranger, really the only way you can be 100% safe is by building their apps from source code yourself. Most native apps I’ve seen thus far are open source, so you can download the source and verify that nothing is fishy before building and running it on your Glass. Unfortunately, this is not something I am comfortable writing a tutorial in. If you want to err on the side of safety but are not a developer, I recommend you wait until Google finishes the GDK, which will (presumably) come as an update that will allow you to load native apps to your Glass from a Google interface.

7 thoughts on “How to install native apps on Glass

  1. Pingback: YouTube for Glass | Applied GlassWare

  2. Pingback: This app lets you watch YouTube on Google Glass | VentureBeat

  3. Pingback: This app lets you watch YouTube on Google Glass | 5 For Business

  4. Pingback: Google ‘bans’ facial recognition on Google Glass – but developers persist | Web Guru Guide

  5. Pingback: Google Glass YouTube App Now Available | Glass Report

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Proudly powered by WordPress
Theme: Esquire by Matthew Buchanan.