Jump to content

Xiaomi Mi 9 (xiaomi-cepheus): Difference between revisions

From postmarketOS Wiki
update to gitlab.postmarketos.org
Mariob (talk | contribs)
No edit summary
 
Line 13: Line 13:
| extendedversion = 10 (MIUI 11)
| extendedversion = 10 (MIUI 11)
| chipset = Qualcomm Snapdragon 855 (SM8150)
| chipset = Qualcomm Snapdragon 855 (SM8150)
| cpu = 8-core (1x 2.84 GHz Kryo 485 & 3x 2.42 GHz Kryo 485 & 4x 1.78 GHz Kryo 485)
| cpu = Octa-core (1x2.84GHz Kryo 485 + 3x2.42GHz Kryo 485 + 4x1.78GHz Kryo 485)
| gpu = Adreno 640
| gpu = Adreno 640
| storage = 64/128/256 GB
| storage = 64/128/256 GB

Latest revision as of 23:22, 9 January 2025


Xiaomi Mi 9
Mi 9
Mi 9
Manufacturer Xiaomi
Name Mi 9
Codename xiaomi-cepheus
Released 2019
Type handset
Hardware
Chipset Qualcomm Snapdragon 855 (SM8150)
CPU Octa-core (1x2.84GHz Kryo 485 + 3x2.42GHz Kryo 485 + 4x1.78GHz Kryo 485)
GPU Adreno 640
Display 1080 x 2340
Storage 64/128/256 GB
Memory 6/8 GB
Architecture aarch64
Software
Original software Android (MIUI)
Original version 9.0
Extended version 10 (MIUI 11)
postmarketOS
Category testing
Pre-built images no
Mainline partial
Unixbench Whet/Dhry score 7735.4
Features
Flashing
Works
USB Networking
Works
Internal storage
No data
SD card
No data
Battery
Works
Screen
Partial
Touchscreen
Works
Multimedia
3D Acceleration
No data
Audio
No data
Camera
No data
Camera Flash
No data
Connectivity
WiFi
No data
Bluetooth
No data
GPS
No data
NFC
No data
Modem
Calls
No data
SMS
No data
Mobile data
No data
Miscellaneous
USB OTG
No data
HDMI/DP
No data
Sensors
Accelerometer
No data
Magnetometer
No data
Ambient Light
No data
Proximity
No data
Hall Effect
No data
Haptics
No data
Barometer
No data

Contributors

Alexey Min

Maintainer(s)

Alexey Min

Users owning this device

  • Alexeymin (Notes: I'll have to give up on this port temporarily)
  • Frankwalter (Notes: Used as main, but a phone is of no use to me. I aim to make it completely mainline. UPDATE: I broke it sorry)
  • R


How to enter flash mode

Bootloader Unlocking

Like other Xiaomi devices, the user will have to acquire the bootloader unlock key: https://en.miui.com/unlock

The device will not unlock if the device isn't 7 days old (from the time when your device connects to internet and powered on, and linked with Mi Account)

Recovery mode

  • Turn the device off (or restart also works)
  • Hold Volume Up and Power button
  • Once you feel vibration and phone turns on, release Power button
  • Keep holding Volume Up until you get to recovery.

Flashing (Download, Fastboot) mode

  • Same as recovery, but this time hold the Volume Down and Power keys.

The device supports booting images using fastboot boot / pmbootstrap flasher boot.

Installation

To boot mainline kernel you need to erase dtbo partition and disable vbmeta.

Note first make sure you have backups of the following partition images (or you have them in your stock Android or Lineage ROM): boot.img, dtbo.img, vbmeta.img
Note mainline port currently does not contain any useful features!
* pmbootstrap init     # select xiaomi, cepheus, console ui (currently you probably don't need anything else)
* pmbootstrap install --no-firewall
* pmbootstrap initfs hook_add debug-shell / netboot   # optional
* fastboot erase dtbo
* pmbootstrap flasher flash_vbmeta    # this flashes vbmeta with verity disabled flag
* pmbootstrap flasher flash boot && fastboot reboot / pmbootstrap flasher boot # ?

Installation (downstream port)

Unlike with mainline kernel, here you don't need to erase dtbo partition.

Note first make sure you have backups of vbmeta partition (or you have it in your stock Android or Lineage ROM)
* pmbootstrap init     # select xiaomi, cepheus-downstream, confirm Y, select console ui (currently you probably don't need anything else)
* pmbootstrap install --no-firewall
* pmbootstrap flasher flash_vbmeta    # this flashes vbmeta with verity disabled flag
* pmbootstrap flasher flash_rootfs
* pmbootstrap flasher flash_kernel
* fastboot reboot

Extra information

Partition layout

Partition layout:

Getting logs through debug UART

Tested! It works extremely well and the TX pin is easily accessible even without soldering. For the ground you can force a breadboard pin into some metal shield. Be careful not to break the back being of a glassy material, so use a piece of plastic such as a credit card (not to scratch the metal edges) to unstick the glue in the edges. To get the credit card into the edges you must first heat them with a phono or with a gas stove and then with a suction cup lift the back (opposing the strength of the glue). Never bend the back too much to avoid the risk of breaking it, but it is relatively flexible and always keeping in mind that it is a glassy material you will not have to leave defects, let alone cracks. If you care about aesthetics and plan to combine a mess, I recommend you put a spare back on the cart, they have a paltry price. The image below indicates which are the serial pins, this is the upper board.

Other xiaomi phones on sm8150

  • xiaomi-raphael (Mi 9T Pro / Redmi K20 Pro)
  • xiaomi-andromeda (Mi Mix 3 5G)
  • xiaomi-vayu (POCO X3 Pro) (sm8150-ac aka Snapdragon 860)

Links