Jump to content

Xiaomi Redmi 12 (xiaomi-fire)

From postmarketOS Wiki


Xiaomi Redmi 12
Manufacturer Xiaomi
Name Redmi 12
Codename xiaomi-fire
Released 2023
Type handset
Hardware
Chipset MediaTek Helio G88 (MT6769H)
CPU 2x 2.0 GHz ARM Cortex-A75
6x 1.8 GHz ARM Cortex-A55
GPU Mali-G52 MC2
Display 1080 x 2460 IPS LCD, 90 Hz
Storage 128/256 GB
Memory 4/8 GB
Architecture aarch64
Software
Original software
The software and version the device was shipped with.
Android 13 with Linux 4.19.191
Extended version
The most recent supported version from the manufacturer.
Android 14 with the same kernel version
FOSS bootloader no
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.
4.19.191
Device package device-xiaomi-fire
Kernel package linux-xiaomi-fire
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).
Broken
Internal storage
eMMC, SD cards, UFS, ...
Works
SD card
Also includes other external storage cards
Works
Battery
Charging and battery level reporting works
Partial
Screen
Display works. Ideally with sleep mode and brightness control.
Works
Touchscreen
Partial
Multimedia
3D Acceleration
Broken
Audio
Audio playback, microphone, headset and buttons.
Partial
Camera
Untested
Camera Flash
Untested
IR TX
Untested
Connectivity
WiFi
Broken
Bluetooth
Untested
GPS
Untested
NFC
Near Field Communication
Untested
Modem
Calls
Untested
SMS
Untested
Mobile data
Untested
Miscellaneous
FDE
Full disk encryption and unlocking with unl0kr.
Untested
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
Untested
Magnetometer
Sensor to measure magnetism
Untested
Ambient Light
Untested
Proximity
Untested
Haptics
Untested


Installation

Unlocking the bootloader

Unlock the bootloader using the official method with Mi Unlock Tool https://en.miui.com/unlock

You'll need to link your device with your Mi Account and wait 7 days to unlock the device.

Alternatively, you can also unlock the phone's bootloader using MTKClient.

Flashing postmarketOS

Type pmbootstrap init and choose the following in the wizard:

Release channel: edge
Vendor: xiaomi
Device codename: fire

xfce4, MATE, LXQt and i3wm are tested and work out of the box. Other UIs are not guaranteed to work.

After choosing an user interface and the rest, type the below command to begin downloading and preparing postmarketOS for installation

$ pmbootstrap install

Then, turn off the device, hold Power and Volume Down buttons, connect it to the computer with a USB cable.

After doing this, type the following commands to flash postmarketOS to your device.

$ pmbootstrap flasher flash_kernel
$ pmbootstrap flasher flash_rootfs

After the commands finished, finally type

$ fastboot reboot

to exit fastboot.

Installing Android after postmarketOS

You have to flash stock super.img and boot.img with the following commands.

$ fastboot flash super super.img
$ fastboot flash boot boot.img

Working UIs

Hardware status

Touchscreen

Our device comes with 3 different touchscreens - Focaltech FT8720, Focaltech FT8725, and Novatek NT36xxx.

Currently, only the Novatek touchscreen works.

In case with FT8720, fts_ts seems to search for a firmware file called "focaltech_ts_fw_.bin" somewhere, even though it is in /lib/firmware/postmarketos and the cmdline has "firmware_class.path=/lib/firmware/postmarketos" parameter. It seems like the "/vendor/firmware" path is hardcoded in the driver.

pmaports#2608

UPDATE: Touchscreen works in MATE after waiting for screen to completely turn off.

Battery

UPower detects if the battery is charging or not, but the battery percentage is always at 0%. In case with LXQt, if you power on the device while it is on battery, it will boot the LXQt, but after a few seconds the device will just shut down. But if you power on the device while it is plugged in, and unplug it only after booting postmarketOS, it works on battery as usual.

Audio

Needs "aw87xxx_acf.bin" firmware file. Switching the volume level with volume buttons seems to work.

Miscellaneous

Partition layout

This device uses A/B partitions and dynamic partitions, the recovery is inside boot. All files in /dev/block/by-name are just links to actual partitions in /dev/block.

ls -lrt /dev/block/by-name
mmcblk0 -> /dev/block/mmcblk0
vbmeta_system_a -> /dev/block/mmcblk0p7
super -> /dev/block/mmcblk0p57
md_udc -> /dev/block/mmcblk0p12
boot_a -> /dev/block/mmcblk0p27
vbmeta_vendor_a -> /dev/block/mmcblk0p8
vbmeta_a -> /dev/block/mmcblk0p6 
otp -> /dev/block/mmcblk0p59
protect2 -> /dev/block/mmcblk0p19
opcust -> /dev/block/mmcblk0p50
sspm_b -> /dev/block/mmcblk0p40
vbmeta_b -> /dev/block/mmcblk0p9
spmfw_a -> /dev/block/mmcblk0p22
flashinfo -> /dev/block/mmcblk0p60
tee_a -> /dev/block/mmcblk0p30
scp_b -> /dev/block/mmcblk0p39
dtbo_b -> /dev/block/mmcblk0p45
vbmeta_system_b -> /dev/block/mmcblk0p10
seccfg -> /dev/block/mmcblk0p20
scp_a -> /dev/block/mmcblk0p23
dtbo_a -> /dev/block/mmcblk0p29
frp -> /dev/block/mmcblk0p5
rescue -> /dev/block/mmcblk0p49
persistbak -> /dev/block/mmcblk0p17
proinfo -> /dev/block/mmcblk0p33
mmcblk0boot0 -> /dev/block/mmcblk0boot0
mem -> /dev/block/mmcblk0p55
logo_b -> /dev/block/mmcblk0p47
ffu -> /dev/block/mmcblk0p53
protect1 -> /dev/block/mmcblk0p18
para -> /dev/block/mmcblk0p3
nvdata -> /dev/block/mmcblk0p15
boot_para -> /dev/block/mmcblk0p35
md1img_b -> /dev/block/mmcblk0p37
gz_b -> /dev/block/mmcblk0p41
efuse -> /dev/block/mmcblk0p34
boot_b -> /dev/block/mmcblk0p43
vbmeta_vendor_b -> /dev/block/mmcblk0p11
metadata -> /dev/block/mmcblk0p13
mmcblk0boot1 -> /dev/block/mmcblk0boot1
misc -> /dev/block/mmcblk0p1
vendor_boot_b -> /dev/block/mmcblk0p44
md1img_a -> /dev/block/mmcblk0p21
logo_a -> /dev/block/mmcblk0p31
gz_a -> /dev/block/mmcblk0p25
vendor_boot_a -> /dev/block/mmcblk0p28
userdata -> /dev/block/mmcblk0p58
spmfw_b -> /dev/block/mmcblk0p38
oops -> /dev/block/mmcblk0p56
expdb -> /dev/block/mmcblk0p4
opconfig -> /dev/block/mmcblk0p51
lk_a -> /dev/block/mmcblk0p26
tee_b -> /dev/block/mmcblk0p46
persist -> /dev/block/mmcblk0p16
nvcfg -> /dev/block/mmcblk0p14
gsort -> /dev/block/mmcblk0p52
devinfo -> /dev/block/mmcblk0p54
cust -> /dev/block/mmcblk0p48
sspm_a -> /dev/block/mmcblk0p24
sec1 -> /dev/block/mmcblk0p32
nvram -> /dev/block/mmcblk0p36
lk_b -> /dev/block/mmcblk0p42
countrycode -> /dev/block/mmcblk0p2
preloader_a -> /dev/block/mmcblk0boot0
preloader_b -> /dev/block/mmcblk0boot1

Community info

Contributors

  • Buildingat90degreesC (Currently running LineageOS 21 GSI on it)
  • Neokitty

Users owning this device


See also