Jump to content

Xiaomi 12 (xiaomi-cupid)

From postmarketOS Wiki
This device has been tested with postmarketOS, but its device package has not yet been added to the postmarketOS repositories.
This means that it cannot be selected in pmbootstrap.
Status: mainline heavy WIP
Xiaomi 12
Xiaomi 12
Xiaomi 12
Manufacturer Xiaomi
Name 12
Codename xiaomi-cupid
Released 2021
Type handset
Hardware
Chipset Qualcomm Snapdragon 8 Gen 1 (SM8450)
CPU Octa-core (1x 3.00 GHz Cortex-X2
3x 2.50 GHz Cortex-A710
4x 1.80 GHz Cortex-A510)
GPU Adreno 730
Display 1080 x 2400 (120Hz 6.28" AMOLED)
Storage 128/256 GB
Memory 8/12 GB
Architecture aarch64
Software
Original software Android (MIUI)
Original version
The version the device was shipped with.
12 (MIUI 13)
Extended version
The most recent supported version from the manufacturer.
14 (HyperOS 1.0)
FOSS bootloader no
postmarketOS
Category testing
Pre-built images
Whether pre-built images are available here.
no
Mainline
Instead of a Linux kernel fork, it is possible to run (Close to) Mainline.
yes
Unixbench score
Unixbench Whetstone/Dhrystone score. See Unixbench.
9409.3
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
Internal storage
eMMC, SD cards, UFS, ...
Works
Battery
Charging and battery level reporting works
Broken
Screen
Display works. Ideally with sleep mode and brightness control.
Broken
Touchscreen
Broken
Multimedia
3D Acceleration
Works
Audio
Audio playback, microphone, headset and buttons.
Broken
Camera
Broken
Camera Flash
Works
IR TX
Works
Connectivity
WiFi
Works
Bluetooth
Works
GPS
Untested
NFC
Near Field Communication
Broken
Modem
Calls
Broken
SMS
Broken
Mobile data
Broken
Miscellaneous
FDE
Full disk encryption and unlocking with unl0kr.
Broken
USB OTG
USB On-The-Go or USB-C Role switching
Broken
Sensors
Accelerometer
Auto screen rotation works in desktops e.g. Phosh or Plasma Mobile
Broken
Magnetometer
Sensor to measure magnetism
Broken
Ambient Light
Broken
Proximity
Broken
Haptics
Broken

The Xiaomi 12 is the most recent Xiaomi flagship device that can boot a source-built downstream kernel.

Contributors

Maintainer(s)

Users owning this device

  • Adrian (Notes: x2, working on mainline and u-boot)
  • ArianK16a (Notes: 2201123G, 8/256, LineageOS 21)
  • CubeCat (Notes: Running HyperOS 2)


Flashing

Flashing requires wiping some partitions to make sure the bootloader does not mess up the mainline kernel devicetree.

fastboot set_active b
fastboot erase vendor_boot
fastboot erase dtbo

Afterwards, you can flash the device as usual using pmbootstrap's flasher utilities. If your rootfs is under 2GB in size, you can flash to the cust partition which is only used by MIUI, otherwise super is recommended (make sure you have a backup or a super_empty.img to restore Android if you intend to go back).

External links