[XDA Assist] averagedude:
My issue is a complicated one, I think.

[Moto x 2nd gen (XT1095)] Two days ago, I dropped my phone, and the screen was absolutely destroyed. The touchscreen and the display are still working fine, but the glass front is completely annihilated. :/ I sent a request to Motorola to get it repaired, and wanted to reflash the stock 5.0 system image. (I happen to be stupid and didn't make a nandriod of stock) I've done this before, in order to update to 5.1, so I have the files required to do so. This is where I started running into problems.

It more or less successfully flashed the image, with the output below:

C:\Program Files (x86)\Android\android-sdk\platform-tools>fastboot flash partition gpt.bin

target reported max download size of 536870912 bytes

sending 'partition' (32 KB)...

OKAY [ -0.000s]

writing 'partition'...

(bootloader) Preflash validation failed

FAILED (remote failure)

finished. total time: 0.078s

C:\Program Files (x86)\Android\android-sdk\platform-tools>fastboot flash motoboot motoboot.img

< waiting for device >

target reported max download size of 536870912 bytes

sending 'motoboot' (2022 KB)...

OKAY [ 0.125s]

writing 'motoboot'...

(bootloader) Motoboot: Preflash validation for tz

(bootloader) Preflash validation failed

FAILED (remote failure)

finished. total time: 0.187s

C:\Program Files (x86)\Android\android-sdk\platform-tools>fastboot reboot-bootloader

rebooting into bootloader...

OKAY [ 0.016s]

finished. total time: 0.016s

C:\Program Files (x86)\Android\android-sdk\platform-tools>fastboot flash logo logo.bin

sending 'logo' (467 KB)...

FAILED (command write failed (No such device or address))

finished. total time: 0.016s

C:\Program Files (x86)\Android\android-sdk\platform-tools>fastboot flash boot boot.img

sending 'boot' (10200 KB)...

FAILED (command write failed (No such device or address))

finished. total time: 0.016s

C:\Program Files (x86)\Android\android-sdk\platform-tools>fastboot flash recovery recovery.img

< waiting for device >

target reported max download size of 536870912 bytes

sending 'recovery' (10280 KB)...

OKAY [ 0.380s]

writing 'recovery'...

OKAY [ 0.512s]

finished. total time: 0.892s

C:\Program Files (x86)\Android\android-sdk\platform-tools>fastboot flash system

system.img

target reported max download size of 536870912 bytes

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

OKAY [ 23.360s]

writing 'system'...

OKAY [ 8.230s]

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

OKAY [ 23.414s]

writing 'system'...

OKAY [ 7.258s]

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

OKAY [ 40.036s]

writing 'system'...

OKAY [ 7.612s]

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

OKAY [ 15.842s]

writing 'system'...

OKAY [ 4.025s]

finished. total time: 129.798s

C:\Program Files (x86)\Android\android-sdk\platform-tools>fastboot erase modemst1

erasing 'modemst1'...

OKAY [ 0.035s]

finished. total time: 0.036s

C:\Program Files (x86)\Android\android-sdk\platform-tools>fastboot erase modemst2

erasing 'modemst2'...

OKAY [ 0.008s]

finished. total time: 0.009s

C:\Program Files (x86)\Android\android-sdk\platform-tools>fastboot flash fsg fsg.mbn

target reported max download size of 536870912 bytes

sending 'fsg' (694 KB)...

OKAY [ 0.062s]

writing 'fsg'...

OKAY [ 0.045s]

finished. total time: 0.109s

C:\Program Files (x86)\Android\android-sdk\platform-tools>fastboot flash modem NON-HLOS.bin

target reported max download size of 536870912 bytes

sending 'modem' (62248 KB)...

OKAY [ 2.083s]

writing 'modem'...

OKAY [ 0.804s]

finished. total time: 2.889s

C:\Program Files (x86)\Android\android-sdk\platform-tools>fastboot erase userdata

erasing 'userdata'...

OKAY [ 4.443s]

finished. total time: 4.444s

C:\Program Files (x86)\Android\android-sdk\platform-tools>fastboot erase cache

erasing 'cache'...

OKAY [ 0.248s]

finished. total time: 0.249s

C:\Program Files (x86)\Android\android-sdk\platform-tools>fastboot reboot

rebooting...

Upon rebooting to insure that everything worked correctly, I was greeted with the dreaded: "Unfortunately, Phone has stopped". Alright, not the worst thing in the world, if anything I can just reflash TWRP and restore the nandroid I had made before hand. I tap "Ok", but only to have "Unfortunately, Nfc Service has stopped" come up immediately afterward. I keep tapping "Ok", but the dialog fail to cease long enough for me to even interact with the phone; therein lies the issue. I can't access settings to enable USB debugging. I boot my phone into fastboot and attempt to flash TWRP, but of course I can't. Now I'm starting to panic and rampantly search Google for the answer. No luck, best I can find is if I could access the setting. The only thing that I could think of doing next is to find someway to use adb side-load, or disable those damned dialogs. I can access storage, and the device's boot-loader is unlocked.

tl;dr: Can't access settings, unlocked boot-loader, stock android stuck at setup screen. Trying to find a way to install TWRP custom recovery.

Please give me some advice!