Xiaomi MI A2 Lite (xiaomi-daisy)
Users owning this device
First make sure to enable USB debugging in Android () Then with device powered off, hold the and buttons simultaneously for a few seconds, until Fastboot Mode screen appears.
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.
First build the image:
$ pmbootstrap init $ pmbootstrap install
Then in order to flash it put your device in fastboot mode, and plug it in USB. Then do:
$ pmbootstrap flasher flash_rootfs --partition userdata $ sudo fastboot format system $ pmbootstrap flasher flash_kernel
To use it select mainline kernel when running
Flash it with
fastboot flash boot lk2nd.img
Reboot device and hold vol. down button after the device unlock warning. Then the lk2nd interface should show up. From there, follow the normal installation steps.
Firmware loads and modem boots. It detects SIM card and can be unlocked and configured with qmicli. Need to test Ofono with patches for QRTR support.
Calls and SMS work on Phosh by using a modified device-xiaomi-daisy and ModemManager version 1.17.900. The changes for those packages can be found here.
Because audio needs more work i couldn't test audio quality on calls but with q6voiced it should work.
Mobile data works now. On kernel version >= 5.14 the following steps are not needed because the port data can be read from sysfs by ModemManger
|This can crash the system and make it totally unresponsive,|
The patches from pmaports!2496 merge request are needed.
To get mobile data working an interface must be enabled to send packets to the modem.
The parameters for it are found in the downstream kernel. They are IPA_CLIENT_APPS_LAN_WAN_PROD=4 and IPA_CLIENT_APPS_WAN_CONS=5.
To get it working:
# qmicli -d qrtr://0 -p --dpm-open-port="hw-data-ep-type=embedded,hw-data-ep-iface-number=1,hw-data-rx-id=4,hw-data-tx-id=5"
- Restart ModemManager:
# killall ModemManager
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.
Driver spams dmesg with
wcn36xx: WARNING Bad TX complete indication and there are some crashes
Works fine but there may be a problem with the governor. It's a bit slow when waking up or when screen changes from idle to active graphics but a few seconds after it stabilizes.
Earpiece and headphones work almost with the default msm8916 UCM config fork. Speaker still not working.
It works, but with the focaltech variant there seems to be a bug where the chip firmware is erased if not powered off properly and the touchscreen stops working.
Mainline driver lacks support for reflashing the firmware so it is needed to flash stock android to fix it.
FDE works fine, but the touchscreen does not work with the packaged kernel as the driver is enabled as a module.
The sensors are managed by the DSP and configuration is made with QMI. Support must be added to libqmi.
Fuel gauge is working on msm8953-mainline. The charger on PMI8950 is really similar to PMI8994, a proper driver could be written to support both PMICs. Work will be uploaded here.