Jump to content

Xiaomi Mi A2 (xiaomi-jasmine)

From postmarketOS Wiki
Revision as of 09:08, 4 March 2025 by Vishalbala (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Xiaomi Mi A2
Xiaomi Mi A2
Xiaomi Mi A2
Manufacturer Xiaomi
Name Mi A2
Codename xiaomi-jasmine_sprout
Released 2018
Type handset
Hardware
Chipset Qualcomm Snapdragon 660 (SDM660)
CPU 8-core (4x 2.2 GHz Kryo 260 & 4x 1.8 GHz Kryo 260)
GPU Adreno 512
Display 1080 x 2160 LTPS IPS LCD
Storage 32/64/128 GB
Memory 4/6 GB
Architecture aarch64
Software
Original software Android (MIUI)
Original version 8.1
postmarketOS
Category testing
Pre-built images no
Mainline yes
postmarketOS kernel 6.10
Features
Flashing
Works
USB Networking
Works
Internal storage
Works
Battery
Works
Screen
Works
Touchscreen
Works
Multimedia
3D Acceleration
Works
Audio
Broken
Camera
Broken
Camera Flash
No data
Connectivity
WiFi
Works
Bluetooth
Partial
GPS
Broken
Modem
Calls
Broken
SMS
Broken
Mobile data
Broken
Miscellaneous
FDE
No data
USB OTG
No data
HDMI/DP
No data
Sensors
Accelerometer
Broken
Magnetometer
No data
Ambient Light
No data
Proximity
No data
Hall Effect
No data
Haptics
Works
Barometer
No data


Contributors

Maintainer(s)

Users owning this device


Notes

This device is quite similar to the Xiaomi Redmi Note 7 (xiaomi-lavender) and Xiaomi Redmi Note 8T (xiaomi-willow), and many of the issues were solved with steps from that devices pages, so if you're hacking on the Mi A2 it's a good idea to read the xiaomi-lavender and the xiaomi-willow page closely.

How to enter flash mode

Bootloader Unlocking

Unlocking the bootloader will erase all your data, so make sure you have backed up all your data before proceeding with unlocking the bootloader.

Because this device is an Android One device, it can be unlocked using fastboot oem unlock and then fastboot flashing unlock_critical from fastboot mode.

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.

Installation

  • Install pmbootstrap first on your PC
  • pmbootstrap -y zap; pmbootstrap init, choose xiaomi-jasmine_sprout as your device
  • pmbootstrap install
  • Enter fastboot, plug USB into computer
  • pmbootstrap flasher flash_kernel
  • pmbootstrap flasher flash_rootfs
  • Reboot, sometimes fastboot reboot works, otherwise hold down Power until it reboots.
  • In addition to the GUI, you can also connect via SSH ssh user@172.16.42.1

Known Issues

  • X11 based DEs (like xfce) have this weird issue where letters are missing on text. Wayland based DEs do not have this issue
  • Gnome has severe graphical issues and is quite unusable and slow
  • Phosh does not start up at all on this device
  • Bluetooth for some reason works only on systemd and not when OpenRC is used
  • Occasionally the wifi driver crashes. This can be fixed by unloading and reloading ath and the dependant modules
  • Charging sometimes does not work when connected to a computer. Charging via a power brick works fine
  • Reboot and shutdown sometimes results in an endless Shutting down screen and the device must be force restarted in this case (this issue mainly occurs when systemd is used and occasionally when OpenRC is used)

Hardware

Touchscreen Novatek NT36672
Main cameras (front/back) Sony IMX376
Secondary back camera Sony IMX486
Proximity sensor Liteon LTR-579ALS
Gyroscope Bosch BMI120
Compass AKM AK09918
IR Blaster Willsemi WNM2046
WiFi/Bluetooth Qualcomm WCN3980
RFFE Qualcomm QET4101
Audio amplifier Texas Instruments TAS2555
Quick Charge Controller (PMIC?) Qualcomm SMB1351

UART

Bootloader UART logs:

  • Pins GPIO_4 and GPIO_5 from U201 are connected to TP11 and TP10.
  • GPIO4 = TP11 = UART TX
  • GPIO5 = TP10 = UART RX
  • UART interface is 1.8v. Not sure if RX is working yet, because there's no voltage on this pin.

Additional Info

Info from the Xiaomi Redmi Note 7, and Redmi Note 8 port that also applies to the Mi A2:

Photos

See also