


To fix this, pass a parameter to tell which device to run. adb devices:ĪDB doesn’t know on which device to perform this command. Once it starts, list the devices by executing. Now, try doing the same when you have multiple devices connected.Ĭonnect another physical device or start up an additional virtual device on your machine. Nice job! You executed a command on your connected device. Note: Make sure to authorize the physical device. adb shell getprop and execute to get information about the connected device. To see that in action, shut down virtual machines or disconnect any physical devices until you have only one device listed. If you have one device connected to your development machine, ADB automatically executes commands on that device. Now that you know how to run ADB, there are a few essential things to know when using it from the command line. This note refers to the ADB server, which doesn’t start until Android Studio starts or until you run ADB for the first time. Server: Runs on the client machine and manages the communication between the client and the daemon running on the device.Daemon (adbd): Runs ADB commands on a device.Client: ADB command invokes this on the terminal or via Android Studio.Behind the scenes, ADB has three components that work together: Note: When using ADB from the command line, you may see text about a daemon not running:Īndroid Studio usually hides these details, and a lot of this can seem like magic. Finally, list the contents of the directory. Open the terminal on your machine and change your current directory to the location of your SDK. In these examples, the SDK is located in the /Users/lgleason/canary_fresh_sdk directory. This will bring up a different screen showing the location of the SDK for that project: You can also find it by going to File ▸ Project Structure in an open project. You’ll get a screen that will show the location of the SDK: Next, type android sdk in the search box. Open Android Studio and go to Android Studio ▸ Preferences on a Mac or File ▸ Settings on Linux or Windows. To use it, you’ll need to know where the SDK is on your machine. The Android Software Development Kit ( SDK) includes ADB. Optional: A second, remote machine with ssh installed.Access to a Wi-Fi network that allows device-to-device communication.A physical Android device such as a phone or tablet.Note: This tutorial assumes you’re familiar with Android development, knowledgable about networking and comfortable using the command-line in your chosen operating system.
