{"tool":"adb","name":"ADB","description":"Android Debug Bridge: install apps, open a shell, pull files, forward ports and read logs on Android devices and emulators.","tags":["Android","debugging"],"homepage":"https://developer.android.com/tools/adb","docs":"https://developer.android.com/tools/adb","install":{"apt":"sudo apt install adb","brew":"brew install --cask android-platform-tools","windows":"winget install Google.PlatformTools"},"related":["frida","objection","apktool"],"total_commands":31,"commands":[{"id":16,"category":"Devices","command":"adb devices -l","example":"adb devices -l","explanation":"Lists connected devices and emulators with model and transport ID. “unauthorized” means you must accept the prompt on the device."},{"id":17,"category":"Devices","command":"adb -s <serial> <command>","example":"adb -s emulator-5554 shell","explanation":"Targets one device when several are connected."},{"id":18,"category":"Devices","command":"adb tcpip 5555","example":"adb tcpip 5555","explanation":"Restarts adbd listening on TCP so you can disconnect the cable."},{"id":2,"category":"Devices","command":"adb connect <ip>:<port>","example":"adb connect 192.168.1.50:5555","explanation":"Connects over the network."},{"id":19,"category":"Devices","command":"adb pair <ip>:<port>","example":"adb pair 192.168.1.50:37123","explanation":"Pairs with Android 11+ wireless debugging using the code shown on the device."},{"id":20,"category":"Devices","command":"adb kill-server && adb start-server","example":"adb kill-server && adb start-server","explanation":"Restarts the local adb server when devices stop showing up."},{"id":4,"category":"Shell","command":"adb shell","example":"adb shell","explanation":"Opens an interactive shell on the device."},{"id":21,"category":"Shell","command":"adb shell <command>","example":"adb shell getprop ro.build.version.release","explanation":"Runs a single command — here, printing the Android version."},{"id":3,"category":"Shell","command":"adb root","example":"adb root","explanation":"Restarts adbd as root. Works on emulators and userdebug builds, not on production phones."},{"id":22,"category":"Shell","command":"adb shell \"su -c <command>\"","example":"adb shell \"su -c id\"","explanation":"Runs a command as root on a rooted device."},{"id":23,"category":"Shell","command":"adb shell getprop","example":"adb shell getprop","explanation":"Every system property: build fingerprint, security patch level, debuggable flag and more."},{"id":7,"category":"Apps","command":"adb install <apk>","example":"adb install app.apk","explanation":"Installs an APK. -r reinstalls keeping data; -g grants all runtime permissions."},{"id":24,"category":"Apps","command":"adb install-multiple <apks>","example":"adb install-multiple base.apk split_config.arm64_v8a.apk","explanation":"Installs a split APK set."},{"id":25,"category":"Apps","command":"adb uninstall <package>","example":"adb uninstall com.example.app","explanation":"Removes an app. -k keeps its data."},{"id":26,"category":"Apps","command":"adb shell pm list packages -3","example":"adb shell pm list packages -3","explanation":"Third-party packages. Add -f to show the APK path."},{"id":27,"category":"Apps","command":"adb shell pm path <package>","example":"adb shell pm path com.example.app","explanation":"Where the APK lives, so you can pull it."},{"id":28,"category":"Apps","command":"adb shell dumpsys package <package>","example":"adb shell dumpsys package com.example.app","explanation":"Permissions, activities, version and signing details."},{"id":29,"category":"Apps","command":"adb shell am start -n <package>/<activity>","example":"adb shell am start -n com.example.app/.MainActivity","explanation":"Launches an activity, including non-exported ones when run as root."},{"id":30,"category":"Apps","command":"adb shell am force-stop <package>","example":"adb shell am force-stop com.example.app","explanation":"Kills an app."},{"id":31,"category":"Apps","command":"adb shell run-as <package> ls files","example":"adb shell run-as com.example.app ls shared_prefs","explanation":"Accesses a debuggable app’s private data without root."},{"id":5,"category":"Files and logs","command":"adb pull <remote> <local>","example":"adb pull /sdcard/Download/ ./loot/","explanation":"Copies from the device."},{"id":6,"category":"Files and logs","command":"adb push <local> <remote>","example":"adb push frida-server /data/local/tmp/","explanation":"Copies to the device; /data/local/tmp is writable and executable."},{"id":8,"category":"Files and logs","command":"adb logcat","example":"adb logcat","explanation":"Streams the system log."},{"id":32,"category":"Files and logs","command":"adb logcat --pid=$(adb shell pidof -s <package>)","example":"adb logcat --pid=$(adb shell pidof -s com.example.app)","explanation":"Logs from a single app — watch for leaked tokens and debug output."},{"id":33,"category":"Files and logs","command":"adb logcat -c","example":"adb logcat -c","explanation":"Clears the log buffer."},{"id":34,"category":"Files and logs","command":"adb bugreport <file>.zip","example":"adb bugreport report.zip","explanation":"Collects a full diagnostic bundle."},{"id":35,"category":"Network and screen","command":"adb forward tcp:<local> tcp:<remote>","example":"adb forward tcp:27042 tcp:27042","explanation":"Forwards a local port to the device — used by Frida and debuggers."},{"id":36,"category":"Network and screen","command":"adb reverse tcp:<remote> tcp:<local>","example":"adb reverse tcp:8080 tcp:8080","explanation":"Lets the device reach a port on your computer, for example an intercepting proxy."},{"id":37,"category":"Network and screen","command":"adb shell settings put global http_proxy <ip>:<port>","example":"adb shell settings put global http_proxy 192.168.1.10:8080","explanation":"Sets a global HTTP proxy; reset with :0."},{"id":38,"category":"Network and screen","command":"adb exec-out screencap -p > <file>","example":"adb exec-out screencap -p > screen.png","explanation":"Takes a screenshot."},{"id":39,"category":"Network and screen","command":"adb shell screenrecord /sdcard/<file>","example":"adb shell screenrecord /sdcard/demo.mp4","explanation":"Records the screen (up to three minutes)."}],"slug":"adb","category":"mobile","url":"https://terminal.rokibulroni.com/tool/mobile/adb","markdown":"https://terminal.rokibulroni.com/api/v1/tools/mobile/adb.md"}