Flashing postmarketOS on a Samsung gtexswifi Device from an Incus VM
By chimo on (updated on )With my Incus VM running Alpine Linux up and running, I was able to install pmbootstrap and build the environment to flash the Samsung Galaxy Tab A 7.0 - SM-T280 (gtexswifi) device.
The first thing we’ll want to do is pass the USB device to the VM so it can see it. On the host:
# Install the 'qemu-hw-usb-host' package, if not already installed
chimo@xps:~$ apk add qemu-hw-usb-host ... # List USB devices
chimo@xps:~$ lsusb ... Bus 001 Device 007: ID : SAMSUNG SAMSUNG USB DRIVER ... # Add the USB device to the VM
chimo@xps:~$ incus config device add alpine-vm android usb \ vendorid=<vendorid> productid=<productid>
In the VM, lsusb
should list a device with the matching
vendorid and productid.
After that, it’s pretty much standard procedure.
One clarification: before running the pmbootstrap
commands, one needs to bootup the device in “Download mode” (Power +
Volume Down + Home Button).
Once the device is booted-up and running, this is what I had to do on my Alpine host machine to SSH to the device (the Samsung device registered the “eth0” network interface. Yours might differ.):
# Set MAC address
chimo@xps:~$ doas ip link set dev eth0 address 12:12:12:12:12:12 # Bring interface up
chimo@xps:~$ doas ip link set dev eth0 up # Give the interface an IP address
chimo@xps:~$ doas ip addr add 172.16.42.2/24 dev eth0 # SSH to the device
chimo@xps:~$ ssh user@172.16.42.1 (user@172.16.42.1) Password: Welcome to postmarketOS! o/ ...
You can then fix the screen being upside-down, if you’re running into that issue, by creating a “/etc/X11/xorg.conf.d/00-fbdev-rotate-UD.conf” file with the following content (credit to an XDA forum post):
Section "Device"
Identifier "LCD"
Driver "fbdev"
Option "Rotate" "UD"
EndSection