Xiaomi Redmi 9A (xiaomi-dandelion)
This device has been tested with postmarketOS, but its device package has not yet been added to the postmarketOS repositories. This means that it cannot be selected in pmbootstrap. Status: framebuffer 1 core |
![]() Xiaomi Redmi 9A (xiaomi-dandelion) | |
Manufacturer | Xiaomi |
---|---|
Name | Redmi 9A |
Codename | xiaomi-dandelion |
Model | M2006C3LG/M2006C3LC |
Released | 2020 |
Type | handset |
Hardware | |
Chipset | Mediatek Helio G25 (MT6762G) |
CPU |
Octa-core (4x2.0 GHz Cortex-A53 4x1.5 GHz Cortex-A53) |
GPU | PowerVR GE8320 |
Display | 720 x 1600 IPS LCD |
Storage | 32GB/64GB/128GB |
Memory | 2GB/3GB/4GB |
Architecture | aarch64 |
Software | |
Original software The software and version the device was shipped with. |
MIUI 12 Android 10 |
Extended version The most recent supported version from the manufacturer. |
MIUI 12 |
postmarketOS | |
Category | testing |
Mainline Instead of a Linux kernel fork, it is possible to run (Close to) Mainline. |
yes |
pmOS kernel The kernel version that runs on the device's port. |
6.x.x |
Unixbench score Unixbench Whetstone/Dhrystone score. See Unixbench. |
0.0 |
Flashing Whether it is possible to flash the device with pmbootstrap flasher . |
Untested
|
---|---|
USB Networking After connecting the device with USB to your PC, you can connect to it via telnet (initramfs) or SSH (booted system). |
Untested
|
Internal storage eMMC, SD cards, UFS... |
Untested
|
SD card Also includes other external storage cards. |
Untested
|
Battery Whether charging and battery level reporting work. |
Untested
|
Screen Whether the display works; ideally with sleep mode and brightness control. |
Untested
|
Touchscreen |
Untested
|
Keyboard Whether the built-in physical keyboard works. |
Untested
|
Touchpad Whether the built-in touchpad works. |
Untested
|
Stylus |
Untested
|
Multimedia | |
3D Acceleration |
Untested
|
Built-in DVB TV tuner/DVB device |
Untested
|
Audio Audio playback, microphone, headset and buttons. |
Untested
|
Camera |
Untested
|
Camera Flash |
Untested
|
IR TX |
Untested
|
IR RX |
Untested
|
Connectivity | |
WiFi |
Untested
|
Bluetooth |
Untested
|
Ethernet |
Untested
|
GPS |
Untested
|
NFC Near Field Communication |
Untested
|
Modem | |
Calls |
Untested
|
SMS |
Untested
|
Mobile data |
Untested
|
Miscellaneous | |
FDE Full disk encryption and unlocking with unl0kr. |
Untested
|
USB-A Whether the full-sized USB-A port works. |
Untested
|
USB OTG USB On-The-Go or USB-C Role switching. |
Untested
|
HDMI/DP Video and audio output with HDMI or DisplayPort. |
Untested
|
Sensors | |
Accelerometer Handles automatic screen rotation in many interfaces. |
Untested
|
Magnetometer Sensor to measure the Earth's magnetism |
Untested
|
Ambient Light Measures the light level; used for automatic screen dimming in many interfaces. |
Untested
|
Proximity |
Untested
|
Hall Effect Measures magnetic fields; usually used as a flip cover sensor |
Untested
|
Haptics |
Untested
|
Barometer Sensor to measure air pressure |
Untested
|
Power Sensor Sensor to monitor current, voltage and power. Not fuel gauge! |
Untested
|
Contributors
- Paradoxvirus
- Rebel1725
Users owning this device
- Azuk1 (Notes: testing mainline)
- EvilSoCute (Notes: framebuffer and only cpu0 works for now)
- Kaloyan Donev (Notes: 9AT, Dead motherboard)
- Paradoxvirus (Notes: testing port)
- Rebel1725 (Notes: successfully built pmos but bootloop)
TODO
clear this page
How to unlock device
How to enter flash mode
How to port device (overview)
1. Create pmbootstrap config files
2. Find the Linux kernel fork used by the device
3. Edit pmbootstrap config to point it to the kernel
4. Download the kernel
5. Compile the kernel
...
How to port device (in progress)
See official docs for up to date and more complete instructions. I recommend reading the installation guide, this guide and the official porting guide before running anything.
See also https://github.com/SheatNoisette/postmarket_redmi_9a/tree/main
Install pmbootstrap
Install pmbootstrap from git to ensure you have the latest version
Initialize
./pmbootstrap.py init
As far as I can tell, this creates files in
$workdir/aports/device/testing/device-xiaomi-dandelion
$workdir/aports/device/testing/linux-xiaomi-dandelion
or
$workdir/cache_git/aports/device/testing/device-xiaomi-dandelion
$workdir/cache_git/aports/device/testing/linux-xiaomi-dandelion
and populates them according to the inputs you submitted.
Find the Linux kernel fork
If the device is supported by LineageOS, you can find the kernel on their GitHub repo. The same goes for other custom ROMs.
In this case, LineageOS does not support the device but the vendor (Xiaomi) open sources the kernels on https://github.com/MiCode/Xiaomi_Kernel_OpenSource.
Find the branch of the (same) repository that the kernel is hosted on and access it: https://github.com/MiCode/Xiaomi_Kernel_OpenSource/tree/dandelion-q-oss.
Tell pmbootstrap where the kernel is hosted
cd $workdir/cache_git/aports/device/testing/linux-xiaomi-dandelion
vim APKBUILD
Change the url, the _repository variable and the _commit variable in the APKBUILD so that they point to the latest commit in the branch of the git repo where the kernel is hosted.
< pkgver=4.9.190 --- > pkgver=3.0.0 26,27c26,27 < _repository="Xiaomi_Kernel_OpenSource" < _commit="8974b9164af90d94603900b229264ae879a83a83" --- > _repository="(CHANGEME!)" > _commit="ffffffffffffffffffffffffffffffffffffffff" 30c30 < $pkgname-$_commit.tar.gz::https://github.com/MiCode/$_repository/archive/$_commit.tar.gz --- > $pkgname-$_commit.tar.gz::https://github.com/LineageOS/$_repository/archive/$_commit.tar.gz
Tell pmbootstrap what version of the kernel you found
Find the kernel version from the Makefile in the GitHub repo. In this case, as of October 2024,
VERSION = 4
PATCHLEVEL = 9
SUBLEVEL = 190
This is equivalent to kernel version 4.9.190
Download the kernel configuration (defconfig)
In this kernel fork there are many defconfig files and I'm not sure which one to use, but I think it makes most sense to use the one called dandelion-defconfig, even though this one isn't mentioned in the build.config files that are in the root of the project.
wget https://raw.githubusercontent.com/MiCode/Xiaomi_Kernel_OpenSource/refs/heads/dandelion-q-oss/arch/arm64/configs/dandelion_defconfig -O $HOME/.local/var/pmbootstrap/cache_git/pmaports/device/testing/linux-xiaomi-dandelion/config-xiaomi-dandelion.aarch64
Check that it has been downloaded and saved correctly by opening it.
vim config-xiaomi-dandelion.aarch64
Download and verify the kernel
pmbootstrap checksum linux-xiaomi-dandelion
Remove the patches that fail
Run the following code to check which patches fail.
pmbootstrap kconfig edit linux-xiaomi-dandelion
Remove the patches that fail from the directory and from the APKBUILD.
Calculate new checksums.
pmbootstrap checksum linux-xiaomi-dandelion
Try again.
pmbootstrap kconfig edit
Add the patch that fixes the ncurses error
pmbootstrap kconfig edit linux-xiaomi-dandelion
The above line fails for me with the error Install ncurses (ncurses-devel) and try again.
, so I download the patch to the directory and add it to the APKBUILD file as described in the docs.
Regenerate the checksums to add the patch.
pmbootstrap kconfig checksum linux-xiaomi-dandelion
Retry.
pmbootstrap kconfig edit linux-xiaomi-dandelion
Build (compile) the kernel
Find or create patches to fix kernel errors
Compile with GCC6 if you can't make it compile
Extract and analyze the boot image
Get a boot image from TWRP, LineageOS or extract it from running android.
How to install to device (after successful porting)
Flash
$ pmbootstrap flasher flash_rootfs $ pmbootstrap flasher flash_kernel $ fastboot reboot