Xiaomi Redmi 4 Prime (xiaomi-markw)
![]() xiaomi-markw showing neofetch | |
Manufacturer | Xiaomi |
---|---|
Name | Redmi 4 Prime |
Codename | xiaomi-markw |
Released | 2016 |
Type | handset |
Hardware | |
Chipset | Qualcomm Snapdragon 625 (MSM8953) |
CPU | Octa-core 2 GHz Cortex-A53 |
GPU | Adreno 506 |
Display | 1080x1920 IPS |
Storage | 32 GB |
Memory | 3 GB |
Architecture | aarch64 |
Software | |
Original software | Android (MIUI) |
Original version | 6.0.1 |
postmarketOS | |
Category | community |
Pre-built images | yes |
postmarketOS kernel | mainline |
Flashing |
Works |
---|---|
USB Networking |
Works |
Internal storage |
No data |
SD card |
No data |
Battery |
Works |
Screen |
Works |
Touchscreen |
Partial |
Multimedia | |
3D Acceleration |
Works |
Audio |
Works |
Camera |
Broken |
Camera Flash |
Broken |
IR TX |
Broken |
Connectivity | |
WiFi |
Works |
Bluetooth |
Works |
GPS |
Broken |
Modem | |
Calls |
Broken |
SMS |
Broken |
Mobile data |
Broken |
Miscellaneous | |
FDE |
Broken |
USB OTG |
Works |
Sensors | |
Accelerometer |
Works |
Magnetometer |
Works |
Ambient Light |
Partial |
Proximity |
Works |
Haptics |
Broken |
This device is based on the Snapdragon 625. See the SoC page for common tips, guides and troubleshooting steps |
Device Notes
Display Panels and Touch Screens
Display | Status | Touch | Status |
---|---|---|---|
Ebbg | Works | atmel,maxtouch | Partial |
Tianma | Works | edt,edt-5336 (edt,edt-ft5x06) | Partial |
A temp solution is applied, touchscreens should work for now: https://gitlab.com/postmarketOS/pmaports/-/merge_requests/4631
Touch screens are unstable due to a conflict of their drivers (initialization on boot may fail, but if it is successful, the driver will work until the device is rebooted). If the touch screen does not work, you can reboot the device several times or reload the driver manually:
$ sudo rmmod atmel_mxt_ts ; sudo modprobe atmel_mxt_ts # if your ts is atmel
$ sudo rmmod edt-ft5x06 ; sudo modprobe edt-ft5x06 # if your ts is focaltech
How to enter flash mode
[Power] + [Vol-] to fastboot mode
Installation
WARNING: Installation on the internal memory will erase all your data! |
Pre-built images
The device was moved to community recently, so can download a pre-built image.
- You need only "<...>-xiaomi-markw-lk2nd.img.xz" and "<...>-xiaomi-markw.img.xz". lk2nd can boot from a file on the "pmOS_boot" subpartition, so you don't need "<...>-xiaomi-markw-boot.img.xz".
Follow the installation article to download image files. Once downloaded, decompress the files with unxz
or any compatible graphical archiver.
Step 1. Flash rootfs:
- - To SD-card
-
- The downloaded rootfs img is a sparse img. You need to convert it to a normal img before flashing it to an SD-card:
$ simg2img <...>-xiaomi-markw.img nonsparse-converted.img
- Then just write it using a tool for writing images.
- The downloaded rootfs img is a sparse img. You need to convert it to a normal img before flashing it to an SD-card:
- - To internal memory
-
$ fastboot flash userdata [the biggest img file]
Step 2. Flash lk2nd:
Note: lk2nd is a hard dependency, without it the mainline kernel will not select the display panel and you'll get a black screen. |
$ fastboot flash boot [the file that ends in -lk2nd.img]
lk2nd is a second stage bootloader that is used for some device-spicific hacks. It can boot from a file on the "pmOS_boot" subpartition, so we don't need to flash a boot.img.
If you see < waiting for any device >
, try running as sudo
and restart your device into fastboot mode again.
Manual build
- Do not use "android recovery zip" method, because it can't install lk2nd and have some other problems.
Step 1. Flash rootfs:
- - To SD-card
-
- Find your SD-card:
lsblk
- Install (change /dev/sdX to your card)
$ pmbootstrap install --sdcard /dev/sdX
- Find your SD-card:
- - To internal memory
-
$ pmbootstrap install $ pmbootstrap flasher flash_rootfs
Step 2. Flash lk2nd:
Note: lk2nd is a hard dependency, without it the mainline kernel will not select the display panel and you'll get a black screen. |
$ pmbootstrap flasher flash_lk2nd
lk2nd boots the kernel from file. Flashing the kernel is not needed
Sensors
Connected to i2c-gpio
Sensor | Model | Status |
---|---|---|
Accelerometer/Gyroscope | bosch,bmi120 (bosch,bmi160) | Works |
Light/Proximity | liteon,ltr559 (liteon,ltr501) | Works |
Magnetometer | yamaha,yas537 (yamaha,yas530) | Works |
Users owning this device
- ApertureUA (Notes:
Atmel with green lightsaber stripe in the middlefocaltech, unlocked with aboot patch) - Vipaol (Notes: pmOS,Ebbg+Atmel)