5 MYNAME=$(getent passwd `whoami` | cut -f5 -d: | cut -f1 -d,)
6 MYMAIL=${DEBMEMAIL:-$EMAIL}
8 # flash the latest image
9 phablet-flash ubuntu-system --no-backup --channel $CHANNEL
12 adb shell "touch /userdata/.writable_image"
14 adb shell "timedatectl set-timezone `cat /etc/timezone`"
16 echo "rebooting to activate writable image..."
20 # install some necessary packages
21 echo "connect to wifi now and press Enter"
23 adb shell "apt-get install -y vim bzr ubuntu-ui-toolkit-autopilot ofono-phonesim"
25 # set up bzr, vim, ssh
26 adb shell "su -c 'mkdir ~/.ssh' phablet"
27 adb push ~/.ssh/id_rsa.pub /home/phablet/.ssh/authorized_keys
28 adb shell "chmod 600 /home/phablet/.ssh/authorized_keys"
29 if [ -e ~/.vimrc ]; then
30 adb push ~/.vimrc /home/phablet/.vimrc
31 adb shell "echo 'set bg=light' >> /home/phablet/.vimrc"
33 adb shell "chown -R phablet:phablet /home/phablet"
37 adb forward tcp:22000 tcp:22