Pinephone (Linux) networking

So during an upgrade of PostmarketOS, my Pinephone started making beeps and the screen was locked. I decided to do a hard reboot, and since that time, the UI on the phone doesn't even come up. Fortunately, however, the usb tethering still comes online, so I can ssh into it.

The networking configuration required manually starting wpasupplicant. I couldn't use nmcli because it's shared libraries were broken during the upgrade. I had to run this as sudo:

echo 'ctrl_interface=/run/wpa_supplicant' >my.conf
echo 'update_config=1' >>my.conf
wpa_password "SSID" "PASSWORD" >>my.conf
wpa_supplicant -Dnl80211,wext -iwlan0 -c my.conf &
udhcpc -i wlan0

Then I had wifi connectivity