Xiaomi Redmi 7A (xiaomi-pine)
Appearance
	
	
| This device is supported as part of a generic port. Refer to Generic MSM89x7 (qcom-msm89x7) for installation instructions and more information. | 
|  Xiaomi Redmi 7A running XFCE | |
| Manufacturer | Xiaomi | 
|---|---|
| Name | Redmi 7A | 
| Codename | xiaomi-pine | 
| Released | 2019 | 
| Type | handset | 
| Hardware | |
| Chipset | Qualcomm Snapdragon 439 (SDM439) | 
| CPU | 4x1.95GHz 4x1.45GHz Cortex A53 | 
| GPU | Adreno 505 | 
| Display | 720x1440 | 
| Storage | 16 / 32 GB | 
| Memory | 2 / 3 GB | 
| Architecture | aarch64 | 
| Software | |
| Original software The software and version the device was shipped with. | Android (MIUI) 9 (MIUI 10) | 
| Extended version The most recent supported version from the manufacturer. | Android (MIUI) 10 | 
| 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. | Mainline | 
| Generic port | Generic MSM89x7 (qcom-msm89x7) | 
| Device package |  device-qcom-msm89x7 | 
| Kernel package |  linux-postmarketos-qcom-msm89x7 | 
| Flashing Whether it is possible to flash the device with  pmbootstrap flasher. | Works | 
|---|---|
| USB Networking After connecting the device with USB to your PC, you can connect to it via telnet (initramfs) or SSH (booted system). | Works | 
| Internal storage eMMC, SD cards, UFS... | Works | 
| SD card Also includes other external storage cards. | Works | 
| Battery Whether charging and battery level reporting work. | Broken | 
| Screen Whether the display works; ideally with sleep mode and brightness control. | Partial | 
| Touchscreen | Works | 
| Keyboard Whether the built-in physical keyboard works. | Untested | 
| Multimedia | |
| 3D Acceleration | Broken | 
| Audio Audio playback, microphone, headset and buttons. | Broken | 
| Camera | Broken | 
| Connectivity | |
| WiFi | Works | 
| Bluetooth | Works | 
| GPS | Broken | 
| Modem | |
| Calls | Broken | 
| SMS | Broken | 
| Mobile data | Broken | 
| Miscellaneous | |
| FDE Full disk encryption and unlocking with unl0kr. | Works | 
| USB OTG USB On-The-Go or USB-C Role switching. | Works | 
| Sensors | |
| Accelerometer Handles automatic screen rotation in many interfaces. | Works | 
| 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 | 
| Power Sensor Sensor to monitor current, voltage and power. Not fuel gauge! | Untested | 
Contributors
Users owning this device
- Chmod-rwx (Notes: works)
- Hitechshell
- Winbo-yml-exe (Notes: main phone, running lineageos 22.)
How to enter flash mode
- Fastboot: Power on the device with both and buttons.
- Recovery: Power on the device with both and buttons; and while holding , release .
Installation
- Follow the Installation guide and your device wiki page.
| Warning: Flashing lk2nd is required, as it is a hard dependency. Without it the mainline kernel will not select the display panel (resulting in black screen on boot). | 
Prebuilt dtbo images can be found here https://github.com/barni2000/dtbo-lk2nd/releases
$ pmbootstrap init # choose Vendor: qcom Device codename: msm89x7
$ pmbootstrap install
$ fastboot flash dtbo dtbo-xiaomi-pine.img
$ fastboot flash boot lk2nd.img # Build lk2nd from msm8916-mainline/lk2nd repo
$ pmbootstrap flasher flash_rootfs
Working UIs
Rotate screen (Downstream)
create file /etc/X11/xorg.conf.d/00-display-rotate.conf
and put this 
Section "Device" Identifier "LCD" Option "Rotate" "CW" EndSection
also for rotate touchscreen you need to create udev file:
/etc/udev/rules.d/98-touchscreen-cal.rules
ATTRS{name}=="fts_ts", ENV{LIBINPUT_CALIBRATION_MATRIX}="0 1 0 -1 0 1"
See also
- pmaports!4114 Initial merge request
- TWRP for Xiaomi SDM439 Devices
- Lineageos wiki page
- lk2nd