Emulator

From WebOS101

Jump to: navigation, search

Contents

Introduction

The webOS SDK includes an emulated webOS device that runs as a virtual machine (VM) in VirtualBox. Using the emulator allows you test applications you develop without the need for a physical device. The emulator also offers some advanced debugging tools not available when running on a device.

Getting Started

To launch the emulator start the palm-emulator command line tool. This command will start VirtualBox and the webOS virtual machine.

Once the emulator is started, you can access its terminal directly by opening up a command window and entering:

novacom -t -d emulator open tty://

Common Emulator Problems

If you allow VirtualBox to suspend the VM that is running webOS you will not be able to connect with the command line tools or Palm Inspector. To fix this, reboot the VM.

Advanced Techniques

Copying Files To The Emulator

On a Mac or Linux PC you can easily copy files to the emulator using the scp command:

scp -P 5522 <local filename> root@localhost:<remote filename>

Root's password is empty (just press enter when prompted). On Windows you must first install WinSCP. To configure WinSCP for Windows, use the following settings:[1]

Host Name: 127.0.0.1  (localhost will not work)
Port: 5522
User Name: root
File Protocol: SCP

Click OK to enter a blank password
Click OK to the error that comes up
You will also get a warning about the connection, just continue.

Changing The Language

You can test localization of your apps by changing the emulator's language.[2] To change the language, navigate to the third page of apps on the emulator and choose Region Settings. From here you can select the language to test. There is a special English variation called 'Pseudoland' that creates randomized strings for Palm-translated strings so you can see which strings Palm translates for you.

Enabling Sounds

  • Note: This only works for .wav and .pcm files.
mv /etc/event.dis/audiod /etc/event.d
mv /etc/event.dis/mediaserver /etc/event.d
mv /etc/event.dis/pulseaudio /etc/event.d
mv /etc/event.dis/systemsoundsloader /etc/event.d

Notes

  1. http://developer.palm.com/distribution/viewtopic.php?f=19&t=2417
  2. http://developer.palm.com/distribution/viewtopic.php?f=7&t=1994
Personal tools