#!/bin/sh
set -e
-CHANNEL=devel-proposed
+CHANNEL=${CHANNEL:=devel-proposed}
MYNAME=$(getent passwd `whoami` | cut -f5 -d: | cut -f1 -d,)
MYMAIL=${DEBMEMAIL:-$EMAIL}
# flash the latest image
-phablet-flash ubuntu-system --no-backup --channel $CHANNEL
+ubuntu-device-flash --channel devel-proposed
# make image writable
adb shell "touch /userdata/.writable_image"
adb reboot
adb wait-for-device
+# enable network
+phablet-network -n /etc/NetworkManager/system-connections/pittinet
+
# install some necessary packages
-echo "connect to wifi now and press Enter"
-read n
-adb shell "apt-get install -y vim bzr ubuntu-ui-toolkit-autopilot ofono-phonesim"
+adb shell "apt-get install -y vim bzr build-essential fakeroot"
# set up bzr, vim, ssh
adb shell "su -c 'mkdir ~/.ssh' phablet"