If you have ever tried to unlock the bootloader, install custom firmware or simply debug an Android app, you have probably encountered abbreviation ADB. This tool is a real lifesaver for advanced users, but even beginners can find it useful for solving routine tasks. In this article we will look at what Android Debug Bridgeis, how it works, and why you canโt do without it when deeply customizing your smartphone.
ADB is not just a utility for developers. With its help, you can remove built-in applications, transfer files bypassing restrictions, change system settings, and even restore โbricksโ after unsuccessful experiments. But like any powerful tool, ADB requires caution: one wrong command can turn your smartphone into a useless piece of plastic. Therefore, we will tell you in detail how to connect to the device, which commands are safe for beginners, and which are best not to use without a clear understanding of the consequences.
Important: the article is aimed at users with basic computer knowledge. If you've never opened the Command Prompt or don't know what it is USB drivers, start with the Getting Started section. For experienced users, we have prepared advanced commands and life hacks that are rarely found in standard manuals.
What is ADB and how it works
ADB (Android Debug Bridge) is a bridge between your computer and Android device, which allows you to send commands directly to the system of your smartphone or tablet. Developed by the company Google as part of Android SDK, this tool was originally intended for debugging applications. However, over time, its capabilities have expanded, and now ADB is used for:
- ๐ง Installing and removing APK files bypassing Google Play
- ๐ฑ Obtaining root access (paired with other tools)
- ๐ Restoring the system after crashes
- ๐ Collecting logs for diagnosing errors
- โก Optimizing performance (for example, disabling unnecessary services)
ADB works on the principle client-server: a client (command line) is launched on the computer, which connects to the server (daemon). data-i="49">) on an Android device. The connection can be made via adbd) on an Android device. The connection can be made via USB or via Wi-Fi (in the latest versions of Android). All commands are executed in real time, and responses are output directly to the console.
Interesting fact: ADB supports not only smartphones, but also other Android devices, including Android TV, Wear OS even some car multimedia systems. However, additional drivers or settings may be required to work with them.
Why does the average user need ADB?
Many people mistakenly believe that ADB is only useful for developers or enthusiasts who install custom firmware. In fact, even average users can benefit from it. Here are some practical scenarios:
- ๐๏ธ Removing built-in applications (bloatware) that cannot be uninstalled using standard methods. For example, many manufacturers install duplicate services Google or their own launchers, which only take up space.
- ๐ Backup and recovery data without root access. ADB allows you to create a complete copy of applications and their data, including those that do not support cloud backup.
- ๐ฑ Unlocking the bootloader (bootloader) for installing custom firmware or recovering from software failures.
- ๐ Diagnostics of problems s battery, network or performance through system logs.
An example from life: you bought a smartphone Samsung with pre-installed games from partners that cannot be deleted. Using ADB, you can uninstall them in a few minutes, freeing up space and speeding up your system. Or another case: after updating Android, some functions stopped working. Through ADB, you can roll back changes or reset the settings of a specific application without affecting other data.
Of course, for most tasks there are alternatives (for example, applications for cleaning or backup), but ADB gives full control over the system without the need to install additional software on the device itself. This is especially important if you are working with a device where there is little free space or limited access to Full control over the system without the need to install additional software on the device itself Before using ADB to remove system applications, create a backup copy of your data. Some apps may be critical for the operation of Android, and their removal will lead to unstable operation of the system. Google Play.
Before using ADB to remove system apps, back up your data. Some apps may be critical to the operation of Android, and their removal will lead to unstable operation of the system.
Preparing for work: installing ADB on a PC
To start using ADB, you first need to install the necessary tools on your computer. The process is slightly different for Windows, macOS and Linux, but the general scheme is the same:
- Download Platform Tools (included in Android SDK)
- Install drivers for your device
- Enable USB debugging on your smartphone
- Connect the device to the PC and check the connection
The easiest way is to download Platform Tools from the official website Google. This is an archive that contains all the necessary files, including adb.exe, fastboot.exe and other utilities. Unpack it into a convenient folder (for example, C:\platform-tools) and add the path to this folder to your environment variables PATHto run ADB from any directory.
For Windows you will also need to install drivers. Usually they are installed automatically when you first connect the device, but for some brands (for example, Xiaomi or HuaweiDownload drivers from the manufacturer's official website or use universal solutions like Universal ADB Drivers.
Download Platform. Tools from the Google website|
Extract the archive into a separate folder|
Add the path to the folder to the PATH variables (for Windows)|
Install drivers for your device|
Enable USB debugging on your smartphone-->
How to enable USB debugging on Android
Without USB debugging enabled, you will not be able to connect to the device via ADB. This mode is hidden in the developer settings, which are disabled by default. Here's how to activate them:
- Open
Settings โ About. phone. - Find item
Build number(orMIUI versionfor Xiaomi,Software versionfor Samsung). - Tap on this item 7 times in a row. After this, the notification โYou have become a developer!โ will appear.
- Return to the main settings menu and find the new section
For Developers(sometimes it is calledDeveloper options). - Turn on the switch
USB debugging. - Connect the device to the PC and confirm permission for debugging on the smartphone screen.
On some devices (for example, Huawei or Honor), you may need additional permission in the menu Trusted devices or Enable USB debugging. If after connecting ADB does not see the device, check if your antivirus or firewall is blocking access.
What to do if USB debugging is not enabled?
If after 7 clicks on "Build number" nothing happens, check:
1. You have enough rights (some firmware requires a PIN code). or password).
2. Guest mode or child profile is not enabled on the device.
3. The firmware is not modified (on some custom ROMs, debugging may be disabled by default).
If the problem persists, try resetting the settings to factory settings (but this will delete all data!) data-i="135">Important: after connecting to a new PC, Android always asks for debugging confirmation. If you accidentally clicked โCancelโ or โDenyโ, disconnect and reconnect the device - the request will appear again. On some versions of Android (for example
Important: After connecting to a new PC, Android always asks for debugging confirmation. If you accidentally click Cancel or Deny, unplug and plug your device again and the prompt will reappear. On some versions of Android (for example, Android 11+), you may also need to unlock the device (enter a PIN or pattern) before confirming debugging.
Basic ADB commands for beginners
When everything is ready, you can start working. Open the command line (cmd for Windows, Terminal for macOS/Linux) and check if ADB sees your device:
adb devices
If the connection is successful, you will see the device serial number. Now you can use basic commands. Here are some of the most useful:
| Command | Description | Example |
|---|---|---|
adb install |
Installing an APK file on a device | adb install app.apk |
adb uninstall |
Deleting an application by package name | adb uninstall com.example.app |
adb pull |
Downloading a file from a device to a PC | adb pull /sdcard/photo.jpg C:\Images\ |
adb push |
Downloading a file from a PC to a device | adb push music.mp3 /sdcard/Music/ |
adb shell |
Running a command shell on the device | adb shell ls /data/app |
To remove system applications, use the command with the flag -k (saves data and cache):
adb uninstall -k --user 0 com.android.browser
This command will remove the default browser for the current user (--user 0), but will leave his data. Without the flag -k the application will be completely uninstalled, which can lead to crashes if it is system critical.
Always check the application package name before uninstalling. Some system components (for example, com.android.phone) are critical to the operation of the phone. Removing them will lead to the device not working!
Advanced ADB capabilities: debugging, logs and recovery
ADB allows you not only to manage files and applications, but also to diagnose problems, collect logs and even restore the device after failures. Here are some advanced commands:
- ๐ View logs in real time:
adb logcat
adb reboot recovery
adb reboot bootloader
adb shell getprop ro.product.model
adb shell getprop ro.build.version.release
adb shell recovery --wipe_data
It is convenient to use filters to collect logs. For example, to see only errors:
adb logcat *:E
This is useful if the application constantly crashes, and there are no obvious signs of a problem in the interface. The logs will help you understand what's going on - for example, a lack of memory, a conflict with other apps, or an error in the code.
If the device does not boot, but responds to connection to the PC (the charging indicator is on), try switching it to the mode fastboot:
adb reboot bootloader
From there you can flash the recovery (TWRP) or reinstall the firmware. The main thing is not to interrupt the process and monitor the indication on the device screen.
How to save logs to a file?
In order not to view the logs in real time, redirect them to a file:
adb logcat -d > log.txt
This will save all current logs to a file log.txt on your PC. To filter by time, use:
adb logcat -t 100 (will show the last 100 lines).Safety and risks when using ADB
ADB is a powerful tool, but with great power comes great responsibility. Here are the main risks to be aware of:
- โ ๏ธ Removing system files may render the device inoperable. For example, deleting
/system/priv-appwill lead to a boot loop. - โ ๏ธ Unauthorized access: if you connect the device to someone else's PC with debugging enabled, an attacker can copy your data or install malware.
- โ ๏ธ Breach of warranty: some manufacturers (for example, Samsung) consider the use of ADB as a reason to refuse warranty service if it leads to a breakdown.
To minimize risks:
โ ๏ธ Attention: Always turn off USB debugging after finishing work with ADB. This will prevent unauthorized access to the device through public USB ports (for example, in airports or cafes).
- Create backup copies before any changes:
adb backup -apk -obb -shared -all -f backup.ab
--user 0so that changes affect only the current user, and not the entire system.If, after experimenting with ADB, the device stops booting, do not panic. In most cases, it can be restored through fastboot or mode Recovery. To do this, you will need official firmware from the manufacturer and instructions for installing it (usually it is available on forums like XDA Developers or 4PDA).
FAQ: answers to frequently asked questions about ADB
Can I use ADB without root access?
Yes, most ADB commands work without root. However, some actions (for example, changing system files in /system or /datarequire superuser rights. For such tasks you need root or an unlocked bootloader.
ADB does not see my device What should I do?
Check the following:
- Is USB debugging enabled in the developer settings.
- Are drivers for your device installed on your PC.
- Are you using an original USB cable (some cheap cables do not support data transfer).
- Is an antivirus blocking access? firewall.
If the problem persists, try rebooting the device and PC, and updating Platform Tools to the latest version.
Is it possible to bypass the pattern through ADB?
Technically yes, but this requires resetting your data. If you have it enabled. USB debugging and you have previously confirmed access from this PC, you can delete the file /data/system/gesture.key (for older versions of Android) or /data/system/locksettings.db. However, on new devices (Android 9+) this will only work if the bootloader is unlocked. In most cases, it is easier to reset via Recovery.
How to update ADB to the latest one. version?
Download the latest version Platform Tools from Google's official website and replace the old files in the folder. You can also use package managers:
- For Windows (via Scoop):
scoop install adb - For macOS (via Homebrew):
brew install android-platform-tools - For Linux (via apt):
sudo apt install adb fastboot
Does ADB work on Android 14?
Yes, ADB is fully compatible with Android 14, but there are changes in the security policy. For example, some commands (like adb backup) may require additional permissions. Also in new versions of Android, Wi-Fi debugging is automatically enabled upon the first USB connection, which simplifies wireless operation.