← Back to Blog
OpenStick · UZ801
Debian Upgrade
MSM8916 · ARM32

Updating OpenStick
Bookworm → Trixie

A step-by-step guide to upgrading Debian 12 (Bookworm) to Debian 13 (Trixie) on the 4G LTE WiFi Modem running OpenStick — including ADB re-enablement via USB gadget service.

Device 4G LTE WiFi Modem
From Debian 12 Bookworm
To Debian 13 Trixie
Debian 12
Bookworm
──▶
Debian 13
Trixie
01

Clean Residual Packages

Before upgrading, remove orphaned packages and stale configuration files to avoid conflicts during the distribution upgrade.

bash — cleanup
apt --purge autoremove
apt autoclean
apt purge '~o'      # remove obsolete packages
apt purge '~c'      # remove residual config files
reboot
02

Update Package Sources

Replace all bookworm references with trixie across your apt sources, then add the Mobian repository which now supports Trixie.

Rewrite sources to Trixie
bash
sed -i 's/bookworm/trixie/g' /etc/apt/sources.list
sed -i 's/bookworm/trixie/g' /etc/apt/sources.list.d/*
Add Mobian repository
bash
echo "deb http://repo.mobian-project.org/ trixie main non-free" \
  > /etc/apt/sources.list.d/mobian.list
apt update
The Mobian repository now ships packages targeting Trixie — this replaces any previous Bookworm-era Mobian source entries.
03

Perform the Upgrade

The upgrade is done in two phases: a minimal upgrade first to update the package manager and critical tools, then a full distribution upgrade.

Phase 1 — minimal upgrade
bash
apt upgrade --without-new-pkgs
Phase 2 — full system upgrade to Debian 13
bash
apt full-upgrade
full-upgrade may remove packages it considers conflicting. Review the proposed changes before confirming — especially if you have custom packages installed.

Update: ADB Working

✦ Post-upgrade addition

After the Trixie upgrade, ADB can be re-enabled by creating a USB gadget service that configures the configfs gadget layer and starts adbd on boot.

Create: /lib/systemd/system/mobian-usb-gadget.service
systemd unit
[Unit]
Description=Configure USB gadget

[Service]
Type=oneshot
ExecStart=/usr/sbin/mobian-usb-gadget setup
ExecStop=/usr/sbin/mobian-usb-gadget reset
RemainAfterExit=yes

[Install]
WantedBy=multi-user.target
Create: /usr/sbin/mobian-usb-gadget
shell script
#!/bin/sh
CONFIGFS=/sys/kernel/config/usb_gadget/g1

setup() {
  [ -d $CONFIGFS ] && gc -c
  gc -a rndis
  sleep 1
  gc -a ffs
  mkdir -p /dev/usb-ffs/adb
  mount -t functionfs adb /dev/usb-ffs/adb
  adbd -D &
  sleep 1
  gc -e
}

reset() {
  echo "Removing the USB gadget..."
  if [ -d $CONFIGFS ]; then
    echo "Removing gadget configuration..."
    gc -c
  fi
}

case "$1" in
  reset) reset ;;
  setup) setup ;;
  *) ;;
esac
Enable and activate
bash
chmod +x /usr/sbin/mobian-usb-gadget
systemctl enable mobian-usb-gadget.service
reboot
After reboot, adbd will start automatically via the USB gadget service. ADB should be available over USB on the host machine.
Trixie ✓