[Google Pixel 2 XL Questions & Answers] dougandthepixel:
I am trying to restore my Pixel 2 XL to stock but am getting strange responses to successive fastboot commands. Successive identical commands produce different results, so scripts are failing. In particular I'm getting errors indicating that the device doesn't support slots, the active slot can't be determined, or bootloader variables don't exist. The extent of the mods I've made are unlocking the bootloader and installing Magisk via the patched boot.img method. A custom hosts file, running Titanium Backup, and a couple of tasker tasks that change wifi and bluetooth settings are all I'm using root for. I have not flashed a custom recovery. I am using a USB-A to USB-C cable.

fastboot getvar with various variables yields:

C:\Users\doug\Documents\Android\platform-tools>adb --version

Android Debug Bridge version 1.0.40

Version 4797878

Installed as C:\Users\doug\Documents\Android\platform-tools\adb.exe

C:\Users\doug\Documents\Android\platform-tools>adb devices

List of devices attached

710KPAE0400368 device

C:\Users\doug\Documents\Android\platform-tools>adb reboot bootloader

C:\Users\doug\Documents\Android\platform-tools>fastboot --version

fastboot version 28.0.0-4797878

Installed as C:\Users\doug\Documents\Android\platform-tools\fastboot.exe

C:\Users\doug\Documents\Android\platform-tools>fastboot getvar all

(bootloader) keep_efs:no

(bootloader) is_oem_unlocked:yes

(bootloader) have_oem_lock_id:yes

(bootloader) avb_stored_rollback_indexes:

(bootloader) avb_user_settable_key_set:no

(bootloader) avb_version:1.0.0

(bootloader) hw-color:VB

(bootloader) hw-variant:GA00125-US

(bootloader) hw-revision:rev_10

(bootloader) cid:00000000

(bootloader) erase-block-size:0x1000

(bootloader) logical-block-size:0x1000

(bootloader) unlocked:yes

(bootloader) off-mode-charge:1

(bootloader) battery-soc-ok:yes

(bootloader) battery-voltage:4368

(bootloader) version-laf:1.0.3

(bootloader) version-baseband:g8998-00202-1803121407

(bootloader) version-bootloader:TMZ12g

(bootloader) version-abl:TMZ12g

(bootloader) version-aes:TMZ12g

(bootloader) version-cmnlib:TMZ12g

(bootloader) version-cmnlib64:TMZ12g

(bootloader) version-devcfg:TMZ12g

(bootloader) version-hyp:TMZ12g

(bootloader) version-keymaster:TMZ12g

(bootloader) version-pmic:TMZ12g

(bootloader) version-rpm:TMZ12g

(bootloader) version-xbl:TMZ12g

(bootloader) variant:MSM UFS

(bootloader) partition-type:laf_b:raw

(bootloader) partition-size:laf_b: 0x3000000

(bootloader) partition-type:laf_a:raw

(bootloader) partition-size:laf_a: 0x3000000

(bootloader) partition-type:dtbo_b:raw

(bootloader) partition-size:dtbo_b: 0x800000

(bootloader) partition-type:dtbo_a:raw

(bootloader) partition-size:dtbo_a: 0x800000

(bootloader) partition-type:boot_b:raw

(bootloader) partition-size:boot_b: 0x2800000

(bootloader) partition-type:boot_a:raw

(bootloader) partition-size:boot_a: 0x2800000

(bootloader) partition-type:vendor_b:ext4

(bootloader) partition-size:vendor_b: 0x1F400000

(bootloader) partition-type:vendor_a:ext4

(bootloader) partition-size:vendor_a: 0x1F400000

(bootloader) partition-type:persist:ext4

(bootloader) partition-size:persist: 0x2000000

(bootloader) partition-type:userdata:ext4

(bootloader) partition-size:userdata: 0xD423FB000

(bootloader) partition-type:system_b:ext4

(bootloader) partition-size:system_b: 0xA0000000

(bootloader) partition-type:system_a:ext4

(bootloader) partition-size:system_a: 0xA0000000

(bootloader) has-slot:laf:yes

(bootloader) has-slot:bootloader:yes

(bootloader) has-slot:vendor:yes

(bootloader) has-slot:dtbo:yes

(bootloader) has-slot:vbmeta:yes

(bootloader) has-slot:cmnlib64:yes

(bootloader) has-slot:cmnlib:yes

(bootloader) has-slot:keymaster:yes

(bootloader) has-slot:devcfg:yes

(bootloader) has-slot:hyp:yes

(bootloader) has-slot:pmic:yes

(bootloader) has-slot:abl:yes

(bootloader) has-slot:rpm:yes

(bootloader) has-slot:tz:yes

(bootloader) has-slot:xbl:yes

(bootloader) has-slot:radio:yes

(bootloader) has-slot:modem:yes

(bootloader) has-slot:system:yes

(bootloader) current-slot:a

(bootloader) has-slot:boot:yes

(bootloader) slot-retry-count:b:6

(bootloader) slot-unbootable:b:yes

(bootloader) slot-successful:b:yes

(bootloader) slot-retry-count:a:6

(bootloader) slot-unbootable:a:no

(bootloader) slot-successful:a:yes

(bootloader) slot-count:2

(bootloader) slot-suffixes:a,b,

(bootloader) secure:yes

(bootloader) serialno:710KPAE0400368

(bootloader) product:taimen

(bootloader) max-download-size:0x20000000

(bootloader) kernel:uefi

(bootloader) qem:0

all:

Finished. Total time: 0.138s

C:\Users\doug\Documents\Android\platform-tools>fastboot getvar all

getvar:all FAILED (remote: unknown command)

Finished. Total time: 0.004s

C:\Users\doug\Documents\Android\platform-tools>fastboot getvar all

(bootloader) keep_efs:no

(bootloader) is_oem_unlocked:yes

(bootloader) have_oem_lock_id:yes

(bootloader) avb_stored_rollback_indexes:

(bootloader) avb_user_settable_key_set:no

(bootloader) avb_version:1.0.0

(bootloader) hw-color:VB

(bootloader) hw-variant:GA00125-US

(bootloader) hw-revision:rev_10

(bootloader) cid:00000000

(bootloader) erase-block-size:0x1000

(bootloader) logical-block-size:0x1000

(bootloader) unlocked:yes

(bootloader) off-mode-charge:1

(bootloader) battery-soc-ok:yes

(bootloader) battery-voltage:4367

(bootloader) version-laf:1.0.3

(bootloader) version-baseband:g8998-00202-1803121407

(bootloader) version-bootloader:TMZ12g

(bootloader) version-abl:TMZ12g

(bootloader) version-aes:TMZ12g

(bootloader) version-cmnlib:TMZ12g

(bootloader) version-cmnlib64:TMZ12g

(bootloader) version-devcfg:TMZ12g

(bootloader) version-hyp:TMZ12g

(bootloader) version-keymaster:TMZ12g

(bootloader) version-pmic:TMZ12g

(bootloader) version-rpm:TMZ12g

(bootloader) version-xbl:TMZ12g

(bootloader) variant:MSM UFS

(bootloader) partition-type:laf_b:raw

(bootloader) partition-size:laf_b: 0x3000000

(bootloader) partition-type:laf_a:raw

(bootloader) partition-size:laf_a: 0x3000000

(bootloader) partition-type:dtbo_b:raw

(bootloader) partition-size:dtbo_b: 0x800000

(bootloader) partition-type:dtbo_a:raw

(bootloader) partition-size:dtbo_a: 0x800000

(bootloader) partition-type:boot_b:raw

(bootloader) partition-size:boot_b: 0x2800000

(bootloader) partition-type:boot_a:raw

(bootloader) partition-size:boot_a: 0x2800000

(bootloader) partition-type:vendor_b:ext4

(bootloader) partition-size:vendor_b: 0x1F400000

(bootloader) partition-type:vendor_a:ext4

(bootloader) partition-size:vendor_a: 0x1F400000

(bootloader) partition-type:persist:ext4

(bootloader) partition-size:persist: 0x2000000

(bootloader) partition-type:userdata:ext4

(bootloader) partition-size:userdata: 0xD423FB000

(bootloader) partition-type:system_b:ext4

(bootloader) partition-size:system_b: 0xA0000000

(bootloader) partition-type:system_a:ext4

(bootloader) partition-size:system_a: 0xA0000000

(bootloader) has-slot:laf:yes

(bootloader) has-slot:bootloader:yes

(bootloader) has-slot:vendor:yes

(bootloader) has-slot:dtbo:yes

(bootloader) has-slot:vbmeta:yes

(bootloader) has-slot:cmnlib64:yes

(bootloader) has-slot:cmnlib:yes

(bootloader) has-slot:keymaster:yes

(bootloader) has-slot:devcfg:yes

(bootloader) has-slot:hyp:yes

(bootloader) has-slot:pmic:yes

(bootloader) has-slot:abl:yes

(bootloader) has-slot:rpm:yes

(bootloader) has-slot:tz:yes

(bootloader) has-slot:xbl:yes

(bootloader) has-slot:radio:yes

(bootloader) has-slot:modem:yes

(bootloader) has-slot:system:yes

(bootloader) current-slot:a

(bootloader) has-slot:boot:yes

(bootloader) slot-retry-count:b:6

(bootloader) slot-unbootable:b:yes

(bootloader) slot-successful:b:yes

(bootloader) slot-retry-count:a:6

(bootloader) slot-unbootable:a:no

(bootloader) slot-successful:a:yes

(bootloader) slot-count:2

(bootloader) slot-suffixes:a,b,

(bootloader) secure:yes

(bootloader) serialno:710KPAE0400368

(bootloader) product:taimen

(bootloader) max-download-size:0x20000000

(bootloader) kernel:uefi

(bootloader) qem:0

all:

Finished. Total time: 0.140s

C:\Users\doug\Documents\Android\platform-tools>fastboot getvar current-slot

getvar:current-slot FAILED (remote: unknown command)

Finished. Total time: 0.016s

C:\Users\doug\Documents\Android\platform-tools>fastboot getvar current-slot

getvar:current-slot FAILED (remote: GetVar Variable Not found)

Finished. Total time: 0.002s

C:\Users\doug\Documents\Android\platform-tools>fastboot getvar current-slot

getvar:current-slot FAILED (remote: unknown command)

Finished. Total time: 0.002s

C:\Users\doug\Documents\Android\platform-tools>fastboot getvar current-slot

current-slot: a

Finished. Total time: 0.002s

C:\Users\doug\Documents\Android\platform-tools>fastboot getvar current-slot

getvar:current-slot FAILED (remote: unknown command)

Finished. Total time: -0.000s

C:\Users\doug\Documents\Android\platform-tools>fastboot getvar current-slot

current-slot: a

Finished. Total time: 0.000s

C:\Users\doug\Documents\Android\platform-tools>

Pointers to next steps appreciated!

Many thanks,

Doug