Xiaomi Redmi 10 2022 (xiaomi-selene)
Before you start, this device is croocked and it needs some shenanigans in order to work
Manufacturer | Xiaomi |
---|---|
Name | Redmi 10 2022 |
Codename | selene |
Model | 21061119AG |
Released | 2021 |
Type | handset |
Hardware | |
Chipset | MediaTek Helio G88 (MT6769H) |
CPU |
2x 2.0 GHz ARM Cortex-A75 6x 1.8 GHz ARM Cortex-A55 |
GPU | Mali-G52 MC2 |
Display | 1080 x 2400 LCD, 90Hz |
Storage | 64GB / 128GB |
Memory | 4GB / 6GB |
Architecture | aarch64 |
Software | |
Original software | Android |
Original version The version the device was shipped with. |
11 |
postmarketOS | |
Category | testing |
Pre-built images Whether pre-built images are available here. |
no |
Mainline Instead of a Linux kernel fork, it is possible to run (Close to) Mainline. |
no |
pmOS kernel The kernel version that runs on the device's port. |
4.14.186 |
Flashing It is possible to flash the device with pmbootstrap flasher . |
|
---|---|
USB Networking After connecting the device with USB to your PC, you can connect to it via telnet (initramfs) or SSH (booted system). |
|
Internal storage eMMC, SD cards, UFS, ... |
Untested
|
Battery Charging and battery level reporting works |
Untested
|
Screen Display works. Ideally with sleep mode and brightness control. |
Untested
|
Touchscreen |
Untested
|
Multimedia | |
3D Acceleration |
Untested
|
Audio Audio playback, microphone, headset and buttons. |
Untested
|
Camera |
Untested
|
Connectivity | |
WiFi |
Untested
|
Bluetooth |
Untested
|
GPS |
Untested
|
Modem | |
Calls |
Untested
|
SMS |
Untested
|
Mobile data |
Untested
|
Miscellaneous | |
FDE Full disk encryption and unlocking with unl0kr. |
Untested
|
USB OTG USB On-The-Go or USB-C Role switching |
Untested
|
This device is based on the Helio G88. See the SoC page for common tips, guides and troubleshooting steps |
The process
Unlocking the bootloader
Unlock the bootloader using the official method with Mi Unlock Tool https://en.miui.com/unlock
You'll need to link your device with your Mi Account and wait 7 days to unlock the device.
Alternatively, you can also unlock the phone's bootloader using MTKClient.
The Shenanigans
- The original kernel of Selene needs a lot of workarounds to compile using Clang and GCC in pmbootstrap and out of it.
- Even when These errors got fixed and the kernel compiled in pmbootstrap, and everything got built successfully, when flashed the device would go in a bootloop "not even booting the kernel".
- Fukiame's kernel "yuki" compiles fine out of pmbootstrap using KernelBuilder with custom LiliumClang and boots android, even with pmbootstrap configs added. It's automatically packed into a flashable zip using fukiame's modded version of Anykernel3.
- I needed a way to use the compiled "yuki" kernel with pmbootstrap to build pmos and boot it, but there's no way "I know of" to use a custom Clang (LiliumClang as mentioned) in pmbootstrap, So as @Henri suggested I used linux-postmarketos-mediatek-mt6768 as a the kernel in pmbootstrap, and put the dtb in the deviceinfo "in device-xiaomi-selene" as mt6769z-volla-mimameid, now after building everything and doing
pmbootstrap install
I have the rootfs and the kernel, but I needed someway to put the kernel with the initramfs in a boot.img. - After I did a backup of my boot.img, I extracted it using
unpack_bootimg --boot_img /path/to/boot.img --out bootimg > bootimg/info
and swapped the `kernel` with the `Image.gz-dtb` I got from the compiled "yuki" kernel, and swapped the `ramdisk` with `initramfs` I got from doing `pmbootstrap export`, Then I repacked everything into a boot.img using a lengthy command "I got the offsets from the info file we extracted earlier":
mkbootimg --kernel Image.gz-dtb --ramdisk initramfs --cmdline "bootopt=64S3,32N2,64N2 androidboot.init_fatal_reboot_target=recovery buildvariant=userdebug" --base 0x40000000 --kernel_offset 0x00080000 --ramdisk_offset 0x07c80000 --tags_offset 0x0bc80000 --os_version 13.0.0 --dtb dtb --os_patch_level 2023-08 --pagesize 2048 --header_version 2 -o new_boot.img
Now, after flashing the image using
fastboot flash boot new_boot.img
we have a working and booting boot.img that boots to USB networking.
- I didn't test flashing rootfs with
pmbootstrap flasher flash_rootfs
yet but that's for another day
Contributors
- 3ab3z
Users owning this device
- 3ab3z (Notes: Main device)
- Gelzar2041 (Notes: 6/128, Main, Trying to Port)
- TukangM (Notes: 3/64, main phone)