- ADB Architecture
- Connection Commands
- Device Management
- Application Management
- Data Operations
- System Operations
ADB has 3 components:
- Client - Computer system through which pentester passes commands to Android device
- Daemon - Background process running on Android device that executes commands
- Server - Computer machine that sends commands to Android device
# Connect to device on specific port (default: 5555)
adb connect <IP>:<port>
# Disconnect specific device, or all devices if no IP specified
adb disconnect <IP>
# Reconnect to currently connected device
adb reconnect
# List all connected devices
adb devices# Get device shell
adb shell
# Show logs for specific application
adb logcat | grep <App Name>
# Reboot device into selected mode
adb reboot <bootloader/recovery/sideload># Install application on device
adb install <application.apk>
# Installation options:
# -l : Forward Lock Application
# -r : Replace Existing Application
# -t : Allow test package
# -s : Install Application on SD-card
# -g : Grant all Runtime permissions# Uninstall application from device
adb uninstall <package name>
# Uninstall options:
# -k : Don't remove data and cache directories# Sideload specified package
adb sideload <package name># Upload file or folder to specific location on device
adb push <File to upload> <Where to upload>
# Download file from device
adb pull <remote file> <local destination># Take backup of device
adb backup <options>
# Backup options:
# -all : Include all (System and User) applications in backup
# -shared : Create backup of shared storage (SD Card)
# -obb : Create backup of application extensions stored in obb folder
# Restore device contents from backup file
adb restore <Backup File>