Jailbreaking

  1. Copy the Jailbreak files to a FAT32 formatted USB drive.
  2. Boot into the USB (hold Volume Down).
  3. Install Golden Keys.
  4. Reboot into USB.
  5. Install Yahallo Jailbreak (may need to use a different version, or update firmware first).

Installing PostmarketOS

Build on the PC:

  1. Jailbreak the device.
  2. Boot from USB (hold Volume Down when booting).
  3. Connect to Wi-Fi, enable DHCP in iwd (uncomment [General] and the line about DHCP in /etc/iwd/main.conf), set the clock, and install pmbootstrap:
iwctl station wlan0 connect SSID --passphrase PASSWORD
sudo vi /etc/iwd/main.conf
sudo service iwd restart
sudo apk add pmbootstrap
sudo apk add git
sudo date -s YYYY.MM.DD-HH:MM:SS
pmbootstrap init
pmbootstrap install --disk /dev/mmcblk0

During pmbootstrap init, select the necessary options: microsoft, surface-rt, iwd, openbox.

Setup

Do the Wi-Fi again like above, then:

sudo apk add nano
sudo apk add chromium
sudo apk add unclutter-xfixes

Kiosk Script

Create ~/kiosk.sh and make it executable with chmod +x kiosk.sh:

#!/bin/bash

# Run this script in display 0 - the monitor
export DISPLAY=:0

# Turn off DPMS Display Sleep
xset s off -dpms &

# Try to fix wifi by setting power save off
iwctl adapter phy0 set-property power_save off &

# Hide the mouse from the display
unclutter-xfixes &

# If Chromium crashes (usually due to rebooting), clear the crash flag so we don't have the annoying warning bar
sed -i 's/"exited_cleanly":false/"exited_cleanly":true/' /home/sam/.config/chromium/Default/Preferences
sed -i 's/"exit_type":"Crashed"/"exit_type":"Normal"/' /home/sam/.config/chromium/Default/Preferences

# Run Chromium and open tabs
/usr/bin/chromium-browser --window-size=1366,768 --kiosk --window-position=0,0 --start-fullscreen https://example.com &

Autostart Kiosk

Create or edit ~/.config/openbox/autostart and add:

sh ~/kiosk.sh &