• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

[Index] Setting up and Using ADB/Fastboot

Search This thread

sd_shadow

Recognized Contributor
Sep 21, 2011
18,110
1
8,679
South Dakota
goo.gl
Motorola Droid X
Moto X4
Setting up and Using ADB/Fastboot
[INDEX]
Helpful Information

Welcome, this thread has been created to encompass everything you may need for Using ADB. Please only post in this thread with feedback on how to improve this document. Do not post "Thank you" type responses. If you have additional questions or require more help, try to find an existing thread, or create your own thread in the Q&A forum. Do not use this as a general help thread.​
Click on a link below for More Info


*​
Forum Rules | New Users Guide | XDA Tour | Report Posts

Please look for a similar thread when visiting another device forum.
If you would like to create an [INDEX] please Click Here.

A special thanks to everyone who contributed to the production of this INDEX
Please note: This is and will be, an ongoing WIP

 
Last edited:

sd_shadow

Recognized Contributor
Sep 21, 2011
18,110
1
8,679
South Dakota
goo.gl
Motorola Droid X
Moto X4
For Mac: see Can ADB/Fastboot be used on Linux and Mac?

Setting up and using ADB/Fastboot (Android Debugging Bridge)
There are several methods for setting up ADB
  • Using adb.exe from a specific folder, easy method (Windows)
    Install adb drivers for your device or try the Generic Adb drivers
    Download newest adb files
    Setup ADB
    • Create a folder in C drive like ADB (c:/adb)
    • Open start menu and type CMD
    • Right click on CMD > select open file location
    • Find cmd.exe, right click and copy
    • Paste cmd.exe into adb folder
    • Move uncompressed adb files to adb folder (AdbWinUsbApi.dll, AdbWinApi.dll, adb.exe, fastboot.exe)
    Using ADB
    • Double click on cmd.exe in adb folder
    • run commands in command prompt that opens
    • some commands to test connection
    Code:
    adb devices
    return should be serial # ....................... Device
    Code:
     A000xxxxxxxxx......................Device


  • Booting to recovery
    Code:
    adb reboot recovery

  • Booting to fastboot
    Code:
    adb reboot-bootloader

  • Using Fastboot


Note:
adb commands are for rom and recovery (e.g. adb devices)
fastboot commands are for fastboot/bootloader (e.g. fastboot devices)​


Show known File Types if you can not see file extension like .zip
  • Open C:/Mfastboot folder
  • Select View>options>Change folder and Search options
  • In Folder Options Select Tab View
  • Uncheck Box: Hide Extensions for Known file Types
  • Select OK
 
Last edited:

sd_shadow

Recognized Contributor
Sep 21, 2011
18,110
1
8,679
South Dakota
goo.gl
Motorola Droid X
Moto X4
Last edited:

sd_shadow

Recognized Contributor
Sep 21, 2011
18,110
1
8,679
South Dakota
goo.gl
Motorola Droid X
Moto X4
Testing Fastboot Commands
All Fastboot Commands

  • Install Drivers
  • Verify Drivers are correct
  • get adb and fastboot files
  • Boot to Fastboot mode
  • Test fastboot mode connection by sending this code through command prompt
Code:
fastboot getvar product
should get the codename for your device back
ford, THEBES, otter....
also can test with
Code:
fastboot devices
you should get Serial # ....... Device/Mode
Code:
G090HXXXXXX................... device
 
Last edited:
  • Like
Reactions: EpicSaga

sd_shadow

Recognized Contributor
Sep 21, 2011
18,110
1
8,679
South Dakota
goo.gl
Motorola Droid X
Moto X4
Commands for devices with a/b slots

To check active slot
Code:
fastboot getvar current-slot

To change to slot a
Code:
fastboot --set-active=a

To change to slot b
Code:
fastboot --set-active=b

To toggle from active to inactive Slot
Code:
fastboot set_active other

Change X to a or b
Code:
fastboot flash boot_X twrp.img
 
Last edited:
  • Like
Reactions: EpicSaga

sd_shadow

Recognized Contributor
Sep 21, 2011
18,110
1
8,679
South Dakota
goo.gl
Motorola Droid X
Moto X4
Fastboot commands



  • fastboot flash recovery TWRP-recovery.img
  • fastboot getvar emmc_clr_writeprot
  • fastboot getvar emmc_set_writeprot
  • fastboot getvar ptable
  • fastboot getvar cmd
  • fastboot getvar resize
  • fastboot getvar ddrid
  • fastboot getvar emmcid
  • fastboot getvar memory_num
  • fastboot getvar serialno
  • fastboot getvar product
  • fastboot getvar VerifyPartition
  • fastboot getvar nve
  • fastboot getvar call
  • fastboot getvar memory_info_
  • fastboot getvar emmc
  • fastboot getvar memory
  • fastboot getvar version
  • fastboot getvar rescue_version
  • fastboot getvar rescue_phoneinfo
  • fastboot getvar vendorcountry
  • fastboot getvar rescue_ugs_port
  • fastboot getvar rescue_enter_recovery
  • fastboot getvar max-download-size
  • fastboot getvar error_print
  • fastboot getvar partition-type rescue_recovery
  • fastboot reboot
  • fastboot reboot-bootloader
  • fastboot set_active -a
  • fastboot oem reboot-download
  • fastboot oem reboot-ftm
  • fastboot oem rebootRUU
  • fastboot dump
  • fastboot oem listpartition
  • fastboot oem listram
  • fastboot oem dmesg
  • fastboot oem last_dmesg
  • fastboot oem update_emmc_partition
  • fastboot oem read_mmc
  • fastboot oem write_mmc
  • fastboot oem batt_enable_fast_charge
  • fastboot oem batt_test_pwr_supply
  • fastboot oem batt_for_pa_testv
  • fastboot oem batt_disable_safty_timer
  • fastboot oem batt_keep_charge_on
  • fastboot oem uart
  • fastboot oem htc_radio_debug_func
  • fastboot oem htcramdump
  • fastboot oem autordump2storage
  • fastboot oem test_emmc
  • fastboot oem ufs_get_lun
  • fastboot oem ufs_set_lun
  • fastboot oem erase_phone_storage
  • fastboot oem unlock
  • fastboot oem lock
  • fastboot flashing unlock
  • fastboot flashing lock
  • fastboot flashing lock_critical
  • fastboot flashing unlock_critical
  • fastboot flashing get_unlock_ability
  • fastboot flashing get_unlock_bootloader_nonce
  • fastboot flashing unlock_bootloader
  • fastboot flashing lock_bootloader
  • fastboot oem device-info
  • fastboot oem show-barcodes
  • fastboot oem ramdump
  • fastboot oem getcolorid
  • fastboot oem setcolorid
  • fastboot oem getcid
  • fastboot oem setcid
  • fastboot oem enable-charger-screen
  • fastboot oem disable-charger-screen
  • fastboot oem off-mode-charge
  • fastboot oem select-display-panel
  • fastboot oem readconfig
  • fastboot oem writeconfig
  • fastboot oem easydump
  • fastboot oem readunlock
  • fastboot oem dsir
  • fastboot oem ddrtest
  • fastboot oem dump_ram_full
  • fastboot oem get_ks_token
  • fastboot oem get_anti_theft_status
  • fastboot oem sha1sum
  • fastboot oem readmeid
  • fastboot oem refurbish
  • fastboot reboot-bootloader
  • fastboot flashing unlock
  • fastboot oem unlock-go
  • fastboot oem frp-unlock
  • fastboot oem frp-erase
  • fastboot oem enable reduced-version
  • fastboot flashing lock
  • fastboot oem device-info.preflash
  • fastboot flashing get_unlock_ability
  • fastboot oem enable-charger-screen
  • fastboot oem disable-charger-screen
  • fastboot oem enable-bp-tools
  • fastboot oem disable-bp-tools
  • fastboot oem enable-hw-factory
  • fastboot oem disable-hw-factory
  • fastboot oem select-display-panel
  • fastboot oem off-mode-charge enable
  • fastboot oem off-mode-charge disable
  • fastboot oem ramdump enable
  • fastboot oem ramdump disable
  • fastboot oem uart enable
  • fastboot oem uart disable
  • fastboot oem hwdog certify begin
  • fastboot flash:slock
  • fastboot oem hwdog certify close
  • fastboot oem get-imei1
  • fastboot oem get-meid
  • fastboot oem get-sn
  • fastboot oem get-bsn
  • fastboot oem get_verify_boot_status
  • fastboot oem enable_dm_verity
  • fastboot reboot emergency = EDL Mode
 
Last edited:
  • Like
Reactions: EpicSaga

wmazoni

Member
Aug 20, 2012
8
1
To check active slot
Code:
fastboot getvar current-slot

To change to slot a
Code:
fastboot --set-active=a

To change to slot b
Code:
fastboot --set-active=b

To toggle from active to inactive Slot
Code:
fastboot set_active other

Change X to a or b
Code:
fastboot flash boot_X twrp.img

Hi. Now I got to change slot to a.
https://www.dropbox.com/s/2kxb77p5g2bwcxv/Anotação 2020-09-09 213749.jpg?dl=0
However, I still find an error when I type the following commands, the command does not end:
https://www.dropbox.com/s/e00igqsicqyd7au/Anotação 2020-09-09 214453.jpg?dl=0
 
Last edited:
  • Like
Reactions: EpicSaga

Top Liked Posts