A userspace driver and NBD server for the Trek ThumbDrive (VID 0x0a16, PID 0x1111), a pre-USB-mass-storage flash drive from 1999–2000. The device uses a vendor-specific USB protocol that no modern OS supports natively. This project lets you read and write it on Linux via an NBD (Network Block Device) mount.
Capacity: 32 MB (65 536 sectors × 512 bytes)
sudo apt install python3 python3-usb nbd-clientnbd-client pulls in the nbd kernel module. If you prefer a virtualenv, install pyusb from requirements.txt instead of the system python3-usb package.
# Clone the repo
git clone https://github.com/BubaVV/thumbdrive.git
sudo cp -r thumbdrive /opt/trek-thumbdrive
# Install the udev rule (grants non-root USB access, triggers systemd on plug)
sudo cp /opt/trek-thumbdrive/udev/50-trek.rules /etc/udev/rules.d/
sudo udevadm control --reload-rules && sudo udevadm trigger
# Install systemd services
sudo cp /opt/trek-thumbdrive/systemd/trek-nbd-server.service /etc/systemd/system/
sudo cp /opt/trek-thumbdrive/systemd/trek-nbd-mount.service /etc/systemd/system/
sudo systemctl daemon-reloadRe-plug the device after installing the udev rule.
With the udev rule and systemd services installed, plugging in the Trek ThumbDrive will automatically:
- Start the NBD server (
trek-nbd-server.service) - Connect
nbd-client, mount/dev/nbd0at/mnt/trek(trek-nbd-mount.service)
Check status:
systemctl status trek-nbd-server
systemctl status trek-nbd-mountTo stop and unmount:
sudo systemctl stop trek-nbd-mount# Start the server (binds to 127.0.0.1:10809 by default)
sudo python3 nbd_server.py --trek
# In another terminal — connect and mount
sudo modprobe nbd
sudo nbd-client 127.0.0.1 10809 /dev/nbd0
sudo mkdir -p /mnt/trek
sudo mount /dev/nbd0 /mnt/trek
# Access files
ls /mnt/trek/
# Clean up
sudo umount /mnt/trek
sudo nbd-client -d /dev/nbd0Server flags:
| Flag | Description |
|---|---|
--trek |
Use the physical Trek ThumbDrive |
--file PATH |
Use a raw disk image (for testing without hardware) |
--host ADDR |
Bind address (default 127.0.0.1; use 0.0.0.0 for remote access) |
--port PORT |
TCP port (default 10809) |
--ro |
Export as read-only |
trek_usb.py provides a CLI for low-level operations without NBD:
# Print device info and capacity
sudo python3 trek_usb.py info
# Read sectors to stdout
sudo python3 trek_usb.py read 0 4
# Read sectors to a file
sudo python3 trek_usb.py read 0 4 -o first_sectors.bin
# Dump entire device to a raw image
sudo python3 trek_usb.py dump disk.imgSee PROTOCOL.md for the reverse-engineered Trek USB protocol specification (control transfers, command format, capacity query).
trek_usb.py — USB driver library (UsbTransport → TrekDevice → BlockDevice)
nbd_server.py — NBD server frontend
requirements.txt — Python dependencies (pyusb)
udev/ — udev rule for USB permissions + systemd trigger
systemd/ — systemd service units (server + mount)
win_driver/ — Original Windows XP/2000 driver (reference only)
dumps/ — USB packet captures used during reverse engineering
PROTOCOL.md — Trek USB protocol specification
PROTOCOL_ANALYSIS.md — USB capture analysis notes
This project is provided as-is for historical preservation and hobbyist use.