Xiaomi Redmi 4X (xiaomi-santoni)
![]() xiaomi-santoni running pmOS demos | |
Manufacturer | Xiaomi |
---|---|
Name | Redmi 4x |
Codename | xiaomi-santoni |
Released | 2017 |
Hardware | |
Chipset | Qualcomm MSM8940 Snapdragon 435 |
CPU | Octa-core 1.4 GHz Cortex-A53 |
GPU | Adreno 505 |
Display | 720x1280 |
Storage | 16 GB / 32 GB / 64GB |
Memory | 2 GB / 3 GB / 4 GB |
Architecture | aarch64 |
Software | |
Original software | Android 6.0 (can be upgradable to 7.1) |
postmarketOS | |
Category | testing |
Pre-built images | no |
postmarketOS kernel | 3.18.140 |
Unixbench Whet/Dhry score | 1526.7 |
Flashing |
Works |
---|---|
USB Networking |
Works |
Internal storage |
No data |
SD card |
No data |
Battery |
Works |
Screen |
Works |
Touchscreen |
Works |
Multimedia | |
3D Acceleration |
No data |
Audio |
Works |
Camera |
Broken |
Camera Flash |
No data |
Connectivity | |
WiFi |
Works |
Bluetooth |
Partial |
GPS |
No data |
NFC |
No data |
Modem | |
Calls |
No data |
SMS |
No data |
Mobile data |
No data |
Miscellaneous | |
FDE |
Partial |
USB OTG |
Works |
HDMI/DP |
No data |
Sensors | |
Accelerometer |
No data |
Magnetometer |
No data |
Ambient Light |
No data |
Proximity |
No data |
Hall Effect |
No data |
Haptics |
No data |
Barometer |
No data |
Contributors
- pinoaffe
- asriel-danctnix
- Danct12
Maintainer(s)
- Danct12
Users owning this device
- Alula
- Asriel
- Bczeman
- Cewbdex (Notes: + land device owned)
- Danct12
- Dreadlh (Notes: 2/16 GB Second phone)
- Kisekinopureya (Notes: My test subject)
- Pinoaffe
- Shadowsvanish (Notes: Running postmarketOS (mainline kernel))
- Shipa (Notes: partially Ubuntu Touch maintainer)
- Tau (Notes: CrDroid. Fingerprint reader broken)
- TheBads
- UxAmadeus (Notes: Broken touchscreen)
What works
- Install to SD Card
- Boots
- Flashing
- Touch
- Wayland
- XWayland
- USB Ethernet/Internet
- WiFi
- Vibrator
- Audio
- Xorg
- USB OTG
- charging-sdl
What does not work
- Camera
- GPS
- Mobile Data
- SMS
- Calls
- Accelerometers
- Bluetooth (partially)
- 3D Acceleration (will never happen due to downstream kernel)
- Display Power Management on Wayland
- Full Disk Encryption (does unlock, but failed to look up the partition after booting)
Bugs?
- alsamixer doesn't work, will result in a error telling mixer controls doesn't exist, workaround to control the volume is to use PulseAudio.
Mainline kernel?
Not yet, as MSM8937 isn't in mainline. MSM8940 is similar to MSM8937.
Parts | Components | In Torvalds tree? |
---|---|---|
Chipset | MSM8940 | No |
GPU | Adreno 505 | Yes (a5xx_gpu.c) |
Touch Screen | FT5X06 | Yes (edt-ft5x06.c) |
Fingerprint Sensor | FPC1020/Goodix | No |
Accelerometer + Gyroscope | ICM20607/BMI120 | No/Yes (bmi160_i2c.c) |
ALSPS | STK3X1X | No |
Magnetometer | YAS537 | No |
Sound | AW87319 | No |
Notifications LED | AW2013 | No |
Front Camera | OV5675 | Yes (ov5675.c) |
Back Camera | S5K3L8 | No |
More information on this port
- The upstream msm-3.18 kernel is a fork of https://github.com/bitrvmpd/msm-3.18
- Most of this work was done for my project (Arch Linux on Redmi 4X), and the progress are backported to postmarketOS in order to help development.
Bootloader Unlocking
Like other Xiaomi devices, the user will have to acquire the bootloader unlock key: https://en.miui.com/unlock
The device will not unlock if the device isn't 7 days old (from the time when your device connects to internet and powered on)
Key combinations for entering Recovery/Fastboot
Recovery
- Turn the device off (or restart also works)
- Hold both volume buttons (+ and -) and power button
- Keep holding until you got to recovery.
Fastboot
- Same as recovery, but this time hold the volume down key instead of both keys.
Installation
Installation over fastboot works, Android recovery zip installation is untested.
Bluetooth
Bluetooth on this phone is using the WCNSS chip, which provides two SMD channels to the BT core, one for command and one for event packets. Support for Bluetooth HCI SMD can be added using this patch.
With that patch applied, the Bluetooth interface can be bring up by set /sys/module/hci_smd/parameters/hcismd_set to 1. Then install bluez, start the service and use bluetoothctl to control it.
As right now, it seems to connect, but disconnect very quickly, it doesn't ask for pair code when connecting, so this needs to be investigated.
libhybris
Hybris implementation for this device has been added in !420. test_hwcomposer_7_caf passes, and even hwcomposer driver for X11 works!
You can download Halium image for use here: https://github.com/dreemurrs-embedded/halium-santoni
After downloading the system image, drop it to /var/lib/lxc/android/system.img in the device's rootfs.
As for the HWcomposer implementation for X11, it's not that fast and there are artifacts on the screen, and kwin on this device gives repeating texture.
Photos
-
Weston with msm-3.18 upstream kernel
-
charging-sdl on Xiaomi Redmi 4X
-
YouTube on Redmi 4X