[X Style (Pure) General] stevejohnson42:
more on M X P E users Windows based ADB Flashing

First -- read [MENTION=5781153]ResistanceIsFutile[/MENTION] last post -- then this one may make sense

Some of this is from memory - but ; this is the steps I have taken on the OP and results ;

This is assuming that you have no interest in relocking bootloader and you have the official TWRP handy

Have to put phone in bootloader mode :

All files from image need to be in same folder as the ADB on computer

fastboot oem fb_mode_set

fastboot flash partition gpt.bin ( at this point you may get " "Preflash Validation Error" - only time you can ignore an error )

fastboot flash bootloader bootloader.img

fastboot flash logo XT1575-logo-new-9-14-15.bin

fastboot flash boot boot.img

fastboot flash recovery recovery.img

fastboot flash system system.img_sparsechunk.0

fastboot flash system system.img_sparsechunk.1

fastboot flash system system.img_sparsechunk.2

fastboot flash system system.img_sparsechunk.3

fastboot flash system system.img_sparsechunk.4

fastboot flash system system.img_sparsechunk.5

fastboot flash system system.img_sparsechunk.6

fastboot flash system system.img_sparsechunk.7

fastboot flash system system.img_sparsechunk.8

fastboot flash system system.img_sparsechunk.9

fastboot flash modem NON-HLOS.bin ( my recollection - this is most frequent place for a flash error - if you get it ; just rerun command again - you need to see OKAY )

fastboot erase modemst1

fastboot erase modemst2

fastboot flash fsg fsg.mbn

fastboot flash bluetooth BTFM.bingr

fastboot erase cachedir

fastboot erase userdatafas

fastboot erase customize

fastboot erase clogo

fastboot oem fb_mode_clear

fastboot reboot

Be patient - you will get a bootloader unlocked message ( see the post by [MENTION=5781153]ResistanceIsFutile[/MENTION] - he has link on how to get rid of it later ) and , if you set up right -- one security update - take it before you try to flash anything else and let it install

( Up to you here -- I typically do a setup as new when I get to that step -- I reload apps later )

Only after the security update - then get back into the bootloader

To flash TWRP

Download the correct image file and copy the file into the same folder as your adb and fastboot binaries. Rename the image to twrp.img and type:

fastboot flash recovery twrp.img

fastboot reboot

The note below has to be done if TWRP has been removed from device :

This device will replace your custom recovery automatically during first boot. To prevent this, use*Google*to find the proper key combo to enter recovery. After typing*fastboot reboot, hold the key combo ( power and volume down ) and boot to TWRP. Once TWRP is booted, TWRP will patch the stock ROM to prevent the stock ROM from replacing TWRP. If you don't follow this step, you will have to repeat the install.

I boot into TWRP and install the boot.img I want to replace the bootloader warning and also install Magisk then reboot into system

At this point you can flash NucleROM and appropriate gapps / magisk before you restore apps - it is a great ROM -- I keep flipping back and forth ; but at this moment ( subject to change at any moment ) went to the next steps and stayed on rooted stock

You will find at this point you are "uncertified" in the Play Store - Go into Settings => Apps and chose first "Google Play Services" - then clear the data - then go into "Google Play Store " app and do the same -- then reboot -- you should show up as Certified ( Play Store => Settings => scroll to bottom => "Play Protect Certification" shows as "Device is certified"

then go into your library in the Play Store and restore apps you want to have back

I have not had any success with xposed at this point - on the other hand - have not tried real hard ; some themes will work Substratum - I use AospUIBlack - but do not try to theme many apps - more the UI of the OS

Use the first method shown here : https://www.hongkiat.com/blog/change-android-boot-animation/ to get rid of the awful boot animation

get it set up - make a backup in TWRP