Reverse Engineering
ADB, or Android Debug Bridge, is a versatile command-line tool that acts as a client-server program, facilitating communication between your development machine (the client) and an Android device (running the adbd daemon) via a server process binding TCP port 5037. It ships as part of the Android SDK Platform Tools, and on Kali Linux, it's available as the `android-tools-adb` package. ADB is the standard device bridge for Android mobile pentesting and forensics, enabling actions like deploying Frida servers, pulling APKs, and capturing detailed logcat output for analysis.
sudo apt update && sudo apt install android-tools-adb
adb devices
ADB, or Android Debug Bridge, is a fundamental command-line utility for anyone working with Android devices, from developers to security researchers. It operates as a client-server system where a client runs on your development machine, an `adbd` daemon runs on the Android device, and a server process on your machine manages the communication, typically binding to TCP port 5037. This architecture allows for powerful and flexible interaction with Android devices.
Google includes ADB in the Android SDK Platform Tools, ensuring it's the official and standard way to bridge your computer and Android devices. For Kali Linux users, the tool is conveniently packaged as `android-tools-adb` in the APT repositories, making installation straightforward. Its capabilities extend far beyond simple debugging, encompassing a wide array of mobile security and forensic tasks.
In the realm of mobile pentesting and forensics, ADB is indispensable. It's used for deploying dynamic instrumentation frameworks like Frida, extracting application packages (APKs) for static analysis, capturing detailed `logcat` output to understand application behavior or crashes, and for many other low-level device interactions. Its ubiquity and versatility make it a cornerstone tool in any Android security professional's toolkit.
| Command | Purpose |
|---|---|
adb devices | List connected Android devices and their status. |
adb install <path_to_apk> | Install an Android application package (APK) onto the device. |
adb pull <remote_path> <local_path> | Copy a file or directory from the device to your computer. |
adb push <local_path> <remote_path> | Copy a file or directory from your computer to the device. |
adb shell | Start an interactive remote shell on the connected Android device. |
adb logcat | Display real-time log messages from the device's system log. |
adb versionDisplays the installed Android Debug Bridge version.adb devicesLists all connected Android devices, emulators, and their current state.adb devices -lLists connected devices with verbose information, including product, model, and device details.adb -s <serial> <command>Targets a specific Android device by its serial number for the given command.adb -d <command>Targets the single attached USB hardware device for the given command.adb -e <command>Targets the single running Android emulator for the given command.adb start-serverStarts the ADB server process on the host machine if it's not already running.adb kill-serverTerminates the ADB server process on the host machine.adb usbRestarts the adbd daemon on the device in USB mode, useful after connecting via Wi-Fi.adb disconnect [<host>]Disconnects from a specified ADB network host or all connected network devices.adb mdns track-services --proto-textMonitors for ADB-enabled devices on the local network via mDNS discovery (Android 11+).adb install <path_to_apk>Installs an Android application package (APK) onto the connected device.adb install -t <path_to_apk>Installs a test-only Android application package (APK) onto the connected device.adb install-multiple <paths_to_apks...>Installs multiple split APKs or base APKs simultaneously onto the device.adb shell pm list packagesLists all installed packages on the Android device.adb shell pm list packages -3Lists only third-party (non-system) installed packages on the device.adb shell pm path <package>Displays the full path to the APK file for a specified package on the device.adb shell pm uninstall <package>Uninstalls an application from the Android device given its package name.adb shell pm clear <package>Deletes all data associated with a specified application package.adb shell am force-stop <package>Forcefully stops all processes associated with a given application package.adb shell am start -a android.intent.action.VIEWStarts an activity on the device using a specified intent action.adb pull <remote> <local>Copies a file or directory from the Android device to the local machine.adb push <local> <remote>Copies a file or directory from the local machine to the Android device.adb forward tcp:6100 tcp:7100Sets up arbitrary port forwarding from the host machine to the device.adb shell ls /system/binLists the contents of the `/system/bin` directory on the device's filesystem.adb shellStarts an interactive remote shell on the connected Android device.adb shell <command>Executes a single shell command directly on the Android device without entering an interactive shell.adb shell getprop ro.product.cpu.abiRetrieves the CPU Architecture Binary Interface (ABI) of the device.adb shell settings get secure android_idRetrieves the unique Android ID from the device's secure settings.adb shell dumpsys batteryDumps detailed information about the device's battery service.adb logcatDisplays real-time log messages from the device's system log buffer.adb exec-out screencap -p > screen.pngCaptures a screenshot of the device's screen and saves it as a PNG file on the host machine.adb shell screenrecord /sdcard/demo.mp4Records the device's screen activity and saves it as an MP4 file on the device (Android 4.4+).adb bugreportGenerates a comprehensive bug report ZIP file containing device logs, dumpsys, and dumpstate.adb rebootReboots the connected Android device into the normal operating system.adb reboot bootloaderReboots the device into its bootloader mode, often used for flashing images.adb reboot recoveryReboots the device into its recovery mode, used for system updates or factory resets.adb reboot sideloadReboots the device into sideload mode to apply an OTA update from ADB.adb sideload <update.zip>Applies an over-the-air (OTA) update ZIP file to the device while in recovery sideload mode.adb rootRestarts the adbd daemon on the device with root permissions, usually only on userdebug/engineering builds.Set up a mobile pentesting lab by connecting Android devices, verifying their status, and preparing them for further analysis with security tools.
Install new or updated APKs onto a device and extract existing application packages for static analysis or backup.
Capture, filter, and analyze real-time `logcat` output to diagnose application crashes, performance issues, or suspicious activity.
Document findings and create evidence by taking screenshots or recording screen activity directly from the device.
Establish a debugging connection to Android devices over a Wi-Fi network for greater flexibility and convenience in lab environments.
Push and launch dynamic instrumentation frameworks like Frida or mobile exploration tools like Objection onto the device for runtime analysis.
ADB is generally safe when used responsibly on devices you own or are authorized to test. However, if used maliciously or on unauthorized devices, it can compromise security and lead to data loss. Always ensure USB debugging is protected.
Yes, ADB is legal. It is an official tool provided by Google as part of the Android SDK Platform Tools. Its legality depends entirely on how it is used; using it on devices you don't own or without authorization for malicious purposes is illegal.
If `adb devices` isn't showing your device, check if USB debugging is enabled in Developer options, ensure the RSA key authorization is accepted, verify the USB cable/port, and confirm that `adbd` is running on the device. Restarting the ADB server can also help.
No, ADB does not need root access to function. Most ADB commands (installing apps, pulling files from user-accessible directories, `logcat`, `adb shell`) work without root. `adb root` itself only works on userdebug/engineering builds or emulators to restart `adbd` with root privileges.
In ethical hacking, ADB is used to install test payload APKs, push exploits, extract sensitive data, capture logs for reconnaissance, bypass basic security controls (e.g., enable proxies), and deploy dynamic analysis frameworks like Frida for runtime manipulation.
If you encounter "adb: command not found" on Kali Linux, it means ADB is not installed or not in your system's PATH. Fix this by running `sudo apt update && sudo apt install android-tools-adb`. After installation, open a new terminal or reboot for PATH changes to apply.
Reverse Engineering
Objection is a runtime mobile exploration toolkit, powered by Frida, built to help you assess the security of your mobile applications without needing a jailbroken or rooted device.
Reverse Engineering
Frida is a dynamic instrumentation toolkit for developers, reverse-engineers, and security researchers. It allows you to inject snippets of JavaScript or your own library into native apps on various platforms — making it the industry standard for runtime analysis and mobile app security testing.
Web Application
Burp Suite is the industry-standard web application security testing platform from PortSwigger, free as Community Edition on Kali Linux. Learn how to use Burp Suite: install it, route your browser through its proxy, intercept your first request, and test it with Repeater and Intruder.
Exploitation
MSFVenom is a standalone payload generator and encoder utility within the Metasploit Framework, first introduced in Metasploit 4.0 (2015) to replace the legacy msfpayload and msfencode tools with a single unified interface. It enables security professionals, penetration testers, and students to create, customize, and encode payloads for multiple platforms including Windows, Linux, macOS, Android, and PHP. MSFVenom is widely used in CTF competitions, security training labs, authorized penetration testing engagements, and red team operations to generate reverse shells, Meterpreter payloads, shellcode, and encoded executables. Understanding MSFVenom helps both offensive and defensive security professionals learn payload construction techniques, encoding methods, and detection strategies used in modern cybersecurity.
Reverse Engineering
Radare2 (r2) is a complete open-source framework for reverse engineering and binary analysis. It bundles a disassembler, debugger, hex editor, and scripting engine into a single lightweight command-line toolkit that supports dozens of architectures and executable formats.
Reverse Engineering
Learn how to use GDB, the GNU Debugger, by building a small C program with debug symbols and following it from the first breakpoint to a crash. Use the same steps to inspect variables, read a backtrace, and tell when a core dump or a look at the assembly would help.
An in-depth exploration of DNS architecture, resolution process, record types, caching, security threats, and privacy protocols like DoH and DoT.
Ethical Hacking · IntermediateLearn reverse engineering from scratch: analyze binaries with Ghidra and GDB, read assembly, crack a practice binary, and build a starter toolkit.
Linux · BeginnerLearn SSH for secure remote access including key-based authentication, configuration, tunneling, port forwarding, and security hardening.
Linux · BeginnerA quick-reference cheat sheet of 100 essential Linux commands every beginner should know, organized by category with syntax, examples, and practical use cases for system administration and cybersecurity.
ADB commands generally provide direct output to the terminal, indicating success or failure. For instance, `adb install` prints 'Success' on successful installation, or an error message if it fails. When running `adb shell <command>`, the output is the standard output and standard error from the command executed on the device, and the ADB client's exit code reflects the remote command's exit code. The `adb devices` command output is particularly important for verifying connectivity and device state. A typical output from the official documentation: `List of devices attached / emulator-5556 device product:sdk_google_phone_x86_64 model:Android_SDK_built_for_x86_64 device:generic_x86_64 / emulator-5554 device product:sdk_google_phone_x86 model:Android_SDK_built_for_x86 device:generic_x86 / 0a388e93 device usb:1-1 product:razor model:Nexus_7 device:flo`. This shows the device serial (e.g., `emulator-5556`, `0a388e93`), its state (`device`, `offline`, or `unauthorized`), and for `-l` flag, additional columns like `product`, `model`, and `device`. The `logcat` command streams logs with a format like `I/ActivityManager( 585): Starting activity: Intent { action=android.intent.action...}` or `I/MyActivity( 1557): MyClass.getView() — get item number 1`, where `I` is the priority (Info), `ActivityManager` or `MyActivity` is the TAG, and `(585)` or `(1557)` is the process ID. Any other sample output provided on this page should be considered illustrative and not verbatim from official documentation unless explicitly stated otherwise.This tool is designed for authorized security testing, educational purposes, and legitimate network administration only. Unauthorized access to computer systems is illegal.