Skip to content

Developer workflow: install ADB

Philip Lamb edited this page Jul 30, 2019 · 4 revisions

ADB, the Android Debug Bridge, is a command-line tool which allows you to perform a variety of different functions on your Android-based VR device remotely from your PC, including installing and uninstalling apps, starting and stopping activities, running shell commands and more.

Installation

You can install ADB by installing Android Studio, or alternately you can install just the Android command-line tools.

macOS:

Once you have the tools installed, open the terminal, and type adb help to test if adb is installed and accessible to you.

Alternately, you can install ADB via the Homebrew package management system. From the Terminal:

  1. Install Homebrew: ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  2. Install ADB using Homebrew: brew cask install android-platform-tools
  3. Test if installation succeeded: adb help

Windows:

Once Android Studio is installed, you will need to add the platform-tools folder to the command-line path, as follows:

  1. Open the Windows command-line shell (type cmd in Windows search).
  2. In the command-line shell, type or copy and paste this command setx Path "%Path%;%LOCALAPPDATA%\Android\Sdk\platform-tools"
  3. You should see a message "Success". Close the command-line shell.
  4. Open a new command-line shell, and type adb help.

Listing connected devices

In your command-line shell, type adb devices.

Troubleshooting

Only devices with developer mode enabled will show up in the devices list.

If you don’t see any devices listed in the output, turn off your VR headset, disconnect the USB, power your headset back on, reconnect the USB and then run the command again.

If you see a device ID show up in the output with “unauthorized” behind it, put the headset on and look for a permission dialog onscreen.

Once you see a device ID show up with “device” behind it, you are good to go.

See also the ADB command cheat sheet