Mobile device management is often limited to the touch screen and pre-installed interface, but there are tools that allow you to look “under the hood” of the operating system. Android Debug Bridge, or for short ADB, is a universal command line utility that provides communication between a computer and a device based on Android. This tool is part of the package Android SDK Platform-Tools and allows you to perform a wide range of actions: from installing applications and transferring files to deeply debugging the system and obtaining logs.

Use adb opens up opportunities for the user that are not available in the standard mode of operation of the smartphone. You can remove system junk, change screen resolution, emulate geolocation, or even restore your device after software failures. Despite the apparent complexity of the command line interface, mastering the basic principles of working with the debug bridge is accessible even to inexperienced users who are willing to spend a little time learning the syntax.

In this guide, we will analyze in detail the process of setting up the environment, connecting the gadget and performing key operations. Understanding how this protocol works will become the foundation for further delving into firmware modification and automation of routine tasks. Are you ready to turn your smartphone into a fully controlled device?

Preparing the working environment and installing drivers

The first step towards full control of the device is installing the necessary software on a personal computer. You will need to download the official package Android SDK Platform-Tools from the developers' website Google, which contains the executable files adb.exe and fastboot.exe. Unpack the archive into a convenient directory, for example C:\platform-toolsto avoid problems with long paths and Cyrillic characters in folder names.

However, the presence of files is not enough to get started: the operating system must correctly recognize the connected device. This often requires the installation of specific USB driverss, especially if you are using Windows. Owners of devices from Samsung, Xiaomi or OnePlus can find branded drivers on official support sites, while for many other models universal drivers are suitable Google USB Driveravailable through the package manager SDK Manager.

⚠️ Attention: During installation drivers in Windows Device Manager may require manual selection of the .inf file. If the system displays a driver signature error, try disabling digital signature verification during installation or using compatibility mode.

After installing the components, you must add the path to the tools folder to the system environment variable PATH. This will allow you to run commands adb from any directory in the terminal, without going to the root folder of the utility each time. To check the installation is correct, open the command line and enter a simple command adb versionwhich should display the current revision of the installed tool.

💡

Use the original USB cable that came with the device. Cheap "charge-only" cables often do not have data lines, which makes connecting to a computer impossible for debugging.

Activating debug mode on the device

Operating system security Android By default, blocks external interference, so you must explicitly enable debugging to get started. This feature is hidden in a special section of the settings called “For Developers”. To activate this section, go to the menu Settings → About phone and find the “Build Number” item.

Make seven quick clicks on the “Build Number” item, after which the system will notify you that you have become a developer. Depending on the device model and shell version, this item may be called “MIUI Version”, “EMUI Version” or “One UI Version”. After unlocking the section, return to the main settings menu, where a new item will now appear System → For Developers.

  • 📱 Go to the “For Developers” menu and find the “USB Debugging” switch.
  • 🔌 Connect your smartphone to the computer via a USB cable.
  • ✅ Confirm permission for debugging in the pop-up window on the smartphone screen (RSA key).

It is important to understand that each time you connect to a new computer, the device will ask for confirmation of trust. The RSA key fingerprint is stored in the device memory, therefore, when resetting the settings to factory settings, you will have to go through authorization again. Never confirm debug requests unless you initiated the connection yourself, as this could give an attacker access to your data.

☑️ Checking readiness for operation

Executed: 0 / 5

Basic commands and checking the connection

When the software is configured and the device is connected, the moment of truth comes - checking the connection. Open a terminal or command prompt in your tools folder and enter the command adb devices. This utility scans connected ports and displays a list of device identifiers with their status.

If everything is done correctly, you will see a line with the serial number of your gadget and status device. Status unauthorized means that you missed confirming the RSA key on the smartphone screen. Status offline usually indicates problems with drivers or physical cable connections.

adb devices

List of devices attached

R58M123456X device

In addition to checking the list, it is useful to know the command adb rebootthat reboots the device, and adb reboot bootloaderthat puts the gadget into bootloader mode for further manipulations with the firmware. The command adb shell opens an interactive shell directly on the device, allowing you to execute Linux commands directly in the environment Android.

📊 For what purpose do you plan to use ADB?
Removing system applications
Installing custom recovery
Task automation
Collecting logs for debugging
Just exploring the possibilities

Managing applications and file system

One of the most popular functions ADB is managing installed in packages. You can install applications remotely using the adb install path_to_file.apkcommand, or remove them for a specific user. This is especially true for removing pre-installed software (bloatware), which cannot be removed through the standard settings interface.

To remove the application, use the command adb shell pm uninstall --user 0 package_name. Please note that this method removes the application only for the current user (usually the owner), without affecting the system partition, which makes the operation reversible with a factory reset. To find out the name of the package of the desired application, you can use the utility adb shell pm list packages with filtering by name.

Command Description of action Requires Root
adb install app.apk Installing an APK file on the device No
adb uninstall com.package Deleting the application (full access required) Yes (often)
adb pull /sdcard/file.txt Copying file from phone to PC No
adb push file.txt /sdcard/ Copying a file from PC to phone No

Working with the file system is carried out through commands adb pull and adb push. The first copies files from the device to the computer, and the second downloads files from the computer to the smartphone’s memory. These operations are faster and more stable than the standard MTP protocol, especially when transferring a large number of small files.

⚠️ Attention: When removing system components via pm uninstall be extremely careful. Removing critical services, such as com.android.phone or the system launcher, can lead to an endless reboot of the device (bootloop).

Advanced debugging and receiving logs

An indispensable tool for developers and advanced users is a logging system Logcat. It records all system messages, application errors and kernel events in real time. The command adb logcat outputs this stream to the computer console, allowing you to analyze the causes of failures or crashes of apps.

To narrow the search, you can use filters by tag or level of message importance. For example, the command adb logcat -s MainActivity will show only logs associated with the specified tag. This makes it much easier to diagnose problems in specific applications without having to sift through thousands of lines of system garbage.

In addition to logs, ADB allows you to take screenshots and record video from the device screen using the software method. The command adb shell screencap -p /sdcard/screen.png creates a screenshot, which can then be downloaded to your computer. To record video, a utility is used screenrecordthat supports setting the bitrate, resolution and recording duration.

The secret of fast logging

Use redirecting the output to a file immediately when you run the command, for example: adb logcat > error_log.txt. This will allow you to save the entire amount of data for the session for subsequent detailed analysis in a text editor, without losing information when scrolling through the console.

Typical problems and methods for solving them

Despite the reliability of the tool, users often encounter a situation where the computer does not see the device or the connection is constantly interrupted. The most common reason is incorrect operation of drivers in the Windows environment. Try replacing the cable, switching the USB port on the motherboard (preferably USB 2.0) or reinstalling the driver in Device Manager by selecting a specific model from the list.

Sometimes a complete restart of the server helps. ADB. This is done by sequentially entering two commands: first adb kill-server to stop the background process, and then adb start-server to initialize it again. After that, repeat the command adb devices and check the connection status.

If the device is detected as unauthorized and the confirmation window does not appear on the screen, check the Developer Options settings. Try disabling and re-enabling the “USB Debugging” checkbox, as well as revoke (revoke) all previously granted debugging permissions in the same developer settings menu.

💡

90% of ADB connection problems are solved by replacing the USB cable with a high-quality analogue that supports data transfer or reinstalling the drivers in compatibility mode.

Is it safe to use ADB to remove system applications?

Using the command pm uninstall --user 0 is relatively safe since it does not remove the application file from the system partition, but only hides it for the current user. When you reset the settings to factory settings, all applications removed in this way will return. However, removing critical components can disrupt the system.

Do you need root access to work with ADB?

No, basic functionality ADB, including installing applications, transferring files, removing logs and basic debugging, does not require superuser rights. Root access is required only for operations that affect protected system partitions or changes that go beyond the security policy Android.

Can ADB be used over Wi-Fi?

Yes, starting from Android 11there is the possibility of wireless debugging. To do this, you need to connect the device via cable once for setup, enter the command adb tcpip 5555, disconnect the cable and connect to the IP address with the command adb connect IP_address:5555.

What to do if the adb command is not recognized?

This means that the path to folder platform-tools is not added to the PATH environment variable, or you are in the wrong directory. Add the full path to the folder to the system variables or launch the terminal directly from the folder with the utility.

How to disable USB debugging?

To disable it completely, go to the “For Developers” settings and move the “USB Debugging” switch to the inactive position. It is also recommended to disable the entire developer mode if you do not plan to use it in the near future to increase the security of the device.