Jump to content

Huawei P8 Lite (huawei-alice)

From postmarketOS Wiki

This phone was decently popular (known as the Huawei "P8 Lite" or "Y6 II" in Europe) and has an insane number of variants; some include SoCs made by Qualcomm, some were also released as a different name and model. The device codename "Alice" is mentioned a lot. Could be a reference to Alice in Wonderland, it does invoke that in a strange way. You'll see...

Huawei P8 Lite
P8 Lite with XFCE4
P8 Lite with XFCE4
Manufacturer Huawei
Name P8 Lite
Codename huawei-alice
Model ALE-L01, ALE-L02, ALE-L21, ALE-L23, ALE-CL00, ALE-UL00, CAM-L21
Released 2015
Type handset
Hardware
Chipset HiSilicon Kirin 620 (Hi6220)
CPU 8x 1.2 GHz Cortex-A53
GPU 500 MHz Mali-450 MP4
Display 5 inch 16:9, 720x1280 IPS
Storage 8/16/32 GB
Memory 2/3 GB LPDDR3
Architecture aarch64
Software
Original software
The software and version the device was shipped with.
Android (EMUI) 5.0.2
Extended version
The most recent supported version from the manufacturer.
Android (EMUI) 6.0
Optional software Android (LineageOS) (Unofficial)
postmarketOS
Category downstream
Mainline
Instead of a Linux kernel fork, it is possible to run (Close to) Mainline.
no
pmOS kernel
The kernel version that runs on the device's port.
3.10.108
Unixbench score
Unixbench Whetstone/Dhrystone score. See Unixbench.
2193.0
Device package device-huawei-alice
Kernel package linux-huawei-alice
Features
Flashing
Whether it is possible to flash the device with pmbootstrap flasher.
Partial
USB Networking
After connecting the device with USB to your PC, you can connect to it via telnet (initramfs) or SSH (booted system).
Works
Battery
Whether charging and battery level reporting work.
Untested
Screen
Whether the display works; ideally with sleep mode and brightness control.
Works
Touchscreen
Works
Multimedia
3D Acceleration
Untested
Audio
Audio playback, microphone, headset and buttons.
Untested
Camera
Untested
Connectivity
WiFi
Works
Bluetooth
Untested
GPS
Untested
Modem
Calls
Untested
SMS
Untested
Mobile data
Untested
Miscellaneous
FDE
Full disk encryption and unlocking with unl0kr.
Untested
Sensors
Accelerometer
Handles automatic screen rotation in many interfaces.
Untested
Note This page is about all Kirin 620 "Alice" variants. P8 Lite ALE-L04 refers to a Qualcomm Snapdragon 615 (MSM8939) board. Beware the Y6 II! And other names! Any model that starts in PRA is more likely to be a Huawei P8 Lite 2017 (huawei-prague).


Users owning this device

  • Bastindo (Notes: cracked screen, bootloader unlocked with PotatoNV)
  • Blender Addict
  • Hacker420 (Notes: Dying battery and dead WiFi/BT.)
  • Hazel609
  • Jojo autoboy (Notes: Technically a Huawei Y6II (CAM_L21))
  • Kaloyan Donev (Notes: Fried WiFI/Bluetooth, broken trances for power on button)
  • Knuxify (Notes: unlocked with PotatoNV, dead wifi/bluetooth)
  • Madhaxbro (Notes: ALE-L21, runs LineageOS + OrangeFox. Ready for testing. 3Ah LiPo cell with original BMS. NFC is gone. Housing almost closes. The SoC is mainline. This phone is a mess. Joker360 got Android Oreo to work, at least.)
  • Notnoelchannel
  • R0rt1z2 (Notes: Unlocked with PotatoNV)
  • Unx (Notes: Ported)
  • Werti (Notes: PMOS installed, but freezes after splashscreen)


Model variants (Read carefully and hold on to your hats!)

Huawei P8 Lite (2015) "Alice"

  • ALE-CL00 (China?, China Mobile variant?)
  • ALE-L01 - Compatible?
  • ALE-L02 - Compatible?
  • ALE-L03 - (Not Alice?) - Listed in ChimeraTool. Has firmware avalible here and here.
  • ALE-L04 (Not Alice, like Y6?) - Incompatible!
  • ALE-L21 (Global) - Boots User:Unx's kernel.
  • ALE-L22 (Malaysia?) - Listed in ChimeraTool. Also mentioned here.
  • ALE-L23 - Compatible?
  • ALE-L32 - (Not Alice?) - Listed in ChimeraTool.
  • ALE-L34 - (Not Alice?) - Listed in ChimeraTool.
  • ALE-L52 - (Not Alice?) - Listed in ChimeraTool.
  • ALE-L53 - (Not Alice?) - Listed in ChimeraTool.
  • ALE-L62 - (Not Alice?) - Listed in ChimeraTool.
  • ALE-TL00 - (Not Alice?, China Telecom variant?) - Listed in ChimeraTool.
  • ALE-UL00 (China, China Unicom variant?)

Also see this ChimeraTool help page for additional confusion about model naming.

Warning WARNING: Compatibility of all variants is not confirmed. They have the same specs and a similar design, most of them at least. Be aware when using untested hardware configurations.

Honor Holly 3 (Plus) / Honor 5A / Huawei Y6 II (probably more)

  • CAM-L03 (Y6 II)
  • CAM-L21 (Y6 II, Global) - Compatible?
  • CAM-L22 (Honor 5A, Malaysia)
  • CAM-L23 (Y6 II)
  • CAM-L32 (Y6 II, MSM8952) - Incompatible!
  • CAM-UL00 (Y6 II?, China Unicom variant?)
Note Another very similar device. Yes, it has incompatible variants! See Snapdragon 617 (MSM8952) , and Motorola Moto G4 (motorola-athene) for a seat. This is big. Remember to get some coffee as well!

Possible Ascend variant?

Undocumented. The name is from a chinese XML (service?) firmware. (4.4.4?, looks like EMUI, build is labeled "BalongCS") Appears to work on the ALE-L21 board. WARNING: Can remove your IMEI! The included OEMInfo file makes the bootloader display a "Huawei Ascend" logo. This could be another variant or naming exclusive to China. Also see Huawei Ascend P7 (huawei-sophia) for comparison. Needs more research.

Warning WARNING: It's unclear wether the next two devices are actually compatible, or if they should be moved to a seperate Wiki page. Needs entries added to the Device Tree. Could need a seperate DTS, or two. Possibly a lot more as well. Try builds for alice on them if you dare.

Honor 4C / Honor 4C Play / Huawei G Play Mini (Needs more research.)

  • CHC-U01
  • CHC-U23
  • CHC-U03
  • CHM-UL00
  • CHM-U01
  • CHM-TL00
  • CHM-TL00H

Honor 4X / Honor 4X Play / Huawei Glory Play 4X (Needs a lot more.)

  • CHE-TL00
  • CHE-TL00H
  • Che1-CL10
  • Che1-CL20
  • Che1-L04
  • Che2-L11
  • Che2-TL00
  • Che2-TL00M
  • Che2-UL00
Warning WARNING: An unidentified number of the Honor 4X variants listed are known to have a Qualcomm Snapdragon 410 (MSM8916) instead. This board could still be similar and use the same panel, etc. Be aware when testing! Needs a seperate Wiki page. It could be added to mainline as well. Also see Huawei Ascend G7 (huawei-g7) for reference.


Note Any help documenting other variants is greatly appreciated. Please, feel free to correct or add them if you have any confirmed details. This thing is starting to give me a headache. - Madhaxbro

Boot modes

Fastboot - hold Volume Down+Power

Recovery - hold Volume Up+Power

Huawei eRecovery - connect a USB host or charger, then hold Volume Up+Power

DFU (Factory) mode (test point method) - disassemble your device, connect the appropriate pad to ground, then connect the device to USB - See #Testpoint for details.

DFU (Factory) mode (alternative method, assembled) - destroy the boot chain by executing # dd if=/dev/zero of=/dev/disk/by-partlabel/FASTBOOT in a root shell on the device, or (in Fastboot, only if critical fblock is not enabled) - by executing $ fastboot erase FASTBOOT on a connected USB host, or flashing a blank image

Warning WARNING: You will need to flash the FASTBOOT partition using PotatoNV if you try this. Expect the unexpected! After a reboot, your device will display only a status LED code and boot straight to Factory mode. There is no other way to recover it from this state.
Note With Android's kernel configuration, partition labels are found under /dev/block/bootdevice/<mmc controller>/by-name/ instead.

UART mode - disassemble your device, connect the appropriate pad to ground, then connect the device to USB - See #Serial console.

JTAG mode - Needs investigation.

Bootloader unlocking

The bootloader can be unlocked using PotatoNV. To unlock the bootloader, you will need to disassemble the device.

Disassembly

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 on disassembling it.

Testpoint

The test point for this 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. Connect the two points marked in red with a pair of tweezers to activate it. See the picture at #Serial console for details.

PotatoNV

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 Factory mode (testpoint) drivers.

Warning WARNING: The firmware used by PotatoNV has fblock disabled already. The release version for ALE-L21 can fail when trying to flash some or all partitions. It returns the message remote: 'command not allowed' to fastboot. Needs more investigation. There could also be a bug involved.

See Unlocking Bootloaders#Huawei for details about critical unlocking on HiSilicon SoCs.

Downgrade exploit

It could also be 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. This does work on the ALE-L21. PotatoNV should work better, though.

Warning WARNING: This method has only been tested on alice, no guarantees for any other Kirin 620 boards. You probably will need the appropiate firmware. It will also break the OS downgrade prevention, as it uses a fake version number that is higher than the latest official release. Use with caution.

Installation

Note You will need an SD Card to install postmarketOS to this device

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)

Warning WARNING: The following command will delete all data on the device you have selected! Plese back up your data, if any and double check that you have selected the correct device.

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 Power+Volume Down

Execute $ pmbootstrap export and navigate to /tmp/postmarketOS-export

Execute $ fastboot flash boot boot.img

Execute $ fastboot reboot or hold down Power to exit Fastboot mode.

Downstream kernel

Known Issues

Kernel is ancient. Kernel reports can_graphical=false. Only lightdm works because of this, with a workaround that can be found here.

Audio

MAX98925 and TFA9895 codecs are supported in mainline. Needs more research.

Battery

This device uses 2200mAh Lithium-Polymer batteries. Not confirmed for all variants!

Battery variants

Unknown. Needs more research.

BMS

Unknown. Also, unsure if this is relevant. There could be many that work. Needs more research.

Charger

  • HI6521 - Needs more research.
  • BQ2419X - BQ24190 is supported in mainline. Needs more research.

Fuelguage

Unknown.

Camera

Image sensors

  • OV5648 (Front, Foxconn variant?)
  • IMX134
  • S5K4E1GA
  • OV13850 (Back)
  • IMX328
  • OV8856
  • IMX219
  • HI843S
  • Possibly more.

Needs investigation.

ISP

See HiSilicon Kirin 620 (Hi6220)#Camera.

Flash LED

Needs more research.

Display

Display variants

  • OTM1902B
  • OTM1282B
  • NT35521
  • LPM070W425C
  • Possibly more.

Needs investigation.

Status LED

Needs more research.

Touchscreen

Needs more research.

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. See Serial debugging/Cable schematics.

Mainline kernel

Currently unsupported. The SoC is in mainline and it should work. At least a #Device Tree is needed for alice. Also, possibly some hacks that would need a kernel fork for Hi6220.

Mainlining TODO

  • Create a DTS.
  • Test it on Alice.
  • Find out which boards are supported.
  • Create panel drivers.
  • Probably port U-Boot. Possibly lk2nd / uniLoader? Needs investigation.
  • Change to a more detailed name. (e.g. "Huawei P8 Lite 2015", "Huawei P8 Lite / Y6 II / Honor 5A", or - simply "Huawei Alice") Different names may have different implications.
  • Extensive testing.
  • Research hardware configurations.
  • Document unsupported variants.
  • Move all unsupported devices to pages.
  • Create pages for undocumented SoCs.
  • Extensive research.
  • Possibly extend support to more varants.
  • Extesnsive testing to ensure compatibility.
  • Add Huawei firmware functionality. Also see #Useful software, #Boot modes, #Bootloader unlocking.
  • Add known drivers. After extensive testing.
  • More extensive testing.
  • Also do the same for all possible parts.
  • Including any known aftermarket parts.
  • More extensive testing.
  • Possible generic device port for Kirin 620.
  • A lot more extensive testing.

Notes

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

Useful software

Recovery builds

Firmware tools

  • Latest version of oeminfo-huawei Tool for digesting Huawei OEMInfo data. Could also be used for rebranding or model conversion. Consider packaging it. Needs investigation.

Device support

See also

Source code

Development

Specifications

Similar devices