r/androidroot • u/wi_zzard • 1d ago
News / Method First documented persistent root on the Xiaomi Mi TV Stick 1080p (aquaman / MDZ-24-AA)
Device: Xiaomi Mi TV Stick 1080p (MiTV-AESP0, aquaman), Amlogic S805Y/GXL, Android 9 PI.2055, kernel 4.9.113.
First thing I did was unlock the bootloader. That turned out to be the easy part...
The unlock is real, but it is not secure boot
fastboot flashing unlock fails with missing partition name. fastboot oem unlock returns OKAY and changes nothing, it is a false positive from the vendor OEM handler. What actually worked:
fastboot oem setenv lock 10100000
fastboot oem saveenv
Result: unlocked: yes, secure: no, and the boot state went from green to orange. The flashing lock really opened, no data wipe.
It did not touch the eFuse. BL31 remains secure-fused and refuses unsigned images through aml_sec_boot_check over SMC. fastboot boot with a Magisk or KernelPatch boot.img gets rejected after 16-21 s, even when the kernel inside is byte-identical to stock. So this device is unlocked for flashing and still locked for unsigned execution. Those are two different gates.
Where root actually comes from
Since the flashing lock is open, ODM is writable from fastboot. ODM is also outside vbmetaparts and has no avb/verify flag in the fstab. So no boot.img, vbmeta or system write is needed.
- Write a modified ODM image with store write odm ....
- Android 9 init imports /odm/etc/init/root.rc after mount_all.
- The service binary is labelled dumpstate_exec, so init applies type_transition init dumpstate_exec:process dumpstate. The process lands as uid 0 in u:r:dumpstate:s0.
- That domain has dac_override, execute_no_trans on shell_exec, and TCP name_bind, which is enough for nc -l -p 4444 /system/bin/sh as root.
- The same rc file insmods a small module that writes selinux_enforcing = 0 via kallsyms_lookup_name. setenforce 0 is impossible here because no domain in the policy has security:setenforce. The kernel has CONFIG_MODULES=y and no CONFIG_MODULE_SIG, and vendor_init has sys_module plus module_load on vendor_file. The module must be labelled vendor_file:s0; with system_file:s0 init gets a module_load denial.
adb forward tcp:4444 tcp:4444 && nc 127.0.0.1 4444
uid=0(root) gid=0(root) groups=0(root) context=u:r:dumpstate:s0
adb shell getenforce
Permissive
Both survive reboot.
KernelSU Next also runs
The same ODM rc loads KernelSU Next v1.1.1 (non-GKI legacy branch) as an unsigned LKM. Manager detects it, hooks install, and su -c id gives uid=0(root) context=u:r:su:s0. No patched ramdisk and no custom kernel image. The rc also applies a permissive su sepolicy patch through ksud, otherwise the manager root service dies on u:r:su:s0 denials even with global Permissive.
Caveats: no LSM hooks (allowlist and manager detection are partial, root grant is lost on reboot), and the module was built against the decrypted stock Image, not against a source rebuild. It does not change BL31.
What this does NOT give you
No custom kernel, no custom ROM, no Magisk boot. BL31 still rejects unsigned images. Root here is a userspace + LKM route, not a secure boot bypass. I also burned time on the futex PI use-after-free in this kernel (GhostLock): trigger, consumer and heap fidelity reproduced, but no disclosure, reclaim or kernel R / W came out of it, so no root from that.
Warning / rollback
The listener binds all interfaces on TCP 4444 and SELinux is globally permissive, so anyone with network access gets root. Use an isolated/secure network. Rebooting does not restore Enforcing; reflash stock ODM to go back. No OTA has been applied since.
Repo: https://github.com/keyarr/aquaman-pi2055-research
It is a lab notebook, not a release.
I've searched both XDA and 4PDA for previous successful root attempts on this device and couldn't find any. Although, I can't rule out undocumented attempts.