Fastboot command syntax

Search This thread

TonikJDK

Senior Member
  • Dec 9, 2012
    2,637
    1,318
    Been searching here and Google. No luck.

    Do we have a decent list of all the fastboot commands, especially all the ones that pertain to dual partitions?

    I want to switch the active partition to make sure all is OK on that side.
     

    quangtran1

    Senior Member
    Aug 27, 2011
    621
    274
    Been searching here and Google. No luck.

    Do we have a decent list of all the fastboot commands, especially all the ones that pertain to dual partitions?

    I want to switch the active partition to make sure all is OK on that side.
    If you just type "fastboot" without any switch, you'd get a complete list of switches, right? Then it's really easy to output that to a text file. I'll get one for you shortly.
    For now, to answer your end question, you can use "fastboot --set-active=_a" (or _b). It's ten times faster than going through twrp, providing you have access to a PC.
     
    • Like
    Reactions: sjrmac

    TonikJDK

    Senior Member
  • Dec 9, 2012
    2,637
    1,318
    Got it, thanks gang. I looked at the fastboot output and that link before posting. Never saw set_active. Think I will have some more coffee before I dig into why my other slot bootloops.
     

    quangtran1

    Senior Member
    Aug 27, 2011
    621
    274
    Been searching here and Google. No luck.

    Do we have a decent list of all the fastboot commands, especially all the ones that pertain to dual partitions?

    I want to switch the active partition to make sure all is OK on that side.

    This copy and paste is lousy since it screws up spacing, so I attached the syntax list here.
    View attachment 3991598

    commands:
    update <filename> Reflash device from update.zip.
    Sets the flashed slot as active.
    flashall Flash boot, system, vendor, and --
    if found -- recovery. If the device
    supports slots, the slot that has
    been flashed to is set as active.
    Secondary images may be flashed to
    an inactive slot.
    flash <partition> [ <filename> ] Write a file to a flash partition.
    flashing lock Locks the device. Prevents flashing.
    flashing unlock Unlocks the device. Allows flashing
    any partition except
    bootloader-related partitions.
    flashing lock_critical Prevents flashing bootloader-related
    partitions.
    flashing unlock_critical Enables flashing bootloader-related
    partitions.
    flashing get_unlock_ability Queries bootloader to see if the
    device is unlocked.
    flashing get_unlock_bootloader_nonce Queries the bootloader to get the
    unlock nonce.
    flashing unlock_bootloader <request> Issue unlock bootloader using request
    .
    flashing lock_bootloader Locks the bootloader to prevent
    bootloader version rollback.
    erase <partition> Erase a flash partition.
    format[:[<fs type>][:[<size>]] <partition>
    Format a flash partition. Can
    override the fs type and/or size
    the bootloader reports.
    getvar <variable> Display a bootloader variable.
    set_active <slot> Sets the active slot. If slots are
    not supported, this does nothing.
    boot <kernel> [ <ramdisk> [ <second> ] ] Download and boot kernel.
    flash:raw boot <kernel> [ <ramdisk> [ <second> ] ]
    Create bootimage and flash it.
    devices [-l] List all connected devices [with
    device paths].
    continue Continue with autoboot.
    reboot [bootloader] Reboot device [into bootloader].
    reboot-bootloader Reboot device into bootloader.
    help Show this help message.

    options:
    -w Erase userdata and cache (and format
    if supported by partition type).
    -u Do not erase partition before
    formatting.
    -s <specific device> Specify a device. For USB, provide ei
    ther
    a serial number or path to device por
    t.
    For ethernet, provide an address in t
    he
    form <protocol>:<hostname>[:port] whe
    re
    <protocol> is either tcp or udp.
    -p <product> Specify product name.
    -c <cmdline> Override kernel commandline.
    -i <vendor id> Specify a custom USB vendor id.
    -b, --base <base_addr> Specify a custom kernel base
    address (default: 0x10000000).
    --kernel-offset Specify a custom kernel offset.
    (default: 0x00008000)
    --ramdisk-offset Specify a custom ramdisk offset.
    (default: 0x01000000)
    --tags-offset Specify a custom tags offset.
    (default: 0x00000100)
    -n, --page-size <page size> Specify the nand page size
    (default: 2048).
    -S <size>[K|M|G] Automatically sparse files greater
    than 'size'. 0 to disable.
    --slot <slot> Specify slot name to be used if the
    device supports slots. All operations

    on partitions that support slots will

    be done on the slot specified.
    'all' can be given to refer to all sl
    ots.
    'other' can be given to refer to a
    non-current slot. If this flag is not

    used, slotted partitions will default

    to the current active slot.
    -a, --set-active[=<slot>] Sets the active slot. If no slot is
    provided, this will default to the va
    lue
    given by --slot. If slots are not
    supported, this sets the current slot

    to be active. This will run after all

    non-reboot commands.
    --skip-secondary Will not flash secondary slots when
    performing a flashall or update. This

    will preserve data on other slots.
    --unbuffered Do not buffer input or output.
    --version Display version.
    -h, --help show this message.
     

    quangtran1

    Senior Member
    Aug 27, 2011
    621
    274
    Got it, thanks gang. I looked at the fastboot output and that link before posting. Never saw set_active. Think I will have some more coffee before I dig into why my other slot bootloops.

    If you can't use the set_active or --set-active switch, you don't have the latest adb/fastboot binary from Android SDK. Besides the --set-active parameter, the more important one is 'slot' with which you can establish where to flash. You can issue "fastboot --ver" and check the version number. It should start with a '3'.
     
    Last edited:

    TonikJDK

    Senior Member
  • Dec 9, 2012
    2,637
    1,318
    If you don't see the set_active or --set-active switch, you don't have the latest adb/fastboot binary from Android SDK. Besides the --set-active parameter, the more important one is 'slot' with which you can establish where to flash. You can issue "fastboot --ver" and check the version number. It should start with a '3'.

    I'm good, got it. This entire thread is due to my poor reading comprehension today.
     

    Top Liked Posts

    • There are no posts matching your filters.
    • 2
      Been searching here and Google. No luck.

      Do we have a decent list of all the fastboot commands, especially all the ones that pertain to dual partitions?

      I want to switch the active partition to make sure all is OK on that side.

      This copy and paste is lousy since it screws up spacing, so I attached the syntax list here.
      View attachment 3991598

      commands:
      update <filename> Reflash device from update.zip.
      Sets the flashed slot as active.
      flashall Flash boot, system, vendor, and --
      if found -- recovery. If the device
      supports slots, the slot that has
      been flashed to is set as active.
      Secondary images may be flashed to
      an inactive slot.
      flash <partition> [ <filename> ] Write a file to a flash partition.
      flashing lock Locks the device. Prevents flashing.
      flashing unlock Unlocks the device. Allows flashing
      any partition except
      bootloader-related partitions.
      flashing lock_critical Prevents flashing bootloader-related
      partitions.
      flashing unlock_critical Enables flashing bootloader-related
      partitions.
      flashing get_unlock_ability Queries bootloader to see if the
      device is unlocked.
      flashing get_unlock_bootloader_nonce Queries the bootloader to get the
      unlock nonce.
      flashing unlock_bootloader <request> Issue unlock bootloader using request
      .
      flashing lock_bootloader Locks the bootloader to prevent
      bootloader version rollback.
      erase <partition> Erase a flash partition.
      format[:[<fs type>][:[<size>]] <partition>
      Format a flash partition. Can
      override the fs type and/or size
      the bootloader reports.
      getvar <variable> Display a bootloader variable.
      set_active <slot> Sets the active slot. If slots are
      not supported, this does nothing.
      boot <kernel> [ <ramdisk> [ <second> ] ] Download and boot kernel.
      flash:raw boot <kernel> [ <ramdisk> [ <second> ] ]
      Create bootimage and flash it.
      devices [-l] List all connected devices [with
      device paths].
      continue Continue with autoboot.
      reboot [bootloader] Reboot device [into bootloader].
      reboot-bootloader Reboot device into bootloader.
      help Show this help message.

      options:
      -w Erase userdata and cache (and format
      if supported by partition type).
      -u Do not erase partition before
      formatting.
      -s <specific device> Specify a device. For USB, provide ei
      ther
      a serial number or path to device por
      t.
      For ethernet, provide an address in t
      he
      form <protocol>:<hostname>[:port] whe
      re
      <protocol> is either tcp or udp.
      -p <product> Specify product name.
      -c <cmdline> Override kernel commandline.
      -i <vendor id> Specify a custom USB vendor id.
      -b, --base <base_addr> Specify a custom kernel base
      address (default: 0x10000000).
      --kernel-offset Specify a custom kernel offset.
      (default: 0x00008000)
      --ramdisk-offset Specify a custom ramdisk offset.
      (default: 0x01000000)
      --tags-offset Specify a custom tags offset.
      (default: 0x00000100)
      -n, --page-size <page size> Specify the nand page size
      (default: 2048).
      -S <size>[K|M|G] Automatically sparse files greater
      than 'size'. 0 to disable.
      --slot <slot> Specify slot name to be used if the
      device supports slots. All operations

      on partitions that support slots will

      be done on the slot specified.
      'all' can be given to refer to all sl
      ots.
      'other' can be given to refer to a
      non-current slot. If this flag is not

      used, slotted partitions will default

      to the current active slot.
      -a, --set-active[=<slot>] Sets the active slot. If no slot is
      provided, this will default to the va
      lue
      given by --slot. If slots are not
      supported, this sets the current slot

      to be active. This will run after all

      non-reboot commands.
      --skip-secondary Will not flash secondary slots when
      performing a flashall or update. This

      will preserve data on other slots.
      --unbuffered Do not buffer input or output.
      --version Display version.
      -h, --help show this message.
      1
      Been searching here and Google. No luck.

      Do we have a decent list of all the fastboot commands, especially all the ones that pertain to dual partitions?

      I want to switch the active partition to make sure all is OK on that side.
      If you just type "fastboot" without any switch, you'd get a complete list of switches, right? Then it's really easy to output that to a text file. I'll get one for you shortly.
      For now, to answer your end question, you can use "fastboot --set-active=_a" (or _b). It's ten times faster than going through twrp, providing you have access to a PC.
      1
      I'm good, got it. This entire thread is due to my poor reading comprehension today.

      Read? Who's got time for that?
      1
      Read? Who's got time for that?

      Yea, no time to read cuz I'm too busy posting about what I should have read.