Server:Server Status

Rooting to the Palm Pre in Ubuntu

I found a lot of disjointed instructions for rooting to the palm pre in linux, so I thought I'd document the process I used to make it work. These instructions were written using Ubuntu 9.04 Jaunty Jackalope and WebOS version 1.1.0.

  1. Add the repository for virtualbox to your sources list. For Ubuntu 9.04, add deb http://download.virtualbox.org/virtualbox/debian jaunty non-free A list of repos for other distros can be found here: http://www.virtualbox.org/wiki/Linux_Downloads, or if you want to download the .deb and install it that way, go here and choose version 2.2: http://www.virtualbox.org/wiki/Download_Old_Builds I know V-Box is past 3 now, but I had the most success with 2.2. The source for the GPG key can be found here: http://download.virtualbox.org/virtualbox/debian/sun_vbox.asc. Virtualbox is a virtual machine platform that acts as a development platform for the pre, so you may not use it much, but you should do it anyway.
  2. Install virtualbox using the following command: sudo apt-get install virtualbox-2.2
  3. Install the Java JRE using the following terminal command: sudo apt-get install sun-java6-jre
  4. Download the Palm Mojo SDK at the following website: http://developer.palm.com/index.php?option=com_ajaxregister&view=register&sdkdownload. You will be asked to register as a developer, at which point you will be able to choose to Download the sdk, and you should choose the Linux SDK, which will say it is designed for Ubuntu 8.04.
  5. The SDK is a .deb file. You should double-click this file, which will prompt you to install. Install the package.
  6. Download the Novacom Driver from the following link: https://cdn.downloads.palm.com/sdkdownloads/1.1/sdkBinaries/palm-novacom_0.3-svn177284-hud9_i386.deb Install it exactly as you did the SDK
  7. Open your palm pre and load the launcher. Type the following text EXACTLY: upupdowndownleftrightleftrightbastart
  8. This will launch a dialogue asking you to put the phone into dev mode. Slide the switch to activate dev mode, and agree when it asks you to reboot the phone. This same procedure is used to remove the phone from developer mode, and you will be asked to do that later.
  9. Once the phone comes back on, plug it into the computer using the USB cable, and choose "Just Charge" on the phone's screen.
  10. You now have terminal access to your phone. Open a terminal and type: cd /opt/Palm/novacom If this doesn't work, some people report the files for novaterm are located in /opt/nova/bin
  11. Type novaterm and you should be brought to a command prompt that displays:"root@castle:/#
  12. Before taking this step, make sure you either have a data signal, or make sure you have wifi access; you need the internet here. Type the following command in EXACTLY to enable Optiware . In fact, it's probably wise to copy and paste them into your terminal: cd /tmp
    wget http://gitorious.org/webos-internals/bootstrap/blobs/raw/master/optware-bootstrap.sh
    sh optware-bootstrap.sh
    Follow the on-screen instructions to complete the setup.
  13. This step istalls the "Quilt" patch manager (pun intended.) Type the following code in exactly: cd /tmp
    wget http://gitorious.org/webos-internals/bootstrap/blobs/raw/master/quilt-bootstrap.sh
    sh quilt-bootstrap.sh
  14. The Pre already has a package management app, called FileCoaster, meaning you can install apps from the pre, without rooting in through a terminal, over the web. To install the package manager though, I recommend using the terminal. At the Pre terminal prompt, type this exactly: sudo ipkg -o /var install http://www.precentral.net/sites/precentral.net/files/webos-homebrew-apps/feeds/com.palm_.net_.precoder.fcoaster_1.1.1_all.ipk Check here for updated links to .ipk files for versions of FileCoaster past 1.1.1.
  15. It's annoying to have to type the whole code to turn the developer mode on and off, but fortunately there's a patch to put a button in your launcher. This uses the procedure for applying patches using quilt, and there's an instruction sheet for this process here. Basically, you're going to enter the following code exactly:sudo mount -o remount,rw /
    cd /
    sudo quilt import /opt/src/modifications/luna/enable-dev-mode-icon.patch
    sudo quilt push
    sudo mount -o remount,ro /
    For a complete list of patches you can apply using this procedure, look here: http://www.webos-internals.org/wiki/Portal:Patches_to_webOS
  16. To log out of your pre and close terminal access, type: exit
  17. Turn off your pre, then turn it back on.
  18. While this is not necessarily a step, you can now ssh to your pre even if you don't have a USB cable attached. I'll check my home router's config to find the IP of the pre (or just use www.checkmyip.com) and ssh in on port 222 with the following command:ssh <IP Address> -p 222 -l <username>

That should set you up to do most of what you could ever want to do with homebrew on the pre. Check out this thread for a list of homebrew apps, and the links to the .ipk files which you can use to install via FileCoaster: http://forums.precentral.net/homebrew-apps/194104-links-all-homebrew-apps-updated-7-31-a.html.

I credit this article to the following sources:

16 Responses to “Rooting to the Palm Pre in Ubuntu”

  1. rob Says:

    Thanks for the info, glad to find instructions for Ubuntu. Followed the instructions and can ssh to my pre on EVDO but not when on WIFI…any thoughts?

  2. Surfrock66 Says:

    Few things I’d try.

    1) Can you still access the command line using novaterm? That will help check that your usernames and passwords are correct.
    2) Do you have the right IP address? If you installed FileCoaster, get the app MyIP (the ipkg is here: http://www.precentral.net/sites/precentral.net/files/webos-homebrew-apps/feeds/com.golfpinfinder.myip_0.0.2_all.ipk if you wanna install over the command line) and it’ll tell you the correct IP.
    3) If those 2 things are working, then it’s not so much a pre question anymore but an ssh question. I’m not so good as troubleshooting ssh, but anything you search for on the web should carry over to the pre. What point does it get to, for example, does it get to asking you a username, or does it never find the host?

  3. rob Says:

    Using the check my IP site that you listed in the instructions, I used both that it gave me, one for EVDO and another for WIFI. When I ssh on EVDO it accesses the Pre just fine, but when I try while WIFI is on it tells me that I have been denied access. During the install I selected the third option to allow access from each way that it listed. Should I try a reinstall or did I do something incorrectly? Thanks for your advice on this…appreciate the help.

  4. Surfrock66 Says:

    So, it seems that SSH is working correctly since you can get in over the EVDO IP address. Hmm. If SSH is working over EVDO, there’s nothing different about WiFi that should be breaking it. Can you send me the exact terminal output for each way you log in? I have 2 users; a root user and a normal user, have you tried logging in as “root”? It’s not recommended, but it’d be interesting to see if it does anything differently.

  5. MichaelMcEntire Says:

    Hi,
    Whenever I try to run novaterm I get an “exec: 5: novacom: Permission denied”. Getting bummed. Any ideas?

  6. Surfrock66 Says:

    Hmm, I’ve never seen that error before. I did some research, I believe what is actually erroring is your”exec” command. Try running novaterm as sudo. If not that, try reinstalling novaterm. It’s an error on Ubuntu’s end, for whatever reason it’s not allowing you to execute novacom (which is called by novaterm) due to permissions. I couldn’t find a description for what “5” is referring to, it may be the code for the permissions error. But what that is telling me is you run novaterm, which calls novacom, and the call to novacom is being denied due to permissions. All I can think of is “sudo novaterm” instead of “novaterm.” Let me know if that helps!

  7. MichaelMcEntire Says:

    I had already tried, I also chown’d the novaterm file to no avail. I want you to know that I really appreciate your efforts and the time you invested trying to help me solve my problem, most people wouldn’t put in the effort.

    Thanks again,
    Michael

  8. Surfrock66 Says:

    You actually may want to try to post to the ubuntu forums directly, the exec error makes me think it’s not a novacom/term problem at all. Sorry I couldn’t be more help!

  9. spillin_dylan Says:

    Michael, I was having this same issue. Try running sudo ./novacom -t open tty://0 instead of the novaterm script, as that is all the script calls. Or better yet, add “sudo” to the beginning of the exec call in the script. HTH!

  10. rob Says:

    Surfrock66, thanks for your help with my previous problem, I broke my first Pre and when I replaced it, I followed your instructions again and it worked flawlessly…I must have made a mistake the first time through. Also, I posted a link for this page to the Ubuntu forums for people having similar troubles…If that is a problem, let me know and I will pull the link.
    Thanks again!

  11. tom Says:

    had the same problem with novacom. worked previously and then got the permission denied problem.
    followed the suggestion here after reinstalling the .deb package failed

    sudo ./novacom -t open tty://0

    that worked from inside /opt/PALM/novacom

    thanks

  12. Michael McEntire Says:

    Hi,
    I no longer have the permission denied error. I think what my problem is now is that my phone is not being recognized by the OS properly. When I try to run novaterm it says “failed to connect to server”. Also I’ve tried running WebOSquickinstall and it doesn’t recognize my device as connected. Also whenever I connect my phone my network manager sees it as a wired connection Auto usb0. I have to disconnect Auto usb0 to access the internet through my wifi. I think I’m close, any help would be appreciated.

  13. Surfrock66 Says:

    Well, first of all, that your PC sees it as a possible Ethernet connection (the first step to tethering) is awesome because it means your drivers are working. This guy seems to have solved a similar problem, take a look: http://www.uluga.ubuntuforums.org/showthread.php?t=1311738

  14. Michael McEntire Says:

    Got it working! Thanks!

  15. chris Says:

    The only way you can ssh into your Pre if it’s on wifi is to forward a port in your router.

  16. Lola Masse Says:

    I’ve had my Pre considering that shortly soon after launch and am glad to find (by means of this forum) that I can now set a ring tone on incoming text messages and can search as a result of e-mails and this kind of. Now is there any hope for an upcoming launch in which I can search my calendar? Would make my work much simpler, discovering dates of final appointments. No other complaints, except that yesterday I used to be in and out of Sprint service (not unusual). I feel I had been roaming, and looked at my calendar. Every thing inside the calendar was just one hour earlier than what I had input. The clock was one particular hour early as well. I used to be scared to death–then, the moment we got back into Sprint assistance once more, every little thing was normalized. Has this happened to any individual else?? Hunting forward to answers, but please recall, I’m no techie and speak English in lieu of technospeak.

Leave a Reply