[Android General] Arghya Biswas:
Before you start reading note that no spoon-feeding is done here and its a bit tricky if you are flashing Stock ROMs for the first time.

REQUIREMENTS:

-PC/laptop

-ADB-Fastboot / Qualcomm Drivers must be installed

-QFST tool / QFIL tool anyone required (QSFT RECOMMENDED)

-notepad ++

-Platform Tools

-Stock Nougat v82/v99 Firmware File

-And A working Brain

Process:

First, install all the drivers and Flashing Tool then Extract the V82/V99 rom.

Then go where you have extracted the rom then go to the firmware folder there find (rawprogram_unsparse/rawprogram0) anyone and open that file with notepad ++ NOW HERE COMES THE DIFFICULT PART you need to delete some lines from that file so that it doesn't create any NULL IMEI issue when flashing the rom.

**NOTE YOU NEED TO CHANGE THE (rawprogram_unsparse/rawprogram0) FILE. BELOW LINES MUST BE CHANGE FROM BOTH FIRMWARE V82 as well as from V99 firmware. or else it will give null IMEI error.

After opening the file in notpad ++ find this lines:

filename="st1" label="modemst1" num_partition_sectors="3072" physical_partition_number="0" size_in_KB="1536.0" sparse="false" start_byte_hex="0xd682400" start_sector="439314" />

filename="st2" label="modemst2" num_partition_sectors="3072" physical_partition_number="0" size_in_KB="1536.0" sparse="false" start_byte_hex="0xd802400" start_sector="442386" />

[FROM THIS TWO LINE YOU NEED TO REMOVE THE "st1" and "st2" ] THEN

filename="fs_image.tar.gz.mbn.img" label="fsg" num_partition_sectors="3072" physical_partition_number="0" size_in_KB="1536.0" sparse="false" start_byte_hex="0x10008000" start_sector="524352" />

[FROM HERE YOU NEED TO REMOVE "fs_image.tar.gz.mbn.img" ] THEN

filename="persist_1.img" label="persist" num_partition_sectors="9608" physical_partition_number="0" start_sector="10485760" />

[FROM HERE REMOVE "persist_1.img" ] THEN SAVE THE FILE

**NOTE- REMEMBER IN WHICH FILE YOU MAKE THE CHANGES.

(either rawprogram_unsparse or rawprogram0).

**NOTE**

Make sure USB debugging is turned on from developer option,

Now boot your device is in EDL Mode.

To Boot in EDL Mode just Power OFF your device and then press (volume up + volume down button simultaneously) when 10or. logo popup just connects the data cable... and your notification LED will start blinking...

**MAIN PROCESS**

**FIRST NEED TO FLASH V82 FACTORY FIRMWARE FOR UNLOCKING BOOT LOADER.

Now open QPST Tool/ QFIL Tool, anyone you prefer then select Flat Build then in programmer path, go to browse and from the V82 firmware folder select "prog_emmc_firehose_8937_ddr.mbn" file Then click on load XML And select the .xml File in which you have made the changes (otherwise if you select the wrong .xml file the IMEI will be NULL) After selecting the .xml file another window will be popup just select the [patch0] and then it's done...

Now you can flash your 10or. Device By just Clicking on the Download Button.

Let the flashing process to be finished...

After the flashing complete boot your phone it will show a start option just start it by power key, then your phone will boot into test mode then just click on Reboot --> Reboot To Android --> Ok, then again click on start by the power button, after the phone boots again enable the USB debugging option and power off your device.

Now we need to boot our phone into fastboot mode for that (press power button + volume down simultaneously) and then click on start again by the power button. then some options will be shown just select fastboot mode by the volume rockers and the power button.

As now your device is booted into fastboot mode just connect the USB cable and you can now unlock the bootloader by typing this commands

OPEN FASTBOOT/PLATFORM TOOLS and use this following commands

fastboot devices

(it will show if your device is connected or not)

then type fastboot oem unlock

then there will be a popup on the phone just select "yes" by the volume rockers and power button.

After the phone reboot, your phone bootloader will be unlocked Now you need to flash the V99 rom for that just power off your phone and boot it again to EDL mode and flash the V99 rom by the using same process use to flash the V82 ROM.