If you use Android and have never messed around with ADB, you're leaving things on the table. One of the most powerful tools to control your mobile phone from your PC using ADBYou don't need to be a programmer or a "ROM cook" to get the most out of it: with a few well-learned commands you can install apps, move files, take screenshots, activate hidden functions, or rescue a phone that seems dead.
In this guide we will break down, calmly but directly, How to install ADB and Fastboot And which commands are truly useful for the average user or someone who repairs mobile phones. You'll also see how it complements Fastboot, what real dangers it presents, and how these tools are currently being used by both developers and service technicians.
What is ADB and how does it work internally (without strange technical jargon)
ADB stands for Android Debug Bridge, which in Spanish would be something like Android debug bridgeThe name is quite fitting: it acts as a link between your mobile or tablet system and your PC console, so you can send commands directly without going through the settings menus.
Below that, ADB relies on three very clear elements: client, server and daemonThe client is the adb program you run on your computer; the server is a process that runs in the background listening on port 5037 of your PC; and the daemon (adbd) is the service that runs on the Android device itself. When you issue a command, the client sends it to the server, the server redirects it to the daemon on the phone, and the daemon executes it.
The normal thing to use it is for USB with USB Debugging enabledIt also supports Wi-Fi connectivity (especially from Android 11 onwards, which has much better integrated wireless debugging). You don't need root access for most uses: Android only asks you to confirm on screen that you trust the computer using an RSA key.
Important: ADB does not modify anything on its own.The risk lies in the commands you send. That's why it's important to have a clear list of the commands you're going to use and understand what they do.
ADB vs Fastboot: how they are similar and how they are different
ADB and Fastboot are often talked about together, but They are not the same, nor do they serve exactly the same purpose.Think of ADB as the tool for talking to Android when the system is booted (normal mode or recovery), and Fastboot as the one that touches the inner workings when the phone is in the bootloader.
With ADB you can: Check out the best ADB commands:
- Send and receive files between your PC and mobile device.
- Install or uninstall applications in APK format.
- Access the Android shell to execute Unix-like commands.
- Restart the device in different modes (normal, recovery, bootloader).
- Obtain system logs, screenshots, recordings, etc.
With FastbootHowever, things get more serious:
- Unlock the bootloader (on phones that allow it) with fastboot oem unlock.
- Flash entire partitions: system, boot, recovery, radio, etc.
- Restore official firmware when the mobile is soft bricked.
- Start images in "live" mode without writing them to internal memory.
The key is that ADB works against the operating system which is already working, while Fastboot acts directly on the device partitionsThat's why Fastboot is more useful for deep repairs or ROM changes, but also more delicate: flashing the wrong thing can render the phone unusable.
Required files and where to get ADB and Fastboot
To have ADB and Fastboot ready on your PC, you don't need to install the entire Android Studio package, although the full SDK includes them. The minimum you need is... these executables and libraries:
- adb.exe
- fastboot.exe
- AdbWinUsbApi.dll
- AdbWinApi.dll
On Windows, they usually come within the platform-tools folder of the Android SDK, or in lightweight packages downloadable from official repositories or forums like XDA. On Linux and macOS, they arrive with the package of platform-tools or the SDKIf you need step-by-step instructions, consult this. Guide to enabling and using ADB and FastbootNormally, you should keep all these files in the same easy-to-find folder, for example C:\adb or a folder in your home directory.
If you use these tools a lot in Windows, a convenient option is Copy the executables and DLLs to C:\Windows\System32This allows you to type `adb` or `fastboot` in any command prompt window without having to navigate to its directory using `cd`. On Linux or macOS, simply add the `platform-tools` path to your PATH environment variable.
In addition to the binaries, on Windows you will need the manufacturer's USB drivers (Samsung, Xiaomi, Motorola, etc.) or the universal ADB drivers. Without them, the phone won't communicate properly with the PC even if adb.exe is working perfectly.
Configure your mobile phone and computer to use ADB seamlessly
Before launching commands like crazy, you have to tie everything up properly. Two fronts: mobile phone configuration and computer configurationIt takes a minute and saves you hours of headaches.
On your mobile phone, the first thing to do is activate the Developer Options and USB Debugging:
- Go to Settings > About phone.
- Tap on "Build number" 7 times until you see the message that you are a developer.
- Go back and enter "Developer options".
- Enable "USB debugging".
On the PC, depending on the system:
- WindowsInstall the ADB drivers (universal or manufacturer's). Then, open the Windows search bar and type CMD to launch the command prompt.
- MacOSOpen the Terminal application (using Spotlight's magnifying glass, for example) and, if you don't have the SDK, you can use scripts like nexus-tools that automate the download of ADB and Fastboot.
- LinuxInstall the android-tools-adb / android-tools-fastboot package from your package manager, or download platform-tools from Google and add it to your PATH.
Once ready, connect the phone via USB and launch the following on the console:
adb devices
If everything is correct, you will see it appear an identifier for your device followed by the word deviceThe first time you run ADB on Android 4.2.2 or higher, your phone will display a window asking you to accept the computer's RSA key; you must authorize it, or ADB won't work. If the list is empty or shows "offline," there's almost always a problem with the drivers, cable, or USB port.
Connect via Wi-Fi: work wirelessly with ADB
At this point, Android allows you to use ADB without a USB cable, which is very convenient if you're testing apps, rooting devices, or working in a repair shop and don't want to rely on a physical port that fails easily. There are two main ways to do this, depending on your Android version.
En Android 11 and laterThe system includes an option to wireless debugging well integrated:
- Enable Developer Options and look for "Wireless Debugging".
- Pair the device with the PC by scanning a QR code or entering a numeric code.
- Once synchronized, Android Studio or adb can connect to the phone without USB.
If you prefer the command line, you can pair it with:
- On your mobile device, under "Wireless Debugging", tap "Pair device with code" and note down IP:port and code.
- On the PC, run adb pair ip:port and then enter the code.
En Android 10 and earlier versionsOr, if you prefer the classic method, the trick is to do an initial USB connection and then switch to TCP/IP:
- Connect the mobile phone via cable.
- Run adbtcpip 5555 to tell it to listen via Wi-Fi on that port.
- Unplug the cable.
- Find out the mobile's IP address in Settings > About device > Status > IP address.
- Connect with adb connect mobile_ip:5555.
If the network is corporate or very closed, it may P2P connections are blocked and we'll have to resign ourselves to the cable... or change Wi-Fi.
Basic ADB commands that every user should know
ADB has a lot of options, but in practice, with the ADB commands that every user should know You cover most situations, whether you're a curious user or you work in a workshop.
Check connected devices: adb devices
It's the command that can never be missing. adb devices It displays the list of devices and emulators that the ADB server has registered, with their identifier and status.
If you see something like:
emulator-5554 device
0a388e93 device
This means you have an emulator and a physical phone ready to receive commands. If they appear as offline or unauthorized, check USB debugging, drivers, and the RSA key confirmation window on the phone.
Sending and retrieving files: adb push and adb pull
When mass storage mode fails or you simply want to go faster, adb push and adb pull are the clean way to copy files between PC and mobile.
- adb push local file path_on_mobile sends a file from the computer to the device.
- adb pull path_on_mobile_local_folder copy a file or folder from your mobile phone to your PC.
For example, to send a PDF to the phone's downloads folder you could use:
adb push c:\folder\tutorialadb.pdf /sdcard/Download/
And to restore that same file to the desktop:
adb pull /sdcard/Download/tutorialadb.pdf c:\Users\YourName\Desktop\
Install and uninstall applications: adb install and adb uninstall
ADB also lets you Install APKs without touching the mobile screenThis is useful when the system is sluggish or when you're testing beta versions of an app, and it serves to... Remove pre-installed apps without root in many cases.
- adb install file.apk install the app on the device.
- adb install -r file.apk It reinstalls it over the existing one, preserving data.
- adb uninstall package.name uninstall an application by its package name.
Note that adb uninstall also deletes the app's data unless you use the -k option, which preserves cache and user data.
Reboots and special modes: adb reboot
When button combinations become a nightmare, ADB saves the day: You can restart your phone in different modes with a single command..
- adb reboot Restart in normal mode.
- adb reboot bootloader It takes the device into bootloader mode (Fastboot mode).
- adb reboot recovery It boots directly into recovery mode.
It is especially useful if the power or volume button is broken, or if you repeatedly need to enter recovery mode to flash zip files.
ADB shell: the "console mode" for truly tinkering with Android
There's a command that separates those who only install APKs from those who really get into it: adb shellWith it, ADB opens a console on the device itself where you can run commands as if you were sitting in a Linux terminal within Android.
If you write:
adb shell
You'll see that the prompt changes and starts showing you something like shell@device. From there you can list folders (ls), change permissions (chmod), view settings or interact with the package manager (pm) and activity manager (am).
Practical examples where adb shell shines:
- Granting special permissions to an app without root, for example to be able to hide the navigation bar: adb shell pm grant com.app.example android.permission.WRITE_SECURE_SETTINGS.
- Force dark mode on a mobile device where the setting is hidden: adb shell settings put secure ui_night_mode 2 on some Pixels with Android Q.
- Take a screenshot even if the volume button is broken, by chaining three commands: screencap, pull and rm.
However, this is where we need to proceed with more caution: Touching system permissions or files without knowing can break apps or make your phone unstable.If you don't recognize what a command does, it's best not to run it.
Captures, recordings and logs: see what's happening inside the system
Besides moving things around and restarting, ADB is a fantastic tool for understanding What's really happening to your Android?, for both advanced users and developers and technicians.
Screenshots with screencap
To take a screenshot without touching the phone, you can use:
adb shell screencap -p /sdcard/screenshot.png
adb pull /sdcard/screenshot.png
adb shell rm /sdcard/screenshot.png
You can even simplify it with adb exec-out screencap -p > capture.png so that the image goes directly to a file on your PC without going through the mobile's storage.
Record the screen with screenrecord
If you want a video of what's happening (for a tutorial, a diagnosis, or to show a bug), Android has a utility called screenrecord:
adb shell screenrecord /sdcard/demo.mp4
The recording stops automatically after three minutes or when you press Ctrl+C in the console. Then you just need to extract the file with `adb pull`. You can adjust resolution, bit rate, and duration with parameters such as –size, –bit-rate or –time-limit, although it does not record audio and on some devices the maximum resolution may be limited.
Logcat: Android's "complaint book"
For those who develop apps or do repairs, adb logcat It's pure gold. It displays the system event log in real time: errors, app messages, crashes, etc. You can view it on screen or save it to a file.
adb logcat > log.txt
When you want to stop, press Ctrl+C, and you'll have a .txt file with all messages generated during that time. Be aware that private data may appear (paths, file names, sometimes sensitive content). If you need to send the log to a developer, review what you're sharing beforehand.
Fastboot: essential commands for flashing and recovering mobile phones
We move on to the "big brother". Fastboot doesn't work with Android running: It only responds when the device is in bootloader/fastboot modeYou can enter using a button combination or with `adb reboot bootloader`.
Once there, the basic commands you should know are:
- fastboot devices: equivalent to adb devices, checks that the PC sees the phone in fastboot mode.
- fastboot oem unlock: In brands like Google or Sony, it starts the process to unlock bootloader (It usually displays warnings on the screen and erases all data).
- fastboot flash partition file.imgFlashes an image to the specified partition. Classic examples: fastboot flash recovery recovery.img, fastboot flash boot boot.img, fastboot flash system system.img, fastboot flash radio radio.img.
- fastboot flashallIf you have multiple images in the ADB/Fastboot folder, flash them all at once (typical in official packages for recovering complete firmwares).
- fastboot boot file.img: temporarily boots an image without writing it to memory, commonly used to test recoveries or kernels in "live mode".
These commands are used to do things like change ROMs, update manually, Restore soft bricked mobile phones or install a custom recovery. However, accidentally selecting the wrong file or partition can leave you with a... expensive brick in handSo this is where it makes the most sense to read tutorials specific to your model and, if in doubt, ask in forums like XDA before tinkering.
Safety tips, common mistakes, and when you should NOT use these tools
ADB and Fastboot are great, but it must be acknowledged that Not everyone is comfortable writing commands that can wipe an entire system.A couple of sensible recommendations to avoid unpleasant surprises:
- Make a backup Whenever you're going to flash or work with partitions, it doesn't matter if you use a Google backup, a PC backup, or a Nandroid from recovery, but don't proceed blindly.
- Start with innocuous commandsadb devices, push, pull, reboot… Familiarize yourself with these before messing with fastboot flash or shell permission changes.
- Don't use Fastboot recklessly If you don't understand the entire process, be aware that unlocking the bootloader can void your warranty, erase all your data, and even render your phone unusable if something goes wrong.
- Double-check the cable and the USB port.A connection interruption while flashing a critical partition can be fatal.
- Read and ask questionsForums like XDA Developers, Spanish-speaking Android communities, and specialized groups often have step-by-step guides for each model. Following a proven tutorial is much safer than improvising.
If you're the type of person who gets goosebumps just looking at a phone, and on top of that, the phone you want to "fix" is your only one and cost you a fortune, the prudent option is Leave Fastboot in the hands of someone who knows what they're doing: technical service, trusted geeky friend or repair professional.
In contrast, ADB, when used properly, is much more benign: most of the commands we've seen They don't touch critical partitions They simply move files, install apps, or issue commands to the system. Even so, if a guide seems unintelligible or full of jargon, it's best not to follow it blindly.
Ultimately, understanding ADB and Fastboot gives you control over your Android that goes far beyond what the settings menus allow: You can diagnose faults, customize functions, automate tasks, and even save equipment that others consider lost.The key is to learn little by little, always respect your backups, and know how far it's worth going with each device.
