0

I wanted to share my experience since I believe many people who has a Google Glass wants to test how to install an android apk which was not designed for Google Glass. If you know other ways, please share below.

Topsakal
  • 447
  • 5
  • 11

2 Answers2

1
  1. If you know the activity/package name:

    adb shell am start -n com.package.name/com.package.name.ActivityName
    adb shell am start -n com.package.name/.ActivityName
    
  2. If you don’t know the activity/package name: (Credit: How to start an application using android ADB tools?)

    a. create a file named adb-run.sh with these 3 lines:

    pkg=$(aapt dump badging $1|awk -F" " '/package/ {print $2}' | awk -F"'" '/name=/ {print $2}')
    act=$(aapt dump badging $1|awk -F" " '/launchable-activity/ {print $2}' | awk -F"'" '/name=/ {print $2}')
    adb shell am start -n $pkg/$act
    

    b. chmod +x adb-run.sh to make it executable

    c. adb-run.sh myapp.apk

Note: This requires that you have aapt in your path. You can find it under the new build tools folder in the SDK:

$ echo 'export PATH=$PATH:/LOCATIONofSDK/platform-tools:/LOCATIONofSDK/build-tools/android-4.3' >> ~/.bash_profile
Community
  • 1
  • 1
Topsakal
  • 447
  • 5
  • 11
0

Install Launchy which allows you to scroll through a list of all apps on the device. The code has recently been updated to allow launching through a voice trigger.

appmattus
  • 2,620
  • 21
  • 15