[Android Q&A, Help & Troubleshooting] standm:
This is for Huawei P9 Lite L31 model but will apply to L21 and other Huawei variants as well.

Please note that this procedure will take you back to Marshmallow, but you will have the option to update to Nougat if you want. (I will explain later)

This can also be used to flash back to Marshmallow from Nougat, or if your partitions have become corrupted/bricked etc.

If you have updated to Nougat and find that your calculator, calendar and a few apps are missing, this will also work for you.

You can also use this procedure to convert your phone to dual sim. (130 = Dual SIM) (131 = Single SIM)

You will need a microsd card in phone. I highly suggest formatting it first or using a new one. I had issues with mine so rather format.

Download your stock firmware from: https://www.leakite.com/2016/08/download-huawei-p9-lite-stock-firmware.html

Download the following adb files from: https://mega.nz/#!0lp3VS5A!M76e8J6tH6TtVzLAbYAe4mO3OI25ULwD8V8i1lKCSHE (Extract to your C Drive)

Download the L31 OEM files from: https://mega.nz/#F!w4wkFbqQ!k2GrUzYcTakHUHtWo6c8DQ

Download the TWRP files from: https://mega.nz/#F!AhYFFTSD!oWKoWtoBculiP9iS_RgMQw

I am going to assume you know more or less about adb and fastboot options.

Firstly, if you can still make use of your phone, go to developer options and make sure OEM unlock has been selected.

If you don't have your developer options available, do the following:

Go to "About phone"

click on Build Number several times.This will enable developer options.

Hit back, and go to developer options.

Now make sure "Enable OEM unlock" is on.

In windows, click start, select run, type in "cmd", right click and hit run as administrator.

Change directory to where your adb directory is. For ease of use mine is c:\adb

Now, plug in your phone usb between phone and computer.

Power off your phone.

Hold power and volume down button.

Phone will boot into download mode.

Look to see if your phone is OEM unlocked and OEM has been enabled.

If your phone is FRP locked, unlock it at the huawei website to get your oem unlock code.

It's good practice to save this code for future use.

If you have your OEM unlock code, type the following in adb:

"fastboot oem unlock xxxx" (xxxx represents your unlock code)

It will ask you to unlock bootloader, select yes.

Phone will restart and do a factory reset.

If your phone is corrupt it might not be able to do the factory reset but don't worry too much about that.

Shut down the phone.

Hold power and volume down button.

Phone will boot into download mode.

Copy both recovery files into the adb folder.

If you are currently running on Nougat, flash the nougat "recoverytwrpngt.img"

If you are currently running or were running Marshmallow, flash the "recoverytwrpmm.img"

Example: fastboot flash recovery recoverytwrp.img

If all goes well, it should show something like:

C:\adb>fastboot flash recovery recoverytwrpngt.img

target reported max download size of 471859200 bytes

sending 'recovery' (41816 KB)...

OKAY [ 1.283s]

writing 'recovery'...

OKAY [ 1.021s]

finished. total time: 2.307s

If you get "FAILED (remote: Command not allowed)", I can assure you that OEM is still locked even if it says it's not in the download mode screen.

Do the ""fastboot oem unlock xxxx" (xxxx represents your unlock code) "again.

If you get a fail message of any type, try "fastboot -w".

Assuming it went well, unplug the phone. (IMPORTANT)

Press power button and make sure phone switches off.

Hold on power and volume up button. Release the buttons at the logo.

Phone should now go into recovery mode.

If you have a corrupted phone, i suggest you format your phone completely.

Otherwise, just select wipe data and select all, except external drive where you have stored your update files (I will explain ths later).

At this point, plug your usb cable in again and your computer should pick your external usb drive up.

It will be called something like "Micro SD Card"

From your pc, create a folder in your external drive called "dload"

Copy all files from the downloaded firmware into the dload folder. (Extract)

There should be two files, and one folder.

You should have a twrp directory under your flash drive.

Copy the two oeminfo files into twrp/backups/"serialnumberdirectory"/"dateddirectory/

In TWRP, click "restore", select storage, select your sd card" and "ok", and select OEMinfo and restore.

Note that these oem files are for the L31. Look for yours on google if its different.

Once flashed, switch off phone.

Unplug the phone from USB. (IMPORTANT)

Now, hold in power, vol up and also volume down. (ALL three buttons)

Release buttons on logo.

Phone will start with update procedure.

This can take up to 20 minutes to update as all corrupted directories are being recreated.

Once up and running, look for update. (Settings, Updater...)

If the update fails, do a factory reset (Settings, advanced settings, backup and reset, reset phone) and the next OA update will work.

Let me know if it works for you.