Jump to content

Xiaomi 12 (xiaomi-cupid): Difference between revisions

From postmarketOS Wiki
Adrian (talk | contribs)
m Add category = testing
Adrian (talk | contribs)
m Undo revision 68632 by Mariob (talk)
Tag: Undo
 
(8 intermediate revisions by 2 users not shown)
Line 9: Line 9:
| originalsoftware = Android (MIUI)
| originalsoftware = Android (MIUI)
| originalversion = 12 (MIUI 13)
| originalversion = 12 (MIUI 13)
| extendedversion = 13 (MIUI 14)
| extendedversion = 14 (HyperOS 1.0)
| chipset = Qualcomm Snapdragon 8 Gen 1 (SM8450)
| 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)
| cpu = Octa-core (1x 3.00 GHz Cortex-X2 & 3x 2.50 GHz Cortex-A710 & 4x 1.80 GHz Cortex-A510)
Line 18: Line 18:
| architecture = aarch64
| architecture = aarch64
| type = handset
| type = handset
<!-- Features -->
| status_usbnet = Y
| status_usbnet = Y
| status_flashing = Y
| status_flashing = Y
| status_touch =  
| status_touch = N
| status_screen =  
| status_screen = N
| status_wifi =  
| status_3d = Y
| status_xwayland =  
| status_xwayland =
| status_fde =  
| status_fde = N
| status_emmc = Y
| status_wifi = Y
| status_mainline = Y
| status_mainline = Y
| status_battery =  
| status_battery = N
| status_3d =
| status_audio = N
| status_accel =
| status_bluetooth = Y
| status_audio =  
| status_camera = N
| status_bluetooth =  
| status_camera =  
| status_gps =  
| status_gps =  
| status_mobiledata =  
| status_mobiledata = N
| status_emmc = Y
| status_sms = N
| status_sms =  
| status_calls = N
| status_calls =  
| status_otg = N
| status_nfc = N
<!-- Sensors -->
| status_accel = N
| status_magnet = N
| status_light = N
| status_proximity = N
| status_hall = -
| status_barometer = -
| status_powersensor = -
<!-- Misc -->
| status_dvb = -
| status_cameraflash = Y
| status_keyboard = -
| status_touchpad = -
| status_usba = -
| status_sdcard = -
| status_hdmidp = -
| status_irtx = Y
| status_irrx = -
| status_stylus = -
| status_haptics = N
| status_ethernet = -
| status_fossbootloader = N
| status = mainline heavy WIP
| status = mainline heavy WIP
| booting = yes
| booting = yes
Line 42: Line 66:
| pmoskernel =  
| pmoskernel =  
| whet_dhry = 9409.3
| whet_dhry = 9409.3
| status_otg =
}}
}}
{{Based on SoC|Qualcomm_Snapdragon_8_Gen_1_(SM8450)|Snapdragon 8 Gen 1}}
{{Based on SoC|Qualcomm_Snapdragon_8_Gen_1_(SM8450)|Snapdragon 8 Gen 1}}
Line 59: Line 82:
== Flashing ==
== Flashing ==


Flashing requires wiping some partitions to make sure the bootloader does not mess up the mainline kernel devicetree. Currently you will need a <code>vbmeta.img</code> and <code>vbmeta_sytem.img</code> from Android and patch it.
Flashing requires wiping some partitions to make sure the bootloader does not mess up the mainline kernel devicetree.


<pre>
<pre>
dd if=/dev/zero of=zero.bin bs=4096 count=1
fastboot set_active b
fastboot set_active b
fastboot erase vendor_boot
fastboot erase vendor_boot
fastboot flash dtbo zero.bin
fastboot erase dtbo
fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img
fastboot --disable-verity --disable-verification flash vbmeta_system vbmeta_system.img
</pre>
</pre>


Afterwards, you can flash the device as usual using pmbootstrap's flasher utilities.
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 <code>cust</code> partition which is only used by MIUI, otherwise <code>super</code> is recommended (make sure you have a backup or a <code>super_empty.img</code> to restore Android if you intend to go back).


== External links ==
== External links ==


* [https://github.com/sm8450-mainline/linux/ Close-to-mainline kernel sources]
* [https://github.com/xiaomi-sm8450-kernel/ Community-maintained GKI2 kernel sources with minimal modifications over CLO]
* [https://github.com/xiaomi-sm8450-kernel/ Community-maintained GKI2 kernel sources with minimal modifications over CLO]
* [https://forum.xda-developers.com/t/xiaomi-12-xiaomi-12-pro-oss-kernel-sources.4470899/ XDA thread with explanation about the kernel source situation]
* [https://forum.xda-developers.com/t/xiaomi-12-xiaomi-12-pro-oss-kernel-sources.4470899/ XDA thread with explanation about the kernel source situation]
* [https://github.com/cupid-development/ Community-maintained LineageOS sources]
* [https://github.com/cupid-development/ Community-maintained LineageOS sources]

Latest revision as of 00:39, 10 January 2025

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 12 (MIUI 13)
Extended version 14 (HyperOS 1.0)
FOSS bootloader no
postmarketOS
Category testing
Pre-built images no
Mainline yes
Unixbench Whet/Dhry score 9409.3
Features
Flashing
Works
USB Networking
Works
Internal storage
Works
Battery
Broken
Screen
Broken
Touchscreen
Broken
Multimedia
3D Acceleration
Works
Audio
Broken
Camera
Broken
Camera Flash
Works
IR TX
Works
Connectivity
WiFi
Works
Bluetooth
Works
GPS
No data
NFC
Broken
Modem
Calls
Broken
SMS
Broken
Mobile data
Broken
Miscellaneous
FDE
Broken
USB OTG
Broken
Sensors
Accelerometer
Broken
Magnetometer
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