BasedOS

GKD 350H Ultra: eMMC backup and restore

Take a full backup before anything writes to the eMMC. It is also the only copy of stock: no official stock image has turned up.

Taking the backup

The first backup (2026-11-16) was taken step by step with gkdssh.py dump. backup-emmc.sh packages those same steps but hasn't been run end to end yet. From the repo root on the PC, with the device on Wi-Fi running stock:

export MSYS_NO_PATHCONV=1 GKD_HOST=<device address> GKD_PASS=
sh tools/dev/backup-emmc.sh ../backup/<date>

What the regions hold:

RegionSectorsHolds
loader area0 to 32767 (16 MiB)MBR; idbloader (RKNS) at 64; U-Boot FIT at 16384 (8 MiB)
p1 /flash32768, +6,144,000Image, DTBs, boot.scr, SYSTEM squashfs
p2 /storage6,176,768 to the endsettings, saves, ROMs on the eMMC
boot0/boot14 MiB eachan unused Amlogic BL2 (see recon.md). Read-only in Linux. Never needs restoring.

Known stock builds

These fingerprints identify which stock build a backup holds. They are also the start of the allowlist that the installer's harvest step will check against. They are hashes only, so no vendor files are redistributed.

ROCKNIX 20260613 community dev, build c8ed06c (BUILD_ID=c8ed06c7e9222f739308219f4678010f250100c5, built Jun 13 2026 12:39:53 HKT), as shipped on the first unit backed up (2026-11-16):

File / regionsha256
/flash/Image6fcfbd235c5e921116b7254da77f02c6171b33fe8b174ebac8daa25bd784eab0
/flash/SYSTEM9581f8f9b5d6e5dd49ec709977a71fc3c3b6ed2d34bd88c4ada8e77c39450cb4
/flash/boot.scr13e38342ac0b81881afab51bfac4959f4808215ed42bc9407f7b568379b20713
/flash/rk3576-gkd-atom.dtb602147a55e84a1f0cc81734c6f832b963112c8d546739134f06b88e681e0074a
/flash/rk3576-gkd-atom-hdmi.dtb82ae35d0a84e9c89d7a180bba4f80af28ca6a91a6703ef11513c9b022503dd91
/flash/rk3576-gkd-atom-usbdp.dtbf80108a29f45c2a6eaf934d778311f3396c778178b6662d23eb4dde1159a7c28
idbloader, sectors 64 to 1638398d9db607f271ec60bae40de31a2073c07bef7dfff867ef592fd59aa648a51fd
U-Boot FIT area, sectors 16384 to 32767fc621b41351693392b42efc560c40f7ce4143beddafafc1634aa6d4447a1d77a

Whole-image and partition hashes are specific to each unit (/storage, the resize log, the MBR disk ID), so they aren't listed here.

Recovery card (basedos-setup)

basedos-setup.sh ("Make a recovery SD card", or offered before an install, repair or uninstall) makes a card that restores the built-in storage with no PC, then or later. Tested 2026-11-20 (pre.3): made on the device, booted, the backup checked, and a real restore verified byte for byte against the card's backup and the PC backup (with the earlier hold-A screen). Used again 2026-11-21, with a card made at pre.7 (the tap sequence and the restore that skips the bootloader, below), after BasedOS's boot script hung on the logo: the unit came back as the card had it.

It needs the eMMC's own bootloader to start. The boot ROM only ever starts the bootloader from the eMMC (sectors 64 to 32767): tested 2026-11-20 with those sectors zeroed and a card carrying a copy of them in the slot, the device showed only its power LED, and only maskrom (below) brought it back. So a recovery card fixes everything but the bootloader (the partition table, stock's files, BasedOS, the data partition), and a lost bootloader takes maskrom and a PC, with the card's own .1-bootloader.img and maskrom/ (writing just the bootloader at 0x40 through maskrom was tested 2026-11-20).

Rescue SD card (built and boot-tested 2026-11-16)

The rescue card is stock itself, running from the SD card. It's built on the device from the device's own files, so nothing is downloaded or redistributed. It boots whenever it's in the slot. Remove it to boot the eMMC again.

Why stock can't simply be copied to a card: stock's initramfs (inside Image) mounts /dev/mmcblk0p1 and /dev/mmcblk0p2 by name and runs fsck -y on both. It ignores the device it was booted from. The kernel numbers mmcblk devices by the DT aliases, so mmcblk0 is always the eMMC. Stock's kernel on a card would therefore boot the eMMC's system.

The fix: the card's DTBs swap /aliases/mmc0 and mmc1. The SD slot becomes mmcblk0 and the eMMC becomes mmcblk1, and that changes 2 bytes per DTB. Stock's automount then leaves the eMMC alone, because it skips any disk with boot0 partitions ("might be Android").

How to build it, on stock with a spare card of 12 GB or more in the slot:

W=<scratch dir>
python tools/rescue/mkbootscr-card.py <stock boot.scr> $W/boot.scr
for d in rk3576-gkd-atom rk3576-gkd-atom-hdmi rk3576-gkd-atom-usbdp; do
  python tools/rescue/dtb-swap-mmc.py <stock $d.dtb> $W/$d.dtb; done
gkdssh.py push $W /tmp/rescue-files
gkdssh.py script tools/rescue/make-rescue-card.sh probe          # shows the card's CID
gkdssh.py script tools/rescue/make-rescue-card.sh write <CID>    # erases that card
gkdssh.py push <backup>/mmcblk0.img.zst /run/rescue-card/p2/rescue-backup/mmcblk0.img.zst   # optional
gkdssh.py script tools/rescue/make-rescue-card.sh finish         # unmount and reboot into it
Card regionContents
sectors 64 to 32767the eMMC's own idbloader and U-Boot FIT, copied byte for byte
p1 vfat GKD-RESCUE at 32768 (3 GB)stock Image and SYSTEM; boot.scr loading from mmc 1:1; the swapped DTBs
p2 ext4 GKD-RESCUE-ST to the enda copy of stock /storage (same Wi-Fi, SSH, hostname); rescue-backup/ with the backup and its README

Verified on the device on the first boot from the card:

Not tested yet: booting the card with a damaged eMMC loader, which needs the BootROM to fall back to the SD card.

Restoring

Restore write tested 2026-11-16. From the rescue card, p1 was restored from the card's own compressed backup to the eMMC. The bytes were identical, so the content didn't change.

zstd -dc /storage/rescue-backup/mmcblk0.img.zst |
  dd of=/dev/mmcblk1p1 bs=4M skip=4 count=750 iflag=fullblock conv=fsync

Region offsets in the image, in 4 MiB blocks (bs=4M, always with iflag=fullblock when reading from a pipe):

RegionskipcountWrite to
loader area (16 MiB)04/dev/mmcblk1 (careful: sector 0 is the MBR)
p14750/dev/mmcblk1p1
p2754(rest)/dev/mmcblk1p2
whole disk0(all)/dev/mmcblk1
  1. Restore only what broke. The loader area, p1 and p2 are independent. A broken base OS usually means restoring p1 and p2 and leaving the loader alone.
  2. From the rescue card (or any Linux booted off an SD card). On the rescue card the eMMC is /dev/mmcblk1. Check it anyway: type MMC on 2a330000.mmc. Then:

    ``sh zstd -dc /storage/rescue-backup/mmcblk0.img.zst | dd of=/dev/mmcblk1 bs=4M iflag=fullblock conv=fsync ``

    For one region, use skip/count from the table above. Do a dry run into md5sum first.

  3. USB disk mode (U-Boot ums), see below. With admin rights, a raw disk writer on the PC (Rufus, Win32 Disk Imager, dd) restores the whole image. This needs no special drivers.
  4. Maskrom (see below), with RKDevTool or rkdeveloptool: db <rk3576 loader>, then wl 0 mmcblk0.img. This is the only path that works if the loader at sector 64 is damaged. The RK3568 loaders that ship with RKDevTool don't work on this chip. Use the RK3576 USB loader below.

RK3576 maskrom USB loader

tools/maskrom/mk-usb-loader.py builds the loader that db / RKDevTool's "Download Boot" sends, from Rockchip's rkbin:

mk-usb-loader.py 3576 rkbin/bin/rk35/rk3576_ddr_lp4_2112MHz_lp5_2736MHz_v1.13.bin                       rkbin/bin/rk35/rk3576_usbplug_v1.04.bin rk3576_usb_loader.bin

SPI clips and a CH341A don't help: the board has no SPI flash.

Full restore through maskrom (tested 2026-11-16)

This restores the whole eMMC (MBR, loader, U-Boot, p1, p2) from the PC with nothing on the device working except the boot ROM.

  1. Use the USB-A to USB-C cable. Hold Volume Down and press power. RKDevTool shows "Found One MASKROM Device".
  2. Advanced Function tab: set Boot to the RK3576 USB loader (below), then click Download. The status bar keeps saying MASKROM, because the usbplug reports the same USB ID. If Read Flash Info works, the usbplug is running.
  3. Download Image tab: untick every row, especially Loader. Add one item: Address 0x00000000, Path mmcblk0.img (the raw image). Tick only that row, tick Write by Address, and click Run. RKDevTool accepted this from the maskrom state without a Loader row.
  4. It takes about 10 to 15 minutes for 15.6 GB, then RKDevTool resets the 350H Ultra. Usbplug addresses are absolute: 0x0 is sector 0, with no 0x2000 offset (that offset only applies to U-Boot's rockusb mode).

How it was verified: the rescue card was in the slot when RKDevTool reset the 350H Ultra, so it booted from the card and the eMMC stayed unmounted. Then dd if=/dev/mmcblk1 bs=4M | md5sum gave 7212628781e28398546546f4ed634ae8, the backup's md5. Then stock booted from the eMMC with the card out.

With USB plugged in, powering off turns into a boot. To swap cards, unplug USB, shut down, pull the card, then power on.

Recovery modes (tested 2026-11-16)

Use a USB-A to USB-C cable to the PC. With a C-to-C cable, the 350H Ultra showed "USB mode" but Windows never saw it, because U-Boot doesn't negotiate USB-C roles. To leave any of these modes, long-press power: the 350H Ultra reboots, and the LEDs flash a pattern.

Hold at power-onModeWhat the PC seesTested
Menu + HomeGKD's U-Boot USB mass storage (ums 0 mmc 0:0). The screen says "USB mode, long press power to exit".2207:0010 "Linux UMS disk 0", 15,634,268,160 bytes: the whole eMMC user area. Windows mounts p1 (EMUELEC).Read: all six /flash files matched the c8ed06c fingerprint, at about 32 MB/s. Raw read and write need an administrator. Not written. Came up again 2026-11-21 while the eMMC's boot script hung on the logo (not used: no PC at hand).
Volume DownMaskrom (boot ROM download). Black screen.2207:350E "Rockusb Device". RKDevTool reports "Found One MASKROM Device".Full restore tested. The loader was downloaded to RAM, flash info read (Total Sector 0x1d1f000, the whole eMMC), and the entire 15.6 GB image written from sector 0. Read back from the rescue card, the whole eMMC's md5 matched the backup exactly. Stock then booted.
none, rescue card in the slotthe rescue card (see above)noneBooted, read, restore write.

Notes:

This page is docs/recovery.md in the repository.