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.
Before upgrading, remove orphaned packages and stale configuration files to avoid conflicts during the distribution upgrade.
apt --purge autoremove apt autoclean apt purge '~o' # remove obsolete packages apt purge '~c' # remove residual config files reboot
Replace all bookworm references with trixie across your apt sources,
then add the Mobian repository which now supports Trixie.
sed -i 's/bookworm/trixie/g' /etc/apt/sources.list sed -i 's/bookworm/trixie/g' /etc/apt/sources.list.d/*
echo "deb http://repo.mobian-project.org/ trixie main non-free" \ > /etc/apt/sources.list.d/mobian.list apt update
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 upgradeapt upgrade --without-new-pkgs
apt full-upgrade
full-upgrade may remove packages it considers conflicting. Review the proposed
changes before confirming — especially if you have custom packages installed.
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.
[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
#!/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
chmod +x /usr/sbin/mobian-usb-gadget systemctl enable mobian-usb-gadget.service reboot
adbd will start automatically via the USB gadget service.
ADB should be available over USB on the host machine.