Flashing Debian (OpenStick Base)
The Debian OpenStick image (spearheaded by handsomehacker and the community) is the most popular distribution for MSM8916 dongles. It provides a full Debian system with apt package management, USB gadget networking, Wi-Fi hotspot support, and automatic modem initialization.
Prerequisites
Section titled “Prerequisites”- A verified MSM8916 modem with eMMC flash (e.g. UFI001B, UFI003, Uz801).
- Host computer with
fastbootandadbinstalled. - Verified backup of your
modemst1,modemst2, andfsgpartitions (see Backup Guide). - The latest OpenStick release package (
base.zipanddebian.zip).
Step 1: Boot into Fastboot Mode
Section titled “Step 1: Boot into Fastboot Mode”Connect your dongle to your computer:
# Check if ADB detects the deviceadb devices
# Reboot into Fastboot modeadb reboot bootloaderIf your device is unresponsive or bricked, enter EDL mode via test points and flash lk2nd or recovery bootloader.
Verify that fastboot detects the device:
fastboot devices# Should output: [serial_number] fastbootStep 2: Flash the Bootloader & Kernel (LK2ND)
Section titled “Step 2: Flash the Bootloader & Kernel (LK2ND)”OpenStick relies on lk2nd, a secondary bootloader that mimics a standard Android bootloader while providing mainline Linux device-tree booting:
# Flash the secondary bootloader into boot partitionfastboot flash boot lk2nd.img
# Reboot into lk2nd fastboot interfacefastboot rebootThe device will reboot. On boards with an LED, the LED will flash or turn blue, signaling that lk2nd is running.
Step 3: Flash the Root Filesystem
Section titled “Step 3: Flash the Root Filesystem”Once in the lk2nd fastboot interface:
# Flash the Debian system image into the rootfs/system partitionfastboot flash rootfs debian-rootfs.img
# (Optional) Erase userdata to ensure a clean first bootfastboot erase userdata
# Reboot into Debian!fastboot rebootStep 4: First Login over USB Gadget Network
Section titled “Step 4: First Login over USB Gadget Network”Once the device finishes booting (takes ~30–45 seconds on first boot):
- The dongle exposes a virtual USB Ethernet adapter (RNDIS / CDC-ECM).
- The dongle assigns itself the IP
192.168.68.1and runs a DHCP server for your computer. - Your computer should automatically receive an IP in the
192.168.68.xsubnet.
Connect via SSH:
ssh user@192.168.68.1- Default Username:
user - Default Password:
1(oropenstick) - Root Password:
1(switch withsudo su)
Step 5: Post-Installation Essentials
Section titled “Step 5: Post-Installation Essentials”Once logged into your dongle:
# Expand filesystem to fill the eMMC (if not resized automatically)sudo resize2fs /dev/mmcblk0p20
# Connect dongle to your home Wi-Fisudo nmcli device wifi connect "Your_WiFi_SSID" password "Your_WiFi_Password"
# Update package listssudo apt update && sudo apt upgrade -y
# Install favorite toolssudo apt install -y htop git curl tmux neofetchCongratulations! You now have a full-fledged Debian 64-bit ARM Linux server running on a $7 USB stick.