Xiaomi Mi A2 Lite (xiaomi-daisy)

From postmarketOS
Xiaomi Mi A2 Lite
Xiaomi-daisy Booting
Xiaomi-daisy Booting
Manufacturer Xiaomi
Name Mi A2 Lite
Codename xiaomi-daisy
Released 2018
Category community
Pre-built images yes
Original software Android (MIUI)
Original version 8.1
postmarketOS kernel 6.1.0
Hardware
Chipset Qualcomm Snapdragon 625 (MSM8953)
CPU 2 GHz 8 Core Cortex-A53
GPU Adreno 506
Display 1080 x 2280 IPS
Storage 32/64 GB
Memory 3/4 GB
Architecture AArch64
Type Handset
Features
USB Networking
Works
Flashing
Works
Touchscreen
Works
Display
Works
WiFi
Works
FDE
Works
Mainline
Works
Battery
Works
3D Acceleration
Works
Audio
Works
Bluetooth
Works
Camera
Partial
GPS
Partial
Mobile data
Partial
Internal storage
Works
SMS
Works
Calls
Partial
USB OTG
Works
Sensors
Accelerometer
Works
Magnetometer
Ambient Light
Proximity
Hall Effect
Barometer
Power Sensor
Misc
Built-in DVB
Camera Flash
Keyboard
Touchpad
USB-A
HDMI/DP
Ir TX
Ir RX
Stylus
Memory Card
Haptics
Ethernet
FOSS bootloader


This device is also known as Xiaomi Redmi 6 Pro (sakura). The only difference is that sakura has MIUI preinstalled instead of stock Android One.

Contributors

  • Ash
  • Alikates

Users owning this device

  • Alikates (Notes: Two devices, one with android and the other with pmOS)
  • Ash (Notes: Broken part of screen)
  • Progmetalbg (Notes: running Android One 10)


Installation

Fastboot Mode

First make sure to enable USB debugging in Android ([1]) Then with device powered off, hold the Volume Down and Power buttons simultaneously for a few seconds, until Fastboot Mode screen appears.

OEM Unlock

Get device into Fastboot Mode, plug in USB cable, then:

$ sudo fastboot oem unlock

When prompted on device, use Volume-Up/Down buttons to highlight choice, then Power button to select it. The Fastboot Mode screen will appear again, and a message saying that the device isn't secure will appear briefly.

Installation

Build the image

$ pmbootstrap init
$ pmbootstrap install

Install the image

$ pmbootstrap flasher flash_lk2nd
$ pmbootstrap flasher flash_rootfs

Install to xiaomi-sakura

xiaomi-sakura has rollback protection, some manually steps are needed.

$ fastboot boot lk2nd.img
$ fastboot flash lk2nd lk2nd.img
$ pmbootstrap flasher flash_rootfs
Note If you want to install pmOS to an SD card instead of internal storage, you need to add --sdcard <device path> at the end of the install command.
I.e. (using lk2nd): pmbootstrap install --add msm8953-lkn2d --sdcard /dev/<your_sdcard>

Mainline Kernel

To use it select mainline kernel when running pmbootstrap init

Flashing lk2nd is needed. ([2]).

Feature table

Parts Status Notes
Modem Partial It works with ipa-lite on 6.7.0/main branch.
WiFi Works
Sensors Partial Working with i2c-gpio from here. WIP SSC driver here.
GPU Works
Audio Works Everything works. Speaker works since version 6.4.7. Needs alsa UCM config from this package.
Touchscreen Works Both touchscreen variant are supported.
Charger Works Driver added in 6.1
Panel Partial Only supported hx8933, ili8707 and otm1911 models (not sure if there are any other panels)

Modem

Firmware loads and modem boots. It detects SIM card and can be unlocked and configured with qmicli.

Because audio needs more work i couldn't test audio quality on calls but with q6voiced it should work.

Mobile data

Mobile data works with ipa-lite on 6.7.0/main branch.

To configure the mobile network settings, use NetworkManger (mobile network menu on phosh settings) so it sets up the network interface and IP routing.

After that, two new network interfaces should appear. The rmnet one is the connection to the modem, and the other one is virtual and the one that is used to transmit mobile data.

Touchscreen

Both touchscreen are supported but touchscreen selection is binded to the display panel sometimes same panel comes with different touchscreen. Touchscreen selection can be overriden from lk2nd.

https://github.com/msm8953-mainline/lk2nd/blob/main/dts/msm8953-xiaomi-common.dts#L42-L53

https://github.com/msm8953-mainline/lk2nd/blob/main/dts/msm8953-xiaomi-daisy.dts#L18-L29

Choose:

touchscreen-compatible = "goodix,gt917d";

or

touchscreen-compatible = "edt,edt-ft5406";

Images

Daisy-pcb-testpoints.png

Note 1: Tx, 2: GND, 3: EDL test-points

Daisy-phosh-about.png

See also