Search the Community
Showing results for tags 'install'.
To sideload apps onto your Focus device, we suggest using Android Debug Bridge (adb) or your favorite command line tool. For more information refer to the Android Debug Bridge User Guide. You can use Terminal from your desktop or from within Android Studio to navigate to and utilize the debug bridge. (NOTE: On a Mac in order to use adb, you must type “./adb” and then the command each time). Before you begin, ensure that your Focus device is in Developer Mode. To put Focus in Developer Mode: 1.) Tap the Vive Button to pull up the Home Menu. 2.) Click Settings > More Settings 3.) Scroll Down to About Device > Scroll down to Build Number > Click on this 7 Times. 4.) You will see a message that reads, "Congratulations You Are Now a Developer!" This step adds a Developer Options field in your More Settings menu. In the More Settings Menu: 1.) On your Focus go to security - enable unknown sources. Click go back 2.) Go to developer options - enable usb debugging. Click go back.3.) Plug the Focus into the computer. Put the headset back on. Focus your gaze or use controllers to click on ‘transfer files’ Click allow usb debugging from this computer. (this can be tricky. Sometimes the controllers disappear once the device is plugged in. sometimes you have to restart. Unplug. Plug it back in.)4.) Go on to the computer. Open a cmd prompt. Go to the adb directory and run adb 5.) Type the command "adb devices" to make sure it is recognizing your device. If it doesn't recognize your device it may read "unauthorized". If it doesn't show, then look at your device for a message that reads "This computer's RSA fingerprint is not recognized" and gives a toggle box that allows you to choose to allow a connection to your computer. If you don't see it, try plugging and unplugging the device from the USB until this message appears in your Focus. For example to show connected devices: “adb devices” To install an app on a connected device: “adb install [directory location of apk]” If an app is already installed, and you wish to replace it: “adb install -r [directory location of apk]” To uninstall an app from a connected device: “adb uninstall com.CompanyName.AppName” Debugging Tips: Logcat Command Line Tool Use the Logcat command-line tool to help debug your app. It dumps a log of system messages, including stack traces, when your device throws an error, and messages that you’ve written to the Log class. To start Logat: Type adb logcat To stop the logcat, press Control and C at same time. To save the Logcat content to a file, type the following command adb logcat > filename.txt This will save the logcat to “filename.txt”. You can name "filename" whatever you wish. You can then review this file or share it with your engineering team. Even more Tips: # set and start launcher: adb shell cmd package set-home-activity com.htc.mobilevr.launcher/com.htc.vr.unity.WVRUnityVRActivity adb shell am start -n com.htc.mobilevr.launcher/com.htc.vr.unity.WVRUnityVRActivity # reset launcher back to the Android phone launcher: adb shell cmd package set-home-activity com.android.launcher/com.android.launcher2.Launcher adb shell am start -n com.android.launcher/com.android.launcher2.Launcher # run an app: adb shell am start -n <package-name>/<activity-name> # e.g. adb shell am start -n com.htc.bowshot_3DOF/com.htc.vr.unity.WVRUnityVRActivity # list 3rd party installed packages: adb shell cmd package list packages -3 # find activity of an installed package: (from an apk: aapt dump badging yourapp.apk) adb shell cmd package resolve-activity --brief <package-name> # uninstall a package e.g. Vysor: adb uninstall com.koushikdutta.vysor # turn bluetooth on: adb root adb shell service call bluetooth_manager 6 # use 8 to turn off # for wifi use: adb shell svc wifi enable # or disable adb unroot # power down: adb shell reboot -p # check battery level: adb shell "dumpsys battery | grep level" # adb over wifi (setup wifi connection first): # find ip address: adb shell "ifconfig wlan0 | grep 'inet addr:'" # restart adb over wifi: adb tcpip 5555 # connect over wifi: (you can now disconnect usb cable) adb connect <ip address>:5555 # to revert to usb: adb usb # or just reboot # check FPS (windows) adb logcat | find "FPS" # check FPS (mac/linux) adb logcat | grep "FPS" # or use the below commands to filter FPS by a specific app # to get the list of package names (filtered by enabled + 3rd party) adb shell pm list packages -e -3 # replace "com.htcvive.wavetest" with the desired app package name # check FPS (windows) adb logcat "com.htcvive.wavetest" | find "FPS" # check FPS (mac/linux) adb logcat "com.htcvive.wavetest" | grep "FPS" # use "Ctrl + c" to kill the process