Jump to content

Xiaomi Redmi 12 (xiaomi-fire): Difference between revisions

From postmarketOS Wiki
Neokitty (talk | contribs)
mNo edit summary
update to gitlab.postmarketos.org
 
(18 intermediate revisions by one other user not shown)
Line 10: Line 10:
| originalversion        = 13 with Linux 4.19.191
| originalversion        = 13 with Linux 4.19.191
| extendedversion        = 14 with the same kernel version
| extendedversion        = 14 with the same kernel version
| pmoskernel            = 4.19.191
| chipset                = MediaTek Helio G88 (MT6769H)
| chipset                = MediaTek Helio G88 (MT6769H)
| cpu                    = 2x 2.0 GHz ARM Cortex-A75 &  6x 1.8 GHz ARM Cortex-A55  
| cpu                    = 2x 2.0 GHz ARM Cortex-A75 &  6x 1.8 GHz ARM Cortex-A55  
| gpu                    = Mali-G52 MC2
| gpu                    = Mali-G52 MC2
| storage                = 128/256 GB
| storage                = 128/256 GB
| display                = 1080 x 2460 IPS LCD
| display                = 1080 x 2460 IPS LCD, 90 Hz
| memory                = 4/8 GB
| memory                = 4/8 GB
| architecture          = aarch64
| architecture          = aarch64
Line 21: Line 22:
| booting                = yes
| booting                = yes


| status_usbnet          = P
| status_usbnet          = N
| status_flashing        = Y
| status_flashing        = Y
| status_touch          = P
| status_touch          = P
| status_screen          = Y
| status_screen          = Y
| status_wifi            = N
| status_wifi            = N
| status_fde            = N
| status_fde            =  
| status_mainline        = N
| status_mainline        = N
| status_battery        = P
| status_battery        = P
| status_3d              = N
| status_3d              = N
| status_audio          = N
| status_audio          = P
| status_bluetooth      = N
| status_bluetooth      =  
| status_camera          = N
| status_camera          =  
| status_gps            = N
| status_gps            =  
| status_mobiledata      = N
| status_mobiledata      =  
| status_sms            = N
| status_emmc            = Y
| status_calls          = N
| status_sms            =  
| status_calls          =  
| status_otg            = Y
| status_otg            = Y
| status_nfc            = N
| status_nfc            =  


| status_accel          = N
| status_accel          =  
| status_magnet          = N
| status_magnet          =  
| status_light          = N
| status_light          =  
| status_proximity      = N
| status_proximity      =  
| status_hall            = -
| status_hall            = -
| status_barometer      = -
| status_barometer      = -
Line 49: Line 51:


| status_dvb            = -
| status_dvb            = -
| status_cameraflash    = N
| status_cameraflash    =  
| status_keyboard        = -
| status_keyboard        = -
| status_touchpad        = -
| status_touchpad        = -
Line 55: Line 57:
| status_sdcard          = Y
| status_sdcard          = Y
| status_hdmidp          = -
| status_hdmidp          = -
| status_irtx            = N
| status_irtx            =  
| status_irrx            = N
| status_irrx            = -
| status_stylus          = -
| status_stylus          = -
| status_haptics        = N
| status_haptics        =  
| status_ethernet        = -
| status_ethernet        = -
| status_fossbootloader  = N
| status_fossbootloader  = N
}}
}}
{{Based on SoC|MediaTek_Helio_G88_(MT6769H)|Helio G88}}


== Installation ==
== Installation ==
 
=== Unlocking the bootloader ===
=== Preparation ===
 
==== Entering the flash mode ====
When the phone is powered off, hold the <code>Power</code> and <code>Volume Down</code> button to enter into fastboot (bootloader) mode, or run <code>adb reboot bootloader</code> from Android.
 
To boot into recovery, hold the <code>Power</code> and <code>Volume Up</code> buttons, or
<code>adb reboot recovery</code> from Android.
 
To enter into fastbootD which is needed to flash GSIs, enter into fastboot mode and type
<code>fastboot reboot fastboot</code> or <code>adb reboot fastboot</code> from Android.
 
You need the fastboot (bootloader) mode to flash postmarketOS.
 
==== Unlocking the bootloader ====
 
Unlock the bootloader using the official method with Mi Unlock Tool
Unlock the bootloader using the official method with Mi Unlock Tool
https://en.miui.com/unlock
https://en.miui.com/unlock
Line 85: Line 75:
You'll need to link your device with your Mi Account and wait 7 days to unlock the device.
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 to bypass the waiting, but this method isn't recommended overall, so do this on your own risk.
Alternatively, you can also unlock the phone's bootloader using MTKClient.


=== Flashing postmarketOS ===
=== Flashing postmarketOS ===
Line 93: Line 83:
  '''Device codename:''' fire
  '''Device codename:''' fire


<code>xfce4</code>, <code>MATE</code> and <code>LXQt</code> are tested and work out of the box. Other UIs are ''not guaranteed'' to work.
<code>xfce4</code>, <code>MATE</code>, <code>LXQt</code> and <code>i3wm</code> 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
After choosing an user interface and the rest, type the below command to begin downloading and preparing postmarketOS for installation
Line 99: Line 89:
  '''$''' pmbootstrap install
  '''$''' pmbootstrap install


Boot the phone in fastboot mode, connect it to the computer with a USB cable. Use <code>fastboot devices</code> or <code>lsusb</code> to verify that the phone is detected by the computer. It should detect as something like <code>Google Inc. Xiaomi Mi/Redmi 2 (fastboot)</code> in case with <code>lsusb</code>.
Then, turn off the device, hold <code>Power</code> and <code>Volume Down</code> buttons, connect it to the computer with a USB cable.
If it is not detected, try another USB cable/USB port etc.


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


  '''$''' pmbootstrap flasher flash_kernel
  '''$''' pmbootstrap flasher flash_kernel
Line 109: Line 98:


After the commands finished, finally type  
After the commands finished, finally type  
  fastboot reboot
  '''$''' fastboot reboot
to exit fastboot. You can alternatively just hold the power button until the device reboots.
to exit fastboot.  
 
==== Installing Android after postmarketOS ====
You have to flash stock <code>super.img</code> and <code>boot.img</code> with the following commands.


That's it, if you get a boot splash and then the desktop you've chosen you successfully installed postmarketOS to your Redmi 12.
'''$''' fastboot flash super super.img


==== Installing Android after postmarketOS ====
'''$''' fastboot flash boot boot.img
After flashing postmarketOS, you won't be able to boot Android again. So here is how to bring Android back: download the stock fastboot ROM, unpack it, then flash the stock '''super.img''' and '''boot.img''' using the following commands:


fastboot flash super super.img
== Working UIs ==
to flash the super,
* [[i3]]
and
* [[LXQt]]
fastboot flash boot boot.img
* [[MATE]]
to flash the boot image.
* [[Xfce4]]


=== Graphical Interfaces ===
== Hardware status ==
{|class="wikitable feature-colors"
! Interface
! Info
! Working
|-
|none
|Doesn't work. But gets stuck at the loading splash.
| N
|-
|[[GNOME 3]]
| Unknown - Not tested
|
|-
|[[i3wm]]
| Unknown - Not tested
|
|-
|[[MATE]]
|Works fine, but the device will shut down if you open anything related to power management.
| P
|
|-
|[[Phosh]]
| Unknown - Not tested.
|
|-
|[[Plasma Mobile]]
| Unknown - Not tested.
|
|-
|[[Shelli]]
| Unknown / Not tested.
|
|-
|[[Sxmo]]
| Unknown - Not Tested.
|
|-
|[[Sway]]
| Wayland doesn't work on this device.
| N
|-
|[[Weston]]
|Unknown / Not tested
|
|-
|[[Xfce4]]
|Works like expected, except it shows the battery as 1% and then shuts down afterwards if not plugged in.
| Y
|
|-
|[[LXQt]]
|Works, but also shuts down if the device is not plugged in.
| Y
|}
== Parts and their statsus==
=== Touchscreen ===
=== Touchscreen ===
Our device comes with 3 different touchscreens - Focaltech FT8720, Focaltech FT8725, and Novatek NT36xxx.


Touchscreen doesn't work currently, and I've tried evtest and it didn't output anything.
Currently, only the Novatek touchscreen works.


fts_ts seems to search for a firmware file called "focaltech_ts_fw_.bin" somewhere, but I haven't figured it out yet. I created an issue for it
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.
on pmaports.


https://gitlab.com/postmarketOS/pmaports/-/issues/2608
{{issue|2608|pmaports}}


UPDATE: Touchscreen works in MATE after waiting for screen to completely turn off.
UPDATE: Touchscreen works in MATE after waiting for screen to completely turn off.
Line 195: Line 130:
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.  
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 / Volume buttons ===
=== Audio ===
While pressing the volume buttons, I get notifications from LXQt about the volume changing. But I am not sure if the audio works itself. That needs testing.
Needs "aw87xxx_acf.bin" firmware file. Switching the volume level with volume buttons seems to work.


== Miscellaneous ==
== Miscellaneous ==
Line 284: Line 219:


* {{Kernel package|xiaomi-fire}}
* {{Kernel package|xiaomi-fire}}
* [https://gitlab.postmarketos.org/postmarketOS/pmaports/-/blob/master/device/testing/firmware-xiaomi-fire/APKBUILD?ref_type=heads Firmware package]


* [https://github.com/MiCode/Xiaomi_Kernel_OpenSource/tree/fire-t-oss Downstream kernel source code]
* [https://github.com/MiCode/Xiaomi_Kernel_OpenSource/tree/fire-t-oss Downstream kernel source code]

Latest revision as of 05:54, 4 November 2024


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 Android
Original version 13 with Linux 4.19.191
Extended version 14 with the same kernel version
FOSS bootloader no
postmarketOS
Category testing
Pre-built images no
Mainline no
postmarketOS kernel 4.19.191
Features
Flashing
Works
USB Networking
Broken
Internal storage
Works
SD card
Works
Battery
Partial
Screen
Works
Touchscreen
Partial
Multimedia
3D Acceleration
Broken
Audio
Partial
Camera
No data
Camera Flash
No data
IR TX
No data
Connectivity
WiFi
Broken
Bluetooth
No data
GPS
No data
NFC
No data
Modem
Calls
No data
SMS
No data
Mobile data
No data
Miscellaneous
FDE
No data
USB OTG
Works
Sensors
Accelerometer
No data
Magnetometer
No data
Ambient Light
No data
Proximity
No data
Haptics
No data


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