Installing, Running, and Navigating through apps

Search This thread

shodutta92

Member
Jun 29, 2012
9
13
I've gotten a few questions about how to run apps on the Nexus Q, so I figured I'd make some sort of post giving instructions, at least basic ones.

1. Enable USB debugging on the Q. This is done by running the nexus Q app on another device, pairing with the Q, and then going to advanced and enabling USB debugging.

2. Installing apps is done by running
Code:
adb install path/to/app.apk
in the command line on a computer.

3. launching apps is done in command line by running
Code:
adb shell
, then typing
Code:
am start package.name/.Activity name
. For example, opening settings is done with
Code:
am start com.android.settings/.Settings
once in adb shell. Netflix is
Code:
am start com.netflix.mediaclient/.UIWebViewActivity
, and Angry Birds is
Code:
am start com.rovio.angrybirds/com.rovio.ka3d.App
. The package/activity names can be determined by running the app on another android device, plugging it into a computer, and running the monitor tool in terminal and looking at the hierarchy viewer.

4. XY coordinates for touch/drag events can be given to the device by using the monkeyrunner tool (documentation can be found on the android developers website). For a brief overview:
start monkeyrunner (located in android-sdk/tools/)
Code:
from com.android.monkeyrunner import MonkeyRunner, MonkeyDevice
device = MonkeyRunner.waitForConnection()
device.touch(x, y, MonkeyDevice.DOWN_AND_UP)
device.drag((startX,startY), (endX, endY), 1, 10)
device.press('KEYCODE_BACK', MonkeyDevice.DOWN_AND_UP)

I realize this isn't very complete, but I'll add some stuff to it as I play more.
 

Some_dude36

Senior Member
Mar 21, 2012
701
114
hollow earth
So theres no UI for the apps? You have to memories each apps command string?

That sucks. lol Is there any chance of a UI in development or a launcher for the apps?

That seems excessively complicated to run for example angry birds with quite an extensive com string.
 

shodutta92

Member
Jun 29, 2012
9
13
Agreed, it does really suck to have to use console commands.

Well...lets just say I'm working on something. It may take a few days before I know whether it'll actually work, but I'll let you know.
 

Zarboz

Known Scammer
Mar 5, 2009
145
9,339
Denver
Why not install the VNC application for droid

in order to run the VNC server on your nexus Q and then use your tablet or other touch enabled android/computer/device to control the Q interface :D

http://code.google.com/p/android-vnc-server/

https://play.google.com/store/apps/details?id=org.onaips.vnc&hl=en

https://play.google.com/store/apps/...t#?t=W251bGwsMSwyLDEsImNvbS5zY2h1bWkudm5jcyJd

this is just an idea considering you have root the app shouldnt be hard to set a call to on some kind of init.d script path

i think it would serve well for navigation
 

THE_KINGDOM

Senior Member
Sep 20, 2011
1,071
137
OnePlus 11
it's basically identical internals to the galaxy nexus, with some extra hardware outputs, so you can port over a custom rom for galaxy nexus and use that as the UI for now
 

mrjaymillz

Member
May 20, 2012
16
0
it's basically identical internals to the galaxy nexus, with some extra hardware outputs, so you can port over a custom rom for galaxy nexus and use that as the UI for now

What your saying does make sense, so I'm willing to give it a try this weekend. I will port over the same ROM I have on my VZW Galaxy Nexus (Stock Jellybean 4.1 from Rootz Wiki). In order to do so I will need just a little bit of help... My Q is already rooted, so you can just provide me with a walk thru outlining how to push/port the ROM over. Do I have to hook it to the pc again and start the bootloader with adb or what exactly? Thanks for the help in advance.
 

zulu99

Senior Member
Jan 6, 2009
2,348
1,482
You can install droidmote server on nexus q and control it with your android phone.
with droidmote server you simulate a mouse a keyboard a multitouch touchpad etc. etc.
you can play, in remote,also with games that support only the touch screen
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 13
    I've gotten a few questions about how to run apps on the Nexus Q, so I figured I'd make some sort of post giving instructions, at least basic ones.

    1. Enable USB debugging on the Q. This is done by running the nexus Q app on another device, pairing with the Q, and then going to advanced and enabling USB debugging.

    2. Installing apps is done by running
    Code:
    adb install path/to/app.apk
    in the command line on a computer.

    3. launching apps is done in command line by running
    Code:
    adb shell
    , then typing
    Code:
    am start package.name/.Activity name
    . For example, opening settings is done with
    Code:
    am start com.android.settings/.Settings
    once in adb shell. Netflix is
    Code:
    am start com.netflix.mediaclient/.UIWebViewActivity
    , and Angry Birds is
    Code:
    am start com.rovio.angrybirds/com.rovio.ka3d.App
    . The package/activity names can be determined by running the app on another android device, plugging it into a computer, and running the monitor tool in terminal and looking at the hierarchy viewer.

    4. XY coordinates for touch/drag events can be given to the device by using the monkeyrunner tool (documentation can be found on the android developers website). For a brief overview:
    start monkeyrunner (located in android-sdk/tools/)
    Code:
    from com.android.monkeyrunner import MonkeyRunner, MonkeyDevice
    device = MonkeyRunner.waitForConnection()
    device.touch(x, y, MonkeyDevice.DOWN_AND_UP)
    device.drag((startX,startY), (endX, endY), 1, 10)
    device.press('KEYCODE_BACK', MonkeyDevice.DOWN_AND_UP)

    I realize this isn't very complete, but I'll add some stuff to it as I play more.