Jump to content

Xiaomi Mi 5 (xiaomi-gemini)

From postmarketOS Wiki
Xiaomi Mi 5
Xiaomi Mi5 and phosh on mainline kernel
Xiaomi Mi5 and phosh on mainline kernel
Manufacturer Xiaomi
Name Mi 5
Codename xiaomi-gemini
Released 2016
Type handset
Hardware
Chipset Qualcomm Snapdragon 820 (MSM8996)
CPU Quad-core (2x 1.8 GHz Kryo
2x 1.36 GHz Kryo) or Quad-core (2x 2.15 GHz Kryo
2x 1.6 GHz Kryo)
GPU Adreno 530
Display 1080x1920
Storage 32/64/128 GB
Memory 3/4 GB
Architecture aarch64
Software
Original software
The software and version the device was shipped with.
Android (MIUI) 6.0
Extended version
The most recent supported version from the manufacturer.
Android (MIUI) 8.0
postmarketOS
Category testing
Mainline
Instead of a Linux kernel fork, it is possible to run (Close to) Mainline.
yes
Device package device-xiaomi-gemini
Kernel package linux-xiaomi-gemini
Features
Flashing
It is possible to flash the device with pmbootstrap flasher.
Works
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
Charging and battery level reporting works
Partial
Screen
Display works. Ideally with sleep mode and brightness control.
Works
Touchscreen
Works
Multimedia
3D Acceleration
Works
Audio
Audio playback, microphone, headset and buttons.
Partial
Camera
Broken
Connectivity
WiFi
Works
Bluetooth
Works
GPS
Broken
NFC
Near Field Communication
Works
Modem
Calls
Partial
SMS
Partial
Mobile data
Partial
Miscellaneous
FDE
Full disk encryption and unlocking with unl0kr.
Works
USB OTG
USB On-The-Go or USB-C Role switching
Works
Sensors
Accelerometer
Auto screen rotation works in desktops e.g. Phosh or Plasma Mobile
Broken

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

Device owners

  • Cafehaine
  • Kevinwidjaja21 (Notes: Running /e/ OS. Crack with some dead lines across LCD. Unable to boot PMOS.)
  • Maxnet (Notes: daily driver with microg LineageOS (for now))
  • Pinoaffe
  • R (Notes: Mainline!)


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
  • Camera. This device uses a Sony IMX298 (the same as the Oneplus 3/3T) as back camera and an OmniVision OV4688 as front camera.

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.

See also