Make it executable without specifying the adb path

This article can be read in about 3 minutes.
PR

The purpose 

Installing Android Studio, the Android app development environment, also installs adb (Android Debug Bridge), which allows you to install apps and manipulate files on your Android device from your PC.

However, by default, you need to specify the path to adb when running it from the command prompt.

This guide shows you how to configure your system to run adb directly without specifying the path.

PR

Environment

OS:windows11

Android Debug Bridge version 1.0.41
Version 33.0.3-8952118

PR

Environment variable

 Location of the executable file

adb will be installed in the following folder:

C:\Users\<window user name>\AppData\Local\Android\Sdk\platform-tools\adb.exe

set as an environment variable

Press the Windows key, type “environment,” and click Edit the environment variables that appear.

After selecting “Path” in the following dialog box, click “Edit.”

Click “New” in the following dialog and enter the following string:

(You can enter C:\Users\username\AppData\Local\Android\Sdk\platform-tools\adb.exe, but using this fixed path will be easier for all users.)

%USERPROFILE%\AppData\Local\Android\Sdk\platform-tools

Click ‘OK’ on both open dialog boxes to complete the operation.

PR

Result

Open a new command prompt, navigate to any directory, type adb, and press Enter. If you see output similar to this (you may need to scroll up as the output is long), you’re successful. The presence of the help text indicates success.

comment

Copied title and URL