I spent a moment this morning slapping together another application for the Nexus Q. This one is really simple, and all it does is to use the LEDs to show the time. There are three “hands” that show the hour in white, minutes in blue, and seconds in red.
The video doesn’t do full justice to the ability to read the time. The camera picked up too much light around each hand due to the diffusion the LEDs have. For example, the second hand looks fully red in real life, and doesn’t have the rainbow band around it as seen on the video.
53f32769-46f8-4cae-8c6d-7e29f175e997|1|5.0|96d5b379-7e1d-4dac-a6ba-1e50db561b04
The QRemote REST API documentation is now bundled into the application itself, but here’s a copy/paste for reference.
More...
537bb1f4-008c-42c0-8743-43de60339f8f|0|.0|96d5b379-7e1d-4dac-a6ba-1e50db561b04

I just finished setting up a repo on GitHub for QRemote: https://github.com/docBliny/qremote
It includes the source for both the Android application and the web interface.
I also updated the installable APK with the rough API documentation.
1fc56c8b-0459-4c07-a3f5-7aea53ff686d|0|.0|96d5b379-7e1d-4dac-a6ba-1e50db561b04
UPDATE July 14, 2012: I updated the APK to contain rough API documentation. Just navigate to http://192.168.1.1:8080/api.html adjusting the IP address to match your Q.
OK, it’s late (I mean early), but here’s a very rough alpha version of QRemote which let let you control the Nexus Q via a RESTful-ish API and your web browser. It’s developer-only friendly at the moment, but that shouldn’t a problem since only Google I/O attendees have them. If you’re brave enough to test it and have feedback, hit me up via Twitter, Google+, or email. I’m lazy at approving comments here on the site. Anyway, to the point…
GALLERY
Here it is in all it's glory.

Installation
- Download QRemote.apk here.
- Upload the file using adb with the following command: adb install QRemote.apk
Running
Unfortunately, you’ll have to manually start the application every time you power on the Nexus Q. I’m working on to get the boot message receiver to work with a signed package (seems to work fine with a debug build).
- Start the application with the following command: adb shell am start -a android.intent.action.MAIN -n com.blinnikka.android.qremote/.StartServiceActivity
- Open up a browser and navigate to port 8080. For example, http://192.168.1.1:8080/
Known Issues
- You need to start it manually every time you power up the Nexus Q.
- You have to know your Q’s IP address.
- You need to load up a playlist with the Play application on an Android device.
- Videos are not supported.
Uninstalling
- Run the following command: adb uninstall com.blinnikka.android.qremote
Upgrading
You will need to uninstall and re-install the application if you had the initial Alpha version as I changed the keys used to sign the application. Just follow the instructions above to uninstall and install again.
d2e5f944-0662-4796-ba77-6cd3174c8f3d|0|.0|96d5b379-7e1d-4dac-a6ba-1e50db561b04
The video says it all.
 
89f54371-c67f-425f-9cee-2fb0ab163dfd|1|5.0|96d5b379-7e1d-4dac-a6ba-1e50db561b04
This is just a quick post to list out the applications that I’m aware of that use the LEDs on the Nexus Q and their priorities within the system. The priority determines which application gets to control the LEDs at any given moment. Higher numbers represent higher priority. I haven’t looked at the code close enough to see how duplicate priorities are handled, but I’m guessing that that situation is not deterministic.
I haven’t put a lot of effort into verifying whether the descriptions match reality of what the applications do. I’m sure I’ve missed applications, too. Feel free to let me know if something is off.
| Priority | Application | Description |
| 0 / 100 | TungstenLEDService | Master volume. Uses 100 to override everything when volume is changing and switches to 0 otherwise. |
| 5 | Visualizer | Displays theme-based animations. |
| 10 | NetworkLedController | Network status indication. |
| 20 | HubBroker | Bluetooth Pairing portion of the @home broker. |
| 25 | HubBroker | NFC handler. |
823f1152-f63c-4755-837f-1b8be5217572|0|.0|96d5b379-7e1d-4dac-a6ba-1e50db561b04
Here’s a quick list of ways I’ve been able to control playback using the adb developer tool.
- Send media key codes.
- Send broadcast Intents.
The values for both options are listed in the following tables.
| Action | Key Code |
| Play/Pause |
adb shell input keyevent 85
|
| Previous |
adb shell input keyevent 88
|
| Next |
adb shell input keyevent 87
|
| Action | Intent |
| Play/Pause |
adb shell am broadcast -a com.android.music.musicservicecommand.togglepause
|
| Previous |
adb shell am broadcast -a com.android.music.musicservicecommand.next
|
| Next |
adb shell am broadcast -a com.android.music.musicservicecommand.previous
|
| Play |
adb shell am broadcast -a com.android.music.musicservicecommand -e command play
|
| Pause |
adb shell am broadcast -a com.android.music.musicservicecommand -e command play
|
| Stop |
asb shell am broadcast -a com.android.music.musicservicecommand -e command stop
|
a9055f41-565d-49f6-8172-971c553d557e|0|.0|96d5b379-7e1d-4dac-a6ba-1e50db561b04
Do the following at your own risk!
Now that we’ve got that out of the way, here are some caveats:
- The internal “SD card” will be erased (mine only contained empty folders).
- You will unpair the device from your other Android devices and will need to set it up again.
- I wouldn’t flash the boot ROM I’m providing below. I know I haven’t.
Requirements
- Nexus Q
- Android Development Kit, including the adb tool and fastboot.
Instructions
- Plug your USB cable between your computer that contains the Android developer kit and the Nexus Q.
- Run adb reboot-bootloader . The LED ring will stay solid red. You should also be able to do this by holding your hand over the mute LED when it boots. Just let go when the ring turns red.
- Run fastboot devices to make sure you’re connected.
- Run fastboot oem unlock to unlock the bootloader.
- Within five seconds, run fastboot oem unlock_accept . The Q will erase user data and reboot.
- Pair your Android device again with the Q.
- Turn on debug mode again.
- I also put together a new boot.img file that modifies default.propwith the following values:
ro.secure=0
ro.debuggable=1
- Download nexusq-boot.img.
- Run adb reboot-bootloader .
- Run fastboot boot nexusq-boot.img to start the Q with root permissions.
Now you can upload su and back your regularly scheduled Android hacking.
Miscellaneous
adb reboot recovery results in pulsing red LEDs. Touching the mute LED flashes white. I didn’t see anything show up via the HDMI connector. The only way to get out of this mode was to tap the mute LED repeatedly (about five times).
52c26197-5c6f-4e6e-a792-f61362ed8999|0|.0|96d5b379-7e1d-4dac-a6ba-1e50db561b04
You can run the adb utility to initiate a backup, but you’ll get a prompt on the screen to approve the backup. Since there’s no keyboard, you can’t type the password and click OK. Here’s how to do it without an input device.
- Open two command prompt or terminal windows.
- Run the desired backup command in the first window, such as adb backup -apk -shared -all –system .
- Enter the following commands in the second window to trigger keypad movements (down, right, and enter):
adb shell input keyevent 20
adb shell input keyevent 22
adb shell input keyevent 23
You'll now have a backup file named backup.ab on your local machine.
a0dcbf47-690c-4f3c-8e1d-e21ef9328ce1|0|.0|96d5b379-7e1d-4dac-a6ba-1e50db561b04
Here’s a really quick introduction on turning on debug mode for the Nexus Q.
Requirements
- Micro AB USB cable (careful with that connector!)
- An Android device with the Nexus Q application installed
- You may need an Android tablet, see Troubleshooting below.
Instructions
- On your Android device, turn on USB debugging in the device settings.
- Go to Settings, and then scroll down to Developer Options.
- Slide Developer options to ON.
- Check USB debugging.
- Set up the Nexus Q on your network by installing the Nexus Q application on an Android device.
- Start the application, and then select your Nexus Q device.
- Select Advanced.
- Under USB debugging, move to slider to ON.
- Go back to the previous screen.
- Plug on end of the USB cable into the Nexus Q and the other into your computer.
Troubleshooting
- If you can’t see the USB debugging option in the Nexus Q application, You will need to turn on USB debugging in the Android device settings first (not the Q application, the main device settings control panel).
- I could only see this option on the Nexus 7 tablet, not on my Nexus Galaxy phone. The Nexus 7 had the USB debugging turn on in the main settings by default. Thanks to Ryan Warner for figuring this out.
Screenshots



a6672894-b8c3-4db2-b465-428b379e7062|1|5.0|96d5b379-7e1d-4dac-a6ba-1e50db561b04