diff --git a/CHANGELOG.md b/CHANGELOG.md
index 0b59c45..2b622ac 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -3,6 +3,49 @@
Each release's notes come from its section here (packaging/release-notes.sh).
Releases before 5.5.0 are listed on the GitHub releases page.
+## 5.7.0
+
+### Fixes that matter for flashing
+
+- **RK3576 and other NEWIDB chips boot after a full `update.img` flash.** The flash reported success, but the board came back in Maskrom: rkdeveloptool's `ul` writes the bootloader in a layout these chips' boot ROM rejects. The app now builds the boot image itself and writes it at sector 0x40. Raw images such as Armbian carry their own bootloader and weren't affected.
+- **A full flash no longer fails on its first step** when you had already answered Yes to "load the Loader now?". A running Loader refuses a second one, and the flash gave up after three tries. It now skips that step; the image's own Loader still goes onto the board.
+- **Multi-step jobs no longer stop halfway with no error.** When one step started the next one right away, the next step's follow-up was lost. This stopped the production line before the reset, and could skip the read-back after a large write.
+- After loading the Loader, the app waits until the board answers before writing. Writing straight away was refused for a second or two.
+- The storage size in the pre-flight check was always "unknown" on a real board. It's now read correctly.
+- In Maskrom, the chip is known from the USB ID before any Loader runs, so **Get Loader for This Chip** works when it's most needed. Older chips (RK3368, RK3399, …) now show their product name instead of an internal number.
+- Change Storage asks first; switching to storage the board doesn't have leaves every read and write failing. Erasing everything is one button with one confirmation.
+
+### New
+
+- **Safer flashing**
+ - Before a full flash or Import GPT overwrites the partition table, the old one is saved as a parameter file. Import GPT restores it.
+ - Before decompressing or unpacking, the app checks that the disk has room, instead of failing part-way through.
+ - A full `update.img` flash can read every partition back and compare it with the image.
+ - When a flash is done, **Reset Board** boots the new system straight away.
+- **History** tab: every flash with its time, chip, image, result and duration. **Flash Again** puts the image back; right-click for details or to delete one.
+- **Production line**: flash the same image onto boards one after another. Plug in a board in Maskrom, and it gets its Loader, the write, an optional read-back and a reset; then plug in the next. It replaces the old mass production, which couldn't work: rkdeveloptool refuses to run with more than one board connected.
+- **For newcomers**
+ - A first-run guide checks the setup (rkdeveloptool, and the USB rule on Linux), sets the language and theme, and shows how a flash goes.
+ - **How do I get into Maskrom?** explains the button, `sudo reboot loader`, boards without a button, and what to check when nothing shows up.
+ - **Search** (⌘K on macOS, Ctrl+K elsewhere, or the button in the status bar) finds any button or setting by its name in either language, or by everyday words like "flash", "backup" or "救砖", then takes you to it and highlights it.
+- **Updates and installing**
+ - The app updates itself on macOS and Linux (DMG, AppImage, deb, rpm): download, check against GitHub's SHA-256, install, restart.
+ - One-line install: `curl -fsSL https://raw.githubusercontent.com/gahingwoo/RKDevelopTool-GUI/main/install.sh | sh`. It picks the right package for the system and checks it the same way.
+ - Homebrew: `brew trust gahingwoo/tap && brew install --cask gahingwoo/tap/rkdeveloptool-gui`.
+ - The DMG shows an Applications folder to drag onto, and how to get past the first-launch warning.
+- **Report a Problem** opens a GitHub issue with the board, the environment and the end of the log filled in. You see and can edit everything before it's sent, and your home folder and user name are left out.
+- A desktop notification when a flash ends while the app is in the background, and progress on the Dock icon.
+
+### Smaller changes
+
+- The Parameters tab's options (verify, erase before writing, reset after writing, timeout, retries) now take effect. Before, nothing read them.
+- Partitions can be erased from their row in the partition table. Sizes read "4.00 MB" instead of `0x2000` sectors.
+- Dialog titles, the `update.img` details and the Yes/No buttons are translated in the Chinese UI.
+- Buttons whose name doesn't say what they do, or what they risk, have tooltips. Status colours suit light and dark themes. Ctrl+1…9 switch tabs.
+- At the default window size, every tab fits beside the left panel again.
+
+**Full Changelog**: https://github.com/gahingwoo/RKDevelopTool-GUI/compare/5.6.1...5.7.0
+
## 5.6.1
### Fixes
diff --git a/README.md b/README.md
index cbc6ab3..f0f0e52 100644
--- a/README.md
+++ b/README.md
@@ -2,251 +2,175 @@
[中文](README.zh.md) | English
-RKDevelopTool GUI is a graphical front-end for Rockchip's rkdeveloptool, for Linux and macOS. It flashes firmware to Rockchip boards, manages their partitions and recovers them from Maskrom, without the command line. The prebuilt packages include rkdeveloptool.
-
-**GitHub:** https://github.com/gahingwoo/RKDevelopTool-GUI
+A graphical front-end for Rockchip's `rkdeveloptool`, for macOS and Linux. It flashes firmware to Rockchip boards, manages their partitions and brings them back from Maskrom, without the command line. The prebuilt packages include rkdeveloptool, so there is nothing else to install.

-## Features
-
-**Flashing**
-- One-click flashing of an `update.img` (RKFW, including images over 4 GiB), a raw disk image, or a compressed `.img.xz`, `.img.gz` or `.img.bz2`, which is decompressed first.
-- A check before every write: device connected, Loader loaded, the right kind of image for the address, and enough storage for it. A failed check stops the write.
-- Progress for the whole write with speed and time left, a Cancel button, and an optional read-back verification afterwards.
-- An `update.img` brings its own Loader. For other images in Maskrom mode, the app offers to load yours and picks the right way to do it.
-- No Loader for your chip? **Get Loader for This Chip** builds one from Rockchip's [rkbin](https://github.com/rockchip-linux/rkbin) repository.
-- A production line for flashing the same image onto many boards, one after another.
-
-**When something goes wrong**
-- Failures come with the likely cause and what to try, instead of an exit code.
-- If the board disconnects mid-write, the app stops and tells you how to recover it.
-
-**Everything else**
-- Drag a firmware, Loader or other file onto the window; it goes to the right field.
-- Partition table: read it, then flash, back up or erase single partitions.
-- A command line for any rkdeveloptool command, with history.
-- A Settings tab: style, theme, language, text size, which rkdeveloptool to use, a default Loader, and where to decompress images.
-- Update check against GitHub releases, and Chinese and English.
-
-| Check before writing | Settings |
-| --- | --- |
-|  |  |
-
----
+## Install
-## Install in one line (macOS and Linux)
+**macOS and Linux, one line:**
```sh
curl -fsSL https://raw.githubusercontent.com/gahingwoo/RKDevelopTool-GUI/main/install.sh | sh
```
-It picks the right package for your system, checks it against the SHA-256
-checksum GitHub publishes, and installs it:
+It picks the package for your system, checks it against the SHA-256 checksum GitHub publishes, and installs it:
-- macOS: the app into `/Applications` (no "cannot be opened" prompt this way).
-- Debian/Ubuntu, Fedora/openSUSE: the `.deb` or `.rpm` through apt, dnf or
- zypper (asks for your password); it includes the udev rule, so the board
- shows up without sudo.
-- Other Linux, or with `PACKAGE=appimage`: the AppImage into `~/.local/bin`
- with a menu entry, no root needed.
+- macOS: the app goes into `/Applications`, and opens without the "cannot be opened" warning.
+- Debian/Ubuntu, Fedora/openSUSE: the `.deb` or `.rpm`, through apt, dnf or zypper (it asks for your password). It includes the USB rule, so the board shows up without sudo.
+- Other Linux, or with `PACKAGE=appimage`: the AppImage in `~/.local/bin` with a menu entry, no root needed.
[Read the script](install.sh) first if you like.
-## Download
+**Homebrew (macOS):**
-Prebuilt packages are attached to every [GitHub Release](https://github.com/gahingwoo/RKDevelopTool-GUI/releases).
-They **bundle `rkdeveloptool`**, so there is nothing else to install.
+```sh
+brew trust gahingwoo/tap
+brew install --cask gahingwoo/tap/rkdeveloptool-gui
+```
+
+Homebrew only loads casks from taps you trust, hence the first line.
+
+**Download:** every [release](https://github.com/gahingwoo/RKDevelopTool-GUI/releases) has these files.
| Platform | File |
| --- | --- |
| macOS (Apple Silicon) | `RKDevelopTool-GUI-arm64.dmg` |
| macOS (Intel) | `RKDevelopTool-GUI-x86_64.dmg` |
-| Linux (portable, x86_64 / arm64) | `RKDevelopTool-GUI-*-x86_64.AppImage` / `*-aarch64.AppImage` |
+| Linux, portable (x86_64 / arm64) | `RKDevelopTool-GUI-*-x86_64.AppImage` / `*-aarch64.AppImage` |
| Debian/Ubuntu (amd64 / arm64) | `rkdeveloptool-gui_*.deb` |
| Fedora/openSUSE (x86_64 / aarch64) | `rkdeveloptool-gui-*.rpm` |
-To update, click "Check for updates" in the bottom-right corner. The app also
-checks by itself at most once a day: one request to the GitHub Releases API,
-and nothing else is sent. You can turn that off in Settings.
+> **macOS, first launch from the DMG:** the app isn't notarized yet, so macOS says it can't be opened. On macOS 15 (Sequoia) and later, open **System Settings → Privacy & Security**, scroll down and click **Open Anyway**. On older versions, right-click the app, then **Open** and **Open** again. This is needed once; the app's own updates don't trigger it. The one-line installer and Homebrew skip this step.
-> **macOS, first launch from the DMG:** the app isn't notarized yet, so macOS
-> says it can't be opened. On macOS 15 (Sequoia) and later, open **System
-> Settings → Privacy & Security**, scroll down and click **Open Anyway**
-> (right-click → Open no longer gets past this). On older versions,
-> right-click the app → **Open** → **Open**. Or run
-> `xattr -cr /Applications/RKDevelopTool-GUI.app`. This is only needed once:
-> the app's own updates don't trigger it.
+**Updates:** the app updates itself. When a new release is out, **Download and Install** in the update dialog fetches it, checks it and restarts. To look now, click the version in the bottom-right corner. The automatic check runs at most once a day, sends one request to GitHub's Releases API and nothing else, and can be turned off in Settings.
-### Linux: USB access
+## What it does
-Without a udev rule only root can open a Rockchip device, and the board won't
-show up. The `.deb` and `.rpm` packages install the rule, so the logged-in user
-has access straight away. With the AppImage or pip, the app notices when the
-board is there but can't be opened, and gives you a one-line command to
-install the rule. You can also install it yourself:
+**Flashing**
+- Flash an `update.img` (RKFW, including images over 4 GiB), a raw disk image, or a compressed `.img.xz`, `.img.gz` or `.img.bz2`, which is decompressed first.
+- Before every write, a check: is a board connected, is a Loader running, does the image suit the address, does it fit in the storage. A failed check stops the write.
+- One progress bar for the whole job, with speed and time left, and a Cancel button.
+- Read the image back afterwards and compare, for single images and for each partition of an `update.img`.
+- The partition table is saved before anything overwrites it, so Import GPT can put it back.
+- In Maskrom the Loader is loaded for you: yours, or one built for your chip from Rockchip's [rkbin](https://github.com/rockchip-linux/rkbin) with **Get Loader for This Chip**.
+- **Reset Board** when it's done, and the new system boots.
+
+**Many boards**
+- The production line flashes the same image onto boards one after another: plug one in, wait for "unplug", plug in the next. Each gets its Loader, the write, an optional read-back and a reset.
+
+**When you're new to this**
+- A first-run guide checks your setup and walks through a flash.
+- **How do I get into Maskrom?** covers the button, boards that already run Linux, boards without a button, and what to check when nothing shows up.
+- **Search** (⌘K on macOS, Ctrl+K elsewhere) finds any button or setting in English or Chinese, or by everyday words like "flash", "backup" or "unbrick", and takes you to it.
+- Errors come with the likely cause and what to try. **Report a Problem** opens a GitHub issue with the details filled in.
-```bash
-echo 'SUBSYSTEM=="usb", ATTR{idVendor}=="2207", TAG+="uaccess"' | sudo tee /etc/udev/rules.d/70-rkdeveloptool-gui.rules
-sudo udevadm control --reload-rules && sudo udevadm trigger
-```
+**Everything else**
+- The **History** tab lists every flash; **Flash Again** puts the image back.
+- Partition table: read it, then flash, back up or erase single partitions.
+- A command line for any rkdeveloptool command, showing the command behind each button.
+- Drag a firmware, Loader or other file onto the window and it goes to the right field.
+- A desktop notification when a flash ends in the background.
+- Light and dark themes, adjustable text size, English and Chinese.
-Then unplug and replug the board.
+| Check before writing | History |
+| --- | --- |
+|  |  |
----
+| Search | Getting into Maskrom |
+| --- | --- |
+|  |  |
-## Install via pip
+## Usage
-Install a standard Python wheel — this adds the `rkdeveloptool-gui` command to
-your `PATH`. Unlike the prebuilt packages above, the wheel does **not** bundle
-`rkdeveloptool`, so install that separately (see [Running from source](#running-from-source)
-for the requirements).
+### Flashing a board
-```bash
-git clone https://github.com/gahingwoo/RKDevelopTool-GUI
-cd RKDevelopTool-GUI
-pip install .
-rkdeveloptool-gui
-```
+1. Put the board into Maskrom mode: with the USB cable in the board's OTG / download port, hold its Maskrom (or Recovery) button while you power it on. The left panel shows "Connected (Maskrom)". If it doesn't, click **How do I get into Maskrom?**.
+2. Drag the firmware onto the window, or choose it on the **Firmware Download** tab. An `update.img`, a raw `.img` or a compressed `.img.xz` all work.
+3. An `update.img` brings its own Loader. For anything else, choose the Loader for your chip, for example `rk3588_spl_loader_*.bin`, or click **Get Loader for This Chip**. The write loads it when it's needed.
+4. Click **Start One-Click Burn** (for an `update.img`) or **Burn Image**. Read the check results and confirm. You can tick "Read back and verify".
+5. When it's done, click **Reset Board**. **Cancel** stops a write, but then the board needs flashing again before it boots.
-Or build a redistributable wheel and install it anywhere:
+### Many boards
-```bash
-pip install build
-python -m build --wheel
-pip install dist/rkdeveloptool_gui-*.whl
-```
+rkdeveloptool works with one connected board at a time, so the production line on the **Advanced Tools** tab takes them one after another. Choose the image, click **Start Line**, then plug in boards in Maskrom one at a time. Unplug each when the line says so. Results are listed per board.
----
+### Partitions
-## Running from source
+1. With the Loader running, click **Read Partition Table**.
+2. On the **Partition Management** tab, flash, back up or erase a partition from its row.
-If you run from source instead of a prebuilt package, you need:
+Before a full flash or **Import GPT** writes a new table, the old one is saved as a parameter file; the log says where. Import GPT restores it.
-- Python 3.9 or later, PySide6 (Qt 6 for Python)
-- `rkdeveloptool` installed and on PATH — verify with `rkdeveloptool --version`
- ([installation instructions](https://docs.radxa.com/en/zero/zero3/low-level-dev/rkdeveloptool))
+### Commands
-### From Source
+The **Command** field above the log shows the rkdeveloptool command behind each button. Type or edit a command there and press Enter, for example `ld`, `rci` or `ppt`. Commands that write or erase ask first.
-```bash
-git clone https://github.com/gahingwoo/RKDevelopTool-GUI
-cd RKDevelopTool-GUI
-pip install -r requirements.txt
-python rkdevtoolgui.py
-```
+### Settings
-### Build Standalone Executable
+The **Settings** tab (Ctrl+, or ⌘,) has the style, theme, language and text size, which rkdeveloptool to use, a default Loader, where to decompress images, notifications, debug logging and updates. It can also reopen the first-run guide.
-```bash
-python build_nuitka.py
-./rkdevtoolgui
-```
+### If something fails
-### Arch Linux
+The app explains the common rkdeveloptool errors: no device found, the device can't be opened, the wrong Loader, a write that failed. Each comes with what to try, and rkdeveloptool's own output is under **Show Details**. **Report This Problem** in the error dialog, or **Report a Problem…** in Settings, opens a GitHub issue with the board, the environment and the end of the log. You see everything before it's sent.
-Available in AUR:
-```bash
-yay -S rkdeveloptool-gui
-```
+## Linux: USB access
+
+Without a udev rule only root can open a Rockchip device, and the board won't show up. The `.deb` and `.rpm` packages install the rule. With the AppImage or pip, the first-run guide and the app both notice and give you a one-line command. To install the rule yourself:
-Or through a community repository:
```bash
-sudo pacman -S rkdeveloptool-gui
+echo 'SUBSYSTEM=="usb", ATTR{idVendor}=="2207", TAG+="uaccess"' | sudo tee /etc/udev/rules.d/70-rkdeveloptool-gui.rules
+sudo udevadm control --reload-rules && sudo udevadm trigger
```
-For the packaging status across more distributions, please refer to [Repology](https://repology.org/project/rkdeveloptool-gui/versions)
-
-Alternatively, you can install it via a [self-hosted package repository](https://github.com/taotieren/aur-repo)
-
----
-
-## Usage
-
-### Flashing a board
-
-1. Put the board into Maskrom mode: hold its Maskrom (or Recovery) button while
- you plug in USB or power it on. The status bar shows "Connected (Maskrom)".
-2. Drag the firmware onto the window, or choose it with **Browse** on the
- **Firmware Download** tab. An `update.img`, a raw `.img` or a compressed
- `.img.xz` all work.
-3. For anything other than an `update.img` (which brings its own Loader),
- choose the Loader for your chip, for example `rk3588_spl_loader_*.bin`, and
- load it when the app asks, or with **Load Loader**. If you don't have one,
- **Get Loader for This Chip** downloads the parts from rkbin and builds it.
-4. Click **Start One-Click Burn**. Review the check results and confirm. For
- a raw or compressed image you can also tick "Read back and verify".
-5. Wait for it to finish. The bar covers the whole flash, and **Cancel**
- stops it, but a cancelled write has to be flashed again before the board
- boots.
-
-### Many boards
+Then unplug and replug the board.
-rkdeveloptool works with one connected board at a time, so the production line
-on the **Advanced Tools** tab takes boards one after another. Choose the image,
-click **Start Line**, then plug in boards in Maskrom mode one at a time. Each
-board gets its Loader (the one on the Firmware Download tab, or one built from
-rkbin), a size check, the write, an optional read-back and a reset. When the
-line says so, unplug it and plug in the next. Results are listed per board.
+## Other ways to install
-### Partitions
+### pip
-1. Load the Loader, then click **Read Partition Table**.
-2. On the **Partition Management** tab, pick a partition and flash, back up or
- erase it.
+The wheel adds the `rkdeveloptool-gui` command. Unlike the packages above it doesn't include `rkdeveloptool`, so install that separately ([instructions](https://docs.radxa.com/en/zero/zero3/low-level-dev/rkdeveloptool)) and check it with `rkdeveloptool --version`.
-### Commands
-
-The **Command** field above the log shows the rkdeveloptool command behind
-each button. You can type or edit a command there and run it with Enter, for
-example `ld`, `rci` or `ppt`. Commands that write or erase ask first.
+```bash
+git clone https://github.com/gahingwoo/RKDevelopTool-GUI
+cd RKDevelopTool-GUI
+pip install .
+rkdeveloptool-gui
+```
-### Settings
+### From source
-The **Settings** tab (Ctrl+, or ⌘,) has the style, theme, language and text
-size, the rkdeveloptool binary to use, a default Loader, where to decompress
-images, debug logging and the update check. The style, theme and language
-pickers are also in the status bar.
+Python 3.9 or later, PySide6, and `rkdeveloptool` on PATH:
-### If something fails
+```bash
+git clone https://github.com/gahingwoo/RKDevelopTool-GUI
+cd RKDevelopTool-GUI
+pip install -r requirements.txt
+python rkdevtoolgui.py
+```
-The app explains the most common rkdeveloptool errors: no device found, the
-device can't be opened, the wrong Loader, a write that failed. Each comes with
-what to try, and rkdeveloptool's own output is under **Show Details**. To
-report a problem, use **Export diagnostics…** in Settings and attach the file
-to an issue.
+To build a standalone app: `python build_nuitka.py`.
----
+### Arch Linux
-## Important Notice
+From the AUR:
-This software is a graphical wrapper around rkdeveloptool. Firmware flashing is inherently risky and may result in device bricking or data loss if not performed correctly.
+```bash
+yay -S rkdeveloptool-gui
+```
-Before using this tool:
-- Ensure you have a backup of important data
-- Use a reliable USB cable and a stable power supply for the board
-- Understand the implications of each operation
-- Consult device-specific documentation if needed
+Or from a community repository: `sudo pacman -S rkdeveloptool-gui`, or the [self-hosted package repository](https://github.com/taotieren/aur-repo). [Repology](https://repology.org/project/rkdeveloptool-gui/versions) lists other distributions.
-The author is not responsible for any device damage, data loss, or other consequences resulting from the use of this software.
+## Important notice
----
+This is a graphical wrapper around rkdeveloptool. Flashing firmware is risky: done wrong, it can leave a board unbootable or lose its data. Before you start, back up what matters, use a good USB cable and a stable power supply, and check that the firmware is for your board.
-## Contributing
+The author is not responsible for damage to devices, lost data or other consequences of using this software.
-Contributions are welcome. Please feel free to submit issues or pull requests.
+## Contributing and support
----
+Issues and pull requests are welcome: [github.com/gahingwoo/RKDevelopTool-GUI/issues](https://github.com/gahingwoo/RKDevelopTool-GUI/issues). The README screenshots are made by `docs/make_screenshots.py`.
## License
-See [LICENSE](LICENSE) file for details.
-
----
-
-## Support
-
-For issues, questions, or feature requests, please visit:
-https://github.com/gahingwoo/RKDevelopTool-GUI/issues
-
-
+See [LICENSE](LICENSE).
diff --git a/README.zh.md b/README.zh.md
index 2a6dc4f..940647c 100644
--- a/README.zh.md
+++ b/README.zh.md
@@ -2,209 +2,175 @@
[English](README.md) | 中文
-RKDevelopTool GUI 是 Rockchip rkdeveloptool 的图形界面,适用于 Linux 和 macOS。不用敲命令,就能给 Rockchip 开发板烧录固件、管理分区,以及从 Maskrom 模式救砖。预编译安装包已经自带 rkdeveloptool。
-
-**GitHub:** https://github.com/gahingwoo/RKDevelopTool-GUI
+Rockchip `rkdeveloptool` 的图形界面,支持 macOS 和 Linux。不用敲命令,就能给 Rockchip 开发板烧录固件、管理分区,以及从 Maskrom 模式救砖。预编译安装包自带 rkdeveloptool,不用另外安装。

-## 功能特性
+## 安装
-**烧录**
-- 一键烧录 `update.img`(RKFW 格式,支持 4 GiB 以上)、原始磁盘镜像,或者 `.img.xz`、`.img.gz`、`.img.bz2` 压缩镜像(会先自动解压)。
-- 每次写入前先检查:设备是否连接、Loader 是否已加载、镜像类型是否适合写到这个地址、存储放不放得下。有一项不通过就不会开始写入。
-- 显示整个烧录的总进度、速度和剩余时间,可以随时取消,写完还可以选择读回校验。
-- `update.img` 自带 Loader;烧录其他镜像时,在 Maskrom 模式下应用会提示加载你的 Loader,并自动选用正确的加载方式。
-- 手上没有对应芯片的 Loader?点「获取本芯片的 Loader」,应用会用 Rockchip 的 [rkbin](https://github.com/rockchip-linux/rkbin) 仓库生成一个。
-- 流水线烧录:把同一个镜像一块接一块地烧到多块板子上。
+**macOS 和 Linux,一行命令:**
-**出问题时**
-- 失败时会说明可能的原因和建议的操作,而不只是一个退出码。
-- 写入过程中设备断开,应用会停下来,并告诉你怎么恢复。
+```sh
+curl -fsSL https://raw.githubusercontent.com/gahingwoo/RKDevelopTool-GUI/main/install.sh | sh
+```
-**其他**
-- 把固件、Loader 等文件直接拖到窗口上,会自动放进对应的输入框。
-- 分区表:读取后可以单独烧录、备份或擦除某个分区。
-- 命令行:可以执行任意 rkdeveloptool 命令,支持历史记录。
-- 设置页:样式、主题、语言、字号、使用哪个 rkdeveloptool、默认 Loader、压缩镜像解压到哪里。
-- 检查 GitHub 上的新版本;支持中文和英文界面。
+它会自动选择适合你系统的安装包,用 GitHub 公布的 SHA-256 校验后再安装:
-| 烧录前检查 | 设置页 |
-| --- | --- |
-|  |  |
+- macOS:应用装到 `/Applications`,打开时不会出现"无法打开"的提示。
+- Debian/Ubuntu、Fedora/openSUSE:通过 apt、dnf 或 zypper 安装 `.deb` 或 `.rpm`(会要求输入密码)。安装包带 USB 规则,不用 sudo 就能识别开发板。
+- 其他 Linux,或者设置了 `PACKAGE=appimage`:AppImage 装到 `~/.local/bin`,并添加菜单项,不需要 root。
----
+想先看看脚本内容,可以[点这里](install.sh)。
-## 一行命令安装(macOS 和 Linux)
+**Homebrew(macOS):**
```sh
-curl -fsSL https://raw.githubusercontent.com/gahingwoo/RKDevelopTool-GUI/main/install.sh | sh
+brew trust gahingwoo/tap
+brew install --cask gahingwoo/tap/rkdeveloptool-gui
```
-它会自动识别系统,下载合适的安装包,用 GitHub 公布的 SHA-256 校验后安装:
-
-- macOS:装到 `/Applications`(用这种方式不会出现「无法打开」的提示)。
-- Debian/Ubuntu、Fedora/openSUSE:通过 apt、dnf 或 zypper 安装 `.deb` / `.rpm`(会要求输入密码),自带 udev 规则,之后不用 sudo 也能找到板子。
-- 其他 Linux,或者设置 `PACKAGE=appimage`:把 AppImage 放到 `~/.local/bin` 并加进应用菜单,不需要 root。
-
-想先看看脚本内容可以[打开 install.sh](install.sh)。
+Homebrew 只加载你信任过的第三方 tap,所以要先执行第一行。
-## 下载
-
-每个 [GitHub Release](https://github.com/gahingwoo/RKDevelopTool-GUI/releases) 都附带预编译包,**已自带 `rkdeveloptool`**,无需另外安装。
+**手动下载:** 每个 [Release](https://github.com/gahingwoo/RKDevelopTool-GUI/releases) 都有这些文件。
| 平台 | 文件 |
| --- | --- |
| macOS(Apple 芯片) | `RKDevelopTool-GUI-arm64.dmg` |
| macOS(Intel) | `RKDevelopTool-GUI-x86_64.dmg` |
-| Linux(便携,x86_64 / arm64) | `RKDevelopTool-GUI-*-x86_64.AppImage` / `*-aarch64.AppImage` |
+| Linux 便携版(x86_64 / arm64) | `RKDevelopTool-GUI-*-x86_64.AppImage` / `*-aarch64.AppImage` |
| Debian/Ubuntu(amd64 / arm64) | `rkdeveloptool-gui_*.deb` |
| Fedora/openSUSE(x86_64 / aarch64) | `rkdeveloptool-gui-*.rpm` |
-点击右下角的「检查更新」即可检查新版本。应用也会自动检查,每天最多一次:只向 GitHub Releases API 发一个请求,不发送任何其他信息。可以在「设置」里关闭。
+> **macOS 从 DMG 第一次打开:** 应用还没有经过公证,macOS 会提示无法打开。macOS 15(Sequoia)及以后:打开**系统设置 → 隐私与安全性**,滚到下面点**仍要打开**。更早的版本:右键点应用 →**打开**→ 再点**打开**。只需要做一次,应用自己的更新不会再触发。用一行命令或 Homebrew 安装就没有这一步。
-> **macOS,用 DMG 第一次打开时:** 应用还没有做公证,macOS 会提示无法打开。macOS 15(Sequoia)及以后:打开**系统设置 → 隐私与安全性**,往下拉,点**仍要打开**(右键 → 打开在新系统上已经不管用了)。更早的版本:右键应用 → **打开** → **打开**。也可以执行 `xattr -cr /Applications/RKDevelopTool-GUI.app`。只需要第一次这样做,之后应用自己的更新不会再触发这个提示。
+**更新:** 应用会自己更新。有新版本时,在更新对话框里点**下载并安装**,它会下载、校验,然后重启。想马上检查,点右下角的版本号。自动检查每天最多一次,只向 GitHub 的 Releases API 发一个请求,不发送任何别的信息,可以在设置里关掉。
-### Linux:USB 访问权限
+## 能做什么
-没有 udev 规则时,只有 root 能访问 Rockchip 设备,板子会显示不出来。`.deb` 和 `.rpm` 安装包会自动装好规则,当前登录的用户直接就能用。用 AppImage 或 pip 时,如果检测到板子已连接但打不开,应用会给出一条安装规则的命令。也可以自己安装:
+**烧录**
+- 烧录 `update.img`(RKFW 格式,支持 4 GiB 以上)、原始磁盘镜像,或者 `.img.xz`、`.img.gz`、`.img.bz2` 压缩镜像(先自动解压)。
+- 每次写入前先检查:板子连上没有、Loader 在不在运行、镜像适不适合写到这个地址、存储放不放得下。有一项不通过就不会开始写。
+- 整个任务一条进度条,显示速度和剩余时间,可以随时取消。
+- 写完可以读回来比对,单个镜像可以,`update.img` 的每个分区也可以。
+- 分区表在被覆盖之前会先备份,用"导入 GPT"就能恢复。
+- Maskrom 模式下自动加载 Loader:用你选的,或者点**获取本芯片的 Loader**,从 Rockchip 的 [rkbin](https://github.com/rockchip-linux/rkbin) 为你的芯片生成一个。
+- 刷完点**重启板子**,新系统就起来了。
+
+**批量烧录**
+- 流水线把同一个镜像一块接一块地烧到多块板子上:接上一块,等提示"拔下",再接下一块。每块都会加载 Loader、写入、可选读回校验,然后重启。
+
+**新手友好**
+- 第一次打开有新手向导:检查环境,再带你走一遍刷机流程。
+- **怎么进 Maskrom?** 讲了按键的方法、已经跑着 Linux 的板子怎么进、没有按键的板子怎么办,以及找不到设备时该检查什么。
+- **搜索**(macOS 上按 ⌘K,其他系统按 Ctrl+K):用中文、英文,或者"刷机""备份""救砖"这样的日常说法,找到任何按钮或设置,直接带你过去。
+- 出错时说明可能的原因和该怎么做。**报告这个问题**会打开一个已经填好信息的 GitHub issue。
-```bash
-echo 'SUBSYSTEM=="usb", ATTR{idVendor}=="2207", TAG+="uaccess"' | sudo tee /etc/udev/rules.d/70-rkdeveloptool-gui.rules
-sudo udevadm control --reload-rules && sudo udevadm trigger
-```
+**其他**
+- **烧录历史**页列出每一次烧录,**再烧一次**会把镜像填回去。
+- 分区表:读取后可以单独烧录、备份或擦除某个分区。
+- 命令行:可以执行任意 rkdeveloptool 命令,也能看到每个按钮背后实际执行的命令。
+- 把固件、Loader 等文件拖到窗口上,会自动放进对应的输入框。
+- 应用在后台时,刷机结束会发系统通知。
+- 浅色和深色主题,可调字号,中文和英文界面。
-然后重新插拔开发板。
+| 烧录前检查 | 烧录历史 |
+| --- | --- |
+|  |  |
----
+| 搜索 | 怎么进 Maskrom |
+| --- | --- |
+|  |  |
-## 通过 pip 安装
+## 使用方法
-构建并安装标准的 Python wheel 包,会把 `rkdeveloptool-gui` 命令加入 `PATH`。
-与上面的预编译包不同,wheel **不**捆绑 `rkdeveloptool`,需要另行安装
-(依赖见[从源码运行](#从源码运行))。
+### 烧录一块板子
-```bash
-git clone https://github.com/gahingwoo/RKDevelopTool-GUI
-cd RKDevelopTool-GUI
-pip install .
-rkdeveloptool-gui
-```
+1. 让板子进入 Maskrom 模式:USB 线接在板子的 OTG / 下载口上,按住 Maskrom(或 Recovery)键再上电。左侧会显示"已连接 (Maskrom)"。没反应的话,点**怎么进 Maskrom?**。
+2. 把固件拖到窗口上,或者在**固件下载**页选择。`update.img`、原始 `.img`、压缩的 `.img.xz` 都可以。
+3. `update.img` 自带 Loader。其他镜像要选对应芯片的 Loader,比如 `rk3588_spl_loader_*.bin`,或者点**获取本芯片的 Loader**。需要的时候,写入流程会自动加载它。
+4. 点**开始一键烧录**(`update.img`)或**烧录镜像**。看一下检查结果,确认。可以勾选"烧录后读回校验"。
+5. 完成后点**重启板子**。**取消**可以中止写入,但中止后要重新烧录,板子才能启动。
-或先构建可分发的 wheel,再随处安装:
+### 多块板子
-```bash
-pip install build
-python -m build --wheel
-pip install dist/rkdeveloptool_gui-*.whl
-```
+rkdeveloptool 同一时间只能操作一块板子,所以**高级工具**页的流水线是一块接一块来的。选好镜像,点**开始流水线**,然后一次接一块处于 Maskrom 的板子,提示拔下时拔掉。每块板子的结果会单独列出。
----
+### 分区
-## 从源码运行
+1. Loader 运行起来以后,点**读取分区表**。
+2. 在**分区管理**页,从分区所在的那一行烧录、备份或擦除它。
-若选择从源码运行(而非预编译包),需要:
+全量烧录或**导入 GPT** 写入新分区表之前,旧的会先存成一个 parameter 文件,日志里会写明位置。用导入 GPT 导入它就能恢复。
-- Python 3.9+、PySide6 (Qt 6 Python 绑定)
-- 已安装并配置到 PATH 的 `rkdeveloptool` —— 用 `rkdeveloptool --version` 验证
- ([安装说明](https://docs.radxa.com/zero/zero3/low-level-dev/rkdeveloptool))
+### 命令行
-### 从源码运行
+日志上方的**命令**输入框会显示每个按钮背后的 rkdeveloptool 命令。也可以在这里输入或修改命令,回车执行,比如 `ld`、`rci`、`ppt`。会写入或擦除的命令会先确认。
-```bash
-git clone https://github.com/gahingwoo/RKDevelopTool-GUI
-cd RKDevelopTool-GUI
-pip install -r requirements.txt
-python rkdevtoolgui.py
-```
+### 设置
-### 构建独立可执行文件
+**设置**页(Ctrl+, 或 ⌘,)可以改样式、主题、语言和字号,选用哪个 rkdeveloptool、默认 Loader、压缩镜像解压到哪里,还有通知、调试日志和更新。也可以在这里重新打开新手向导。
-```bash
-python build_nuitka.py
-./rkdevtoolgui
-```
+### 出了问题
-### Arch Linux
+常见的 rkdeveloptool 错误,应用都会解释:找不到设备、设备打不开、Loader 不对、写入失败等等,并告诉你该试什么。rkdeveloptool 的原始输出在**显示详情**里。错误框里的**报告这个问题**,或者设置里的**报告问题…**,会打开一个 GitHub issue,带上板子、运行环境和日志末尾。发出去之前你能看到全部内容。
-在 AUR 中可用:
-```bash
-yay -S rkdeveloptool-gui
-```
+## Linux:USB 权限
+
+没有 udev 规则时,只有 root 能打开 Rockchip 设备,板子就显示不出来。`.deb` 和 `.rpm` 安装包会装好规则。用 AppImage 或 pip 安装时,新手向导和应用都会发现这个问题,并给出一行修复命令。也可以自己装:
-或通过社区仓库:
```bash
-sudo pacman -S rkdeveloptool-gui
+echo 'SUBSYSTEM=="usb", ATTR{idVendor}=="2207", TAG+="uaccess"' | sudo tee /etc/udev/rules.d/70-rkdeveloptool-gui.rules
+sudo udevadm control --reload-rules && sudo udevadm trigger
```
-更多发行版的打包状态请查看 [Repology](https://repology.org/project/rkdeveloptool-gui/versions)。
-
-另外也可通过 [自建源仓库](https://github.com/taotieren/aur-repo) 安装。
+然后把板子拔下来重新插上。
----
-
-## 使用方法
+## 其他安装方式
-### 烧录开发板
+### pip
-1. 让板子进入 Maskrom 模式:按住板子上的 Maskrom(或 Recovery)键,再插上 USB 或上电。状态栏会显示「已连接 (Maskrom)」。
-2. 把固件拖到窗口上,或者在「固件下载」页点「浏览」选择。`update.img`、原始 `.img` 和压缩的 `.img.xz` 都可以。
-3. 如果烧录的不是 `update.img`(它自带 Loader),请选择和芯片对应的 Loader,例如 `rk3588_spl_loader_*.bin`,在应用提示时加载,或者点「加载 Loader」。手上没有的话,点「获取本芯片的 Loader」,应用会从 rkbin 下载组件并生成。
-4. 点「开始一键烧录」,看一下检查结果后确认。烧录原始镜像或压缩镜像时,还可以勾选「烧录后读回校验」。
-5. 等待完成。进度条显示的是整个烧录的总进度;点「取消」可以中止,但被中止的写入需要重新烧录,板子才能正常启动。
+wheel 会添加 `rkdeveloptool-gui` 命令。它和上面的安装包不同,不带 `rkdeveloptool`,需要另外安装([安装说明](https://docs.radxa.com/en/zero/zero3/low-level-dev/rkdeveloptool)),装好后用 `rkdeveloptool --version` 确认。
-### 多块板子
-
-rkdeveloptool 一次只能操作一块已连接的板子,所以「高级工具」页的流水线是一块接一块地烧。选好镜像,点「开始流水线」,然后把处于 Maskrom 模式的板子一块一块接上。每块板会依次加载 Loader(用「固件下载」页里填的,或者从 rkbin 生成)、检查容量、写入,可选回读校验,最后重启。界面提示后拔下这块,再接下一块。每块板的结果都会列出来。
-
-### 分区
+```bash
+git clone https://github.com/gahingwoo/RKDevelopTool-GUI
+cd RKDevelopTool-GUI
+pip install .
+rkdeveloptool-gui
+```
-1. 先加载 Loader,再点「读取分区表」。
-2. 在「分区管理」页选择分区,进行烧录、备份或擦除。
+### 从源码运行
-### 命令行
+需要 Python 3.9 或更高版本、PySide6,以及在 PATH 里的 `rkdeveloptool`:
-日志上方的「命令」栏会显示每个按钮背后实际执行的 rkdeveloptool 命令。你也可以在这里输入或修改命令,按回车执行,例如 `ld`、`rci`、`ppt`。会写入或擦除设备的命令,执行前会先确认。
+```bash
+git clone https://github.com/gahingwoo/RKDevelopTool-GUI
+cd RKDevelopTool-GUI
+pip install -r requirements.txt
+python rkdevtoolgui.py
+```
-### 设置
+打包成独立应用:`python build_nuitka.py`。
-「设置」页(Ctrl+, 或 ⌘,)里有样式、主题、语言和字号,使用哪个 rkdeveloptool,默认 Loader,压缩镜像解压到哪里,调试日志和检查更新。样式、主题和语言在状态栏里也能直接切换。
+### Arch Linux
-### 出错时
+AUR:
-对于最常见的 rkdeveloptool 错误(找不到设备、设备打不开、Loader 不对、写入失败等),应用会说明可能的原因和建议的操作,rkdeveloptool 的原始输出在「显示详细信息」里。反馈问题时,可以在「设置」里点「导出诊断信息…」,把导出的文件附到 issue 上。
+```bash
+yay -S rkdeveloptool-gui
+```
----
+也可以用社区仓库 `sudo pacman -S rkdeveloptool-gui`,或者[自建软件源](https://github.com/taotieren/aur-repo)。其他发行版的打包情况见 [Repology](https://repology.org/project/rkdeveloptool-gui/versions)。
## 重要提示
-本软件是 rkdeveloptool 的图形化界面封装。固件烧录是一项风险操作,如果操作不当可能导致设备损坏或数据丢失。
-
-使用本工具前,请:
-- 确保已备份重要数据
-- 使用可靠的 USB 线,并保证开发板供电稳定
-- 了解每项操作的含义
-- 必要时查阅设备相关文档
-
-作者不对因使用本软件而导致的设备损坏、数据丢失或其他后果承担责任。
-
----
+本软件是 rkdeveloptool 的图形界面。刷机有风险,操作不当可能导致板子无法启动或丢失数据。开始之前,请备份重要数据,使用质量好的 USB 线和稳定的电源,并确认固件和你的板子型号匹配。
-## 贡献
+作者不对使用本软件造成的设备损坏、数据丢失或其他后果负责。
-欢迎贡献代码。请提交 issue 或 pull request。
+## 参与和反馈
----
+欢迎提交 issue 和 pull request:[github.com/gahingwoo/RKDevelopTool-GUI/issues](https://github.com/gahingwoo/RKDevelopTool-GUI/issues)。README 里的截图由 `docs/make_screenshots.py` 生成。
## 许可证
-详见 [LICENSE](LICENSE) 文件。
-
----
-
-## 技术支持
-
-如有问题、疑问或功能建议,请访问:
-https://github.com/gahingwoo/RKDevelopTool-GUI/issues
-
-
+见 [LICENSE](LICENSE)。
diff --git a/docs/images/history_en.png b/docs/images/history_en.png
new file mode 100644
index 0000000..5267f32
Binary files /dev/null and b/docs/images/history_en.png differ
diff --git a/docs/images/history_zh.png b/docs/images/history_zh.png
new file mode 100644
index 0000000..871436e
Binary files /dev/null and b/docs/images/history_zh.png differ
diff --git a/docs/images/home_en.png b/docs/images/home_en.png
index d5e9ee3..42ac798 100644
Binary files a/docs/images/home_en.png and b/docs/images/home_en.png differ
diff --git a/docs/images/home_zh.png b/docs/images/home_zh.png
index f2c3576..3d4e48d 100644
Binary files a/docs/images/home_zh.png and b/docs/images/home_zh.png differ
diff --git a/docs/images/maskrom_en.png b/docs/images/maskrom_en.png
new file mode 100644
index 0000000..85f95e4
Binary files /dev/null and b/docs/images/maskrom_en.png differ
diff --git a/docs/images/maskrom_zh.png b/docs/images/maskrom_zh.png
new file mode 100644
index 0000000..e8645a0
Binary files /dev/null and b/docs/images/maskrom_zh.png differ
diff --git a/docs/images/preflight_en.png b/docs/images/preflight_en.png
index d1beb18..706af69 100644
Binary files a/docs/images/preflight_en.png and b/docs/images/preflight_en.png differ
diff --git a/docs/images/preflight_zh.png b/docs/images/preflight_zh.png
index acc9022..33c4510 100644
Binary files a/docs/images/preflight_zh.png and b/docs/images/preflight_zh.png differ
diff --git a/docs/images/search_en.png b/docs/images/search_en.png
new file mode 100644
index 0000000..1b51900
Binary files /dev/null and b/docs/images/search_en.png differ
diff --git a/docs/images/search_zh.png b/docs/images/search_zh.png
new file mode 100644
index 0000000..c2b50c7
Binary files /dev/null and b/docs/images/search_zh.png differ
diff --git a/docs/images/settings_en.png b/docs/images/settings_en.png
deleted file mode 100644
index f449522..0000000
Binary files a/docs/images/settings_en.png and /dev/null differ
diff --git a/docs/images/settings_zh.png b/docs/images/settings_zh.png
deleted file mode 100644
index 5da9762..0000000
Binary files a/docs/images/settings_zh.png and /dev/null differ
diff --git a/docs/make_screenshots.py b/docs/make_screenshots.py
new file mode 100644
index 0000000..768ca6a
--- /dev/null
+++ b/docs/make_screenshots.py
@@ -0,0 +1,218 @@
+"""
+Render the README screenshots into docs/images, in English and Chinese.
+
+ pip install . # the app as it will ship
+ python docs/make_screenshots.py
+
+Run it on macOS for the native look. The windows are drawn off screen
+(opacity 0), nothing talks to a board (rkdeveloptool is a stub), and the
+settings and history live in a temporary folder. The board, image and
+numbers are staged: an ArmSoM CM5 (RK3576) in Maskrom, as tested.
+"""
+import os
+import stat
+import sys
+import tempfile
+import time
+
+_tmp = tempfile.mkdtemp(prefix="rkgui-shots-")
+_stub = os.path.join(_tmp, "rkdeveloptool")
+with open(_stub, "w") as f:
+ f.write('#!/bin/sh\necho "rkdeveloptool ver 1.32"\nexit 0\n')
+os.chmod(_stub, os.stat(_stub).st_mode | stat.S_IXUSR)
+os.environ["RKDEVELOPTOOL_BIN"] = _stub
+os.environ["RKDEVELOPTOOL_GUI_SETTINGS"] = os.path.join(_tmp, "settings.ini")
+os.environ["RKDEVELOPTOOL_GUI_NO_WIZARD"] = "1"
+os.environ["RKDEVELOPTOOL_GUI_UPDATE_URL"] = "file://" + os.path.join(_tmp, "none.json")
+
+from PySide6.QtCore import QPoint # noqa: E402
+from PySide6.QtGui import QPainter, QPixmap # noqa: E402
+from PySide6.QtWidgets import QApplication, QMessageBox # noqa: E402
+
+app = QApplication(sys.argv)
+
+from rkdeveloptool_gui import history # noqa: E402
+from rkdeveloptool_gui import operations as ops # noqa: E402
+from rkdeveloptool_gui import settings as app_settings # noqa: E402
+from rkdeveloptool_gui.maskrom_help import show_maskrom_help # noqa: E402
+from rkdeveloptool_gui.progress import format_eta, format_speed # noqa: E402
+from rkdeveloptool_gui.rkdevtoolgui import RKDevToolGUI, TranslationManager # noqa: E402
+from rkdeveloptool_gui.settings import AppSettings # noqa: E402
+
+OUT = os.path.join(os.path.dirname(os.path.abspath(__file__)), "images")
+DEVICE = "DevNo=1\tVid=0x2207,Pid=0x350e,LocationID=101\tMaskrom"
+IMAGE = "~/Downloads/armsom-cm5-rk3576-debian12-server.img.xz"
+RAW = "~/Downloads/armsom-cm5-rk3576-debian12-server.img"
+LOADER = "~/Downloads/rk3576_spl_loader_v1.09.107.bin"
+CAPACITY = 61079552 * 512 # the CM5's eMMC, from rfi
+
+
+def settle(ms=300):
+ end = time.time() + ms / 1000
+ while time.time() < end:
+ app.processEvents()
+ time.sleep(0.01)
+
+
+def save(pixmap, name, lang):
+ path = os.path.join(OUT, f"{name}_{lang}.png")
+ pixmap.save(path)
+ print("wrote", path)
+
+
+def make_window(lang):
+ settings = AppSettings()
+ settings.set(app_settings.KEY_THEME, "dark")
+ settings.set(app_settings.KEY_STYLE, "macOS")
+ settings.set(app_settings.KEY_LANGUAGE, lang)
+ window = RKDevToolGUI(TranslationManager(lang=lang, settings=settings), settings=settings)
+ window.stop_device_detection()
+ window.setWindowOpacity(0.0)
+ window.show()
+ settle()
+ # As narrow as the layout allows, so nothing is cut off on the right.
+ window.resize(max(1300, window.minimumSizeHint().width()), 1000)
+ settle()
+ # Connected in Maskrom with the Loader running; no "load it now?" prompt.
+ window.maskrom_device_shown_hint = True
+ real_exec = QMessageBox.exec
+ QMessageBox.exec = lambda self: QMessageBox.StandardButton.No
+ try:
+ window.on_device_found([DEVICE], "Maskrom", "RK3576")
+ finally:
+ QMessageBox.exec = real_exec
+ window.loader_loaded = True
+ settle()
+ return window
+
+
+def home(window, lang):
+ """Writing a decompressed image: overall progress, speed, time left."""
+ tr = window.tr
+ window.tab_widget.setCurrentWidget(window.download_tab)
+ window.image_path.setText(IMAGE)
+ window.loader_path.setText(LOADER)
+ window.equiv_command_field.setText(f"rkdeveloptool wl 0x0 {RAW}")
+ window.log_widget.clear_log()
+ for line in (f"[OK] {tr('decompress_done').format(RAW)}",
+ f"[OK] {tr('loader_loaded_success')}",
+ "Write LBA from file (46%)"):
+ window.log_message(line)
+ stage = tr("stage_writing").format("armsom-cm5-rk3576-debian12-server.img")
+ window.progress_bar.setValue(46)
+ window.progress_label.setText(" · ".join(
+ (f"{stage} 46%", format_speed(21.4e6), format_eta(tr, 71))))
+ settle()
+ save(window.grab(), "home", lang)
+
+
+def idle(window):
+ """No write in progress: an empty log and a ready progress row."""
+ window.log_widget.clear_log()
+ window.equiv_command_field.clear()
+ window.progress_bar.setValue(0)
+ window.progress_label.setText(window.tr("ready_status"))
+
+
+def preflight(window, lang):
+ """The burn confirmation with its checks."""
+ raw = os.path.join(_tmp, "armsom-cm5-rk3576-debian12-server.img")
+ with open(raw, "wb") as f:
+ f.write(b"\0" * 510 + b"\x55\xaa")
+ f.truncate(2_684_354_560) # sparse, 2.5 GB
+ checks = ops.preflight_checks(window, raw, "0x0", CAPACITY)
+ shots = []
+ real_exec = QMessageBox.exec
+
+ def grab(box):
+ settle(100)
+ shots.append(box.grab())
+ return QMessageBox.StandardButton.No
+
+ QMessageBox.exec = grab
+ try:
+ ops._show_burn_confirm(window, os.path.basename(raw), 2_684_354_560, "2.50 GB",
+ "3f9a1c0e5b7d42a8c6e1f0b9d2a7c4e5", "0x0",
+ window.change_storage_combo.currentText(),
+ ops.get_storage_info(window, window.change_storage_combo.currentData()),
+ checks, True)
+ finally:
+ QMessageBox.exec = real_exec
+ save(shots[0], "preflight", lang)
+
+
+def history_tab(window, lang):
+ """Past flashes, newest first."""
+ history.clear()
+ entries = (
+ ("/Users/demo/Downloads/armsom-cm5-rk3576-debian12-xfce.img", history.OK, "update.img", "", 254, ""),
+ ("/Users/demo/Downloads/armsom-cm5-rk3576-debian12-server.img.xz", history.FAILED, "image", "0x0", 41, ""),
+ ("/Users/demo/Downloads/armsom-cm5-rk3576-debian12-server.img.xz", history.OK, "image", "0x0", 183,
+ window.tr("history_verified")),
+ )
+ for image, result, kind, address, seconds, note in reversed(entries):
+ history.add(image, result, kind=kind, address=address, chip="RK3576",
+ loader="/Users/demo/Downloads/rk3576_spl_loader_v1.09.107.bin",
+ seconds=seconds, note=note)
+ # Spread the times out: newest a few minutes ago, the others before it.
+ now = time.time()
+ entries = history.load()
+ for entry, minutes_ago in zip(entries, (6, 19, 27)):
+ entry["time"] = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime(now - minutes_ago * 60))
+ history._save(entries)
+ window.refresh_history()
+ idle(window)
+ window.tab_widget.setCurrentWidget(window.history_tab)
+ settle()
+ save(window.grab(), "history", lang)
+
+
+def search(window, lang):
+ """Ctrl/Cmd+K: the search window with what matches "backup"."""
+ idle(window)
+ window.tab_widget.setCurrentIndex(0)
+ palette = window.search_palette
+ palette.open()
+ palette.setWindowOpacity(0.0)
+ palette.field.setText("备份" if lang == "zh" else "backup")
+ settle()
+ shot = window.grab()
+ painter = QPainter(shot)
+ corner = palette.mapToGlobal(QPoint(0, 0)) - window.mapToGlobal(QPoint(0, 0))
+ painter.drawPixmap(corner, palette.grab())
+ painter.end()
+ palette.hide()
+ save(crop_top(shot), "search", lang)
+
+
+def crop_top(shot):
+ """The top of the window, where the search window opens."""
+ ratio = shot.devicePixelRatio()
+ piece = shot.copy(0, 0, shot.width(), int(560 * ratio))
+ piece.setDevicePixelRatio(ratio)
+ return piece
+
+
+def maskrom(window, lang):
+ dialog = show_maskrom_help(window)
+ dialog.setWindowOpacity(0.0)
+ settle()
+ save(dialog.grab(), "maskrom", lang)
+ dialog.close()
+
+
+def main():
+ os.makedirs(OUT, exist_ok=True)
+ for lang in ("en", "zh"):
+ window = make_window(lang)
+ for shot in (home, preflight, history_tab, search, maskrom):
+ shot(window, lang)
+ settle()
+ window.cleanup()
+ window.deleteLater()
+ settle()
+ history.clear()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/packaging/io.github.gahingwoo.rkdeveloptool_gui.appdata.xml b/packaging/io.github.gahingwoo.rkdeveloptool_gui.appdata.xml
index 821b545..5c20de0 100644
--- a/packaging/io.github.gahingwoo.rkdeveloptool_gui.appdata.xml
+++ b/packaging/io.github.gahingwoo.rkdeveloptool_gui.appdata.xml
@@ -52,8 +52,12 @@
https://raw.githubusercontent.com/gahingwoo/RKDevelopTool-GUI/main/docs/images/preflight_en.png
- Settings
- https://raw.githubusercontent.com/gahingwoo/RKDevelopTool-GUI/main/docs/images/settings_en.png
+ Every flash in the History tab
+ https://raw.githubusercontent.com/gahingwoo/RKDevelopTool-GUI/main/docs/images/history_en.png
+
+
+ Search for any button or setting
+ https://raw.githubusercontent.com/gahingwoo/RKDevelopTool-GUI/main/docs/images/search_en.png
diff --git a/rkdeveloptool-gui/__init__.py b/rkdeveloptool-gui/__init__.py
index 1e5de26..a309140 100644
--- a/rkdeveloptool-gui/__init__.py
+++ b/rkdeveloptool-gui/__init__.py
@@ -3,4 +3,4 @@
# The single source of the version: pyproject.toml reads it from here, the
# update check compares against it, and the release workflow checks that the
# pushed tag matches it.
-__version__ = "5.6.1"
+__version__ = "5.7.0"