LogbookRabbit R1

Three hours in the wheel: the Rabbit R1's dm-verity loop, and the byte that held it

Log
34 of 39
Date
Reading
3 min read

Friday 27 November, 3:05 pm. First attempt at installing LineageOS on my Rabbit R1. The Mac sees an Android running (“TrebleDroid with GApps”). The screen stays black.

A few attempts later, another screen appears. I’m going to see it a lot.

The R1's screen at boot: a small rabbit runs in a hamster wheel, under the title "dm-verity corruption" and the message "Your device is corrupt. It can't be trusted and may not work properly. Press power button to continue. Or, device will power off in 5s".

Rabbit drew its error screen as a rabbit in a hamster wheel. At the time, I found it less funny than I do today.

The R1 shows this message, waits five seconds and switches off. I rewrote the system. Then rabbit’s official firmware, in full. Then the complete backup made that very morning. Every time: the rabbit, the wheel, five seconds, black.

Inside the machine: a verdict kept outside the system

dm-verity is a guard in the Linux kernel. It checks that every block of the system read from storage matches a fingerprint computed in advance. If a block doesn’t match, the system is declared corrupt.

What I hadn’t understood was where that verdict is written down. Not in the system. On this MediaTek-based R1, it’s kept in a tiny partition called seccfg, at byte 0x10. The bootloader, the small program that runs before everything else, reads it on waking. If it finds a 1, it shows the rabbit, waits five seconds and cuts the power. The kernel doesn’t even start.

Hence the failure of all my attempts: I was repainting the car while the clamp was on the wheel.

None of the usual repairs touch seccfg. A full restore with mtkclient leaves it out, and the official firmware doesn’t write it. The proof came from the bootloader’s own code, disassembled to see which value triggers the alert. The fix confirmed it.

The second trap: a condemned slot

The R1 has two boot slots, A and B, like many recent phones: you update one while the other keeps running. The bootloader counts the attempts until a boot has been declared successful. Beyond a certain number, it condemns the slot. After so many loops, slot A had become unusable. That counter lives in another partition, para.

What the numbers said

# Moment or measure Value
1 First attempt 3:05 pm
2 Delay before power-off 5 seconds
3 Where the verdict lives seccfg partition, byte 0x10
4 Fix applied 6:31 pm
5 LineageOS boots 6:54 pm

What broke, and my part in it

The fix takes a single connection: put seccfg back in its factory state, bootloader still unlocked and byte 0x10 at zero (mtkclient recomputes on the device the fingerprint the chip requires), then rewrite para with slot A allowed again. After that, the clean run took twelve minutes, from 6:42 to 6:54 pm.

How did the flag get raised? I can only reconstruct, without proof. My first attempt started from a rabbitOS update applied halfway, with a security piece (vbmeta) taken from another version. Then I disabled verification on slot B while the R1 was booting from A. The kernel found blocks that matched nothing, and did its job.

The rabbit had nothing to do with it.

Who found it

From 1 pm to 5 pm, I searched with Claude Opus 5.5. Thirty-one steps, each with its own hypothesis, and a growing worry: I was afraid of losing the device. At 5:12 pm, I switched to Claude Fable 5.2 and let it take over. At 6:31 pm, its first flash was the right one.

I will never know what belongs to whom. Opus had already pointed at the guilty byte half an hour before the switch. Fable started from four hours of logged attempts, backups already made and hypotheses already ruled out, and wrote the complete repair in one go. The battle prepared the ground; the change of model finished it.

What’s next

Installing LineageOS cleanly, in a single pass, and noting every trap for the next R1 owner: that’s the next episode.

Lire en français