WRITE-UP // HARDWARE HACKING · PRIVATE LAB

Rooting a junk Chinese tablet (MT6580)

White label, MediaTek MT6580 SoC, Android 9 Pie dressed up cosmetically as 10, zero official documentation and no working recovery. Found dumped in a bin. This is the full forensic process: recon, dumping the critical partitions, bypassing skip_initramfs in the Little Kernel and deploying Magisk v30.7 with SELinux enforcing.

MT6580 Quad-Core SAR A-only MTKClient BROM Magisk 30.7 SELinux Enforcing
Davito By @davito_03
September 17, 2026 ~10 min read My own lab

01. Disclaimer and legal context

This document describes a hands-on research and lab session on an abandoned, ownerless device recovered from the rubbish. It isn't a guide to bypassing personal account locks, nor a manual for bricking other people's phones. If you're going to experiment with hardware, do it on your own devices.

Risk of a permanent brick
The preloader and MediaTek's partition table don't forgive a half-finished flash or corruption in nvram or proinfo. Before writing a single cell of flash memory, take complete dumps and verify their SHA-256 checksums.

Every tool used is public and open source: adb, fastboot, bkerler's MTKClient and topjohnwu's stable Magisk. No zero-day exploit was needed: just an understanding of Android's boot chain and MediaTek's partition layout.

02. The find: the box

The device is a generic white-label Android tablet with a plastic shell, an 800×1280 panel, 2 GiB of RAM and 32 GB of soldered eMMC storage.

The shell and the system settings showed the trade name OUZRS P8 and claimed it ran Android 10. There was no service manual on the supposed manufacturer's website, no official firmware repository and no earlier TWRP builds under that name.

Lab goal
Turn it into a useful homelab node (for example a telemetry client and home dashboard over WireGuard). Non-negotiable: get full, clean root access while keeping the ability to restore it to factory state if something goes badly wrong.

03. Reconnaissance (read-only mode)

Connected over USB to a Linux workstation with ADB debugging enabled, the first step was to query the system properties with getprop. The strings gave away the marketing trick straight away:

bash ~ adb shell getprop
ro.build.version.release = 10.0      # Puro marketing cosmético
ro.build.version.sdk     = 28        # Android 9 (Pie) real
ro.build.id              = PPR1.180610.011
ro.build.flavor          = full_k80_bsp-user
ro.fota.platform         = MTK6580_9.0
ro.board.platform        = mt6580
ro.treble.enabled        = true
ro.build.system_root_image = true
ro.boot.verifiedbootstate  = green
ro.boot.flash.locked       = 1
sys.oem_unlock_allowed     = 1
getenforce                 = Enforcing

The SDK is 28 (Android 9 Pie) and the FOTA platform admits MTK6580_9.0. The “Android 10” shown in Settings was just a string changed in build.prop. Even the certification fingerprint MLS/iQM960:7.0/NRD90M was cloned from another Greek manufacturer's tablet to fool Play Protect.

SoC & processor

MediaTek MT6580, a 32-bit quad-core ARMv7 Cortex-A7 at 1.3 GHz. Mali-400 MP2 GPU with OpenGL ES 2.0 (no Vulkan). A modern Android 12+ GSI would choke the GPU; Pie is the sensible limit.

Partition layout

A traditional A-only layout (no dynamic super partition), but with system-as-root (SAR) and Treble enabled (a separate /vendor partition with VNDK 28 and HIDL HALs). dm-verity active under AVB 1.1.

Connectivity

3G WCDMA/GSM modem. Widevine L3 DRM (no advanced hardware TEE). Wi-Fi b/g/n and Bluetooth 4.0 built into the MediaTek chip itself.

Display & LCM

There's a dedicated partition called lcm that stores the LCD panel's timings and initialisation parameters. If it gets altered or erased, the screen stays black.

04. The forensic fingerprint: three layers of identity

Searching for firmware or technical information under the trade name “OUZRS P8” got nowhere. Looking at the ro.product.* variables revealed the real rebranding chain:

OUZRS P8 Retail rebrand
➔
Yestel X7_EEA Vendor / shell
➔
incar / incartech6580 OEM / board maker
➔
k80_bsp (E960V2.6) MediaTek BSP

The base BSP is k80_bsp (MediaTek's codename for the MT6580 reference design). With these strings I could cross-check dumps and confirm the existing partition table on specialist forums under “YesTel X7”.

05. Forensic partition backup: dump first

Trying to flash without first backing up nvram, proinfo and preloader is suicide. Those areas hold the factory analogue radio calibration, the hardware identifiers and the MAC addresses. If they get corrupted, the tablet won't be able to register on any network and the bootloader becomes unusable.

Operating strategy
Read with MTKClient through the BROM/Preloader port; write only through Fastboot. MTKClient exploits the handshake vulnerability in the internal boot ROM (BROM), which is ideal for pulling bit-for-bit images without changing anything. For writing, fastboot offers checksum validation and transfer control that copes better with brief disconnections.
Partition eMMC block Size Criticality Purpose
preloader mmcblk0boot0 256 KB IRREPLACEABLE DRAM initialisation and BROM handshake.
nvram / nvdata mmcblk0pX 5 MB / 32 MB IRREPLACEABLE Analogue RF calibration, IMEI and Wi-Fi MAC.
proinfo mmcblk0pX 3 MB CRITICAL Serial numbers and OEM provisioning keys.
lcm mmcblk0pX 1 MB HARDWARE LCD panel initialisation parameters and timings.
boot / recovery mmcblk0pX 16 MB / 16 MB BOOTABLE Compressed Linux 3.18.35 kernel and ramdisks.
vbmeta mmcblk0pX 4 KB VERITY AVB 1.1 cryptographic descriptors and hashtrees.

The exact bit-for-bit extraction command, without touching the data partition:

bash ~ mtkclient dump & checksum
# 1. Apagar tablet por completo
# 2. Conectar USB manteniendo presionado Vol- para activar modo BROM
python3 mtk rl --skip userdata out_backup/

# 3. Generar sumas de verificación criptográfica
sha256sum out_backup/*.bin > out_backup/checksums.sha256
cat out_backup/checksums.sha256 | head -n 4

06. Official bootloader unlock

Fortunately, MediaTek's Little Kernel (lk) kept the standard Fastboot commands. After enabling the OEM unlocking switch in Developer options:

bash ~ fastboot unlock sequence
adb reboot bootloader
fastboot devices
fastboot flashing unlock
# Confirmar pulsando el botón Vol+ en el panel físico de la tablet
fastboot reboot-bootloader

Unlocking the bootloader rewrites the AND_SECCFG security structure in the seccfg partition and performs an automatic factory reset (userdata wipe). The verified boot state went from green to orange.

07. The SAR obstacle and the skip_initramfs patch

On this hardware, injecting Magisk into the recovery partition wasn't viable: the system ships the /system/bin/install-recovery.sh binary, which restores the stock image from /system/recovery-from-boot.p on every cold boot.

On the other hand, patching boot.img directly runs into the configuration injected by the Little Kernel:

Kernel cmdline injection
skip_initramfs ro rootwait init=/init

Because skip_initramfs is present, the Linux kernel completely ignores the ramdisk packed in boot.img and mounts the system partition directly as root /. Magisk lives in a synthetic ramdisk (magiskinit), so with skip_initramfs active, Magisk never runs on a normal boot.

The fix: legacy SAR Magisk (flipping bits in the kernel)
Instead of rebuilding the Little Kernel in assembly, I located the literal string skip_initramfs in the decompressed kernel binary and replaced it with want_initramfs (exactly the same 14 bytes). Since the kernel no longer recognises the directive, it unpacks the ramdisk and hands control to magiskinit.
Hex diff ~ kernel binary patch (offset 0x00F71A47)
# ANTES (Stock Kernel):
00F71A40  72 6F 6F 74 3D 00 00 73 6B 69 70 5F 69 6E 69  |root=..skip_ini|
00F71A50  74 72 61 6D 66 73 00 72 6F 6F 74 77 61 69 74  |tramfs.rootwait|

# DESPUÉS (Patched Kernel):
00F71A40  72 6F 6F 74 3D 00 00 77 61 6E 74 5F 69 6E 69  |root=..want_ini|
00F71A50  74 72 61 6D 66 73 00 72 6F 6F 74 77 61 69 74  |tramfs.rootwait|

On top of that, to stop Android Verified Boot (AVB) from bootlooping when it detects a patched kernel, I changed the byte at offset 0x7b in the vbmeta header from 0x00 to 0x03 (HASHTREE_DISABLED | VERIFICATION_DISABLED).

bash ~ fastboot flash images
fastboot flash vbmeta vbmeta_patched.img
fastboot flash boot   boot_magisk_legacysar.img
fastboot reboot

08. System verification and telemetry

After a cold reboot with the physical power button, the device started normally. From the debug console:

bash ~ adb shell sanity checks
$ adb shell "su -c id"
uid=0(root) gid=0(root) context=u:r:magisk:s0

$ adb shell "su -c getenforce"
Enforcing

$ adb shell "su -c getprop ro.boot.verifiedbootstate"
orange

$ adb shell "su -c magisk -v"
30.7:MAGISK:R

Key audit results:

  • Clean root: Magisk 30.7 fully working in user space.
  • SELinux still secure: the Enforcing policy was kept; it wasn't downgraded to Permissive.
  • Partitions intact: stock recovery, system, vendor, preloader and nvram match their original SHA-256 checksums exactly.

09. A second life: joining the homelab

With root access in place, the tablet's hardware was turned into a permanent low-power telemetry panel for the rack:

  1. User-space WireGuard: since the 3.18 kernel has no native module, I installed the official WireGuard app with the Go backend and connected it as peer 10.66.66.X.
  2. Memory optimisation (ZRAM tuning): ZRAM set up with lz4 compression at 768 MB and swappiness=80 so the OOM killer doesn't close the browser in the background.
  3. Immersive kiosk mode: an init script in /data/adb/service.d/kiosk.sh starts the tablet full screen on the internal monitoring dashboard (Beszel / Uptime Kuma), dimming the brightness automatically at night.

10. Conclusions and golden rules

  • Never flash preloader blindly: it gives you nothing towards root and it's the number one cause of bricks you can't recover in software.
  • Don't trust build.prop on white-label hardware: low-end Chinese manufacturers change surface strings to fake newer Android versions. The SDK API level is what counts.
  • Keep the cryptographic hash of every dump: a backup without SHA-256 verification is a hope, not a guarantee.
  • The legacy SAR route is the most elegant on old SoCs: a binary patch to the kernel cmdline avoids touching the Little Kernel's assembly code.
Next article: WireGuard topology & homelab