Palm Pre
2011

The Basics of The Palm Pre Linux
Written by:
Alexandr Dodatko,
Junior Software Developer of Device Team
Table of content
Introduction
1. SDK Installation
2. Start to work with Linux
3. Program Installation
4. System foldes review
4.1 Standard system directories
4.2 Specific Directories of Web OS
5. Work with FTP on the Palm Pre
5.1. Data exchage procedure
5.2 Work with console client ncftp
Referrences
Introduction
Palm company released (http://www.palm.com/us/products/phones/pre/) 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 is 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:
- SDK installation and configuration.
- Accessing Linux using "novacom" utility. Basic Linux commands.
- Installation of additional utilities (sudo, package manager etc.). Configuration of the virtual machine (virtualbox). Installremove packages.
- Short description of the system files and directories specific for Palm Pre.
- Work with FTP on Palm Pre, review of some files 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: http://developer.palm.com/index.php?option=com_ajaxregister&view=register&sdkdownload
Or use this link (no registration): http://developer.palm.com/index.php?option=com_content&view=article&id=1788
Choose the platform you need on the download page (Fig.1) and then follow the instuctions on the site and in Install Wizard. It's better to install Java first, thenVirtualBox, and thenSDK. Such order decrease 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 installation program (fig.2) or VirtualBox interface(fig.3).
Figure 2: Start with shortcut
Figure 3: Start from Virtualbox
If verything is ok then you'll see the Emulator window (fig.4). We'll need the Internet connection for the further work. It should be configured only in the host system (in our case it's Windows) . You can check ff 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 (fig.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 this 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 lets 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 the 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 reader to learn also such commands as rm (remove filesdirectories), 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 install software on the local computer. Such software is called “package manager”. The package manager compares software versions on the computer and in the repository, download software, resolve 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
http://www.webos-internals.org/wiki/Next_steps.
The script optware-bootstrap.sh performs the following:
- Formats /dev/hdb for its needs
- Installs package manager ipkg-opt
- Creates the list of repositories /opt/etc/ipkg/optware.conf
- Installs the sudo program, creates the user with the root (administrator) rights
- 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:
http://www.webos-internals.org/wiki/Adding_Disks_to_the_Emulator
I've put the fixed version of this script into the attachments to this article. It lets user to change disk for installation and also is free from the limitations for the emulator.
To start the fixed script you shoud 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
wget ftp://192.168.0.60/optware-bootstrap-edited.sh
the file will be uploaded to the device ???? to the current directory (ip adress 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/optware-bootstrap-edited.sh
) 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 <parckage name>.
For example
ipkg-opt install file
The list of the packages can be browsed by the command
ipkg-opt list
or by following the link:
http://ipkg.nslu2-linux.org/feeds/optware/i686g25/cross/unstable/Packages
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 foldes 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 http://link.osenxpsuite.net/?uid=homepage&id=sqlite2009pro.zip
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 yo like, deamons). Using them 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 exchage procedure
Well, now we know what and where 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:
- Install FTP server (for example this one http://filezilla-project.org/download.php?type=server ) to the one of the computers in the local network you work in (for example on your own one).
- 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 (http://filezilla-project.org/download.php ).
- Install FTP client to the Palm Pre:
ipkg-opt install ncftp - Use ncftp to transmit data to the server (it will be described later).
- Get data from FTP server to your computer.
5.2 Work with console client ncftp
To connect to the server enter ncftp <url>.
Or
ncftp
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 choosed 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:
http://ncftp.com/ncftp/doc/ncftp.html
Download scripts sources.
Referrences:
-
http://developer.palm.com/
-
http://www.palm.com/us/products/phones/pre/
-
http://www.webos-internals.org/wiki/Next_steps
-
http://www.control-escape.com/linux/lx-swinstall.html
-
http://www.linuxforums.org/forum/linux-tutorials-howtos-reference-material/64958-how-install-software-linux.html
-
http://www.linuxcenter.ru/lib/articles/system/rpm_howto.phtml
-
http://www.debian.org/doc/manuals/apt-howto/index.ru.html
-
http://www.webos-internals.org/wiki/PalmDatabase.db3_File
-
http://www.sqlite.org/cvstrac/wiki?p=ManagementTools
-
http://link.osenxpsuite.net/?uid=homepage&id=sqlite2009pro.zip
-
http://ipkg.nslu2-linux.org/feeds/optware/i686g25/cross/unstable/Packages
-
http://filezilla-project.org/download.php?type=server
-
http://filezilla-project.org/download.php
-
http://www.perpetualpc.net/srtd_commands_rev.html
-
http://ncftp.com/ncftp/doc/ncftp.html
About the Author
Apriorit is an Ukrainian software development company.
Apriorit develops its own products as well as provide offshore development and QA services in the areas of advanced system programming, driver development, software for devices.
One of the key values of Apriorit's specialists is knowledge generation and sharing of experience.
Learn more about Apriorit and its experience at Apriorit Official site
Palm Pre
![]() |
![]() NEW Palm Pre Plus 16GB Verizon Black Smartphone Qwerty keyboard Touch Screen $59.99 Time Remaining: 1d 13h 41m Buy It Now for only: $59.99 Buy It Now |
![]() NEW PALM PRE PLUS 16GB VERIZON SMARTPHONE TOUCH + QWERTY WEB OS $64.99 Time Remaining: 1h 48m Buy It Now for only: $74.99 Buy It Now |
![]() Palm Pre 2 ATT Black Good Condition $101.99 Time Remaining: 2h 29m |
![]() New Sprint Pcs Palm Pre QWERTY Slider Smart Phone $69.99 Time Remaining: 21d 19h 59m Buy It Now for only: $69.99 Buy It Now |
![]() Palm Pre 8GB Black Sprint 289 $19.99 Time Remaining: 9h 56m |
![]() NEW PALM PRE PLUS 16GB VERIZON SMARTPHONE TOUCH + QWERTY WEB OS $59.98 Time Remaining: 18d 15h 1m Buy It Now for only: $59.98 Buy It Now |
![]() Palm Pre 2 ATT Black Fair Condition $96.99 Time Remaining: 10h 9m |
![]() HP PALM PRE PLUS ATT 3G Wifi Smartphone 16GB Black Slider TOUCHSCREEN $94.59 Time Remaining: 11d 2h 51m Buy It Now for only: $94.59 Buy It Now |
![]() REFURBISHED PALM PRE PLUS 16GB VERIZON SMARTPHONE TOUCH + QWERTY WEB OS $42.99 Time Remaining: 10h 40m Buy It Now for only: $47.99 Buy It Now |
![]() Excellent Used HP Palm Pre 2 Black Unlocked Smartphone Simple Mobile Att $88.94 Time Remaining: 4d 21h 55m Buy It Now for only: $88.94 Buy It Now |
![]() NEW PALM PRE PLUS 16GB VERIZON SMARTPHONE TOUCH + QWERTY WEB OS $64.99 Time Remaining: 10h 48m Buy It Now for only: $74.99 Buy It Now |
![]() Palm Pre 8GB Black Sprint Smartphone $9.99 Time Remaining: 13h 25m Buy It Now for only: $30.00 Buy It Now |
![]() HP PLAM PRE 3 VERIZON 3G Global Smartphone 16GB BLACK MATCH YOUR TOUCHPAD $499.99 Time Remaining: 5d 10h 6m Buy It Now for only: $499.99 Buy It Now |
![]() REFURBISHED PALM PRE PLUS 16GB VERIZON SMARTPHONE TOUCH + QWERTY WEB OS $42.99 Time Remaining: 14h 40m Buy It Now for only: $47.99 Buy It Now |
![]() Good Palm PRE PLUS ATT 3G TOUCHSCREEN Wi Fi SMARTPHONE $79.99 Time Remaining: 29d 23h 14m Buy It Now for only: $79.99 Buy It Now |
![]() Palm Pre Plus 16GB Black Verizon Smartphone $0.99 Time Remaining: 14h 45m |
![]() PALM PRE PLUS BLACK VERIZON SMARTPHONE Mint Condition Clean Esn VERIZON $31.99 Time Remaining: 4d 20h 28m Buy It Now for only: $31.99 Buy It Now |
![]() HP Palm Pre 3 16GB Black ATT Smartphone $260.00 (3 Bids) Time Remaining: 16h 3m |
![]() REFURBISHED PALM PRE PLUS 16GB VERIZON SMARTPHONE TOUCH + QWERTY WEB OS $44.99 Time Remaining: 16d 19h 16m Buy It Now for only: $44.99 Buy It Now |
![]() Palm Pre 8GB Black Sprint Smartphone $20.00 Time Remaining: 16h 43m Buy It Now for only: $50.00 Buy It Now |
![]() PALM PRE PLUS WITH WEBOS VERIZON SMARTPHONE TOUCH $32.99 Time Remaining: 23d 14h 32m Buy It Now for only: $32.99 Buy It Now |
![]() Palm Pre 8GB Black Sprint Smartphone $20.00 Time Remaining: 16h 44m Buy It Now for only: $50.00 Buy It Now |
![]() Verizon Palm Pre Plus No Contract 3G QWERTY Touch Camera WebOS Slider Smartphone $34.99 Time Remaining: 16h 50m Buy It Now for only: $39.99 Buy It Now |
![]() EXCELLENT Used Palm Pre 2 Black Verizon Slider Smartphone Palm OS CLEAN ESN $89.95 Time Remaining: 4d 21h 57m Buy It Now for only: $89.95 Buy It Now |
![]() Used Palm Pre Black for Sprint $10.50 (14 Bids) Time Remaining: 18h 6m |
![]() NEW PALM PRE PLUS ATT 3G SLIDER TOUCHSCREEN Wi Fi SMARTPHONE UNLOCKED $119.99 Time Remaining: 21d 56m Buy It Now for only: $119.99 Buy It Now |
![]() Palm Pre Plus 16GB Black Verizon Smartphone $29.99 Time Remaining: 18h 24m Buy It Now for only: $40.00 Buy It Now |
![]() NEW PALM PRE PLUS ATT 3G SLIDER TOUCHSCREEN Wi Fi SMARTPHONE $94.99 Time Remaining: 21d 41m Buy It Now for only: $94.99 Buy It Now |
![]() Palm Pre Plus 16GB Black Verizon Smartphone $44.95 Time Remaining: 18h 44m Buy It Now for only: $49.95 Buy It Now |
![]() Verizon Palm Pre Plus No Contract 3G QWERTY Touch Camera WebOS Smartphone Used $29.69 Time Remaining: 23d 17h 50m Buy It Now for only: $29.69 Buy It Now |
![]() Palm Pre Black Sprint Smartphone clean esn $19.95 Time Remaining: 19h 8m |
![]() Palm Pre Black Sprint Smartphone clean esn $0.99 Time Remaining: 19h 9m |
![]() PALM PRE SPRINT PHONE Works Great $34.90 Time Remaining: 1d 21h 10m Buy It Now for only: $34.90 Buy It Now |
![]() Palm Pre Black Sprint Smartphone clean esn $19.95 Time Remaining: 19h 11m |
![]() Used Sprint WIRELESS PALM PRE CELL Phone Pda Clean ESN Tested Works B213 $24.95 Time Remaining: 4d 17h 39m Buy It Now for only: $24.95 Buy It Now |
![]() Palm Pre Black Sprint Smartphone clean esn $19.95 Time Remaining: 19h 12m |
![]() Palm Pre 2 Black Verizon Smartphone Brand New $160.00 Time Remaining: 3d 1h 26m Buy It Now for only: $160.00 Buy It Now |
![]() Palm Pre Black Sprint Smartphone clean esn $19.95 Time Remaining: 19h 13m |
![]() HP Palm Pre 2 Black Unlocked Smartphone Brand New Any Sim $180.00 Time Remaining: 3d 1h 28m Buy It Now for only: $180.00 Buy It Now |
![]() Palm Pre Black Sprint Smartphone clean esn $15.00 Time Remaining: 19h 13m |
![]() Palm Pre 2 Black Verizon Smartphone open box comes with manuals and accessor $139.95 Time Remaining: 18d 19h 59m Buy It Now for only: $139.95 Buy It Now |
![]() Palm Pre Black Sprint Smartphone clean esn $15.00 Time Remaining: 19h 14m |
![]() Palm Pre Plus 16GB Black Verizon Smartphone $50.00 Time Remaining: 20h 58m Buy It Now for only: $75.00 Buy It Now |
![]() NEW Replacement Lcd Display Touch Screen Digitzer Palm Pre Screen Protector $25.99 Time Remaining: 28d 7h 39m Buy It Now for only: $25.99 Buy It Now |
![]() Palm Pre 2 Black Verizon Works but Damaged Display SEE DETAILS FREE SH $20.01 (5 Bids) Time Remaining: 21h 43m |
![]() Verizon Palm Pre Plus 3G Qwerty Camera Used Smartphone No Contract $32.39 Time Remaining: 19h 45m Buy It Now for only: $32.39 Buy It Now |
![]() Palm Pre 2 Verizon Black Good Condition Camera Bluetooth Slide Phone $96.99 Time Remaining: 23h 49m |
![]() Palm Pre Sprint Black Good Condition Pda Smartphone $41.99 Time Remaining: 19h 38m Buy It Now for only: $41.99 Buy It Now |
![]() NEW PALM PRE PLUS 16GB VERIZON SMARTPHONE TOUCH + QWERTY WEB OS $57.99 Time Remaining: 1d 9h 48m Buy It Now for only: $64.99 Buy It Now |
![]() Palm Pre Plus Black ATT AS IS FAST Free Shipping $39.99 Time Remaining: 25d 17h 52m Buy It Now for only: $39.99 Buy It Now |
![]() Palm Pre 8GB Black Sprint Smartphone With Touchstone Charging Kit Included $0.99 (1 Bid) Time Remaining: 1d 10h 55m |
![]() Palm Pre Original Smart Phone AC USB Wall Adapter + Original Palm PRE Charging USB 2.0 Data Cable List Price: Sale Price: $7.48 You save: $32.47 (81%) Eligible for free shipping!Availability: Usually ships in 24 hours See Reviews For This Product DescriptionProduct Description * Palm Travel Chargers provide portable power. Simply plug the charger into a wall outlet and soon your battery will be fully charged. * Get one for the office, one for your home and one for travel... |
![]() Palm Stereo Headset for Palm Pixi and Palm Pre List Price: Sale Price: $2.46 You save: $22.53 (90%) Eligible for free shipping!Availability: Usually ships in 1-2 business days See Reviews For This Product DescriptionPalm Pre Stereo Headset |
![]() Palm Standard Battery for Palm Pixi and Palm Pre List Price: Sale Price: $4.16 You save: $45.83 (92%) Eligible for free shipping!Availability: Usually ships in 1-2 business days See Reviews For This Product DescriptionPalm Pre Standard Battery |
![]() Otterbox Plm6-Pre01-20-C50Tr Palm Pre /Pre Plus Tandem Case List Price: Sale Price: $17.26 You save: $17.69 (51%) Eligible for free shipping!Availability: Usually ships in 1-2 business days See Reviews For This Product DescriptionOtterbox Plm6-Pre01-20-C50Tr Palm Pre/Pre Plus Tandem Case |
![]() Palm Leather Side Case for Palm Pre List Price: Sale Price: $4.49 You save: $35.50 (89%) Eligible for free shipping!Availability: Usually ships in 1-2 business days See Reviews For This Product DescriptionPalm Pre Leather Side Case |
![]() Palm Pre Touchstone Back Cover List Price: Sale Price: $18.51 You save: $4.48 (19%) Eligible for free shipping!Availability: Usually ships in 1-2 business days See Reviews For This Product DescriptionAvoid the hassle of tangled cords and charge your Palm Pre wirelessly with the Palm Touchstone charging solution--the first inductive charging solution for phones. This Touchstone Back Cover snaps onto the back of the Palm Pre and is required for wireless charging with the separately available Touchstone Charging Dock... |
![]() 3 Pack of Premium Reusable LCD Screen Protectors for Palm Pre Sale Price: $0.98 Eligible for free shipping!Availability: Usually ships in 1-2 business days See Reviews For This Product Description3 Pack of Premium Reusable LCD Screen Protectors for Palm Pre |
![]() Palm Touchstone Charging Dock for Palm Pre and Palm Pixi List Price: Sale Price: $14.99 You save: $35.00 (70%) Eligible for free shipping!Availability: Usually ships in 1-2 business days See Reviews For This Product DescriptionAvoid the hassle of tangled cords and charge your Palm Pre wirelessly with this Palm Touchstone Charging Dock. The first inductive charging solution for phones, the Touchstone Charging Dock allows you to set your Palm Pre on top of the dock without worrying about connection, orientation or fit... |
![]() NEW PALM OEM 157-10119-00 BATTERY FOR PIXI PRE PLUS 1571011900 3443WW 1050mAh Sale Price: $4.69 Eligible for free shipping!Availability: Usually ships in 1-2 business days See Reviews For This Product DescriptionFlight delays, power outages, longer-than-expected trips. You can't always recharge your Palm device when you'd like to. But with an extra Palm battery on hand, you can always talk, type, and work as long as you need to... |
![]() Rubberized Proguard Case for Palm Pre Plus (Black) List Price: Sale Price: $0.96 You save: $13.34 (93%) Eligible for free shipping!Availability: Usually ships in 1-2 business days See Reviews For This Product DescriptionPalm Pre Plus Plus rubberized case is a high quality rubberized form fitting case for the Palm Pre Plus Plus. Rubberized coated polycarbonate plastic is made from the most advanced materials available... |





















































Eligible for free shipping!










Comment