ToolStack
KO

ADB Commands Cheatsheet

Android Debug Bridge commands for connecting, installing, and logging

Your data never leaves the browser — all processing is done locally 0 server requests

01

Connection & Device Status

Enable Developer Options → USB Debugging on the device first.

  • adb devices

    List all connected devices

  • adb devices -l

    List devices with detailed info including model name

  • adb -s 시리얼 shell

    Target a specific device by serial number when multiple are connected

  • adb tcpip 5555

    Switch a USB-connected device to wireless (TCP/IP) mode

  • adb connect 192.168.0.10:5555

    Connect wirelessly to a device on the same network

  • adb disconnect

    Disconnect a wireless ADB connection

  • adb kill-server && adb start-server

    Restart the ADB server (fixes device detection errors)

  • adb usb

    Switch back from wireless mode to USB mode

02

App Installation & Management

  • adb install app.apk

    Install an APK on the device

  • adb install -r app.apk

    Reinstall (update) an app while keeping its data

  • adb install -d app.apk

    Allow downgrade installation to a lower version

  • adb uninstall com.example.app

    Uninstall an app by its package name

  • adb shell pm list packages

    List all installed packages on the device

  • adb shell pm list packages -3

    List only user-installed apps

  • adb shell pm clear com.example.app

    Clear an app's data and cache

  • adb shell pm path com.example.app

    Show the installed path of an APK

  • adb shell pm disable-user --user 0 패키지명

    Disable a system app without rooting (restore with pm enable)

03

File Transfer

  • adb push local.txt /sdcard/

    Copy a file from the PC to the device

  • adb pull /sdcard/photo.jpg ./

    Copy a file from the device to the PC

  • adb shell ls /sdcard/

    List files in the device's storage

04

Screen & Input Control

  • adb shell screencap -p /sdcard/s.png

    Take a screenshot and save it to device storage

  • adb exec-out screencap -p > screen.png

    Take a screenshot and save it directly to the PC

  • adb shell screenrecord /sdcard/demo.mp4

    Record the screen (Ctrl+C to stop, max 3 minutes by default)

  • adb shell input tap 500 1200

    Simulate a touch at the specified coordinates

  • adb shell input swipe 300 1000 300 200

    Simulate a swipe between coordinates (useful for scroll automation)

  • adb shell input text "hello"

    Type text input (use %s for spaces)

  • adb shell input keyevent 26

    Send a key event (26=power, 3=home, 4=back)

05

Logs & Debugging

  • adb logcat

    Stream system logs in real time

  • adb logcat -c

    Clear the log buffer

  • adb logcat *:E

    Show only error-level logs and above

  • adb logcat -d > log.txt

    Dump current logs to a file and exit

  • adb logcat --pid=$(adb shell pidof -s 패키지명)

    Filter logs for a specific app by its PID

  • adb bugreport bug.zip

    Save a full diagnostic report as a zip file

  • adb shell dumpsys battery

    Show current battery status

  • adb shell dumpsys activity top

    Show information about the currently visible activity

06

System Info & Reboot

  • adb shell getprop ro.build.version.release

    Get the Android OS version

  • adb shell getprop ro.product.model

    Get the device model name

  • adb shell wm size

    Show screen resolution (use wm size 1080x1920 to change it)

  • adb shell wm density

    Show screen DPI (dots per inch)

  • adb reboot

    Reboot the device

  • adb reboot recovery

    Reboot into recovery mode

  • adb reboot bootloader

    Reboot into bootloader (fastboot) mode

  • adb sideload update.zip

    Install an OTA update zip file from recovery

ADB Commands: Debugging Android from the Command Line

Android Debug Bridge (ADB) is the command-line interface for communicating with Android devices. It lets you install and remove apps, transfer files, capture screenshots, stream the screen, and view real-time logs from Logcat.

The most common workflow is: enable Developer Options → USB Debugging → adb devices to verify the connection → adb install app.apk. For wireless debugging, enable ADB over TCP and connect with adb connect.

⚠ adb shell rm -rf and format commands are irreversible on the device. Always confirm the target before running destructive shell commands.

FAQ

My device is not recognized by ADB — what should I do?
Enable USB Debugging in Developer Options on your device, then run adb devices. If the device shows as "unauthorized", check the confirmation dialog on your phone screen. On Linux, you may also need to add udev rules.
How do I connect to a device wirelessly?
First connect via USB and run adb tcpip 5555, then disconnect the cable and run adb connect <device-ip>:5555. Use adb disconnect to end the wireless session.
How do I capture a screenshot from the command line?
Use adb shell screencap /sdcard/screen.png then adb pull /sdcard/screen.png to save it locally. For a video, use adb shell screenrecord /sdcard/video.mp4.

Related Tools