Installation Android Debug Bridge (ADB) is a fundamental step for any enthusiast, developer or advanced user who wants to gain complete control over their device. This universal tool allows you to carry out deep debugging, install applications bypassing standard restrictions, make full system backups, and even reflash the gadget in case of critical failures. Without correctly configured Platform-Tools access to many hidden functions of the operating system remains closed.
The configuration process may seem complicated to a beginner due to the need to work with the command line and system variables. However, if you break the task into successive stages, the entire procedure takes no more than 10-15 minutes, even on a not-so-powerful computer. The key to success is to strictly follow the order of actions when adding paths to system variables. In this material, we will analyze each step in detail, eliminating common mistakes.
Before starting the technical part, you need to prepare your workplace and make sure that all components are available. You will need a stable Internet connection to download archives from Google servers and a high-quality USB cable that can transfer data, not just charge the battery. Cheap cables often cause the computer not to see the connected device, which is confusing during the first setup.
Preparing the environment and loading components
The first step will be to obtain official files from the operating system developers. You need to download the package SDK Platform-Toolsthat contains the executable files adb.exe and fastboot.exe. Downloading should be done exclusively from the official Android Developers resource to eliminate the risk of introducing malicious code or using modified versions of utilities.
After going to the download page, select the archive that corresponds to your operating system. For Windows users, this will be a file with the extension .zip, which does not require installation in the classical sense, but is simply unpacked into any convenient folder. It is recommended to create a separate directory in the root of the disk, for example C:\adb, so that the path to the files is short and does not contain Cyrillic characters or spaces.
- 📦 Download the current version of SDK Platform-Tools from the developer's website.
- 📂 Unpack the archive into the root folder disk folder to simplify the paths.
- 🔌 Prepare an original USB cable to connect the gadget.
- 💻 Make sure that the chipset drivers are installed on your computer (often loaded automatically).
Use USB ports built directly into the motherboard (at the back of the system unit), since ports on the front panel or through hubs may not provide a stable voltage for debugging.
It is important to understand that the archive itself does not automatically start the service. Platform-Tools is a set of console snails that require a manual call via the terminal or command line. That is why it is critically important to correctly configure the environment variables, which will be discussed in the next section, otherwise the system simply will not be able to find the executable file using the entered command.
Setting environment variables in Windows
In order for the command adb to work from any directory without having to go to the tools folder each time, you need to register the paths in the system variables. This is a standard Windows procedure that allows the operating system to know where to look for executable files when entering a command in the terminal. Ignoring this step will result in a “command not found” error when you try to run it.
Open the Start menu, start typing “Variables” and select “Change system environment variables”. In the window that opens, find the “Environment Variables” button and in the “System Variables” block, find the parameter named Path. Select it and click “Edit”, then add a new item pointing to the folder where you previously unpacked Platform-Tools.
⚠️ Attention: When editing the path, make sure that it leads to the folder with the files, and not to a higher level. The path must end with
platform-tools, otherwise Windows will not be able to find the executable fileadb.exe.
After adding the path, be sure to click "OK" in all open windows for the changes to take effect. Sometimes you need to restart the computer or at least reconnect the command line terminal for the system to update the list of variables. If you are using PowerShell or CMD that was running before changing the settings, you need to close them and open them again.
☑️ Checking the settings of variables
Checking the correctness of the settings is carried out by simply entering the command adb version in the command line. If in response you see the version number and assembly details, it means that the path is specified correctly and the system is ready for use. Otherwise, you should double-check the path syntax and the absence of typos in the folder names.
Activating developer mode on the device
Without the appropriate permissions on the smartphone side, the computer connection will be limited to only charging or transferring files. To access debugging, you must activate the hidden “For Developers” menu. On most devices running Android this is done through the “About phone” section in the settings.
Find the “Build Number” item and quickly click on it 7 times in a row. The system will notify you that you have become a developer, after which a new section will appear in the main settings menu. It is inside it that the “USB Debugging” switch is located, which must be activated to start working with ADB.
- 📱 Go to Settings → About phone.
- 🖱️ Click on “Build Number” 7 times until a notification appears.
- ⚙️ Go to the menu that appears “For developers.”
- 🔌 Turn on the “USB Debugging” toggle switch.
When you connect to the computer for the first time, a request to confirm debugging will appear on the screen of your mobile device. A digital key (RSA fingerprint) will be displayed on the screen, which must be verified and click “Allow”. It is also recommended to check the box “Always allow from this computer” so as not to confirm the action every time you connect.
What to do if the developer menu does not appear?
On some shells (for example, MIUI or ColorOS), after activating the menu, you may need to additionally enable the “USB debugging (Security Settings)” item and allow installation of applications via USB.
Connection diagnostics and working with the command line
After completing all the preparatory steps, the moment of truth comes - checking the connection between the PC and the gadget. Connect the device with a cable and enter the command adb devicesin the command line. If everything is configured correctly, you will see a list of connected devices with their unique identifiers and status device.
If the status is displayed as unauthorized, look at the smartphone screen. There should be a dialog box asking for debugging permission. If the window does not pop up, try disconnecting and reconnecting the cable or changing the USB operating mode (for example, switching to “Charge Only” mode and back to “File Transfer”).
C:\> adb devicesList of devices attached
192.168.1.55:5555 device
R58M123456X device
Status offline usually indicates problems with drivers or an unstable connection. In such a situation, it makes sense to check the Windows Device Manager: if there is a device with an exclamation mark there, you need to update the driver by manually selecting it from the Google USB Driver list or the chipset manufacturer.
| Status in ADB | Value | Actions |
|---|---|---|
| device | Device is connected and ready to work | You can execute commands |
| unauthorized | Confirmation is required on the phone screen | Click “Allow” on the gadget screen |
| offline | No connection or problem with the driver | Reconnect the cable, check drivers |
| no device | Device not found | Check the cable and enable debugging |
Basic commands and system management
After successful connection, wide control options open up before you. The basic command syntax involves using the prefix adb followed by specific action. For example, the command adb reboot will reboot the device, and adb reboot bootloader transfer it to bootloader mode for further manipulations.
To install applications, use the flag -r (reinstall) or -d (downgrade), which allows you to replace existing versions or install older ones. The command looks like adb install -r application.apk, where the path to the file can be absolute or relative to the current folder.
- 📲
adb shell— entering the Android command shell (Linux-based shell). - 💾
adb pull /path/to/file— copying a file from the phone to the PC. - 📥
adb push file.txt /sdcard/— downloading the file from the PC to phone. - 📸
adb shell screencap -p /sdcard/screen.png— creating a screenshot.
⚠️ Attention: Be extremely careful when using the command
adb shell rm(delete). Deleting system files via ADB may make it impossible to boot the operating system (bootloop) without flashing it.
One of the most useful features is the ability to enter text and emulate keystrokes. You can send text to the input fields with the command adb shell input text"Hello" or emulate pressing the Home button via adb shell input keyevent 3. This is especially useful when creating automation scripts or testing interfaces.
Wireless debugging and advanced scripts
Starting with Android 11, the wireless debugging process has been greatly simplified and built directly into the developer menu. Now, to connect via Wi-Fi, it is not necessary to have root access or use complex commands via a USB cable, although the initial pairing may still require a short-term connection.
To activate, find the “Wireless Debugging” item in the developer menu. Once enabled, you will see the IP address and port. Modern versions of the SDK allow you to pair directly through the Android Studio graphical interface or using a command adb pair ip:port with a confirmation code.
C:\> adb connect 192.168.1.55:5555
connected to 192.168.1.55:5555
Using wireless mode significantly increases the developer's mobility, allowing you to test applications without tangled wires. However, it is worth remembering that data transfer speeds over Wi-Fi, especially in congested networks, can be significantly lower than over a USB 3.0 cable, which affects the installation time of heavy APK files.
Wireless debugging is convenient for testing, but for critical operations such as flashing or restoring the system, always use a reliable wired connection.
Frequently asked questions (FAQ)
Why doesn’t the computer see the phone in debugging mode?
Most often the problem lies in the drivers. Try installing universal Google USB Drivers via SDK Manager or download specific drivers from the website of your smartphone manufacturer (Samsung, Xiaomi, Huawei). Also check the cable - it should support data transfer, not just charging.
Is it safe to keep USB debugging enabled all the time?
No, it is not recommended. If you lose your phone or it falls into the hands of an attacker, enabling debugging will allow you to gain full access to your data and bypass the screen lock. Enable this feature only while work is underway.
Can ADB be used on Mac and Linux?
Yes, Platform-Tools Available for all major operating systems. The operating principles are identical, only the file paths and the syntax for setting environment variables are different (for example, using .bashrc or .zshrc in Linux/macOS instead of the Windows registry).
What to do if the adb command is not found?
This means that the path to folder platform-tools is not added to the environment variable Path. Return to the variable settings section and make sure that the path is entered correctly and does not contain unnecessary characters. After the changes, restart the terminal.