adb devices -lLists connected devices and emulators with model and transport ID. “unauthorized” means you must accept the prompt on the device.
Android Debug Bridge: install apps, open a shell, pull files, forward ports and read logs on Android devices and emulators.
sudo apt install adbadb devices -lLists connected devices and emulators with model and transport ID. “unauthorized” means you must accept the prompt on the device.
adb -s <serial> <command>Targets one device when several are connected.
Example
adb -s emulator-5554 shelladb tcpip 5555Restarts adbd listening on TCP so you can disconnect the cable.
adb connect <ip>:<port>Connects over the network.
Example
adb connect 192.168.1.50:5555adb pair <ip>:<port>Pairs with Android 11+ wireless debugging using the code shown on the device.
Example
adb pair 192.168.1.50:37123adb kill-server && adb start-serverRestarts the local adb server when devices stop showing up.
adb shellOpens an interactive shell on the device.
adb shell <command>Runs a single command — here, printing the Android version.
Example
adb shell getprop ro.build.version.releaseadb rootRestarts adbd as root. Works on emulators and userdebug builds, not on production phones.
adb shell "su -c <command>"Runs a command as root on a rooted device.
Example
adb shell "su -c id"adb shell getpropEvery system property: build fingerprint, security patch level, debuggable flag and more.
adb install <apk>Installs an APK. -r reinstalls keeping data; -g grants all runtime permissions.
Example
adb install app.apkadb install-multiple <apks>Installs a split APK set.
Example
adb install-multiple base.apk split_config.arm64_v8a.apkadb uninstall <package>Removes an app. -k keeps its data.
Example
adb uninstall com.example.appadb shell pm list packages -3Third-party packages. Add -f to show the APK path.
adb shell pm path <package>Where the APK lives, so you can pull it.
Example
adb shell pm path com.example.appadb shell dumpsys package <package>Permissions, activities, version and signing details.
Example
adb shell dumpsys package com.example.appadb shell am start -n <package>/<activity>Launches an activity, including non-exported ones when run as root.
Example
adb shell am start -n com.example.app/.MainActivityadb shell am force-stop <package>Kills an app.
Example
adb shell am force-stop com.example.appadb shell run-as <package> ls filesAccesses a debuggable app’s private data without root.
Example
adb shell run-as com.example.app ls shared_prefsadb pull <remote> <local>Copies from the device.
Example
adb pull /sdcard/Download/ ./loot/adb push <local> <remote>Copies to the device; /data/local/tmp is writable and executable.
Example
adb push frida-server /data/local/tmp/adb logcatStreams the system log.
adb logcat --pid=$(adb shell pidof -s <package>)Logs from a single app — watch for leaked tokens and debug output.
Example
adb logcat --pid=$(adb shell pidof -s com.example.app)adb logcat -cClears the log buffer.
adb bugreport <file>.zipCollects a full diagnostic bundle.
Example
adb bugreport report.zipadb forward tcp:<local> tcp:<remote>Forwards a local port to the device — used by Frida and debuggers.
Example
adb forward tcp:27042 tcp:27042adb reverse tcp:<remote> tcp:<local>Lets the device reach a port on your computer, for example an intercepting proxy.
Example
adb reverse tcp:8080 tcp:8080adb shell settings put global http_proxy <ip>:<port>Sets a global HTTP proxy; reset with :0.
Example
adb shell settings put global http_proxy 192.168.1.10:8080adb exec-out screencap -p > <file>Takes a screenshot.
Example
adb exec-out screencap -p > screen.pngadb shell screenrecord /sdcard/<file>Records the screen (up to three minutes).
Example
adb shell screenrecord /sdcard/demo.mp4A dynamic instrumentation toolkit: inject JavaScript into running processes on Android, iOS, Windows, macOS and Linux to trace and modify behaviour.
A runtime mobile-exploration toolkit powered by Frida: bypass SSL pinning, explore the file system and dump keychains without a jailbreak.
Decodes Android APKs to near-original resources and smali code, and rebuilds them after modification.
A security-testing framework for Android that interacts with app components — activities, providers, services — over IPC to find weaknesses.