Hardware: breaking open a stock Shelly Wall Display XL, from the box to a read-unlocked U-Boot
On this page
Status (2026-11-30): working. A real panel's identity, display, storage, exposed Android nodes
and GPT layout are all read and logged. Holding the external top bezel button on power-up drops
straight into Rockchip's RockUSB Loader — no case, no disassembly. Loader's reads over 32 MiB come
back filled with 0xCC; a one-instruction patch to one of U-Boot's two on-flash copies removes
that cap, and the panel was booted on the patched copy, used to archive a byte-exact stock backup,
and restored to stock Copy A (verified byte-for-byte). In follow-up verification below, boot was
flashed with an arm64-v8a Magisk + boot-animation image (read-back verified, leaving the patched
boot installed on the dev unit; undo is rkdeveloptool wl 51200 boot.img from the stock backup);
nothing was written to recovery, super, or userdata.
Device: Shelly Wall Display XL (SAWD-3A1XE10EU2), codename Blake, Rockchip RK3566, stock
Android 11 (Shelly/Blake/Blake:11/RD2A.211001.002/vBlake.7a04f24:user/release-keys). Tools:
rkdeveloptool 1.3 (macOS) and a pyusb + WinUSB RockUSB client (Windows), adb, fastboot,
dtc, llvm-mc, tools/shelly-xl/recon.sh.
Question
What is this panel, under the stock cloud.shelly.stargate launcher — its SoC, RAM, storage,
display, and which Android nodes a kiosk app could use? And is there a RAM-only, unsigned way to
reach code on it before Android boots, the way FEL does on the S1 — reachable without opening the
case, without a cold hardware short, and without any risk of bricking the panel?
How we got here
The box ships with USB debugging already reachable: ro.adb.secure=0 means adbd authorizes any
host key with no on-screen prompt, ro.debuggable=0 and ro.secure=1 otherwise look like a normal
user build, SELinux is Permissive, and ro.boot.verifiedbootstate=orange with
ro.boot.flash.locked=0 says verified boot is present but not enforced, with the bootloader
unlocked. That's the S1's story all over again — a sealed-looking panel that is, underneath,
wide open. The first pass over adb shell (tools/shelly-xl/recon.sh adb) gave the hardware
identity, the display, the mounted partitions, and every exposed /sys and /dev node for free,
with no case opened.
Android-level access answers "what is this panel", but not "can we run our own code before Android
does". The S1's answer to that question was FEL, a mask-ROM USB mode with no authentication, no
button-free trigger, and nothing that touches flash until we tell it to. The Wall Display XL is
Rockchip, not Allwinner, so it doesn't have FEL — but RK3566 has the same shape of thing: a
boot-ROM MaskROM mode beneath everything, and a vendor Loader (RockUSB) stage that a
patched/unlocked U-Boot exposes once it's running. fastboot was the first thing we ruled out as
the way in: it enumerates, but it's stock AOSP fastboot with no partition read-back and no fastboot boot, and fastboot getvar all is known to stall this panel's U-Boot outright (recon.sh's
fastboot recon deliberately queries one variable at a time instead). So the question became how to
reach RockUSB without root and without opening the case.
It turned out there already was a button for it, just not a hidden PCB one: holding the panel's
external top bezel button while plugging in USB-C drops the panel straight into RockUSB Loader
mode (2207:350a), with zero ADB and zero disassembly needed. U-Boot's own embedded devicetree
confirms why — the only hardware key it knows about at all is volumeup-key on the SARADC, and
that's the physical button under the bezel. There's no separate fastboot key; the one key wired up
is the key that reaches Loader.
With cold, repeatable, no-disassembly access to Loader, the obvious next step was to try reading
the whole eMMC the way we read the whole S1 over FEL's upload extension. That's where we hit a
wall: rid/rfi/rci/ppt all answer fine, and reads below 32 MiB return real bytes, but any
read that crosses sector 65536 (32 MiB) comes back as all 0xCC, with status=0 — not an
error, just filler. This isn't a RockUSB protocol limit; it reads like a deliberate anti-dump guard
Shelly's own U-Boot build adds on top of stock RockUSB.
Two ways around a vendor U-Boot guard suggested themselves: drop below U-Boot into MaskROM, which
talks straight to the boot ROM and has no reason to carry the same guard, or find and patch the
guard itself. MaskROM first, since it's the more hardware-agnostic of the two and
rkdeveloptool rd 3 claims to request exactly that — a warm, software-only re-entry into MaskROM,
no case needed. It failed identically on two machines, two different USB stacks (macOS
libusb/rkdeveloptool and Chrome WebUSB, across two different hubs), and a Windows box on a direct
root port with WinUSB — every attempt timed out re-enumerating the device right after the MaskROM
request. That rules out the obvious one-offs (a bad hub, something macOS- or WebUSB-specific) and
points at Shelly's own U-Boot wedging the USB controller when it's asked to reset into MaskROM.
We stopped there: the only remaining way into MaskROM is a cold one — shorting the eMMC clock
line on the PCB during power-on — and that means opening the case and risks exactly the kind of
permanent damage rule 1 exists to avoid, for a dump we don't strictly need, since the bezel button
already gets us a RAM-only entry point.
So, patch the guard. Rather than reversing it from nothing, the SPL — the chip's own first-stage
loader, which runs before U-Boot and so is itself unauthenticated and freely inspectable — gave the
shape of the fix away for free. Its FIT-image loader checks only a SHA-256 hash per sub-image, no
RSA signature, and on a bad magic or a bad hash it doesn't halt: it retries the next copy of
the same image at a fixed offset. uboot.img's 4 MiB turned out to be exactly two 2 MiB FIT images,
Copy A then Copy B, byte-identical in a stock panel. That SPL fallback protects against corrupt
writes, bad FIT magic, and hash mismatches: if Copy A fails its magic or SHA-256 check, the SPL
falls through to the untouched Copy B automatically. (Note: a defective Copy A whose SHA-256 hash
does match will be accepted and executed by the SPL rather than falling back to Copy B, so any
Copy A patch must stay strictly minimal, verified offline against a real dump, and never alter
Loader entry; recovery from a valid-hash hang would require cold PCB MaskROM.) With that
understood, finding the actual 32 MiB guard
was a matter of searching U-Boot's own RockUSB read handler for a comparison against 65536 sectors
right before the real block read — and there it was, one conditional branch, with a sibling write
function nearby carrying no such check at all. One branch flipped from conditional to unconditional,
and one SHA-256 updated to match, is the entire patch: 36 bytes, in Copy A only.
What we tried
-
adb hardware + Android inventory (2026-11-30, verified)
$ tools/shelly-xl/recon.sh adb ro.product.model = Blake ro.product.brand = Shelly ro.board.platform = rk356x ro.build.fingerprint = Shelly/Blake/Blake:11/RD2A.211001.002/vBlake.7a04f24:user/release-keys ro.boot.verifiedbootstate = orange ro.boot.flash.locked = 0 ro.adb.secure = 0 Permissive Linux <redacted-hostname> 4.19.232 #66 SMP PREEMPT Wed Oct 15 09:55:57 Europe 2025 aarch64 Physical size: 1280x800 Physical density: 160Full output in
01-identity.txt/02-getprop.txt/03-cpu-mem-storage.txt. The kernel'suname -aline embeds a hostname containing the panel's Wi-Fi MAC — redacted here and in every file this note quotes from.Hardware: Rockchip RK3566 EVB2 LP4X V10 Board,Serial <redacted>in/proc/cpuinfo— also redacted; never the real value in a commit or PR. Rules out needing a serial console for a basic inventory:adbalone gets the SoC, RAM, storage, display and stock build. -
USB power on a Mac over USB-A→USB-C (2026-11-30, verified). Booting stock Android with the 10.1" backlight on browns out a standard 0.5–1.5 A Mac USB port — the panel resets the moment the screen lights up. A USB-A→USB-C cable on a 5 V/3 A-capable powered USB chain holds steady; with the screen off (Loader/MaskROM), draw is only ~200–400 mA. Rules out a bad cable or a panel fault; it's a current budget problem specific to the backlight turning on.
-
Exposed
/sysand/devnodes over adb (2026-11-30, verified)$ tools/shelly-xl/recon.sh adb # 06-hardware-nodes.txt -rw-rw-rw- 1 system system … /sys/class/strelay/relay1 -rwxrwxrwx 1 system system … /sys/devices/platform/backlight/backlight/backlight/brightness crw-rw-rw- 1 system system 4, 69 … /dev/ttyS5 crw-rw-r-- 1 input system 13, 64 … /dev/input/event0 (… through event5)cat /system/bin/rootcmd.sh(08-init-and-scripts.txt) shows the LED/radar GPIOs the stock image exports at boot and chmods to0666(valuefiles). Rules out needing root for the relay, backlight, input events or exported GPIOvaluefiles — all are world-accessible from a normal app's uid; a later audit ofStargate.apkinsuper.imgalso showed/dev/ttyS5is unused onBlake(used on theJenna/ X2i SKU instead). -
Input device inventory (2026-11-30, verified)
$ adb shell getevent -lp add device 1: /dev/input/event1 name: "jadard-touchscreen" ABS_MT_POSITION_X: max 1280 … add device 2: /dev/input/event5 name: "relay detect" KEY_F11 KEY_F12 add device 4: /dev/input/event3 name: "adc-keys" KEY_F1..KEY_F4 add device 5: /dev/input/event4 name: "gpio_keys" KEY_F5 KEY_F6 add device 6: /dev/input/event0 name: "rk805 pwrkey" KEY_F10Confirms a 10-point capacitive touchscreen at the panel's native
1280×800, and that the external buttons and relay-detect line surface as ordinary function-key input events, not a vendor HAL. -
Fastboot recon, one variable at a time (2026-11-30, verified)
$ tools/shelly-xl/recon.sh fastboot product -> ... partition-size:boot -> ...fastboot getvar allwas not run — it's documented inrecon.shto stall this panel's U-Boot. Rules out stock fastboot as a partition-read path: there's nofastboot bootand no read-back extension here, unlike the S1's patched U-Boot. -
Cold entry into RockUSB Loader via the external bezel button (2026-11-30, verified)
$ tools/shelly-xl/recon.sh usb # held while plugging in USB-C === rkdeveloptool ld === DevNo=1 Vid=0x2207,Pid=0x350a,LocationID=... LoaderConfirmed on both macOS (
rkdeveloptool) and Windows (WinUSB+pyusb). Rules out needing to open the case at all for a RAM-only bootloader session — the one physical step is holding the external button on power-up, the Wall Display XL's equivalent of the S1's FEL button, but with no disassembly required. -
Confirming the button in U-Boot's own devicetree (2026-11-30, read). Extracted the
fdtFIT sub-image fromuboot.img(data-position 0x1e4200,data-size 0x37cd) and ran it throughdtc:adc-keys { compatible = "adc-keys"; io-channel-names = "buttons"; volumeup-key { linux,code = <0x73>; // KEY_VOLUMEUP press-threshold-microvolt = <0x09>; }; };volumeup-keyis the only key node in the whole devicetree — no separate fastboot key, no recovery key. Rules out a second hidden combo: the bezel button we already found is the one key U-Boot can see. -
Reading the low 32 MiB over RockUSB (2026-11-30, verified)
$ tools/shelly-xl/recon.sh rockusb --dump-low === ppt (partition table) === 00 00002000 security 01 00004000 uboot ... 14 00AEB000 userdata $ shasum -a 256 dumps/.../low32m/*.img 28a34c4a697163c52aa64e77bc0bcd44302b6758398b046a52b9bf33dda5e119 uboot.imggpt,security,uboot,trust,misc,dtbo,vbmeta, and the first 7 MiB ofbootall read clean. Gives the full GPT layout (below) with no partition-crossing read attempted yet. -
Finding the 32 MiB read wall (2026-11-30, verified)
$ rkdeveloptool rl 65536 16 probe_over32m.img # LBA 65536 = exactly 32 MiB $ xxd -l 64 probe_over32m.img 00000000: cccc cccc cccc cccc cccc cccc cccc cccc ................ $ rkdeveloptool rl 51200 14336 boot_head_7m.img # boot partition's own start, 7 MiB, < 32 MiB $ xxd -l 16 boot_head_7m.img 00000000: 414e 4452 4f49 4421 08b0 e601 0080 0010 ANDROID!........Any read that starts at or crosses sector 65536 comes back
status=0, filled with0xCC; a read entirely below it returns real bytes (here,boot's ownANDROID!header). Rules out a flaky read or a flash-controller limit — it's a sector-indexed cutoff, exactly 32 MiB, independent of which partition the read starts in. -
Warm MaskROM re-entry — dead end (2026-11-30, verified). From Loader:
$ rkdeveloptool rd 3 && sleep 2 && rkdeveloptool ldOn macOS: both
rkdeveloptool/libusband Chrome WebUSB timed out re-enumerating the device on the first0x0471control chunk, across two different hubs (an Anker VL822 and a GenesysLogic hub). On Windows, on a direct xHCI root port with aWinUSBdriver bound to the device, the OS's ownSET_CONFIGURATIONcall timed out (STATUS_IO_TIMEOUT,0xC00000B5, Device Manager Code 10). Four independent combinations of OS, USB stack and hub all failed the same way right after the MaskROM request, which rules out a hub fault, a macOS quirk, or a WebUSB-specific bug. It points at Shelly's own loader software wedging the USB controller when told to drop to MaskROM. Cold MaskROM (shorting the eMMC clock pin on the PCB at power-on) was not attempted — it needs the case open, and the bezel-button Loader path already gives RAM-only access with none of that risk. -
Locating the SPL's dual-copy fallback and U-Boot's read guard in disassembly (2026-11-30, read). SPL (
idbloader-lba64.img, 241,664 B) disassembled withllvm-mc --triple=aarch64around the FIT image loader:spl+0x323c: add w27, w27, #1 spl+0x3240: cmp w27, #2 spl+0x3244: b.ne #-92 ; loop while w27 ∈ {0,1} — Copy A, then Copy B spl+0x3254: ldr w0, [x28] ; re-read FIT magic from the current copy spl+0x3268: b.eq #16 ; bad magic -> fall through to the next copy spl+0x3370: cbnz w0, #-308 ; hash check failed -> fall through spl+0x338c: cbnz w0, #-336 ; second hash check failed -> fall throughU-Boot's own RockUSB read path (
uboot_bin.bin, theubootFIT sub-image atdata-position 0x1000,data-size 0x135650):ub+0x127d8: cmp x4, #16, lsl #12 ; #16<<12 sectors = 65536 = 32 MiB ub+0x127dc: b.ls #40 ; <= 32 MiB: branch down to the real read call ; (ub+0x12804, blk_dread) — else fall through to 0xCC filland the write path at
ub+0x13e98(blk_dwrite), reached with no comparison at all before it. Confirms the SPL's per-copy SHA-256-only check (noCONFIG_SPL_FIT_SIGNATURE, so no RSA), the non-bricking two-copy fallback, and that the 32 MiB cutoff is exactly one conditional branch, present only on reads. -
Patching Copy A only, offline, with a byte-diff proof before touching the panel (2026-11-30, verified — dry run). Built both images from the same stock
uboot.img:$ python3 make_patch.py uboot data-position = 0x1000 uboot data-size = 0x135650 $ python3 verify.py total differing bytes: 35 run: 0x18c..0x1ab (32 bytes) # FIT hash/value run: 0x137dc..0x137df (4 bytes) # the branch word (1 byte is a no-op: 0x00 in both encodings) === per-image SHA-256 === uboot sha=768c1881... [MATCH] (updated) atf-1 … fdt [MATCH] # every other sub-image untouched and still verifies ALL CHECKS PASSEDConfirms the patch changes exactly two regions totalling 36 bytes (35 of which change value) in Copy A, that every other FIT sub-image (ATF, OP-TEE, the board
fdt) is untouched, and that the recomputed hash matches what the SPL will check. -
Live proof on the panel: patch, cold-boot, dump, restore (2026-11-30, verified). Hashed both copies before touching anything, wrote only Copy A, read both back, cold-booted holding the bezel button, then restored Copy A and read both back again:
live_pre_copyA = live_pre_copyB = 6c8b8134... (stock, identical) $ rkdeveloptool wl 16384 uboot_copyA_patched.img # Copy A only, 2 MiB live_post_copyA = 7de61967... (patched) live_post_copyB = 6c8b8134... (unchanged) # unplug USB-C, hold the external bezel button, replug — cold-boots into the patched Loader $ rkdeveloptool rl 65536 16 probe_65536.bin && xxd -l 16 probe_65536.bin bf14 0071 e806 0054 bf10 0071 8200 0054 # real AArch64 instructions, not 0xCC $ rkdeveloptool rl 133120 16 probe_133120.bin && xxd -l 16 probe_133120.bin 414e 4452 4f49 4421 08b0 e601 0080 0010 # "ANDROID!" at the recovery partition $ rkdeveloptool rl 51200 81920 boot.img # full boot partition, 40 MiB $ sha256sum boot.img -> df705631d4e7adb4dd36386fc35a76a9491563f6a51d8eb12fca2c276f9c9af9 $ rkdeveloptool rl 133120 262144 recovery.img # full recovery partition, 128 MiB $ sha256sum recovery.img -> 7edff6b84ef0831d90a337319e8bcdea717dde08cb81ad237fd6721399e8767c $ rkdeveloptool rl 5072896 2048 baseparameter.img # 1 MiB $ sha256sum baseparameter.img -> b3ea054f37f20610cdb9d914287b24107d28ae0ae6e61a0134f462659506cb67 $ rkdeveloptool wl 16384 uboot_copyA_stock.img # restore Copy A live_restored_copyA = live_restored_copyB = 6c8b8134... (both back to stock, byte-for-byte)Proves the patch works on real hardware (reads past 32 MiB return real data, a full
bootandrecoverywere pulled and hashed), and that it is fully reversible: the panel now holds the identical stockuboot.imgit shipped with, verified by reading it back after the restore, not just by writing the original bytes.
Result
Identity
| Field | Value |
|---|---|
| Model / codename | Shelly Wall Display XL, SAWD-3A1XE10EU2, codename Blake |
| SoC | Rockchip RK3566 (ro.board.platform=rk356x, ro.hardware=rk30board) |
| RAM | 2 GB (MemTotal 2004440 kB) |
| eMMC | Samsung, 32 GB (61079552 sectors × 512 B = 29,824 MB) |
| Display | 10.1", 1280×800, 160 dpi, 10-point capacitive touch (jadard-touchscreen) |
| Stock OS | Android 11, Shelly/Blake/Blake:11/RD2A.211001.002/vBlake.7a04f24:user/release-keys |
| Kernel | 4.19.232 #66 SMP PREEMPT, built Oct 2025 |
| Stock launcher | cloud.shelly.stargate 2.5.0-579773b3 (pre-2.8.4/2.8.5) |
| Security posture | ro.adb.secure=0, getenforce=Permissive, ro.boot.verifiedbootstate=orange, ro.boot.flash.locked=0, ro.boot.dynamic_partitions=true |
| Serial / hostname | Device-unique — redacted; never commit the real values (rule 2) |
Exposed Android nodes
| Node | Perm | What |
|---|---|---|
/sys/class/strelay/relay1 |
0666 |
Latching mains relay (smatek-keep-relay; inverted polarity 0 = on, 1 = off in Stargate.apk, live toggle untested) |
/sys/devices/platform/backlight/.../brightness |
0777 |
PWM backlight (0–255) |
/dev/ttyS5 |
0666 |
Enabled UART, unused by Stargate.apk on Blake (used on Jenna/X2i) |
/dev/input/event0–event5 |
0664 |
rk805 pwrkey (KEY_F10), touchscreen, light sensor (STK3A5x), adc-keys (KEY_F1–F4), gpio_keys (radar KEY_F5/F6), relay-detect (SW input KEY_F11/F12) |
GPIO 147–150 (rootcmd.sh) |
0666 after boot |
Button LEDs (driven 0 at boot, polarity untested) |
GPIO 153 (rootcmd.sh) |
0666 after boot |
Radar/presence sensor enable (driven 1 at boot) |
GPIO 126 (rootcmd.sh) |
0666 after boot |
Template Zigbee reset line (no Zigbee chip/daemon referenced in super.img) |
GPT partition layout (from rkdeveloptool ppt, sizes from each entry's offset to the next)
| # | Name | LBA (hex) | Offset | Size |
|---|---|---|---|---|
| 0 | security |
0x2000 |
4 MiB | 4 MiB |
| 1 | uboot |
0x4000 |
8 MiB | 4 MiB |
| 2 | trust |
0x6000 |
12 MiB | 4 MiB |
| 3 | misc |
0x8000 |
16 MiB | 4 MiB |
| 4 | dtbo |
0xA000 |
20 MiB | 4 MiB |
| 5 | vbmeta |
0xC000 |
24 MiB | 1 MiB |
| 6 | boot |
0xC800 |
25 MiB | 40 MiB |
| 7 | recovery |
0x20800 |
65 MiB | 128 MiB |
| 8 | backup |
0x60800 |
193 MiB | 384 MiB |
| 9 | cache |
0x120800 |
577 MiB | 384 MiB |
| 10 | metadata |
0x1E0800 |
961 MiB | 16 MiB |
| 11 | stback |
0x1E8800 |
977 MiB | 1500 MiB |
| 12 | baseparameter |
0x4D6800 |
2477 MiB | 1 MiB |
| 13 | super |
0x4D7000 |
2478 MiB | 3112 MiB |
| 14 | userdata |
0xAEB000 |
5590 MiB | 24,234 MiB (to the end of the disk) |
The 32 MiB RockUSB read wall sits exactly at LBA 65536, inside the boot partition — boot
itself spans LBA 0xC800–0x20800 (25–65 MiB), so only its first ~7 MiB is reachable without the
patch.
U-Boot / SPL findings
| What | Where | Finding |
|---|---|---|
Dual-copy uboot.img |
LBA 0x4000, 4 MiB |
Two identical 2 MiB FIT images: Copy A (0x000000–0x200000), Copy B (0x200000–0x400000) |
| Per-image integrity | SPL FIT loader | SHA-256 only (hw_fit_calculate_hash); no CONFIG_SPL_FIT_SIGNATURE, no RSA value under /configurations/conf/signature |
| Non-bricking fallback | spl+0x3194–spl+0x338c |
Loop over w27 ∈ {0,1}; bad magic (spl+0x3268) or bad hash (spl+0x3370, spl+0x338c) falls through to the other copy instead of halting |
| 32 MiB read guard | ub+0x127d8–ub+0x127dc |
cmp x4, #16, lsl #12 (65536 sectors); b.ls to the real blk_dread call, else fall through to the 0xCC fill |
| Write path, no guard | ub+0x13e98 |
blk_dwrite, reached with no size comparison |
| The patch | Copy A only, 36 bytes | 0x137dc: 49 01 00 54 (b.ls) → 0a 00 00 14 (b, unconditional); 0x18c: FIT images/uboot/hash/value updated to the new SHA-256 |
| The one physical key | U-Boot's board fdt (FIT data-position 0x1e4200) |
/adc-keys/volumeup-key, linux,code=0x73, press-threshold-microvolt=9 — the external bezel button, and the only hardware key U-Boot knows about |
How to reproduce
All of this is on the panel's raw storage; follow the read-only steps first every time, and never skip straight to the write step.
- Read-only — Android inventory.
tools/shelly-xl/recon.sh adb(andusb,fastboot). Writes nothing on the device; output goes underdumps/(gitignored). - Read-only — enter Loader and inventory RockUSB. Hold the external top bezel button while
plugging in USB-C, then
tools/shelly-xl/recon.sh rockusb. No writes. - Read-only,
< 32 MiB.tools/shelly-xl/recon.sh rockusb --dump-lowdumps the GPT and every partition that starts below 32 MiB, plus the first 7 MiB ofboot, and probes the 32 MiB cutoff. No writes. - Writes storage — the patch, Copy A only, Copy B kept untouched.
- Read and hash both copies of
uboot.imgfirst (rkdeveloptool rl 16384 4096 uboot_copyA_stock.imgfor Copy A,rkdeveloptool rl 20480 4096 uboot_copyB_stock.imgfor Copy B) and keep the stock bytes. - Build the patched Copy A offline (the 36-byte diff above) and diff it against the stock copy
before writing anything, the way
make_patch.py/verify.pydo. - Write only Copy A:
rkdeveloptool wl 16384 uboot_copyA_patched.img. Copy B is never touched — it stays stock for SPL fallback on bad magic or hash mismatch. - Read Copy A back (
rkdeveloptool rl 16384 4096 check_a.img) and confirm it matches the patched bytes; read Copy B back (rkdeveloptool rl 20480 4096 check_b.img) and confirm it still matches the original stock bytes. - Cold-boot (hold the bezel button, replug USB-C) into the now-patched Loader, and read whatever
is needed past 32 MiB (
boot,recovery,baseparameter, and so on). - Undo (Copy A): write the saved stock Copy A bytes back (
rkdeveloptool wl 16384 uboot_copyA_stock.img), then read both copies back again and confirm they match the original stock hash. Only then isubootconsidered restored.
- Read and hash both copies of
- Writes storage (follow-up below) — flashing a patched
boot.img.- While in unlocked Loader, write
boot:rkdeveloptool wl 51200 boot_patched.img, read back all 40 MiB (rkdeveloptool rl 51200 81920 boot_readback.img) and verify SHA-256, then restore stock Copy A (rkdeveloptool wl 16384 uboot_copyA_stock.img) and verify both copies. - Undo (
boot): in unlocked Loader, write the archived stockboot.imgback (rkdeveloptool wl 51200 boot.img), read back all 40 MiB and verify SHA-256 against the stock backup, then restore stock Copy A.
- While in unlocked Loader, write
Nothing in these steps writes recovery, vbmeta, trust, security, misc, dtbo, super, or
userdata. (Kiln's Undo now writes one message to misc for its factory reset: see
Factory reset through misc.)
Open questions
- Fastboot read-only recon, now that we can reach the whole image another way — worth rechecking
whether any fastboot
getvar partition-*or OEM command is actually safe to call in isolation (thegetvar allstall is confirmed; narrower calls are not). - Clarity perf run and live hardware-toggle checks:
generic-android-debug.apkinstalled and launched cleanly at native1280×800on 2026-11-30 (verified; Stargate's floatingGoBackHomeServiceoverlay appeared until Stargate is disabled),relay1read1while off (consistent with Stargate's inverted0 = on,1 = off),6-0040showedpx30-cht8305bound (with no/sys/devices/platform/sht3x-usernode), andSensorManagerexposed activeLight,Proximity, andAccelerometersensors. Still pending: live toggle of/sys/class/strelay/relay1and button LEDs GPIO 147–150,fb0/blank/bl_powerblanking check, and a full Clarity run.
Follow-up live verifications (2026-11-30, verified)
- Hands-free
autoLoader: trueLoader re-entry (@glassworks/rockusb): Flashed Copy A produced bypatchUbootReadLimit(copyA, { autoLoader: true })(flipsub+0x127dcb.ls #40→b #40andub+0x2e40b.ne #52→nop, leaving Copy B untouched stock, sha25635088340f96547da870947c6ed14eb09611b624b609e964fa4c89cdf5d279126), verified Copy A & Copy B by read-back, and ranrkdeveloptool rdwith no button press or cable replug. The panel automatically re-enumerated in unlocked Loader (2207:350a) in < 5 s and readANDROID!atLBA 133120(recovery), then restored stock Copy A byte-for-byte (6c8b8134…). - Live
arm64-v8aMagisk v31.1 boot (@glassworks/bootpatch): Flashed the 40 MiB boot image patched withpatchBoot({ abi: 'arm64-v8a', preinitDevice: 'cache' })(af762d16…91620), verified all 40 MiB by read-back, and rebooted. Android booted cleanly in 12 s (sys.boot_completed=1) withmagiskdrunning as root and/debug_ramdiskmounted. - Live
1280×800Glassworks boot animation bind-mount: Generatedbootanimation.zip(7.3 MiB) viabranding/boot/generate.py --frame shelly-wall-display-xl, packed it witharm64-v8amagisk-busyboxand anoverlay.d/glassworks.rc(on post-fs-datamount -o bind ${MAGISKTMP}/glassworks_bootanimation.zip /odm/media/bootanimation.zip) intoboot.img(38.33 MiBused /1.67 MiBfree), flashed via the hands-freeautoLoadercycle with 40 MiB read-back verify + stock Copy-A restore, and rebooted. Android booted in 13 s withmagisk on /odm/media/bootanimation.ziplive-mounted (7.2M).
Factory reset through misc (2026-12-02, read; untested on a panel)
The problem. Kiln's Undo has two depths. "Keep its settings" gives the screen back to Stargate
over adb, then restores boot and Copy A. "As it came from Shelly" only restored them and told the
person to factory-reset from Shelly's settings. That last step couldn't be reached: the install turns
Stargate and its placeholder off for user 0 (pm disable-user), and Glassworks stays installed as
device owner and HOME, so the stock software started straight into a Glassworks with no root side.
The disabled state lives in /data, which the restore doesn't touch.
What we weighed. (a) Run the keep depth's adb give-back before the factory restore as well: it
needs a running Android, which a panel that won't start doesn't have, and a wipe undoes it anyway.
(b) Have the app wipe the panel as device owner (wipeData): it has no such call, and the app may be
what's broken. (c) Ask the panel's own recovery for the reset the way Android's Settings → Factory
reset does: write the bootloader message (boot-recovery, recovery\n--wipe_data\n) to misc
while Kiln still holds the panel in the Loader. It needs no Android, and nothing of ours runs during
it. We took (c), so the only question was where in misc this panel's U-Boot reads that message.
AOSP puts it at offset 0, while Rockchip's older U-Boot puts it at 16 KiB.
What we read. misc is GPT entry 3, LBA 0x8000, 4 MiB (the table above): under the stock
loader's 32 MiB read wall, and clear of uboot. In the stock loader copy from a Kiln backup
(uboot_a.img, FIT built 2025-10-17, U-Boot image 0 loaded at 0xa00000, 1,267,280 bytes):
$ dumpimage -T flat_dt -p 0 -o u-boot.bin uboot_a.img
$ strings -n 5 u-boot.bin | grep -n "boot mode: recovery (misc)\|android_bcb_write\|Could not read from misc"
boot mode: recovery (misc) # at 0xaf8cfa
Could not read from misc partition # at 0xae7c56 (android_bootloader_message_load)
Following the ADRP/ADD references to both strings (capstone, AArch64):
0xa02d10(rockchip_get_boot_mode) calls0xa28620first and keeps its result as the block offset it adds tomisc's start before reading 2 KiB and comparing the command withboot-recovery(0xa02c4c,0xa02c5c).0xa2a6a8(the BCB loader behindandroid_bcb_write) adds the same helper's result (0xa2a700,add x1, x21, w0, uxtw).- The helper:
a28620: bl 0xa28610 ; ldr x0,[x18]; ldr w0,[x0,#0x88]; lsr w0,w0,#25 -> os_version major a2862c: cmp w0, #9 a28630: cset w0, ls a28634: lsl w0, w0, #5 ; 32 blocks (16 KiB) for Android 9 and older, else 0 - That field (
gd + 0x88) is set at0xa06bd8from the boot image header'sos_version(header offset0x2c) just before0xa02d10runs (0xa06bdc). If the header can't be read, it stays 0 and the helper says 16 KiB.
The stock boot and recovery both say header v2, Android 11.0.0, patch level 2021-10, so this
loader reads the message at offset 0, where Kiln writes it (kiln/packages/kiln-core/src/wipe.ts).
Our patched boot keeps the stock header's os_version (bootpatch's repackBootImage copies the
stock header page and changes only the sizes and the id), and
Undo writes the message only after the stock boot is back, so both cases agree. The check is
scripted, read-only, for the next firmware:
$ python3 -I tools/shelly-xl/bcb-offset.py <backup>/uboot_a.img <backup>/boot.img
boot image: header v2, Android 11.0.0, patch level 2021-10
U-Boot: offset helper at 0xa2862c (16 KiB for Android 9 and older, else 0)
=> this loader reads the BCB at misc + 0 with this boot image (where Kiln writes it)
What it rules out. Writing the message at 16 KiB (the older Rockchip habit) would do nothing on
this firmware. Writing it at both offsets would leave a stale boot-recovery at the one recovery
doesn't clear.
How Kiln does it. First, while Android still runs, it tries the same give-back as "Keep its
settings" over adb: Shelly's launcher back, Glassworks' device admin dropped, the app removed. That
is only a fallback for a reset that doesn't run (wrong offset, a recovery that ignores the message),
so the panel would still come back on Stargate. Kiln goes on whatever comes of it, including no
device picked, so a panel that won't start can still be undone. Then it reads misc with the backup checks, before anything is written, and
refuses unless the first 2 KiB are all zero or already this request. Then it restores boot and
Copy A, writes the message (the rest of misc as it was read), reads all 4 MiB back, and restarts.
Recovery zeroes the message when it's done, so misc ends byte for byte as Kiln found it. A
read-back mismatch puts back what was read. The RockUSB layout lists misc (start and size checked
at connect) and allows writing it (writable).
Untested: a real panel through Undo → "Reset to Shelly factory settings" (named "As it came
from Shelly" when this note was written). To verify it: run it, confirm the
panel starts recovery, wipes and comes back to Stargate's first-run setup, then read misc back
(rkdeveloptool rl 32768 4 misc-head.img) and check its first 2 KiB are zero again. Also still
unread: what the stock recovery wipes beyond /data and /cache (metadata?), and whether it
shows a confirmation screen for a --wipe_data from the message (AOSP's doesn't).