Jump to content

Xiaomi Mi A2 (xiaomi-jasmine): Difference between revisions

From postmarketOS Wiki
mNo edit summary
m Added chat room link
Line 440: Line 440:
-->
-->


* [https://app.element.io/#/room/#sdm660-mainline:matrix.org Chat room: SDM660 devices development]
* [https://github.com/xiaomi-sdm660/android_kernel_xiaomi_sdm660 Kernel used as downstream kernel source for jasmine_sprout]
* [https://github.com/xiaomi-sdm660/android_kernel_xiaomi_sdm660 Kernel used as downstream kernel source for jasmine_sprout]
* [https://github.com/robante15/mia2_pmaports Xiaomi Mi A2 Linux and Device Package]
* [https://github.com/robante15/mia2_pmaports Xiaomi Mi A2 Linux and Device Package]

Revision as of 19:46, 21 October 2024

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
Broken
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.

LED / Torch / Screen brightness / Vibrator

Write brightness or boolean value to specific sysfs files:

  • Front panel LED light [0-255]: /sys/class/leds/white/{brightness,blink}
  • Torch light [0-255]: /sys/class/leds/flashlight/brightness (torch_0 is cold light, torch_1 is warm light)
  • Screen brightness [0-255]: /sys/class/leds/lcd-backlight/brightness
  • Vibrator [Miliseconds]: /sys/class/timed_output/vibrator/enable

Example: echo 255 > /sys/class/leds/lcd-backlight/brightness That maximizes the brightness of the screen

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
    • GNOME have been successfully tested.
  • pmbootstrap install
  • Enter fastboot, plug USB into computer
  • pmbootstrap flasher flash_kernel
  • pmbootstrap flasher flash_rootfs
  • pmbootstrap flasher flash_vbmeta
  • 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

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