Jump to content

Xiaomi Redmi 4 Prime (xiaomi-markw)

From postmarketOS Wiki
Revision as of 05:11, 18 December 2023 by Vipaol (talk | contribs) (fde is not working because of a hack for touchscreen)
Xiaomi Redmi 4 Prime
xiaomi-markw showing phosh about
xiaomi-markw showing phosh about
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
Features
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

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

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

Suspend

The device can't wake up from suspend (but turning display off is working). You can disable it in your UI's settings.

How to enter flash mode

[Power] + [Vol-] to fastboot mode

Installation

Warning WARNING: Installation on the internal memory will erase all your data!

Pre-built images

The device was moved to community recently. It will become visible on the download page after v23.12 is released, but you already can download edge images by the direct link.

  • 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.
- To internal memory
$ fastboot flash userdata [the other img file (biggest)]

Step 2. Flash lk2nd:

Note 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
- To internal memory
$ pmbootstrap install
$ pmbootstrap flasher flash_rootfs

Step 2. Flash lk2nd:

Note 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 middle focaltech, unlocked with aboot patch)
  • Vipaol (Notes: pmOS,Ebbg+Atmel)

Maintainer(s)

Contributors

See also