This is how I updated Debian from Bookworm (12) to Trixie (13)
Clean any residual packages and configuration files using the following commands:
apt --purge autoremove
apt autoclean
apt purge '~o'
apt purge '~c'
reboot
sed -i 's/bookworm/trixie/g' /etc/apt/sources.list
sed -i 's/bookworm/trixie/g' /etc/apt/sources.list.d/*
Add Mobian repository (it is actually now with Trixie):
echo "deb http://repo.mobian-project.org/ trixie main non-free" > /etc/apt/sources.list.d/mobian.list
apt update
Initiate the minimal upgrade:
apt upgrade --without-new-pkgs
Now that your package sources have been updated, you can upgrade your system.
Execute the following command to perform a full system upgrade to Debian 13 Trixie:
apt full-upgrade
!UPDATE! adb working
Create /lib/systemd/system/mobian-usb-gadget.service:
[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:
#!/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
Make the script executable:
chmod +x /usr/sbin/mobian-usb-gadget
Enable the service:
systemctl enable mobian-usb-gadget.service
Reboot:
reboot