OpenStick Build Guide · MSM8916
A complete, no-steps-skipped walkthrough for turning a ~$10 HiMI "UFI" MSM8916 4G LTE Wi-Fi dongle into a 64-bit Debian Linux computer - done entirely from a Raspberry Pi over SSH, with a full calibration backup so your IMEI survives.
This rewrites low-level eMMC partitions over Qualcomm EDL. Done carefully it is reversible, but a skipped backup can permanently kill cellular on your stick. The fsg, modemst1/2 and fsc partitions hold your factory IMEI and RF calibration - they are unique to your device and cannot be downloaded from anywhere. Do Step 4 before you flash anything. You do this at your own risk.
HMUF02 V05 and/or zbx002. The SoC itself is marked Qualcomm MSM8916. (The chip marking is the same on every board in this family, so the PCB text is what identifies it.)The Pi gives you a clean Linux host with working adb, fastboot and edl, and sidesteps the Windows Qualcomm 9008 driver headaches entirely. Plug the dongle directly into a USB port, not through an unpowered hub - it draws a fair bit of current at boot.
SSH into your Pi and install the Android platform tools plus bkerler/edl, the Qualcomm EDL/Firehose client. ModemManager on the Pi will grab Qualcomm serial ports and interfere with EDL, so remove it from the Pi.
# platform tools + build/usb deps sudo apt update sudo apt install -y adb fastboot git python3-pip python3-venv libusb-1.0-0 tmux # ModemManager breaks EDL - remove it on the Pi (not the dongle) sudo apt purge -y modemmanager
# clone and install edl in a virtualenv git clone https://github.com/bkerler/edl.git ~/edl cd ~/edl git submodule update --init --recursive python3 -m venv venv source venv/bin/activate pip install -r requirements.txt pip install . # install the udev rules so edl can reach USB without root sudo cp Drivers/*.rules /etc/udev/rules.d/ sudo udevadm control --reload-rules && sudo udevadm trigger
If pip install complains about keystone-engine failing to build, ignore it. Keystone is optional - it is only used for some loader patching, not for the backup or flash. Everything in this guide works without it, and edl will simply print "Keystone library is missing (optional)" and carry on.
Plug the dongle into the Pi and give it ~30 seconds to boot (its Wi-Fi network will appear). The stock firmware exposes ADB. Confirm the Pi sees it:
lsusb | grep -i 05c6 adb devices adb shell getprop | grep -iE "model|board|product|manufacturer"
On a HMUF02-V05 you'll see a Qualcomm device (05c6:9024), one attached ADB device, and properties reporting ro.product.manufacturer: HiMI, ro.product.model: UFI, and ro.board.platform: msm8916. That confirms you're on the right hardware.
The moment the dongle is plugged in, it hands the Pi a usb0 address (e.g. 192.168.100.x) and a default route with no working data behind it - so the Pi loses internet. If ping 1.1.1.1 hangs, delete the dongle's default route. Check first with ip route, then:
sudo ip route del default dev usb0
# make it permanent so it never steals the default route again
CON=$(nmcli -t -f NAME,DEVICE con show --active | grep ':usb0' | cut -d: -f1)
sudo nmcli con mod "$CON" ipv4.never-default yes ipv6.never-default yes
EDL (Emergency Download, USB ID 05c6:9008) is the low-level mode where you back up and flash. On most MSM8916 sticks you can trigger it with adb reboot edl - but not on this firmware.
On this board's stock firmware, adb reboot edl lands in Qualcomm diagnostic mode (05c6:9091), not EDL. The stock bootloader also doesn't understand fastboot oem reboot-edl. EDL is entered by the physical button only.
So do it by hand:
lsusb | grep 9008
Bus 001 Device 0xx: ID 05c6:9008 Qualcomm, Inc. Gobi Wireless Modem (QDL mode) - the stick's LED usually goes dark and its Wi-Fi disappears. That's normal; you're now in EDL.
If you can't find or reach the button, the alternative is shorting the EDL test point to ground while plugging in - but the button is far easier, so try it a few times first.
This is the step you never skip. Run it inside tmux so an SSH drop can't kill a multi-minute dump halfway through.
tmux new -s backup cd ~/edl && source venv/bin/activate mkdir -p ~/stick-backup/critical && cd ~/stick-backup/critical
First, dump the small, irreplaceable partitions one by one (this takes about a minute total):
# IMEI, RF calibration, modem, and the stock boot chain
for p in fsc fsg modemst1 modemst2 persist sec modem \
sbl1 aboot rpm tz hyp boot config; do
edl r $p $p.bin || echo "FAILED: $p"
done
ls -lh
Confirm the files exist and match these sizes before going further. Zero-byte files mean a bad dump - redo them.
| File | Expected size | Holds |
|---|---|---|
fsg.bin | 1.5 MB | RF calibration |
modemst1.bin | 1.5 MB | IMEI / modem state |
modemst2.bin | 1.5 MB | IMEI / modem state |
fsc.bin | 1 KB | Modem filesystem ctrl |
persist.bin | 32 MB | Wi-Fi / BT calibration |
modem.bin | 64 MB | Modem firmware |
sec.bin | 16 KB | Security / fuses |
aboot / sbl1 / rpm / tz / hyp | 0.5–1 MB | Stock boot chain |
boot.bin | 16 MB | Stock Android boot |
Then take a complete 1:1 image of the whole eMMC - the ultimate "undo button" (~3.7 GB, around 12 minutes):
cd ~/stick-backup edl rf full_emmc.bin # verify size and checksum everything stat -c %s full_emmc.bin # ~3909091328 bytes sha256sum critical/*.bin full_emmc.bin > SHA256SUMS
Sector size in XML 4096 does not match disk sector size 512 and Host's payload to target size is too large are expected on this board and don't affect the dump. If a partition read stalls at ~0.05 MB/s, press Ctrl+C, re-enter EDL with the button, and continue - the files already written are fine.
Copy the whole ~/stick-backup folder to another machine (and ideally a second place). If the Pi's SD card dies, so does your only way back to stock.
scp -r pi@<pi-ip>:~/stick-backup .
The cleanest route for this board is the Basistiy/openstick-installer, which has a dedicated HMUF02 profile. It downloads a universal Debian image, injects your calibration partitions into it, and flashes it over EDL. It's pure Python + edl, so it runs fine on the Pi.
The installer also lists UZ801 and HM-MIFIB. Those flash a full eMMC image that rewrites the whole boot chain and partition table. Choosing the wrong board for your stick replaces your board's own bootloader and breaks it. On a HMUF02-V05, select HMUF02 and nothing else.
cd ~ git clone https://github.com/Basistiy/openstick-installer.git cd openstick-installer # hand it the calibration you already dumped mkdir -p calibration cp ~/stick-backup/critical/{modemst1,modemst2,fsg,fsc,persist,sec,modem}.bin calibration/ # run inside tmux; over SSH, call main.py directly (run.sh wants a desktop terminal) tmux new -s flash python3 main.py
Then follow the menu:
n - you already have a verified backup in calibration/, which this step uses. (Answering yes just repeats the ~12-min dump.)edl wf.When the installer names the image it's about to flash, confirm it says HMUF02. If you ever see it about to flash a UZ801 image onto this stick, stop immediately.
After it reboots, the stick comes up as a USB network adapter and hands your Pi an address on its subnet (typically 192.168.5.x). The stick itself is .1:
ssh [email protected] # password: 1
If SSH rejects the password 1, check the address - you may be SSHing into the Pi's own IP (e.g. 192.168.5.242), where no user account exists. The dongle is always the .1 gateway address, not whatever DHCP gave the Pi.
Once in, confirm the port and do basic housekeeping:
cat /proc/device-tree/model # should name the board uname -a passwd # change the default "1" sudo apt update && sudo apt upgrade -y
To bring up cellular (with an active SIM inserted), the calibration you restored means your IMEI is intact:
mmcli -L # list the modem mmcli -m 0 # shows IMEI if calibration is good sudo nmcli con add type gsm ifname '*' con-name lte apn <your-APN> sudo nmcli con up lte ping -c 3 1.1.1.1
USB: ssh [email protected] (or 192.168.68.1), password 1, root via sudo su.
Wi-Fi fallback: SSID Openstick, password openstick, stick at 192.168.4.1. Exact IPs vary slightly by image.
Because you kept a full backup, you can always go back - to stock Android, or to redo the flash. Enter EDL with the button, then either use the installer's 2 · Restore Stock Backup option, or restore partitions directly:
cd ~/edl && source venv/bin/activate cd ~/stick-backup/critical # write back the full image (safest, complete restore) edl wf ~/stick-backup/full_emmc.bin edl reset # - or - just restore calibration if only the modem broke for p in fsg modemst1 modemst2 fsc sec persist; do edl w $p $p.bin done edl reset
As long as full_emmc.bin and the critical/ files are safe on another machine, this dongle is effectively un-brickable over EDL - the button always gets you back to 9008, and EDL writes below Android.
Hold the button before plugging in and keep holding a few seconds after. Try a different USB port, directly on the Pi. If you only ever get 05c6:9091 (diag) or 9024 (normal boot), that's the firmware ignoring software EDL - the button is the only reliable way in on this board.
That means no 9008 device is connected yet - edl is waiting for one. Confirm lsusb | grep 9008 shows the device first; re-do the button trick if it doesn't.
Press Ctrl+C, re-enter EDL, and continue. The individual critical/ partition files are what matter for recovery; a stalled tail on the full image doesn't cost you them.
You're on the wrong IP - that's the Pi answering, not the stick. Use the .1 address of the dongle's subnet. Clear a stale host key with ssh-keygen -R 192.168.5.1 if it complains.
Check mmcli -m 0 - if the IMEI is blank or zeroed, restore modemst1, modemst2 and fsg from your backup (see Step 7). Also make sure the image you flashed was the HMUF02 one, not a mismatched board's.