3

I was planning to flash a custom recovery in my Yu Yuphoria. So I searched for it on Google, and found a download link along with a written tutorial. I'm acquainted with the fastboot commands, so I avoided reading it, but somehow came across something different. Instead of commands like:

fastboot oem unlock 
fastboot reboot

I came across commands like:

fastboot -i 0x2A96 reboot 

What's the use of the -i 0x2A96? Is it specific for different devices? Why is it necessary to add this to the command?

2 Answers 2

5

-i <vendor id> is used to specify a custom USB vendor id

according to the fastboot --help page

usage: fastboot [ <option> ] <command>

commands:
  update <filename>                        reflash device from update.zip
  flashall                                 flash boot, system, vendor and if found,
                                           recovery
  flash <partition> [ <filename> ]         write a file to a flash partition
  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
  boot <kernel> [ <ramdisk> [ <second> ] ] download and boot kernel
  flash:raw boot <kernel> [ <ramdisk> [ <second> ] ] create bootimage and 
                                           flash it
  devices                                  list all connected devices
  continue                                 continue with autoboot
  reboot                                   reboot device normally
  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 first erase partition before
                                           formatting
  -s <specific device>                     specify device serial number
                                           or path to device port
  -l                                       with "devices", lists device paths
  -p <product>                             specify product name
  -c <cmdline>                             override kernel commandline
  -i <vendor id>                           specify a custom USB vendor id
  -b <base_addr>                           specify a custom kernel base address.
                                           default: 0x10000000
  -n <page size>                           specify the nand page size.
                                           default: 2048
  -S <size>[K|M|G]                         automatically sparse files greater
                                           than size.  0 to disable

As for usage, I've never had to use it, but this suggests that it's for getting fastboot to work with unrecognized devices:

As you've already know, you can force fastboot to work with a device, even if the vendor ID is unknown by fastboot binary, by -i parameter: -i <vendor id> specify a custom USB vendor id

2
  • I used fastboot commands without the -i option and had no issue :D
    – Shayan
    Commented Jan 6, 2019 at 1:41
  • 1
    @Shayan typically you can run fastboot without args. This is for the case where the device is not automatically recognized
    – arcyqwerty
    Commented Jan 7, 2019 at 8:05
2

I just had the case that indeed I HAD to specify my Android device ID.

My intention was to unlock the bootloader of my Android device. But Ubuntu just did not find the device when in "Download mode" - as displayed on the device screen.
When using like:

fastboot devices

Had no output, just prompt.

As soon as I used just

fastboot -i 0x2e04 devices

it listed the device.

For all my predecessor Androids on the same Ubuntu host optin "-i" wasn't necessary.

2e04 resp. 0x2e04 is the ID for Nokia. In my case Nokia 6.1 or 6 (2018).

Could be found with "lsusb" or "dmesg" like:

saeufer@eckkneipe:~$ lsusb
Bus 002 Device 002: ID 17ef:7214 Lenovo 
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 014: ID 2e04:c026

Also mind "fastboot" might need sudo/root permission on default Ubuntu settings.

EDIT/Update Reason was I had an older Ubuntu (32Bit) and package-manager did not update ADB tools (including also fastboot) to more resent version. I later used a newer Ubuntu (virtual machine) and ADB tolls were a bit more current - no need to use "-i" option any longer. So if you struggle consider update ADB. Newer 64Bit versions can also be downloaded at Google (I just miss the link). 32Bit ADB tools are deprecated by Google.

2
  • fastboot only needs root if you set up the USB devices to be only accessible by the root user. If your devices.list gives your user permission to access the devices, you can use fastboot as yourself.
    – Dan Hulme
    Commented Aug 21, 2018 at 12:51
  • Dan I updated to - fastboot might need root... (which is true in my default setting)
    – linolino
    Commented Aug 21, 2018 at 13:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .