[Nexus 6 Q&A, Help & Troubleshooting] ZhimingWU:
Below is the text from the command terminal where I tried.

<pre>

zhiming@wuzm-BJ-PC-0994:~/Project/Nexus/Images/shamu-nbd90z$ ./flash-all.sh

target reported max download size of 536870912 bytes

sending 'bootloader' (4071 KB)...

OKAY [ 0.129s]

writing 'bootloader'...

(bootloader) flashing partition ...

(bootloader) This may take a few seconds if a

(bootloader) different partition table is being

(bootloader) flashed since we need to backup

(bootloader) and restore a few partitions

(bootloader) Flashing primary GPT image...

(bootloader) Flashing backup GPT image...

(bootloader) flashing aboot ...

(bootloader) flashing sbl1 ...

(bootloader) flashing rpm ...

(bootloader) flashing tz ...

(bootloader) flashing sdi ...

(bootloader) flashing logo ...

OKAY [ 0.528s]

finished. total time: 0.657s

rebooting into bootloader...

OKAY [ 0.000s]

finished. total time: 0.151s

target reported max download size of 536870912 bytes

sending 'radio' (115507 KB)...

OKAY [ 3.617s]

writing 'radio'...

(bootloader) flashing modem ...

(bootloader) flashing mdm1m9kefs1 ...

(bootloader) flashing mdm1m9kefs2 ...

(bootloader) flashing mdm1m9kefs3 ...

(bootloader) flashing versions ...

OKAY [ 1.609s]

finished. total time: 5.226s

rebooting into bootloader...

OKAY [ 0.000s]

finished. total time: 0.151s

target reported max download size of 536870912 bytes

archive does not contain 'boot.sig'

archive does not contain 'recovery.sig'

archive does not contain 'system.sig'

archive does not contain 'vendor.img'

Creating filesystem with parameters:

Size: 28474998784

Block size: 4096

Blocks per group: 32768

Inodes per group: 8160

Inode size: 256

Journal blocks: 32768

Label:

Blocks: 6951904

Block groups: 213

Reserved block group size: 1024

Created filesystem with 11/1738080 inodes and 153124/6951904 blocks

Creating filesystem with parameters:

Size: 268435456

Block size: 4096

Blocks per group: 32768

Inodes per group: 8192

Inode size: 256

Journal blocks: 1024

Label:

Blocks: 65536

Block groups: 2

Reserved block group size: 15

Created filesystem with 11/16384 inodes and 2089/65536 blocks

--------------------------------------------

Bootloader Version...: moto-apq8084-71.21

Baseband Version.....: D4.01-9625-05.42+FSG-9625-02.113

Serial Number........: ZX1G22H7C4

--------------------------------------------

checking product...

OKAY [ 0.002s]

checking version-bootloader...

OKAY [ 0.002s]

checking version-baseband...

OKAY [ 0.003s]

sending 'boot' (8535 KB)...

OKAY [ 0.269s]

writing 'boot'...

OKAY [ 0.161s]

sending 'recovery' (13921 KB)...

OKAY [ 0.439s]

writing 'recovery'...

OKAY [ 0.208s]

sending sparse 'system' (508909 KB)...

OKAY [ 16.031s]

writing 'system'...

OKAY [ 7.247s]

sending sparse 'system' (524036 KB)...

FAILED (status read failed (Protocol error))

finished. total time: 28.751s

zhiming@wuzm-BJ-PC-0994:~/Project/Nexus/Images/shamu-nbd90z$ fastboot devices

ZX1G22H7C4	fastboot

zhiming@wuzm-BJ-PC-0994:~/Project/Nexus/Images/shamu-nbd90z$ fastboot oem lock

...

^C

zhiming@wuzm-BJ-PC-0994:~/Project/Nexus/Images/shamu-nbd90z$ fastboot oem lock

...

(bootloader) Device state transition will erase userdata.

(bootloader) Are you sure you want to continue this transition?

(bootloader)

(bootloader) Press POWER key to continue.

(bootloader) Press VOL UP or VOL DOWN key to cancel state transition.

(bootloader) State transition confirmed!

(bootloader) Phone is locked successfully!

OKAY [ 24.319s]

finished. total time: 24.319s

zhiming@wuzm-BJ-PC-0994:~/Project/Nexus/Images/shamu-nbd90z$ ls

bootloader-shamu-moto-apq8084-71.21.img flash-all.bat flash-all.sh flash-base.sh image-shamu-nbd90z.zip radio-shamu-d4.01-9625-05.42+fsg-9625-02.113.img

zhiming@wuzm-BJ-PC-0994:~/Project/Nexus/Images/shamu-nbd90z$ ./flash-all.sh

target reported max download size of 536870912 bytes

sending 'bootloader' (4071 KB)...

OKAY [ 0.129s]

writing 'bootloader'...

(bootloader) Not allowed in LOCKED state!

FAILED (remote failure)

finished. total time: 0.132s

rebooting into bootloader...

OKAY [ 0.000s]

finished. total time: 0.151s

target reported max download size of 536870912 bytes

sending 'radio' (115507 KB)...

OKAY [ 3.617s]

writing 'radio'...

(bootloader) Not allowed in LOCKED state!

FAILED (remote failure)

finished. total time: 3.622s

rebooting into bootloader...

OKAY [ 0.000s]

finished. total time: 0.151s

target reported max download size of 536870912 bytes

archive does not contain 'boot.sig'

archive does not contain 'recovery.sig'

archive does not contain 'system.sig'

archive does not contain 'vendor.img'

Creating filesystem with parameters:

Size: 28474998784

Block size: 4096

Blocks per group: 32768

Inodes per group: 8160

Inode size: 256

Journal blocks: 32768

Label:

Blocks: 6951904

Block groups: 213

Reserved block group size: 1024

Created filesystem with 11/1738080 inodes and 153124/6951904 blocks

Creating filesystem with parameters:

Size: 268435456

Block size: 4096

Blocks per group: 32768

Inodes per group: 8192

Inode size: 256

Journal blocks: 1024

Label:

Blocks: 65536

Block groups: 2

Reserved block group size: 15

Created filesystem with 11/16384 inodes and 2089/65536 blocks

--------------------------------------------

Bootloader Version...: moto-apq8084-71.21

Baseband Version.....: D4.01-9625-05.42+FSG-9625-02.113

Serial Number........: ZX1G22H7C4

--------------------------------------------

checking product...

OKAY [ 0.002s]

checking version-bootloader...

OKAY [ 0.002s]

checking version-baseband...

OKAY [ 0.003s]

sending 'boot' (8535 KB)...

OKAY [ 0.269s]

writing 'boot'...

(bootloader) Not allowed in LOCKED state!

FAILED (remote failure)

finished. total time: 0.288s

zhiming@wuzm-BJ-PC-0994:~/Project/Nexus/Images/shamu-nbd90z$ fastboot

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

zhiming@wuzm-BJ-PC-0994:~/Project/Nexus/Images/shamu-nbd90z$ ls

bootloader-shamu-moto-apq8084-71.21.img flash-all.bat flash-all.sh flash-base.sh image-shamu-nbd90z.zip radio-shamu-d4.01-9625-05.42+fsg-9625-02.113.img

zhiming@wuzm-BJ-PC-0994:~/Project/Nexus/Images/shamu-nbd90z$ geany flash-base.sh

zhiming@wuzm-BJ-PC-0994:~/Project/Nexus/Images/shamu-nbd90z$ ./flash-base.sh

target reported max download size of 536870912 bytes

sending 'bootloader' (4071 KB)...

OKAY [ 0.129s]

writing 'bootloader'...

(bootloader) Not allowed in LOCKED state!

FAILED (remote failure)

finished. total time: 0.132s

rebooting into bootloader...

OKAY [ 0.000s]

finished. total time: 0.151s

target reported max download size of 536870912 bytes

sending 'radio' (115507 KB)...

OKAY [ 3.617s]

writing 'radio'...

(bootloader) Not allowed in LOCKED state!

FAILED (remote failure)

finished. total time: 3.622s

rebooting into bootloader...

OKAY [ 0.000s]

finished. total time: 0.151s

zhiming@wuzm-BJ-PC-0994:~/Project/Nexus/Images/shamu-nbd90z$ fastboot oem

zhiming@wuzm-BJ-PC-0994:~/Project/Nexus/Images/shamu-nbd90z$ fastboot oem --help

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

zhiming@wuzm-BJ-PC-0994:~/Project/Nexus/Images/shamu-nbd90z$ fastboot oem unlock

...

(bootloader) Check 'Allow OEM Unlock' in Developer Options.

FAILED (remote failure)

finished. total time: 0.001s

zhiming@wuzm-BJ-PC-0994:~/Project/Nexus/Images/shamu-nbd90z$ fastboot reboot

rebooting...

finished. total time: 0.151s

zhiming@wuzm-BJ-PC-0994:~/Project/Nexus/Images/shamu-nbd90z$ ls

bootloader-shamu-moto-apq8084-71.21.img flash-all.bat flash-all.sh flash-base.sh image-shamu-nbd90z.zip radio-shamu-d4.01-9625-05.42+fsg-9625-02.113.img

zhiming@wuzm-BJ-PC-0994:~/Project/Nexus/Images/shamu-nbd90z$ fastboot flash radio radio-shamu-d4.01-9625-05.42+fsg-9625-02.113.img

target reported max download size of 536870912 bytes

sending 'radio' (115507 KB)...

OKAY [ 3.617s]

writing 'radio'...

(bootloader) Not allowed in LOCKED state!

FAILED (remote failure)

finished. total time: 3.622s

zhiming@wuzm-BJ-PC-0994:~/Project/Nexus/Images/shamu-nbd90z$ fastboot devices

ZX1G22H7C4	fastboot

zhiming@wuzm-BJ-PC-0994:~/Project/Nexus/Images/shamu-nbd90z$ cd /home/zhiming/Project/Nexus/Images/shamu-mob31e/

zhiming@wuzm-BJ-PC-0994:~/Project/Nexus/Images/shamu-mob31e$ ls

bootloader-shamu-moto-apq8084-71.18.img flash-all.bat flash-all.sh flash-base.sh image-shamu-mob31e.zip radio-shamu-d4.01-9625-05.34+fsg-9625-02.111.img

zhiming@wuzm-BJ-PC-0994:~/Project/Nexus/Images/shamu-mob31e$ ./flash-all.sh

target reported max download size of 536870912 bytes

sending 'bootloader' (10387 KB)...

OKAY [ 0.327s]

writing 'bootloader'...

(bootloader) Not allowed in LOCKED state!

FAILED (remote failure)

finished. total time: 0.332s

rebooting into bootloader...

OKAY [ 0.000s]

finished. total time: 0.151s

target reported max download size of 536870912 bytes

sending 'radio' (115508 KB)...

OKAY [ 3.617s]

writing 'radio'...

(bootloader) Not allowed in LOCKED state!

FAILED (remote failure)

finished. total time: 3.622s

rebooting into bootloader...

OKAY [ 0.000s]

finished. total time: 0.151s

target reported max download size of 536870912 bytes

archive does not contain 'boot.sig'

archive does not contain 'recovery.sig'

archive does not contain 'system.sig'

archive does not contain 'vendor.img'

Creating filesystem with parameters:

Size: 28474998784

Block size: 4096

Blocks per group: 32768

Inodes per group: 8160

Inode size: 256

Journal blocks: 32768

Label:

Blocks: 6951904

Block groups: 213

Reserved block group size: 1024

Created filesystem with 11/1738080 inodes and 153124/6951904 blocks

Creating filesystem with parameters:

Size: 268435456

Block size: 4096

Blocks per group: 32768

Inodes per group: 8192

Inode size: 256

Journal blocks: 1024

Label:

Blocks: 65536

Block groups: 2

Reserved block group size: 15

Created filesystem with 11/16384 inodes and 2089/65536 blocks

--------------------------------------------

Bootloader Version...: moto-apq8084-71.21

Baseband Version.....: D4.01-9625-05.42+FSG-9625-02.113

Serial Number........: ZX1G22H7C4

--------------------------------------------

checking product...

OKAY [ 0.002s]

checking version-bootloader...

FAILED

Device version-bootloader is 'moto-apq8084-71.21'.

Update requires 'moto-apq8084-71.18'.

finished. total time: 2.498s

zhiming@wuzm-BJ-PC-0994:~/Project/Nexus/Images/shamu-mob31e$ cd /home/zhiming/Project/Nexus/Images/shamu-nbd90z/

zhiming@wuzm-BJ-PC-0994:~/Project/Nexus/Images/shamu-nbd90z$ ls

bootloader-shamu-moto-apq8084-71.21.img flash-all.bat flash-all.sh flash-base.sh image-shamu-nbd90z.zip radio-shamu-d4.01-9625-05.42+fsg-9625-02.113.img

zhiming@wuzm-BJ-PC-0994:~/Project/Nexus/Images/shamu-nbd90z$ ./flash-base.sh

target reported max download size of 536870912 bytes

sending 'bootloader' (4071 KB)...

OKAY [ 0.129s]

writing 'bootloader'...

(bootloader) Not allowed in LOCKED state!

FAILED (remote failure)

finished. total time: 0.135s

rebooting into bootloader...

OKAY [ 0.000s]

finished. total time: 0.113s

target reported max download size of 536870912 bytes

sending 'radio' (115507 KB)...

OKAY [ 3.617s]

writing 'radio'...

(bootloader) Not allowed in LOCKED state!

FAILED (remote failure)

finished. total time: 3.622s

rebooting into bootloader...

OKAY [ 0.000s]

finished. total time: 0.151s

zhiming@wuzm-BJ-PC-0994:~/Project/Nexus/Images/shamu-nbd90z$ fastboot oem unlock

...

(bootloader) Check 'Allow OEM Unlock' in Developer Options.

FAILED (remote failure)

finished. total time: 0.001s

zhiming@wuzm-BJ-PC-0994:~/Project/Nexus/Images/shamu-nbd90z$

</pre>