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
Connection & Device Status
Enable Developer Options → USB Debugging on the device first.
-
adb devicesList all connected devices
-
adb devices -lList devices with detailed info including model name
-
adb -s 시리얼 shellTarget a specific device by serial number when multiple are connected
-
adb tcpip 5555Switch a USB-connected device to wireless (TCP/IP) mode
-
adb connect 192.168.0.10:5555Connect wirelessly to a device on the same network
-
adb disconnectDisconnect a wireless ADB connection
-
adb kill-server && adb start-serverRestart the ADB server (fixes device detection errors)
-
adb usbSwitch back from wireless mode to USB mode
App Installation & Management
-
adb install app.apkInstall an APK on the device
-
adb install -r app.apkReinstall (update) an app while keeping its data
-
adb install -d app.apkAllow downgrade installation to a lower version
-
adb uninstall com.example.appUninstall an app by its package name
-
adb shell pm list packagesList all installed packages on the device
-
adb shell pm list packages -3List only user-installed apps
-
adb shell pm clear com.example.appClear an app's data and cache
-
adb shell pm path com.example.appShow the installed path of an APK
-
adb shell pm disable-user --user 0 패키지명Disable a system app without rooting (restore with pm enable)
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
Screen & Input Control
-
adb shell screencap -p /sdcard/s.pngTake a screenshot and save it to device storage
-
adb exec-out screencap -p > screen.pngTake a screenshot and save it directly to the PC
-
adb shell screenrecord /sdcard/demo.mp4Record the screen (Ctrl+C to stop, max 3 minutes by default)
-
adb shell input tap 500 1200Simulate a touch at the specified coordinates
-
adb shell input swipe 300 1000 300 200Simulate a swipe between coordinates (useful for scroll automation)
-
adb shell input text "hello"Type text input (use %s for spaces)
-
adb shell input keyevent 26Send a key event (26=power, 3=home, 4=back)
Logs & Debugging
-
adb logcatStream system logs in real time
-
adb logcat -cClear the log buffer
-
adb logcat *:EShow only error-level logs and above
-
adb logcat -d > log.txtDump 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.zipSave a full diagnostic report as a zip file
-
adb shell dumpsys batteryShow current battery status
-
adb shell dumpsys activity topShow information about the currently visible activity
System Info & Reboot
-
adb shell getprop ro.build.version.releaseGet the Android OS version
-
adb shell getprop ro.product.modelGet the device model name
-
adb shell wm sizeShow screen resolution (use wm size 1080x1920 to change it)
-
adb shell wm densityShow screen DPI (dots per inch)
-
adb rebootReboot the device
-
adb reboot recoveryReboot into recovery mode
-
adb reboot bootloaderReboot into bootloader (fastboot) mode
-
adb sideload update.zipInstall 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.