Huawei P8 Lite (huawei-alice)

== Users owning this device ==
== How to enter flash mode ==
Fastboot - hold + 
Recovery - hold + 
==Bootloader==
The bootloader can be unlocked using PotatoNV. To unlock the bootloader, you will need to disassemble the device.
The back cover is attached with clips, and can be taken off with some fiddling. There's a bit of glue around the battery, but you can remove it by wedging in a plastic card. See the iFixit teardown guide for this device for more detailed instructions.
The test point for the device is located under the bottom metal shield and speaker. You will need to remove them to get to it - the shield (and the top speaker screws) are standard Philips-heads, the bottom ones are torx. See the photo at the bottom of the page. Short down the two points marked in red with a pair of tweezers to activate it.
Follow the guide in the PotatoNV README to unlock the bootloader. Select the Kirin 620 bootloader. Note that you need a Windows PC to run the PotatoNV software. Make sure you install the testpoint drivers.
It's also possible to unlock the bootloader without opening the device by following this bootloader unlock guide on XDA developers. Effectively, the process is just downgrading to Android 5 then rooting the device then getting the OEM unlock key that way. PotatoNV should work better, though.
== Installation ==
Init the device trough pmbootstrap (Manifacturer: Huawei, Device: alice)
Insert your SD Card into your computer
Execute lsblk to find your SD Card's device name (usually mmcblkX)
Execute pmbootstrap install --sdcard="/dev/mmcblkX" Select the device and not a partiton. This will delete all the data on the device you have selected, repartiton it and install the system to it.
Plug the SD Card into the device.
Boot the device into Fastboot mode by pressing 
Execute pmbootstrap export and navigate to /tmp/postmarketOS-export
Execute fastboot flash boot boot.img
Execute fastboot reboot or hold down to exit Fastboot mode.
== Serial console ==
According to schematics, UART should be available on the test points:
The schematics also mention some JTAG pins, however they appear to be hidden behind the shielding, and are on the other side of the motherboard (not the one that's immediately accessible after taking off the back cover). TODO.
== Mainline status and components ==
It may be possible to mainline this device, as its SoC is supported in the mainline kernel.
Element type 	Element 	Works?	Notes
Chipset 	HiSilicon Kirin 620 (Hi6220)	 	DTS in mainline
Graphics 	Mali-450MP4 	 	Seems to have a node in the DTS?
Charger 	HI6521/BQ2419X 	 	BQ24190 is supported in mainline
PMIC 	HI6552 	 	Appears to be supported in mainline
Touchscreen 	CYTTSP5 	 	Supported in mainline.
USB switch 	FSA9685 	 	Not supported in mainline
NFC 	NXP PN547 	 	Supported in mainline
Audio codec 	MAX98925, TFA9895 	 	Supported in mainline
WiFi, Bluetooth 	BCM4343/HI1101 	 	
Accelerometer 	ST_LIS3XH/ROHM_KX023 	 	Both supported in mainline (first one not exactly, but should be the same as other ST accelerometers in mainline). Second one is confirmed to be used.
Proximity/light sensor	TAOS_TMD27723 	 	Variant of the TMD2772 which is supported in mainline
Compass/magnetic 	AKM09911 	 	Not supported in mainline
Hall effect sensor 	AK8789 	 	Not supported in mainline
Primary camera 	OV13850 	 	Mainline has support for an OV13858
Secondary camera 	OV5648 (foxconn) 	 	Supported in mainline
Display 	BOE NT35521 	 	Mainline has a driver for a similar panel in a Sony device
There are many cameras (OV5648, IMX134, S5K4E1GA, OV13850, IMX328, OV8856, IMX219, HI843S) and displays (OTM1902B, OTM1282B, NT35521, LPM070W425C) listed in the defconfig; these were present on my device.
=== Getting the camera/display used on your device ===
$ cat /sys/k3_camera/pri_sensor && echo ""
$ cat /sys/k3_camera/sec_sensor && echo ""
$ cat /sys/class/graphics/fb0/lcd_model
== Gallery ==
File:P8-lite-testpoint.png|Test point location
== See also ==
* Phone specifications
* Kernel
* Initial (closed, not merged) merge request
* Initial merge request
* 
*