Event-driven asynchronous USB flasher for SMHUB
Project description
SMHUB USB Flasher
A simple, automated tool for flashing and recovering the SMHUB operating system over a direct USB connection.
Whether you are getting a fresh start or recovering a completely unbootable hub, this tool handles the entire process for you automatically.
🖥️ 1. Graphical Interface (GUI)
We offer a standalone graphical flasher for Windows, macOS, and Linux. Please download it from the Releases page. The GUI provides a native, click-to-flash experience without requiring terminal commands or manual environment setups.
Note: The macOS GUI build is currently a work-in-progress and will be released soon!
🛠️ 2. CLI Setup (Cross-Platform)
The Python CLI tool smhub-flasher is fully cross-platform and works natively on Linux, macOS, and Windows. If this is your first time using this tool, you need to install its dependencies. On Linux, you also need to grant your terminal the correct permissions to talk to the raw USB ports.
Install Software
You will need to install fastboot using your system's package manager, and then install the Python flasher using pipx (or pip).
# Ubuntu/Debian
sudo apt-get update
sudo apt-get install fastboot
# Fedora/RHEL
# sudo dnf install android-tools
# macOS
# brew install android-platform-tools
# 2. Install the flasher package
pipx install smhub-flasher
# or
pip install smhub-flasher
Grant USB Permissions
By default, Linux forbids regular user accounts from modifying low-level USB devices for security. Rather than running the flashing tool as sudo (which is dangerous), we can install a permanent "rule" allowing your account safe access.
Simply copy and paste these exact commands into your terminal one-by-one:
# 1. Download the permission rules directly from the repository
sudo curl -Lo /etc/udev/rules.d/99-smhub-flasher.rules https://raw.githubusercontent.com/smlight-tech/smhub-flasher/main/99-smhub-flasher.rules
# 2. Tell Linux to reload these newly installed rules
sudo udevadm control --reload-rules
sudo udevadm trigger
# 3. Add your current user account to the 'dialout' allowed group
sudo usermod -a -G dialout $USER
Important: If you had to run step #3, you must completely log out of your computer and log back in, or restart your computer, for Linux to recognize your new group permissions!
⚡ 3. CLI Usage
Once the setup is complete, you are ready to flash your SMHUB board. The easiest way is to let the tool automatically download the latest official firmware release using the --online flag.
Basic Flashing
Run the flasher tool from your terminal:
# Automatically download and flash the latest stable release (Recommended)
smhub-flasher --online
# Or, if you have your own local firmware directory (containing fip.bin and emmc.img)
smhub-flasher --image-dir /path/to/my/firmware/
# Or explicitly defining specific local files
smhub-flasher --fastboot --fip /path/to/fip.bin --image /path/to/emmc.img
The Flashing Process
Once you hit enter, the tool will sit quietly and wait:
- Press the Reset button on your SMHUB board (or plug it in if it's currently disconnected).
- The terminal will instantly detect it and begin the ROM Handshake.
- You will see the board disconnect and reconnect automatically as it transitions out of hardware-mode into U-Boot. Do not unplug it!
- It will smoothly transition into sending your
emmc.imgpayload. - Once flashing is complete, the board will reboot automatically and it is safe to unplug.
Command Line Options
SMHUB USB Flasher
options:
-h, --help show this help message and exit
--image-dir IMAGE_DIR
Path to directory containing fip.bin and emmc.img
--fip FIP Explicit path to fip.bin
--image IMAGE Explicit path to emmc combined image
--list List available online OS images
--online [ONLINE] Download and flash an online OS image (default: latest)
-v, --verbose increase output verbosity (-v: debug, -vv: packet trace)
--fastboot Flash the device using Fastboot mode
--expert-help Show help for advanced / expert-only options
Advanced & Technical Details
For developers and power users, the flasher contains several advanced capabilities. See the Advanced & Technical Details page for full details on slot-based flashing, bootloader testing, running from source, and deep-dive architectural documentation on the internal state machine.
🔧 Troubleshooting
- Permission Denied / USBError: If it immediately crashes claiming it has no access, your Linux user permissions aren't set correctly. Ensure you followed the First-Time Setup completely and have logged out/in.
- I want to see what is failing: Add the
-vflag to the end of your command for verbose output (including standard Fastboot activity logs). For deeper debugging, use the-vvflag instead, which dumps the raw hexadecimal USB traffic onto the screen so developers can see what the hardware is complaining about at the transport layer.
License
Copyright © 2026 SMLIGHT
This project is licensed under the GNU General Public License v3.0. You are free to use, modify, and distribute this software under the terms of that license.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file smhub_flasher-1.0.1.tar.gz.
File metadata
- Download URL: smhub_flasher-1.0.1.tar.gz
- Upload date:
- Size: 50.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ea5ab17ed3bb2870b62b6d06db49e4e7702135fd54246a9a5bc382325ec4a25b
|
|
| MD5 |
fd8345a0d48960626943d2fc6ca33699
|
|
| BLAKE2b-256 |
adc3f4ee8845c30b1a93a005f0931254a2261789529afdc85b1c0b44c2df692c
|
Provenance
The following attestation bundles were made for smhub_flasher-1.0.1.tar.gz:
Publisher:
publish.yaml on smlight-tech/smhub-flasher
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
smhub_flasher-1.0.1.tar.gz -
Subject digest:
ea5ab17ed3bb2870b62b6d06db49e4e7702135fd54246a9a5bc382325ec4a25b - Sigstore transparency entry: 1591811300
- Sigstore integration time:
-
Permalink:
smlight-tech/smhub-flasher@7b2780704cd65f75c768aada549720f05ac88115 -
Branch / Tag:
refs/tags/v1.0.1 - Owner: https://github.com/smlight-tech
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@7b2780704cd65f75c768aada549720f05ac88115 -
Trigger Event:
release
-
Statement type:
File details
Details for the file smhub_flasher-1.0.1-py3-none-any.whl.
File metadata
- Download URL: smhub_flasher-1.0.1-py3-none-any.whl
- Upload date:
- Size: 53.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
be8102c2841403d5824c5233b1335a97dbb8334751fd921ebccfae7b6147d78b
|
|
| MD5 |
787cc318865ca2d8275554c19f6c3b09
|
|
| BLAKE2b-256 |
2b4b90447f78252780ea16eddcc85c25a38d10701a108565b6488eceae4b6f67
|
Provenance
The following attestation bundles were made for smhub_flasher-1.0.1-py3-none-any.whl:
Publisher:
publish.yaml on smlight-tech/smhub-flasher
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
smhub_flasher-1.0.1-py3-none-any.whl -
Subject digest:
be8102c2841403d5824c5233b1335a97dbb8334751fd921ebccfae7b6147d78b - Sigstore transparency entry: 1591811310
- Sigstore integration time:
-
Permalink:
smlight-tech/smhub-flasher@7b2780704cd65f75c768aada549720f05ac88115 -
Branch / Tag:
refs/tags/v1.0.1 - Owner: https://github.com/smlight-tech
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@7b2780704cd65f75c768aada549720f05ac88115 -
Trigger Event:
release
-
Statement type: