Xiaomi Mi 5 (xiaomi-gemini)

A nice and thin Xiaomi ex-flagship from 2016. Originally with Android 6, it was updated up to Android 8. It is one of the official LineageOS supported devices, making it a nice choice for developers, and performs very well in spite of its 3GB of RAM.

Contributors

 * R

Maintainer(s)

 * R
 * Tooniis

How to enter flash mode
Either run `adb reboot bootloader` while the phone is booted in Android, or turn the device off and hold the power button and the volume down button. Your device should now be in "fastboot" mode.

Installation
Standard procedure, boot to Fastboot and then flash boot.img and the rootfs

What's missing
In general, the device works very nicely. But some relevant things are to be noticed:


 * Battery does not charge (i.e., needs reboot to recovery mode), and status (%) is not shown yet.
 * Wi-Fi works, but is unstable and reception is bad
 * Audio works only through the headphone jack, and only if SLPI is disabled. The speaker needs a codec which isn't mainlined yet
 * Clearly, no fingerprint sensor or support for capacitive keys (those around the home button)
 * Sensors, including the accelerometers, are not enabled yet. This is due to the odd Qualcomm SLPI subsystem
 * Modem and GPS can be get to work only by using significant hacks and patchwork around ModemManager and ofono. This will take a while to be solved

Mainline
Works and pending upstreaming. Essentially we are in the same state as Xiaomi Mi Note 2 (xiaomi-scorpio).

Charging
As there is no charger driver yet, you need to boot into recovery mode (TWRP or similar) to charge the phone. This is a known limitation of all MSM8996 devices, which will be hopefully fixed soon.