Xiaomi MI A2 Lite (xiaomi-daisy)

From postmarketOS
Jump to navigation Jump to search
Xiaomi MI A2 Lite
Xiaomi-daisy Booting
Xiaomi-daisy Booting
Manufacturer Xiaomi
Name MI A2 Lite
Codename xiaomi-daisy
Released 2018
Category testing
Original software Android 8.1
postmarketOS kernel 5.13-rc6
Hardware
Chipset Qualcomm MSM8953 Snapdragon 625
CPU 2 GHz 8 Core Cortex-A53
GPU Adreno 506
Display 1080 x 2280 IPS
Storage 32 GB
Memory 3/4 GB
Architecture aarch64
Features
USB Networking
Works
Flashing
Works
Touchscreen
Works
Display
Works
WiFi
Partial
Xwayland
FDE
Partial
Mainline
Partial
Battery
Works
3D Acceleration
Partial
Audio
Partial
Bluetooth
Partial
Camera
GPS
Mobile data
Works
SMS
Works
Calls
Works
USB OTG
NFC
Sensors
Accelerometer
Broken
Magnetometer
Ambient Light
Proximity
Hall Effect
Misc
Ir TX
TrustZone



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)


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

Mainline kernel

In order to use the mainline kernel, installing lk2nd is needed. The package lk2nd-msm8953 provides a prebuilt version ready to flash to the device.

To use it, add it in the init step or instead of running pmbootstrap install, add the package like this: pmbootstrap install --add lk2nd-msm8953

Then put the device in fastboot mode and run:

$ pmbootstrap flasher flash_lk2nd

Then reboot the device and press the Volume Down just after the Android logo shows up and hold until the device vibrates and shows START in green at the top left corner of the screen.

Downstream kernel

If using the downstream kernel, put your device in fastboot mode.

Install the image

To proceed with the installation to internal storage of pmOS, plug the device to the computer with an USB cable and run:

$ pmbootstrap flasher flash_rootfs --partition userdata
$ sudo fastboot format system
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

Device tree and panel driver support added on msm8953-mainline ([2]). Flashing lk2nd is needed. ([3]).

Feature table

Parts Status Notes
Modem Partial Should work with WIP IPA patches, not in msm8953-mainline master branch
WiFi Partial Sometimes stops working and reconnecting to the WiFi network is needed
Sensors Partial Working with i2c-gpio from here, still missing a proper SSC driver
GPU Works
Audio Partial Works with minimal changes to motorola-ocean UCM config. Still not packaged. Speaker does not work
Touchscreen Works
Charger Partial WIP driver here
Panel Partial Only supported hx8933 and ili8707 models

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

Note Mobile data is not working in kernel version 5.15 and later. There's an ongoing effort to upstream the driver needed for mobile data to work. A testing branch can be found here.

Mobile data works now.

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.

Images

Daisy-pcb-testpoints.png

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

Daisy-phosh-about.png

See also