Skip to content

Latest commit

 

History

History
101 lines (77 loc) · 2.25 KB

File metadata and controls

101 lines (77 loc) · 2.25 KB

ADB - Android Debug Bridge

Table of Contents

  1. ADB Architecture
  2. Connection Commands
  3. Device Management
  4. Application Management
  5. Data Operations
  6. System Operations

ADB Architecture

ADB has 3 components:

  1. Client - Computer system through which pentester passes commands to Android device
  2. Daemon - Background process running on Android device that executes commands
  3. Server - Computer machine that sends commands to Android device

Connection Commands

# 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

Device Management

# 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>

Application Management

Installation

# 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

Uninstallation

# Uninstall application from device
adb uninstall <package name>

# Uninstall options:
#   -k : Don't remove data and cache directories

Sideloading

# Sideload specified package
adb sideload <package name>

Data Operations

File Transfer

# 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>

Backup and Restore

# 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>

System Operations