[ TechDocsCove ]  TechDocsCove en   ↩︎

# Comprehensive Guide to Using Adb and Fastboot With Android Devices

adb   android   fastboot  

translations: [ fr/Français ] · [ es/Español ] · [ de/Deutsch ]


Table of contents


Android Debug Bridge (ADB) and Fastboot are vital tools for Android system management, offering extensive capabilities for device debugging, development, and maintenance. This guide aims to provide an in-depth understanding of these tools, including basic operations, file management, and system state controls.

Prerequisites

Understanding ADB

ADB is a versatile command-line tool that allows communication with an Android device for various purposes like installing apps, copying files, and accessing detailed device information.

Basic ADB Commands

  1. List Connected Devices

    adb devices
    

    Expected Output:

    List of devices attached
    device_serial_number   device
    
  2. Install an Application

    adb install path_to_apk
    

File Management

  1. Pushing a File to Device

    adb push local_file_path /remote_file_path
    
  2. Pulling a File from Device

    adb pull /remote_file_path local_file_path
    

Understanding Fastboot

Fastboot mode is a diagnostic and engineering tool which allows for the modification of the Android filesystem from a computer when the device is in bootloader mode.

Basic Fastboot Commands

  1. Check Connected Devices

    fastboot devices
    
  2. Flashing a Recovery Image

    fastboot flash recovery path_to_recovery.img
    

Managing Device States

Entering Bootloader Mode

  1. Using ADB

    adb reboot bootloader
    
  2. Using Key Combinations

    • Power off the device.
    • Hold down specific key combinations (usually Volume Down + Power) until the bootloader screen appears.

Entering Recovery Mode

  1. Using ADB
    adb reboot recovery
    

Rebooting the Device from Fastboot

  1. Reboot Command
    fastboot reboot
    

Advanced Operations

  1. Unlocking the Bootloader

    • Note: Unlocking the bootloader may void your warranty and erase device data.
    fastboot oem unlock
    
  2. Relocking the Bootloader

    fastboot oem lock
    
  3. Accessing Device Logs

    • Useful for debugging applications and system issues.
    adb logcat
    


Created on: Jan 19, 2024
Last updated on: Mar 23, 2024


Email shareIcon for sharing via email    Reddit shareIcon for sharing via Reddit    X shareIcon for sharing via X    Telegram shareIcon for sharing via Telegram    WhatsApp shareIcon for sharing via WhatsApp    Facebook shareIcon for sharing via Facebook    LinkedIn shareIcon for sharing via LinkedIn