Android Debug Bridge (ADB): Complete Guide to Commands and Examples in Spanish

  • Explore what ADB is, how it works, and how it can transform your Android device control.
  • Learn the most essential ADB commands, detailed examples, and real-world usage for every important task.
  • Learn how to connect, transfer files, install apps, take screenshots, manage permissions, and debug Android step by step.
  • Learn about advanced settings, useful tips, and precautions to get the most out of ADB.

Android Debug Bridge ADB commands and examples

If you've ever been curious about taking your Android experience to the next level , you've probably heard of ADB, or Android Debug Bridge . This powerful tool, often mentioned in forums and advanced tutorials, is much more than just a resource for developers: it allows you to control, modify, and customize your device from your computer like never before . While it might sound technical to some, the truth is that with the right guidance, you can take advantage of it no matter where you are in the Android world, without needing to be a computer guru.

In this article , we'll delve into the world of Android Debug Bridge , breaking it down from installation to the most advanced and useful commands. We'll illustrate each section with real-world examples, little-known tricks, and essential warnings to help you get the most out of your phone or tablet. Here you'll find not only a compilation of essential ADB commands but also detailed information on wireless connectivity, app management, file transfers, debugging, screenshots, and much more . Get comfortable and prepare to discover everything ADB has to offer, presented in clear and straightforward language specifically for users in Spain.

What is Android Debug Bridge (ADB) and what is it really used for?

Android Debug Bridge (ADB) is a universal command-line tool that allows you to establish direct and advanced communication between your computer (whether Windows, Mac, or Linux) and your Android device. Think of ADB as a powerful and flexible bridge : by typing commands in your PC's terminal or console, you can manipulate your phone in ways that standard menus can't even dream of.

The best thing about ADB is its versatility : it can be used for tasks ranging from installing or uninstalling applications, transferring files at high speed, creating backups, modifying hidden settings, granting special permissions to apps, taking screenshots, recording video, debugging errors, and even running commands in root mode (on compatible devices). You don't need to be a developer to use it , although, of course, app developers make it their essential tool for daily work.

Why should you use ADB? Because it's the most direct, efficient, and secure way to control your device without relying on slow visual menus, suspicious third-party apps, or complicated rooting processes. If you're curious about customizing Android, optimizing its performance, or simply want to fix a specific problem, ADB is your master key.

How ADB Works: Architecture and Main Elements

ADB is not just a program: it functions as a well-coordinated three-component client-server system :

  • The client: It's the program you run from your computer. It sends instructions.
  • The daemon (adbd): It is the part that runs within the Android itself (or emulator), executing the commands that reach it.
  • The server: It ensures that communication between the client and the daemon is fluid, managing connections, ports, and devices that you have connected.

When you run an ADB command from the terminal , the server starts first, searches for devices connected via USB or Wi-Fi, establishes a connection (usually on port 5037), and then transmits the commands to the daemon on your mobile device or emulator. All of this happens in milliseconds and transparently, so you only need to worry about typing the correct command.

For example, when writing adb devicesThe client asks the server which devices are connected, and the daemon responds with its data. It's that simple and powerful.

How to install and configure ADB on Windows, Mac, and Linux?

Before you start using the commands, you need to install ADB on your computer and enable USB debugging on your Android device . The process is quite simple, although there are a couple of key steps you should be aware of:

1. Download and install ADB Platform Tools

  • In Windows: Download the Platform-Tools package from the official Android Developers website. Extract the ZIP file to an easy-to-locate folder (e.g., C:\ADB).
  • On Mac and Linux: Download and unzip the file to your home folder. In some cases, you can install ADB directly from repositories, but it's safest to use the official version to avoid compatibility and update issues.

2. Enable developer options and USB debugging on your Android

  • Accede to Settings> About phone and click several times (usually seven or ten) on Build Number until the message “You are a developer” appears.
  • Go back to Settings, enter System > Developer Options and activate the option USB debuggingYou'll see a security prompt; accept to use ADB.

3. Connect your Android device to your computer via USB

  • When you connect your mobile, you may see several windows asking for permission to allow USB debugging. Click “OK” whenever you trust the connected computer.
  • Some devices may require you to install specific drivers (especially on Windows). Look for the manufacturer's "ADB Drivers" if your device isn't listed.

4. Test the connection

  • Open the console/terminal and navigate to the folder where you unzipped the tools. For example, on Windows: cd C: \ ADB.
  • Write adb devices and press Enter. If your device ID appears, you're all set!

Practical examples of adb commands

Wireless Connection: How to Use ADB via Wi-Fi

It's not always necessary to connect your phone or tablet via USB to use ADB . Since Android 11, the tool supports wireless connections, which is incredibly convenient, especially if you work with multiple devices on the same network. This allows you to perform installations, debugging, and transfers wirelessly.

Steps to connect ADB via Wi-Fi (Android 11 and later)

  • Make sure your computer and Android are on the same Wi-Fi network.
  • Enable wireless debugging on the Developer options (will appear as “Wireless Debugging” on Android 11+).
  • Pair your device with your PC using a QR code or pairing code. You can do this from Android Studio or from the command line using instructions like:
    adb pair ip_del_dispositivo:puerto
  • Once paired, you can use:
    adb connect ip_del_dispositivo:puerto
  • On Android 10 or earlier, you need to connect via USB first and then run:
    adb tcpip 5555
    and then disconnect the cable and connect by:
    adb connect ip_del_dispositivo:5555

Key advantage: This allows you to manage multiple mobile devices simultaneously, ideal for testing, development, technical support, or network device administration.

Basic and essential ADB commands that every user should know

These are the most commonly used and basic ADB commands . Memorize them or keep them handy, especially if you're just starting out:

  • adb devices: Lists all connected devices and their status. Perfect for checking the connection before issuing any other commands.
  • adb push source destination: Copy files from your PC to your device. Example:
    adb push c:\archivos\foto.jpg /sdcard/
  • adb pull source destination: Download files from your mobile to your PC. Example:
    adb pull /sdcard/foto.jpg c:\usuarios\usuario\escritorio
  • adb install file.apk: Install an APK directly on your phone, very useful for apps outside of Google Play.
  • adb uninstall package.name: Uninstalls an application using its package name (see how to get it below).
  • adb shell: Opens a direct console on the device, where you can run Android/Linux specific commands.
  • adb reboot: Restart your Android device.
  • adb reboot bootloader: : Reboot into bootloader mode (ideal for flashing firmwares).
  • adb reboot recovery: Reboot into recovery mode to perform wipes, install ROMs, etc.
  • adb logcat: Displays the system log in real time, useful for detecting app failures or errors.

Tip: If you manage multiple devices at once, you can specify the target using -s serial_number after adb, like this:
adb -s 0123456789abcdef install app.apk

Practical application areas: real-life ADB use cases

ADB is so versatile that its commands are used in countless everyday situations. Here are some real-world examples that can get you out of a bind or improve your Android experience :

1. Fast file transfer between Android and PC

Having trouble with traditional USB transfers? ADB solves any incompatibility: with adb push or adb pull you can copy videos, photos, documents, and even entire folders without relying on a file explorer or other apps.

2. Installing and uninstalling apps outside of Google Play

With adb install you can safely add downloaded APKs, and with adb uninstall you can quickly and completely remove apps (including some system apps with special permissions) without leaving a trace.

3. Screenshots and video recordings by command

Broken volume button? Need to record your screen for a tutorial? Use `adb shell screencap /sdcard/screenshot.png` to take a screenshot, or `adb shell screenrecord /sdcard/record.mp4` to record a video directly, which you can then retrieve with `pull`.

4. Advanced troubleshooting and error logs

The `adb logcat` command is a key tool for developers and advanced users to debug bugs, app errors, startup problems, or general malfunctions. It allows you to filter messages, export logs, and even monitor in real time.

5. Advanced permission management and hidden options

Some apps require system permissions to function (for example, hiding the navigation bar, changing the theme, locking elements, etc.). With `adb shell pm grant package.name permission`, you can grant special permissions without root access, such as `WRITE_SECURE_SETTINGS` , thus opening up possibilities for deep customization.

Advanced commands and detailed examples for expert users

If you already have experience with the basics, it's time to take the leap to more advanced ADB commands that multiply its usefulness in administration and development:

List all installed applications and filter them

  • To view all installed packages:
    adb shell pm list packages
  • To list only user (third-party) apps:
    adb shell pm list packages -3
  • To add version:
    adb shell pm list packages -3 -U --show-versioncode | sort
  • Filter by name (Windows):
    adb shell pm list packages | findstr nombre
  • Filter by name (Linux and Mac):
    adb shell pm list packages | grep nombre

Get the package name and main activity of an app

  • To identify the APK/package you want to manipulate:
    adb shell pm list packages
    adb shell pm dump nombre.paquete
  • To find out the name of the installed APK:
    adb shell pm path nombre.paquete

Launch and close applications from the terminal

  • Launch an app: adb shell monkey -p nombre.paquete -c android.intent.category.LAUNCHER 1
  • Close an app: adb shell am force-stop nombre.paquete

Get detailed system and device information

  • Android version:
    adb shell getprop ro.build.version.release
  • API Level:
    adb shell getprop ro.build.version.sdk
  • Build Number:
    adb shell getprop ro.build.display.id
  • Device model:
    adb shell getprop ro.product.model

Working with the Android Interactive Shell

  • Start shell: adb shell
  • Execute a command without entering a shell: adb shell "comando"

Complete app management and administration with ADB

The pm (package manager) command within the ADB shell is a toolbox for querying, installing, deleting, activating, or deactivating apps with absolute precision:

  • List packages/applications:
    adb shell pm list packages
  • Install APK: adb install ruta/al/archivo.apk
  • Uninstall app: adb uninstall nombre.paquete
  • Activate app: adb shell pm enable nombre.paquete
  • Disable app: adb shell pm disable nombre.paquete
  • Clear app data: adb shell pm clear nombre.paquete
  • Check permissions: adb shell pm list permissions
  • Grant permission: adb shell pm grant nombre.paquete permiso
  • Revoke permission: adb shell pm revoke nombre.paquete permiso

Copying and Moving Files: Push, Pull, and Directory Management

One of the most applauded uses of ADB is the transfer of files and folders between PC and Android , both for making backups and for moving music, photos, documents, ROMs, etc.

  • Copy file to mobile: adb push archivo.txt /sdcard/archivo.txt
  • Copy file from mobile to PC: adb pull /sdcard/archivo.txt c:\usuario\escritorio

Remember that you can use absolute or relative paths and copy entire directories.

Screenshots and video recordings without touching your phone

With `adb shell screencap` you can instantly generate screenshots , which is ideal if your power button is broken or you need to automate the task. To download the image to your computer:

  • Take a screenshot and save it to your phone:
    adb shell screencap /sdcard/screenshot.png
  • Download screenshot to PC:
    adb pull /sdcard/screenshot.png .
  • Delete the screenshot (optional):
    adb shell rm /sdcard/screenshot.png

To record screen videos (for example, tutorials or gameplay):

  • Start recording:
    adb shell screenrecord /sdcard/recording.mp4
  • Stop with Ctrl+C in the console or let it finish after 3 minutes (default limit).
  • Transfer recording to PC:
    adb pull /sdcard/recording.mp4
  • Delete file on mobile:
    adb shell rm /sdcard/recording.mp4

Note: Limitations may apply on Wear OS devices or some older models.

Monitoring, logging, and debugging with logcat and other useful commands

If you ever encounter mysterious problems, logcat is your ally for investigating what's happening in your system and applications. In addition, there are other useful commands for programmers:

  • View real-time log: adb logcat
  • Record log to a file: adb logcat > log.txt
  • Filter by a specific app: adb logcat | findstr nombre.paquete
  • Consult running processes: adb shell top -m 10 -q

Network Device Management and Advanced ADB Backends

ADB can work with various USB and mDNS backends , meaning it adapts its operation to different operating systems and protocols. For example, you can control devices through Bonjour on macOS or Openscreen on Linux/Windows.

  • Select USB backend: Use the environment variable ADB_LIBUSB to force one or the other.
  • Check mDNS: adb mdns check to check if the service is available.

Tricks, extra security tips, and advanced management

Don't forget that ADB is a powerful tool, but it also carries risks if not used correctly. Keep these key tips in mind:

  • Connect your mobile phone only to trusted computers and never accept USB debugging on other people's computers.
  • Disable USB debugging when you are not going to use ADB regularly.
  • Always verify commands before executing them, especially if you copy/paste from tutorials on the Internet.
  • Do not give extra permissions or delete system apps unless you know exactly what you're doing.
  • Keep ADB updated to avoid incompatibilities or security breaches.

Also remember that there are experimental operating modes, such as ADB's "Burst Mode" (to speed up transfers), special variables for developers, and even integration with Android Studio for those who create applications.

Extra commands and resources for those who want even more

If you're still hungry for more, explore the world of Activity Manager (am) commands , Device Policy Manager (dpm) , and SQLite integration:

  • Start specific activity: adb shell am start -a android.intent.action.VIEW
  • Force close process: adb shell am force-stop nombre.paquete
  • Take control of profiles and users: adb shell dpm set-active-admin nombre.paquete/.Administrador
  • Query SQLite databases: adb shell sqlite3 /data/data/com.ejemplo.app/databases/base.db

Usa adb --help to see the complete and updated list of all possible switches and options, as ADB evolves and each version adds new features.

As you can see, ADB is an essential, powerful, and versatile tool for any Android user who wants to go beyond the conventional. From everyday tasks like installing an app or quickly transferring photos, to complete control and customization of your device, your only limit is your curiosity and desire to experiment. If you master the commands in this article, you can be sure you'll get the most out of your phone or tablet, without relying on third-party apps and with the peace of mind of having complete control.


Add as preferred source in Google