[P8 Lite (2017) Development] vjjmaster:
================================================================================================================================================

How to restore(Huawei Stock Rom)

**************************************

Send(transfer) the "dload" folder to sdcard then shutdown phone. Press [Vol_UP + Vol_DOWN + Power] until Huawei logo appears then keep [Vol_UP + Vol_DOWN]

Let the process continue after it's done it will low-level reset the android phone. WHERE Vol = Volume Button

================================================================================================================================================

You may finish setting up the Andriod and open the settings enabled developer by tapping multiple times on the Build No.

Then enter the developer mode and enable it, then enable debugger mode to connect the phone

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

either run: "adb reboot bootloader" via cmd in adb folder in C: or Shutdown the phone and Connect USB cable to PC only, ---> then Press [Vol_DOWN + Connect USB Cable] until

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

via ADB in C open cmd:--->Then Run---> fastboot oem unlock BOOTLOADER_CODE --->"fastboot oem unlock CODE" after this the phone automatically does a low-level format and start with Huawei animation to boot to setup Andriod. You may shut down the phone after reaching the Andriod Setup screen.

If you are having problems getting your UNLOCK CODE you can reset to any 16Digit like 2222222222222222 via "PotatoNV-next-v2.1.0-x86.exe". This involves opening the phone and short-circuiting the test pin. This was how I did it. It's FREE... Attached is a picture indicating Huawei P8 Lite 2017 TEST PIN

**********************************************************************************************************************

Then Boot the phone to the Bootloader either via button or cmd

================================================================================================================================================

NB: ".\powershell commands simple fastboot commands are cmd commands"

==================================================

.\adb.exe reboot bootloader

.\fastboot.exe oem unlock BOOTLOADER_CODE

=================================================

.\adb.exe reboot bootloader

.\fastboot.exe devices

=================================================

.\fastboot.exe flash recovery_ramdisk .\src\TWRP_3.5.2-prague_DarkJoker360_20210508.img

fastboot flash recovery_ramdisk <kernel or recover file or twrp>

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

fastboot flash recovery_ramdisk C:\adb\TWRP_3.5.2-prague_DarkJoker360_20210508.img

=================================================

After flashing the image I reboot in TWRP by pushing the buttons:

[Vol_UP + Power] until Huawei logo appears then keep [Vol_UP ]

=================================================

I preferred extracting the fstab.hi6250 directly from my phone to PC modifying it then pushing it back to my mobile.

Next enter section Advanced, Terminal and run:

******************************

mount -o remount,rw /vendor

******************************

Now edited fstab.hi6250 can be copied with File Manager to /vendor/etc and it needs to be given proper permission: chmod 0644. After that data can be formatted.

=================================================

=================================================

chmod 644 /vendor/etc/fstab.hi6250

*********************************************************************************

chmod 755 /vendor/etc/fstab.hi6250

=================================================

adb pull /vendor/etc/fstab.hi6250

*********************************************************************************

fstab.hi6250 file downloaded to adb directory Example in "C:\adb"

You will have fstab.hi6250 file in adb folder

*********************************************************************************

Edit fstab.hi6250 and replace the line

/dev/block/bootdevice/by-name/userdata /data f2fs nosuid,nodev,noatime,discard,inline_data,inline_xattr wait,check,fileencryption=aes-256-xts:aes-256-cts

by

/dev/block/bootdevice/by-name/userdata /data f2fs nosuid,nodev,noatime,discard,inline_data,inline_xattr wait,check

or

you simply wipe ",fileencryption=aes-256-xts:aes-256-cts" behind "/dev/block/bootdevice/by-name/userdata /data f2fs nosuid,nodev,noatime,discard,inline_data,inline_xattr wait,check,fileencryption=aes-256-xts:aes-256-cts"

====================================================

Push the fstab.hi6250 into mobile by typing this

***************************************************

adb push fstab.hi6250 /vendor/etc

***************************************************

you have rewritten fstab.hi6250 file

Now, you can reboot the phone and format the partition data

====================================================

Now in TWRP, I'm performing these steps

*****************************

Wipe > Format Data

*****************************

then

*****************************

Reboot > Recovery

*****************************

=====================================================

Wipe Data

************************************************

Now in TWRP again, and performing these steps:

************************************************

Wipe >

[x] Dalvik / ART Cache

[x] Cache

[x] Data

[x] System

*************************************************

Wipe only the partitions listed above !!

======================================================

Install the system

*******************

Still, in TWRP I do:

*******************

Install > Image > System Image

Lineageos-18.1.img

***************************************************************************************

then

*************************

* Wipe > Resize System

*************************

Install > NikGapps-core-arm64-10-20210514-signed.zip

*******************************************************

Install > NFC_fix.zip

*******************************************************

Reboot > System

*******************************************************

Don't install TWRP

*******************************************************

After rebooting, it takes a bit of time for the phone to start and show the EMUI screen

-------------------------ENJOY--------------------------

/////////////////////////////////////////////////////////////////////////////////

*********************************************************************************

=========================================================