Click here to Skip to main content
15,844,903 members
Articles / Containers / Virtual Machine

The Basics of The Palm Pre Linux

Rate me:
Please Sign up or sign in to vote.
4.96/5 (17 votes)
21 Sep 2009CPOL9 min read 49.2K   118   20   10
This article describes the process of initial configuration and basic work with Palm Web OS on the lower level than it's described in Palm SDK docs.

Table of Contents

  1. Introduction
  2. SDK Installation
  3. Start to work with Linux
  4. Program Installation
  5. System folders review
    1. Standard system directories
    2. Specific Directories of Web OS
  6. Work with FTP on the Palm Pre
    1. Data exchange procedure
    2. Work with console client ncftp
  7. References


This article describes the process of initial configuration and basic work with Palm Web OS on the lower level than it's described in Palm SDK docs.

Palm company released ( the new smartphone managed by GNU Linux based operating system. This product becomes more and more popular due to the cute GUI, well-documented SDK and easy start on the development. But nevertheless many low-level features of this system are poorly documented.

This article will be useful for those who start working with the console interface of GNU Linux generally and Palm Web OS in particular. It may be useful also for the developers who need more capabilities than Mojo SDK provides to solve their task.

In this article, we'll consider such questions:

  1. SDK installation and configuration
  2. Accessing Linux using "novacom" utility. Basic Linux commands
  3. Installation of additional utilities (sudo, package manager etc.). Configuration of the virtual machine (virtualbox). Install\remove packages.
  4. Short description of the system files and directories specific for Palm Pre
  5. Work with FTP on Palm Pre, review of some file content

This article is some kind of review.

1. SDK Installation

I used emulator from the Palm Mojo SDK package to research the features of Web OS.

You can download it from the official site, or use this link (no registration).

Choose the platform you need on the download page (Figure 1) and then follow the instructions on the site and in Install Wizard. It's better to install Java first, then VirtualBox, and then SDK. Such order decreases the possibility of errors.


Figure 1: Choosing platform

During the installation, the virtual machine for Palm Web OS will be created. You don't have to create it manually.

2. Start to Work with Linux

To start work with Web OS Linux, start the emulator. You can use either the shortcut created by the installation program (figure 2) or VirtualBox interface (figure 3).


Figure 2: Start with shortcut


Figure 3: Start from Virtualbox

If everything is ok, then you'll see the Emulator window (figure 4). We'll need the Internet connection for further work. It should be configured only in the host system (in our case, it's Windows). You can check if there is Internet on Emulator simply starting Web Browser. To do it, choose Programs (right bottom icon) => Web. After that, try to open some site just like on the computer. Search something for example (figure 5).


Figure 4: Palm Emulator


Figure 5: Palm Web Browser

Now we should use the novacom.exe utility to connect to the device. To get the full information about the program options, enter:

novacom.exe --help

The command:

novacom.exe -t open tty://

opens the Linux terminal window.


Figure 6: Linux Console

Note: Like in the usual Linux, more than one terminal can be opened in Web OS.

First let's browse the file system. ls command is used for this. After entering it, we see the content of the current directory (root by default).


Figure 7: Results of the ls command

To distinguish files from directories, we an use option ls -F.


Figure 8: Results of the ls -F command

Directories now have / symbol at the end. So as you see, we have only three files in the root directory: wget, log.txt, md5sums.

When using ls -F, some other symbols can occur at the end of the file names.

Suffics Meaning
@ Symbol link
* Executable file
/ Directory
= Socket

You can see the examples by entering commands:

ls -F /bin
ls -F /tmp

More detailed information about the file system element type can be obtained by means of file utility. This utility is disabled in Palm Web OS by default. Later, we'll consider how to install it.

To browse the file content, use the command cat <filename>.

For example,

cat md5sums

To obtain full information about the command, enter <command> --help, or search the Internet with keywords "man <command>". You can also read the help in the full Linux version entering "man <command>".

I propose that the reader also learn such commands as rm (remove files\directories), mkdir (make directory), touch(create file), cp (copy), pwd (get current path).

3. Program Installation

The process of the program installation for Linux is a bit different from this process in Windows. Unlike other systems, Linux has repositories. Repository can be considered as the database that contains program, libraries, and relations between them. There is some special software that manages repositories and installs software on the local computer. Such software is called “package manager”. The package manager compares software versions on the computer and in the repository, downloads software, resolves conflicts between packages. More information about package managers can be found in the articles [4],[5],[6],[7].

By default, Palm Web OS does not have a package manager. To install it, use the guide available here.

The script performs the following:

  1. Formats /dev/hdb for its needs
  2. Installs package manager ipkg-opt
  3. Creates the list of repositories /opt/etc/ipkg/optware.conf
  4. Installs the sudo program, creates the user with the root (administrator) rights
  5. Installs ssh, sftp server.

In the original script, some of the mentioned actions cannot be performed on the emulator (for example (4)). It's also required to have /dev/hdb device. By default, there is no such device on the emulator so you should add it manually. Detailed instructions can be found here.

I've put the fixed version of this script into the attachments to this article. It allows the user to change disk for installation and also is free from the limitations for the emulator.

To start the fixed script, you should get it on the device using the wget command. To organize file exchange with the device, you can install FTP server on your computer or other computer in your local network.

After entering the command...


... the file will be uploaded to the device файл to the current directory (IP address should be of the computer with FTP server of cause). DON'T use symbol names of the machines, for example..

wget ftp://my_computer_name/

... as far as Web OS won't be able to convert them to the address correctly.

So, we have executed the script and installed a lot of useful programs. Now we have package manager and so we'll be able to install all missing programs. To do it, use the following command:

ipkg-opt install <package name>. 

For example:

ipkg-opt install file

The list of the packages can be browsed by the command:

ipkg-opt list 

or by following this link.

Developers and enthusiasts may want to install gcc compiler, gdb debugger, make utility, python interpreter and other great things. The presence of these utilities allows program installation by means of building from the source texts.

4. System Folder Review

Let's start from the folders that are common for all Linux systems.

4.1 Standard System Directories

  1. /bin, /lib, /home,

    These are folders for standard utilities from Linux package, shared libraries (Windows *.dll analogues) and user files correspondingly.

  2. /mnt, /media, /lost+found

    The access points to the external data storages (floppies, hard disks, optical disks) are stored in these directories. In the Palm memory card (micro sd) can be mounted to this directory. And there is nothing interesting there on the emulator.

    Note: The lost+found directory is specific for the extX (ext1, ext2, ext3, ext4) file systems.

  3. /dev

    Device files are stored here.

    • /dev/hd[a..z][1..N] – logical partitions of hard disk
    • /dev/hda1 – root file directory
    • /dev/hdc – bootloader
    • /dev/hdb – the section we created earlier or the physical data storage of the real device – 8GB (~7GB user available)
    • ttyN – console devices
    • null – «black hole», eating all information that is entered into it

4.2 Specific Directories of Web OS

  1. /var/luna/data/dbdata/

    There are databases used by high-level applications of Web OS.

    Bases PalmDatabase.db3 and PalmAccountDatabase.db3 is in sqlite format. There are data of such applications as mail accounts, notes, calendar, chat, memo stored in them.

    They can be browsed by any sqlite viewer (see [9]). I would like to advise this one

    We will discuss how to exchange files with Palm Pre in the next section.

  2. /var/luna/data/mediadb.db3

    The data about the locations of images, music, movies etc. are stored here. After analysis, I can say that these data are stored in the directories: /media/internal/, /usr/palm/ and their subdirectories.

  3. /var/luna/data/emails

    The text of email messages is stored in this directory in HTML and ASCII formats.

  4. /usr/share/dbus-1/system-services

    Here you can find Java services (or, if you like, deamons). Using them in the application developed with the usage of Mojo SDK can get access to the low-level components of the system.

  5. /usr/lib/luna/java

    Here java library files (*.jar) are stored, they are used by services.

5. Work with FTP on the Palm Pre

5.1. Data Exchange Procedure

Well, now we know what and where it is situated. But it's not very convenient to research file content directly on Palm Pre. So we have a task of getting files from the device.

One of the methods is FTP protocol. And so you should:

  1. Install FTP server (for example this one) to one of the computers in the local network you work in (for example on your own one).
  2. Install the FTP client on your computer. It can be the plugin for Far Manager or Total Commander, or it can be separated application – for example FileZilla FTP client.
  3. Install FTP client to the Palm Pre:
    ipkg-opt install ncftp
  4. Use ncftp to transmit data to the server (it will be described later).
  5. Get data from FTP server to your computer.

5.2 Work with Console Client ncftp

To connect to the server, enter:

ncftp <url>


open <url>

Remember that:

<url> = ftp://<Ip Address>/ 	symbol names are not allowed
<url> = <bookmark name>

When the connection is established, the current local directory is «frozen». Instead of working with the directory, all commands of navigation in the file system are translated in the commands of the FTP and processed by the server.


Figure 9: Server navigation with ncftp

Now, after you choose the necessary remote directory, data exchange can be performed:

put <filename>
get <filename>

You can also use some mask instead of the argument. For example, put *.txt


Figure 10: Transmission of the several files using the mask

To send the directory, use the command put -R <dir_name>


Figure 11: Sending the directory with ncftp

Ncftp also supports such commands as mkdir, rm, rmdir, pwd.

The same commands but with l- prefix are used to navigate in the local file system: for example lmkdir, lls, lpwd etc.

You can find the full list of the commands on the official program site here.

Find more Mobile Development articles at Apriorit site.




  • 21st September, 2009: Initial post


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Written By
Chief Technology Officer Apriorit Inc.
United States United States
ApriorIT is a software research and development company specializing in cybersecurity and data management technology engineering. We work for a broad range of clients from Fortune 500 technology leaders to small innovative startups building unique solutions.

As Apriorit offers integrated research&development services for the software projects in such areas as endpoint security, network security, data security, embedded Systems, and virtualization, we have strong kernel and driver development skills, huge system programming expertise, and are reals fans of research projects.

Our specialty is reverse engineering, we apply it for security testing and security-related projects.

A separate department of Apriorit works on large-scale business SaaS solutions, handling tasks from business analysis, data architecture design, and web development to performance optimization and DevOps.

Official site:
Clutch profile:
This is a Organisation

33 members

Written By
Software Developer Sitecore
Ukraine Ukraine
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

Questiongood job Pin
varatha4-Dec-13 12:47
varatha4-Dec-13 12:47 
GeneralMy vote of 5 Pin
Manoj Kumar Choubey16-Apr-12 0:40
professionalManoj Kumar Choubey16-Apr-12 0:40 
GeneralRe: My vote of 5 Pin
varatha4-Dec-13 12:46
varatha4-Dec-13 12:46 
GeneralMy vote of 5 Pin
Roelof.den18-Jul-10 23:37
Roelof.den18-Jul-10 23:37 
GeneralModified script fails on Palm Pre 1.4.1 Emulator Pin
Member 416955624-May-10 17:31
Member 416955624-May-10 17:31 
GeneralRe: Modified script fails on Palm Pre 1.4.1 Emulator Pin
Oleksandr Dodatko24-May-10 23:12
Oleksandr Dodatko24-May-10 23:12 
GeneralGreat, but ... Pin
sam.hill21-Apr-10 5:58
sam.hill21-Apr-10 5:58 
GeneralRe: Great, but ... Pin
Oleksandr Dodatko21-Apr-10 7:06
Oleksandr Dodatko21-Apr-10 7:06 
GeneralRe: Great, but ... Pin
sam.hill21-Apr-10 19:40
sam.hill21-Apr-10 19:40 
GeneralGreat Pin
Dr.Luiji27-Sep-09 22:11
professionalDr.Luiji27-Sep-09 22:11 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.