Jump to content

Xiaomi Redmi Note 8 Pro (xiaomi-begonia)

From postmarketOS Wiki
Xiaomi Redmi Note 8 Pro
Redmi Note 8 Pro running Weston
Redmi Note 8 Pro running Weston
Manufacturer Xiaomi
Name Redmi Note 8 Pro
Codename xiaomi-begonia
Released 2019
Type handset
Hardware
Chipset MediaTek Helio G90T (MT6785)
CPU Octa-core (2x2.05 GHz Cortex-A76 & 6x2.0 GHz Cortex-A55)
GPU Mali-G76 MC4
Display 1080 x 2340
Storage 64/128/256 GB
Memory 6/8 GB
Architecture aarch64
Software
Original software Android
Original version 9.0 (MIUI 11)
postmarketOS
Category testing
Pre-built images no
Mainline no
postmarketOS kernel 4.14.218
Unixbench Whet/Dhry score 5577.1
Features
Flashing
Works
USB Networking
Works
Internal storage
No data
SD card
No data
Battery
Broken
Screen
Works
Touchscreen
Works
Multimedia
3D Acceleration
Broken
Audio
Broken
Camera
Broken
Camera Flash
No data
Connectivity
WiFi
Broken
Bluetooth
Broken
GPS
Broken
NFC
No data
Modem
Calls
Broken
SMS
Broken
Mobile data
Broken
Miscellaneous
FDE
Broken
USB OTG
Works
HDMI/DP
No data
Sensors
Accelerometer
Broken
Magnetometer
No data
Ambient Light
No data
Proximity
No data
Hall Effect
No data
Haptics
No data
Barometer
No data


Contributors

Maintainer(s)

Users owning this device


How to enter flash mode

Unlocking the bootloader

Sign up for a Mi Account, register your device in the settings, and wait for a week. More info

Before you go any further

Please read Redmi Note 8 Pro XDA Megathread

Entering recovery

Volume Up + Power

Entering fastboot

Volume Down + Power

Installation

Via fastboot

  • pmbootstrap init
  • pmbootstrap install
  • pmbootstrap flasher flash_rootfs
  • pmbootstrap flasher flash_kernel
  • fastboot reboot

Via zip

  • pmbootstrap init
  • pmbootstrap install --android-recovery-zip
  • pmbootstrap export
  • Transfer the zip to the device
    • adb push /tmp/postmarketOS-export/pmos-xiaomi-begonia.zip /sdcard
  • Flash the zip
  • Reboot

Unbricking

If something went terribly wrong (eg. boot.img doesn't contain valid DTB) your device will hard-brick. Fortunately these days it's pretty easy to unbrick the device.

Requirements (GNU/Linux):

Steps:

  1. Run the exploit
  2. Connect the device via USB and hold Volume Up (+)
  3. When "Protection disabled" message appears, open SP Flash Tool
  4. Select partition images that you want to write and click Download
  5. After green checkmark image appears, restart your phone

Mainline kernel

To boot mainline kernel you need:

  1. Non-CFW based Android boot.img
  2. Non-CFW firmware
  3. osm0sis/mkbootimg
  4. Android kernel (For dtb)
  5. This simple script (Remember to modify it)

Remember to enable pstore console
If you don't get current logs in /proc/last_kmsg, try building the output.img without ramdisk (that will force kernel panic)
You also need to patch drivers/watchdog/mtk_wdt.c to support "mediatek,mt6785-toprgu", otherwise the phone will reboot after a while
The goal is to enable framebuffer or usb, so we can progress with mainlining

Misc

Andoid memory map

$ sudo cat /proc/iomem

Partition table

$ sudo parted
(parted) list

Booting process

More info

1. BROM (Boot ROM)

Boots when power is applied to SoC. Initializes flash storage and starts preloader

2. PL (Preloader)

Initializes basic devices like usb, gpio, timers, etc. If Volume Up (+) is held, PL will hand controll back to BROM wth EDL (Emergency Download Mode).

3. LK (Little Kernel)

Displays logo and verifies some partitions (TODO: which partitions). If it fails to verify partition, it won't continue.
!IMPORTANT! LK WILL USE DTB (Device Tree Blob) FOUND IN BOOT.IMG which means that if DTB is invalid, the device will be hard-bricked

4. Linux

Additional info

See also