Xiaomi Mi A2 Lite (xiaomi-daisy): Difference between revisions
mNo edit summary |
mNo edit summary |
||
(46 intermediate revisions by 8 users not shown) | |||
Line 6: | Line 6: | ||
| imagecaption = Xiaomi-daisy Booting | | imagecaption = Xiaomi-daisy Booting | ||
| releaseyear = 2018 | | releaseyear = 2018 | ||
| originalsoftware = Android 8.1 | | originalsoftware = Android (MIUI) | ||
| pmoskernel = 6. | | originalversion = 8.1 | ||
| pmoskernel = 6.12.0 | |||
| chipset = Qualcomm Snapdragon 625 (MSM8953) | | chipset = Qualcomm Snapdragon 625 (MSM8953) | ||
| cpu = 2 GHz 8 Core Cortex-A53 | | cpu = 2 GHz 8 Core Cortex-A53 | ||
| category = community | |||
| gpu = Adreno 506 | | gpu = Adreno 506 | ||
| storage = 32 GB | | storage = 32/64 GB | ||
| display = 1080 x 2280 IPS | | display = 1080 x 2280 IPS | ||
| memory = 3/4 GB | | memory = 3/4 GB | ||
| architecture = aarch64 | | architecture = aarch64 | ||
| type = Handset | |||
<!-- the following status_* questions should be answered with Y - yes, P - partial, N - no, or left blank (for untested or unknown) --> | <!-- the following status_* questions should be answered with Y - yes, P - partial, N - no, or left blank (for untested or unknown) --> | ||
| status_usbnet = Y | | status_usbnet = Y | ||
Line 27: | Line 30: | ||
| status_3d = Y | | status_3d = Y | ||
| status_accel = Y | | status_accel = Y | ||
| status_audio = | | status_audio = Y | ||
| status_bluetooth = | | status_bluetooth = Y | ||
| status_camera = | | status_camera = P | ||
| status_gps = | | status_gps = P | ||
| status_mobiledata = | | status_mobiledata = P | ||
| status_sms = | | status_sms = Y | ||
| status_calls = | | status_emmc = Y | ||
| | | status_sdcard = Y | ||
| status_calls = P | |||
| status_nfc=- | |||
| booting = Yes | | booting = Yes | ||
| status_otg = Y | |||
| whet_dhry = 4173.5 | |||
<!-- you can also use these lines if you need to: | <!-- you can also use these lines if you need to: | ||
see Unixbench page on wiki | see Unixbench page on wiki | ||
Is OTG available, not used in wiki | Is OTG available, not used in wiki | ||
--> | --> | ||
}} | }} | ||
Line 57: | Line 62: | ||
=== Fastboot Mode === | === Fastboot Mode === | ||
First make sure to enable USB debugging in Android ([https://technowikis.com/4732/how-to-activate-debug-mode-xiaomi-mi-a2-lite]) | First make sure to enable USB debugging in Android ([https://technowikis.com/4732/how-to-activate-debug-mode-xiaomi-mi-a2-lite]). | ||
Then with device powered off, hold the {{button|Volume Down}} and {{button|Power}} buttons simultaneously for a few seconds, until Fastboot Mode screen appears. | Then with device powered off, hold the {{button|Volume Down}} and {{button|Power}} buttons simultaneously for a few seconds, until Fastboot Mode screen appears. | ||
Line 64: | Line 69: | ||
Get device into Fastboot Mode, plug in USB cable, then: | Get device into Fastboot Mode, plug in USB cable, then: | ||
< | <syntaxhighlight lang="shell-session"> | ||
$ sudo fastboot oem unlock | $ sudo fastboot oem unlock | ||
</ | </syntaxhighlight> | ||
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. | 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. | ||
Line 73: | Line 78: | ||
==== Build the image ==== | ==== Build the image ==== | ||
< | <syntaxhighlight lang="shell-session"> | ||
$ pmbootstrap init | $ pmbootstrap init # choose Vendor: qcom Device codename: msm8953 | ||
$ pmbootstrap install | $ pmbootstrap install | ||
</ | </syntaxhighlight> | ||
==== | ==== Install the image ==== | ||
<syntaxhighlight lang="shell-session"> | |||
< | |||
$ pmbootstrap flasher flash_lk2nd | $ pmbootstrap flasher flash_lk2nd | ||
$ pmbootstrap flasher flash_rootfs | |||
</syntaxhighlight> | |||
==== Install to xiaomi-sakura ==== | |||
xiaomi-sakura has rollback protection, some manually steps are needed. | |||
< | <syntaxhighlight lang="shell-session"> | ||
$ fastboot boot lk2nd.img | $ fastboot boot lk2nd.img | ||
$ fastboot flash lk2nd lk2nd.img | $ fastboot flash lk2nd lk2nd.img | ||
$ pmbootstrap flasher flash_rootfs | |||
</syntaxhighlight> | |||
$ pmbootstrap flasher flash_rootfs | |||
</ | |||
{{Note| | {{Note| | ||
If you want to install pmOS to an SD card instead of internal storage, you need to add <code>--sdcard <device path></code> at the end of the install command.<br> | If you want to install pmOS to an SD card instead of internal storage, you need to add <code>--sdcard <device path></code> at the end of the install command.<br> | ||
I.e. | I.e.: <code>pmbootstrap install --sdcard /dev/<your_sdcard></code>. You can use <code>lsblk</code> to find your sdcard. | ||
}} | }} | ||
== Mainline Kernel == | == Mainline Kernel == | ||
=== Feature table === | === Feature table === | ||
Line 127: | Line 112: | ||
| scope="row"| Modem | | scope="row"| Modem | ||
| class="feature feature-partial" | Partial | | class="feature feature-partial" | Partial | ||
| | | It works with ipa-lite since 6.7.0. | ||
|- | |- | ||
| scope="row"| WiFi | | scope="row"| WiFi | ||
Line 135: | Line 120: | ||
| scope="row"| Sensors | | scope="row"| Sensors | ||
| class="feature feature-partial" | Partial | | class="feature feature-partial" | Partial | ||
| Working with i2c-gpio from [https://github.com/alikates/linux/commit/d497e6461a09d4cc0d260c8defbc3edd701ece5c here] | | Working with i2c-gpio from [https://github.com/alikates/linux/commit/d497e6461a09d4cc0d260c8defbc3edd701ece5c here]. WIP SSC driver [https://github.com/msm8953-mainline/linux/tree/alikates/6.4.7/sensors here]. | ||
|- | |- | ||
| scope="row"| GPU | | scope="row"| GPU | ||
Line 142: | Line 127: | ||
|- | |- | ||
| scope="row"| Audio | | scope="row"| Audio | ||
| class="feature feature- | | class="feature feature-yes" | Works | ||
| | | Everything works. Speaker works since version 6.4.7. Needs alsa UCM config from [https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/4268 this package]. | ||
|- | |- | ||
| scope="row"| Touchscreen | | scope="row"| Touchscreen | ||
| class="feature feature- | | class="feature feature-yes" | Works | ||
| | | Both touchscreen variant are supported. | ||
|- | |- | ||
| scope="row"| Charger | | scope="row"| Charger | ||
| class="feature feature-yes" | Works | | class="feature feature-yes" | Works | ||
| Driver added in 6.1 | | Driver added in 6.1 | ||
|- | |- | ||
| scope="row"| Panel | | scope="row"| Panel | ||
| class="feature feature- | | class="feature feature-yes" | Partial | ||
| Only supported hx8933 and | | Only supported hx8933, ili8707 and otm1911 models (not sure if there are any other panels) | ||
|- | |||
| scope="row"| GPS | |||
| class="feature feature-yes" | Partial | |||
| Driver added in 6.8.2 | |||
|- | |||
| scope="row"| Camera | |||
| class="feature feature-yes" | Partial | |||
| ov5675 front camera was enabled in 6.7.2 and in megapixels 1.8.2. | |||
There are variants with different i2c address 0x10. | |||
|} | |} | ||
Line 167: | Line 160: | ||
==== Mobile data ==== | ==== Mobile data ==== | ||
Mobile data works since 6.7.0. | |||
To configure the mobile network settings, use NetworkManger (mobile network menu on phosh settings) so it sets up the network interface and IP routing. | 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. | 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. | ||
=== GPS === | |||
[[Qualcomm_Snapdragon_450/625/626/632_(MSM8953)#GPS]] | |||
=== Touchscreen === | |||
Both goodix and edt touchscreens are supported. | |||
However, touchscreen selection is binded to the display panel, and sometimes the same panel comes with a different touchscreen. As a result, you might need to manually override it in lk2nd. | |||
To do so, you will need to edit and compile lk2nd yourself. First, clone [https://github.com/msm8916-mainline/lk2nd msm8916-mainline/lk2nd]. | |||
==== Edit touchscreen-compatible ==== | |||
Next, edit the following parts of the DTS file corresponding to your device. | |||
{| class="wikitable" | |||
|- | |||
| '''sakura''' || [https://github.com/msm8916-mainline/lk2nd/blob/main/lk2nd/device/dts/msm8953/msm8953-xiaomi-common.dts#L48-L59 lk2nd/device/dts/msm8953/msm8953-xiaomi-common.dts#L48-L59] | |||
|- | |||
| '''daisy''' || [https://github.com/msm8916-mainline/lk2nd/blob/main/lk2nd/device/dts/msm8953/msm8953-xiaomi-daisy.dts#L23-L34 lk2nd/device/dts/msm8953/msm8953-xiaomi-daisy.dts#L23-L34] | |||
|} | |||
Play with the displays' <code>touchscreen-compatible</code> value. This value should be either of: | |||
* <code>"goodix,gt917d"</code> | |||
* <code>"edt,edt-ft5406"</code> | |||
For example, if your touchscreen does not work, change every goodix to edt and vice-versa. | |||
==== Build lk2nd ==== | |||
After that, you need to build the lk2nd image. Run the following command from the repository's root directory: | |||
<syntaxhighlight lang="shell-session"> | |||
$ make TOOLCHAIN_PREFIX=arm-none-eabi- lk2nd-msm8953 | |||
</syntaxhighlight> | |||
See [https://github.com/msm8916-mainline/lk2nd/blob/main/README.md#building msm8916-mainline/lk2nd/README.md#building] for more details on the building process. | |||
The resulting image will be in the <code>build-lk2nd-msm8953</code> folder as <code>lk2nd.img</code>. | |||
==== Flash lk2nd ==== | |||
To flash <code>lk2nd.img</code>, run the following commands: | |||
<syntaxhighlight lang="shell-session"> | |||
$ fastboot boot lk2nd.img | |||
$ fastboot flash lk2nd lk2nd.img | |||
</syntaxhighlight> | |||
Finally, you can run: | |||
<syntaxhighlight lang="shell-session"> | |||
$ pmbootstrap flasher flash_rootfs | |||
</syntaxhighlight> | |||
And reboot your device. | |||
==== Goodix touch display calibration ==== | |||
Install {{pmaport|device-xiaomi-daisy-fake-goodix}} if your replacement display with goodix touch controller is not calibrated well. | |||
== Images == | == Images == | ||
Line 185: | Line 238: | ||
* {{MR|1687|pmaports}} Initial merge request | * {{MR|1687|pmaports}} Initial merge request | ||
* {{MR|2225|pmaports}} Mainline merge request | * {{MR|2225|pmaports}} Mainline merge request | ||
* {{Device package| | * {{Device package|qcom-msm8953|community}} | ||
* {{Kernel package|postmarketos-qcom-msm8953}} | * {{Kernel package|postmarketos-qcom-msm8953|community}} | ||
* {{Firmware package|qcom-msm8953|community}} | |||
* [https://github.com/msm8953-mainline/linux Mainline kernel] | * [https://github.com/msm8953-mainline/linux Mainline kernel] | ||
* [https://github.com/ | * [https://github.com/msm8916-mainline/lk2nd lk2nd] | ||
* [https://github.com/alikates/linux/tree/smbcharger Charger driver fork] | * [https://github.com/alikates/linux/tree/smbcharger Charger driver fork] |
Latest revision as of 06:08, 29 March 2025
![]() Xiaomi-daisy Booting | |
Manufacturer | Xiaomi |
---|---|
Name | Mi A2 Lite |
Codename | xiaomi-daisy |
Released | 2018 |
Type | handset |
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 |
Software | |
Original software | Android (MIUI) |
Original version | 8.1 |
postmarketOS | |
Category | community |
Pre-built images | yes |
postmarketOS kernel | 6.12.0 |
Unixbench Whet/Dhry score | 4173.5 |
Flashing |
Works |
---|---|
USB Networking |
Works |
Internal storage |
Works |
SD card |
Works |
Battery |
Works |
Screen |
Works |
Touchscreen |
Works |
Multimedia | |
3D Acceleration |
Works |
Audio |
Works |
Camera |
Partial |
Camera Flash |
No data |
Connectivity | |
WiFi |
Works |
Bluetooth |
Works |
GPS |
Partial |
Modem | |
Calls |
Partial |
SMS |
Works |
Mobile data |
Partial |
Miscellaneous | |
FDE |
Works |
USB OTG |
Works |
HDMI/DP |
No data |
Sensors | |
Accelerometer |
Works |
Magnetometer |
No data |
Ambient Light |
No data |
Proximity |
No data |
Hall Effect |
No data |
Haptics |
No data |
Barometer |
No data |
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)
- DiabloSat (Notes: A detailed installation guide with pictures has been written)
- Imre (Notes: struggling to install to sdcard)
- ItsVixano (Notes: Has a non-OEM battery replacement)
- Manut (Notes: edge, phosh)
- Progmetalbg (Notes: running Android One 10)
- Russanandres (Notes: Android 12 Custom)
- Soupborsh (Notes: stable pmOS as server with removed battery)
- Victorbnl
- XVT 360 (Notes: Running pmOS)
Installation
Fastboot Mode
First make sure to enable USB debugging in Android ([1]). Then with device powered off, hold the and 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 # choose Vendor: qcom Device codename: msm8953
$ 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
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.: pmbootstrap install --sdcard /dev/<your_sdcard> . You can use lsblk to find your sdcard. |
Mainline Kernel
Feature table
Parts | Status | Notes |
---|---|---|
Modem | Partial | It works with ipa-lite since 6.7.0. |
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) |
GPS | Partial | Driver added in 6.8.2 |
Camera | Partial | ov5675 front camera was enabled in 6.7.2 and in megapixels 1.8.2.
There are variants with different i2c address 0x10. |
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 since 6.7.0.
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.
GPS
Qualcomm_Snapdragon_450/625/626/632_(MSM8953)#GPS
Touchscreen
Both goodix and edt touchscreens are supported.
However, touchscreen selection is binded to the display panel, and sometimes the same panel comes with a different touchscreen. As a result, you might need to manually override it in lk2nd.
To do so, you will need to edit and compile lk2nd yourself. First, clone msm8916-mainline/lk2nd.
Edit touchscreen-compatible
Next, edit the following parts of the DTS file corresponding to your device.
sakura | lk2nd/device/dts/msm8953/msm8953-xiaomi-common.dts#L48-L59 |
daisy | lk2nd/device/dts/msm8953/msm8953-xiaomi-daisy.dts#L23-L34 |
Play with the displays' touchscreen-compatible
value. This value should be either of:
"goodix,gt917d"
"edt,edt-ft5406"
For example, if your touchscreen does not work, change every goodix to edt and vice-versa.
Build lk2nd
After that, you need to build the lk2nd image. Run the following command from the repository's root directory:
$ make TOOLCHAIN_PREFIX=arm-none-eabi- lk2nd-msm8953
See msm8916-mainline/lk2nd/README.md#building for more details on the building process.
The resulting image will be in the build-lk2nd-msm8953
folder as lk2nd.img
.
Flash lk2nd
To flash lk2nd.img
, run the following commands:
$ fastboot boot lk2nd.img
$ fastboot flash lk2nd lk2nd.img
Finally, you can run:
$ pmbootstrap flasher flash_rootfs
And reboot your device.
Goodix touch display calibration
Install device-xiaomi-daisy-fake-goodixPMOS if your replacement display with goodix touch controller is not calibrated well.
Images
1: Tx, 2: GND, 3: EDL test-points |
See also
- Qualcomm Snapdragon 450/625/626/632 (MSM8953)
- pmaports!1687 Initial merge request
- pmaports!2225 Mainline merge request
- Device package
- Kernel package
- Firmware package
- Mainline kernel
- lk2nd
- Charger driver fork