Setting Up ADB on Windows and Connecting Wirelessly to Android

How to Set up ADB on Windows Platform

Android Debug Bridge (ADB) is a tool that gives you options to modify, tweak, or debug your Android device. The ADB establishes a connection between your PC and Android device or emulator (for development purposes) through a built-in server. For debugging purposes, you can connect to your device with a USB data cable or over a wireless connection. This guide will give you 2 options for setting up an ADB terminal on your Windows computer, as well as how to establish a wireless connection between device and PC.

Requirements:

Minimal ADB and Fastboot

If you only want to run adb commands to debug or test your device but do not exactly want to go into developing for Android, this light ADB command line program is sufficient. This allows you to push and pull files from your Android device, extract and read logs, sideload, etc.

  1. Download and run the installer.

Download Link

  1. Click on Next at the Welcome and Information prompts.
  2. Take note of the installation destination folder.

ADB-7

4. Select whether or not to add a Start Menu folder and click Next.

5. Select whether or not to create a shortcut and click Next.

6. The summary of options will show. Click Install.

ADB-6

7. In order to run adb commands from anywhere in your PC, you will need to add the installation folder to environment paths to make the adb commands known throughout your computer.

a. Go to your PC’s main folder. (My Computer for Windows 7 and earlier or This PC for Windows 8/8.1)

b. Right click on a white space and click on Properties.

ADB-5

c. In the System Settings window, click Advanced system settings on the left hand pane.

ADB-4

d. In the System Properties window, click on Environment Variables.

ADB-3

e. Scroll and find the Path variable in System variables.

f. Highlight the Path line and click on Edit.

ADB-2

g. Go to the end of the line of path variables. Type in a semicolon immediately after the last character and type in the installation folder path you took note of in step 3 above. (i.e. ;C:\Program Files (x86)\Minimal ADB and Fastboot)

ADB-1

h. Click OK on all preceding windows.

i. Run a command prompt window as administrator. Your computer will now recognize all adb commands, without requiring you to open the command window from the Minimal ADB and Fastboot installation location.

ADB-12

Android Stand Alone SDK Tools

If you will eventually be going into developing apps, it would be worth it to get the complete Android SDK Toolkit. This guide focuses on getting the ADB terminal working.

  1. Download the appropriate (32-bit or 64-bit) SDK Installer Package

32-bit Download

64-bit Download

  1. Unpack the downloaded zip file.
  2. Run the SDK Manager and check that the sdk platform tools are already installed.

ADB-13

4. Take note of the folder path indicated in the SDK Manager.

5. Go to the file folder. Shift+Right Click on any white space of the folder window. Click on Open command window here.

ADB-11

6. You may now type in adb commands in the terminal that opens.

 How to Use ADB Shell Without A Data Cable

If you don’t want to go through the hassle of a data cable to use ADB, you can set up a wireless connection between your device and PC. This enables you to send ADB commands as if your device was physically connected to your PC.

Requirements:

  • Rooted Android device
  • Common network connection of your device and computer
  1. Install ADB Wireless on your Android Device from Play Store.
  2. Run the app and push the big red button.

ADB-14

3. Take note of the address shown (i.e. 192.168.1.148).

ADB-15

4. Open an adb window on your PC and type in the following command: adb connect <address> (i.e. adb connect 192.168.1.148)

5. The service will confirm the successful connection.

ADB-8

You can now type in ADB commands through the terminal. When you are done, just push the big green button on your device to disable the link and kill the server on the ADB window with adb kill-server.

Connecting wirelessly has security risks, of course. It is recommended to use this over a private and secured network connection.

Comments

One response to “Setting Up ADB on Windows and Connecting Wirelessly to Android”

  1. gregzeng Avatar
    gregzeng

    Unsure whether “wireless” includes Bluetooth. Googling to check, in the last 5 minutes, but still do not know.

Leave a Reply

Your email address will not be published. Required fields are marked *