webOS Open Source Edition (OSE) provides an emulator that enables you to develop the webOS application and service on a virtual environment. With the emulator, you can test major features of webOS OSE on your PC without the need of a physical device such as Raspberry Pi.
The emulator runs as a virtual machine on VirtualBox and supports host platforms including Ubuntu Linux, macOS, and Windows.
The VirtualBox-based emulator is supported by webOS OSE build #87 or higher (included in the 2019 6th release).
webOS OSE emulator requires VirtualBox version 6.0 or higher, which can be installed on 64-bit host platforms only.
Key characteristics of the emulator are as follows:
Emulates major features of webOS OSE platform on PC without Raspberry Pi 3 target device
Provides graphics functionality with host PC’s GPU H/W acceleration
Supports webOS OSE CLI tool for application and service development
Download the binary package specified as “OS X hosts” from VirtualBox Download page and install it on your computer.
Download the binary package specified as “Windows hosts” from VirtualBox Download page and install it on your computer.
Setting the path on Windows
On Windows, the path to the VirtualBox installation directory is not automatically added to the path during installation. We strongly recommend you set the path manually for later steps, using one of the commands below on a command shell.
Setting the PATH variable in the system environment (run the shell as Administrator)
After the build is completed, check that the resulting image (webos-image-qemux86-master-*.wic.vmdk) has been created properly.
Setting Up the Virtual Machine in VirtualBox
You can create and set up a VirtualBox virtual machine from the GUI or from the command line.
Using the GUI
Note The screenshots below have been captured from Oracle VM VirtualBox v6.0.10 for Windows. If you are using a different version of the program or on a different host operating system, you might notice minor differences in the position or name of GUI elements.
Start the Oracle VM VirtualBox application. You can launch the program from the application menu or by typing virtualbox in a command shell.
Ubuntu Linux only You can ignore the “Error opening file for reading: Permission denied” error that might appear when launching the VirtualBox GUI from the shell.
First, you need to create a webos-image virtual machine. To create a webos-image virtual machine, click New on the icon toolbar.
In the Create Virtual Machine wizard that appears, input the general information of the virtual machine.
In the Name box, type webos-image.
From the Type list, select Linux.
From the Version list, select Other Linux (32-bit).
In the Memory size section, set the amount of memory you wish to allocate to the webos-image virtual machine.
You must allocate at least 512 MB of memory. It is recommended, however, that you allocate 1024 MB, provided your computer has the capacity.
Type the amount of memory in the box to the right of the slider, and click Next.
In the Hard disk section, select Use an existing virtual hard disk file and click icon.
Click the Add button and locate the webOS image (.vmdk) on your computer that you wish to install on the virtual machine.
Oracle VM VirtualBox Manager will return to the main screen and display the details of the created virtual machine.
Next, you need to modify the system settings of webos-image virtual machine. On the icon toolbar, click Settings.
In the Settings dialog box that appears, click System in the navigation bar.
The Motherboard category will be displayed.
In Boot Order, clear checkboxes on Floppy and Optical.
In Extended Features, select Enable I/O APIC.
Click the Processor tab.
The Processor section will be displayed.
You need to specify the number of processors you want for your virtual machine. You can specify 1, but we recommend you set it to a higher value (up to 4), depending on your system capabilities.
Type the number of processors you wish to allocate, in the box to the right of the Processor(s) slider.
On the navigation bar, click Display.
The Display section will be displayed.
In Video Memory, set the amount of video memory you wish to allocate to the webos-image virtual machine. You can allocate up to 128 MB of memory.
From the Graphics Controller list, select VMSVGA.
In Acceleration, ensure that Enable 3D Acceleration option is selected.
On the navigation bar, click Network.
The Network section will be displayed. Ensure that the Adapter 1 tab is selected.
From the Adapter 1 tab, click Advanced. You will see advanced network settings.
From the Adapter Type list, select Intel PRO/1000 MT Desktop (82540EM).
Next, click Port Forwarding.
The Port Forwarding Rules dialog box will show up.
You need to set up port forwarding rules to connect through SSH and Web Inspector. To add port forwarding rules, click .
You will see the rules table. Set the rules by typing the following values in the appropriate column:
Leave it blank
Leave it blank
Leave it blank
Leave it blank
Click OK. You will return to the Adapter 1 section. On the navigation bar, click Serial Ports.
The Serial Port section will be displayed. Ensure that the Port1 tab is selected.
In the Port 1 tab, select Enable Serial Port.
From the Port Mode list, select Raw File.
In the Path/Address box, type /dev/null (on Ubuntu/macOS) or null (on Windows).
Oracle VM VirtualBox Manager will return to the main screen and display the details of the virtual machine with updated information.
Your virtual machine is ready for use. To start the virtual machine, ensure that the virtual machine you wish to run is selected. On the icon toolbar, click Start.
Oracle VM VirtualBox Manager will display the webos-image virtual machine window.
It will display the VirtualBox - Information dialog box. Click OK.
Next you will see another VirtualBox - Information dialog box, informing you about how the mouse capture has been set up. Click OK.
You can now begin using the webos-image virtual machine.
The display resolution of webos-image defaults to 1920x1080. If it is too big to be displayed on the host monitor, you can adjust the scale with the following command.
To create a virtual machine from the command line, the vboxmanage command of VirtualBox is used.
The following example shows commands used to create and set up a webos-image virtual machine for a Ubuntu Linux host with a similar setting of the GUI example above. Type the following commands sequentially in a command shell:
A command-line example to create a virtual machine on Ubuntu Linux
To launch the virtual machine, type the following in a command shell:
vboxmanage startvm webos-image
Updating the Image on the Virtual Machine
The following describes the steps to update the emulator image on the previously created virtual machine.
Prepare a new emulator image by building webOS OSE for emulator.
Start the Oracle VM VirtualBox on your computer. From the virtual machine list, select the virtual machine whose image you wish to update. From the icon toolbar, click Settings.
On the navigation bar of the Settings dialog box, click Storage. From the Controller: IDE list, select the build image that you wish to update.
On the Attributes section, click icon. From the displayed menu, select Choose Virtual Hard Disk File….
You will see the Please choose a virtual hard disk file dialog box. Locate the new webOS image you wish to install from your computer. Select the appropriate emulator image file (.vmdk), and click Open.
The Storage section will show up. Click OK.
Now your virtual machine has been updated and you are ready to use the updated virtual machine.
Connecting to the Emulator
On the host machine, you can connect to the emulator from the shell or from the web browser.
Connect from the Shell
The best way to get a shell into the emulator is with SSH. On the command shell, type the following command with the host port number configured for ssh (for example, 6622) in the port forwarding rules during the setup process:
ssh -p <PortNumber> root@localhost
To avoid error messages about the host changing every time you change emulator images, you can add the following flags to ssh (or create an alias in your .bashrc to do this for you):
Use a SSH client (for example, Putty) to connect to the emulator using SSH protocol.
Connect from the Web Browser
To connect to the emulator using Web Inspector, access localhost:<PortNumber> on a web browser (for example, Chrome). The port number must match the value configured for web-inspector (for example, 9998) in the port forwarding rules during the setup process.