Enabling Developer Mode

Later steps will require that your phone has developer mode enabled; specifically you cannot root your device without it.

To enable developer mode enter the following into the launcher screen of your Pre:

upupdowndownleftrightleftrightbastart

This will popup a window called "developermode" and you can enable it there, and reboot to have it take effect.

Getting Root

Once developer mode is enabled you can connect your pre to a Linux host, using the supplied cable, and use the precomd utility to:

  • Download files from your pre.
  • Upload files to your pre.
  • Execute commands on your pre

To get the precomd command downloaded and compiled I used:

skx@gold:~$ mkdir -p ~/git/
skx@gold:~$ cd ~/git/ && git clone git://gitorious.org/webos-internals/precomd.git
skx@gold:~$ cd ~/git/precomd && make

Once you've done that getting root is as simple as:

skx@gold:~$ cd ~/git/precomd && sudo ./novacom
Novacom found: bulk_ep_in: 0x82 bulk_ep_out: 0x02
Writing packet of 48 bytes
Going to tty state
root@castle:/#

root@castle:/# id
uid=0(root) gid=0(root)

root@castle:/# hostname
castle

root@castle:/# free -m
             total       used       free     shared    buffers     cached
Mem:           239        214         24          0          2         34
-/+ buffers/cache:        178         61
Swap:          127          0        127

Fun stuff - using this tool you can easily do a lot of things, for example setting ringtones described next. (I'm sure you can use the built-in browser to download ringtons, or get them the "normal" way via expensive SMSs but I didn't even try either approach).

Note: The hostname of the phone is set to "castle" - this seems to be global as far as I can see from reading other documentation. I'm wary of changing it lest something break..

Uploading Ringtones, Wallpapers, etc.

Using the precomd command you can explore the phone, and I soon discovered that the location /media/internal has lots of things in it:

root@castle:/# cd /media/internal/
root@castle:/media/internal# ls
DCIM                         downloads
Open Source Information.pdf  ringtones
PalmPre.mp4                  wallpapers

I downloaded a Doctor Who .wav file to use as my ringtone, and encoded it to mp3 with lame - then copied it across to my pre with this command:

skx@gold:~/git/precomd$  sudo ./novacom  \
 put \
 file:////media/internal/ringtones/Tardis.mp3 \
 < /home/skx/Hightard.wav.mp3

Now the file I've uploaded appears in the "Sounds" applet - so I can set the ringtone to be the tardis-sound </geek>

PreWare

preware seems to be a graphical APT-like program for working with the palms ipkg format packages.

Via the root terminal access I did this:

mount -o remount,rw /
mkdir -p /var/etc/ipkg/
ln -s /etc/ipkg/arch.conf /var/etc/ipkg/
echo "src/gz webosinternals http://ipkg.preware.org/feeds/webos-internals/all" \
  > /var/etc/ipkg/webos-internals.conf
echo "src/gz webosinternals-armv7 http://ipkg.preware.org/feeds/webos-internals/armv7" \
 >>  /var/etc/ipkg/webos-internals.conf

/usr/bin/ipkg -o /var update
/usr/bin/ipkg -o /var install org.webosinternals.ipkgservice
/usr/bin/ipkg -o /var install org.webosinternals.preware
sh /var/usr/lib/ipkg/info/org.webosinternals.ipkgservice.postinst
luna-send -n 1 palm://com.palm.applicationManager/rescan {}

mount -o remount,ro /
exit

This gives me preware as an icon on the desktop - which I then used to install some random packages, such as the terminal.

The terminal application lets you run commands on your pre without a host computer, or the use of the USB cable. For example once you run it you can list installed packages:

root@castle:/# /usr/bin/ipkg -o /var list_installed
org.webosinternals.ipkgservice - 0.9.17 - Package Manager Service
org.webosinternals.preware - 0.9.6 - Preware
org.webosinternals.terminal - 0.2.3 - Terminal
org.webosinternals.termplugin - 0.2.2 - Terminal Service Plugin

OpenSSH Client

I downloaded the dropbear package from this this unstable repo and installed it via ipkg.

This combined with the terminal installed above was sufficient to give me outgoing SSH access to my mailserver, and run mutt.

Unfortunately some stuff just doesnt work - running "w" for example complains that the terminal isn't wide enough. Still I can restart apache, reboot, and do similar thing if I wish.

TODO: Ctrl-d? up/down arrows? TAB?

Battery Life

Battery life was about 24 hours with a few texts, calls, and "a bit" of surfing.

This was obviously sub-par. I noticed after a while that my gmail account was syncing every 15 minutes and that using wifi was better than 3G. Tweaking those, and reducing the screen brightness brought life to about 2.5/3.0 days.

In conclusion: It's not appalling, but its not amazing either.