Preenv/FAQ

How to install Preenv?
Gain root access and use  in the terminal: $ root
 * 1) apt-get install preenv
 * 2) exit

What do I use to extract an ipk file?
An .ipk file can be extracted with 7-zip or any tool that is able to extract Debian packages (dpkg, file-roller, etc)

Here is a video guide on how to install WebOS games on the N900: http://www.youtube.com/watch?v=pGQwWZ_VriA

Or you can follow the steps below...

How to install a game

 * Use 7-zip to extract the game-folder from the .ipk file.


 * Copy the game-folder to

$ sudo gainroot $ cd game-folder $ chmod a+x filename

where,  =   in case of Need for Speed or   in case of Sims3.


 * Launch the game

$ preenv $ ./filename


 * Once you know that the game runs properly, you can add a menu icon

$ sudo gainroot
 * 1) preenv
 * 2) desktopgen game-folder/appinfo.json
 * 3) exit

How to get games to save
You will need FileBox and rootsh from the Extras repository.


 * You need to change file ownership and group of the game-folder using the command:

chown -R user:users game-folder

Taking Hero Of Sparta as an example,

chown -R user:users /home/user/webOS/com.gameloft.app.heroofsparta/HeroOfSparta

NOTE: If your game was installed via a .deb file then you shall find it in /home/opt/preenv/usr/palm/applications/com.gameloft.app.heroofsparta/HeroOfSparta

Changing the file ownership is vital for allowing the execution of any game.

How to delete a game
$ preenv $ cd game-folder
 * Run preenv and  to the game-folder

$ root
 * Become root and use desktopgen to delete the menu entry
 * 1) preenv
 * 2) desktopgen -r appinfo.json
 * 3) exit
 * 4) exit

$ cd .. $ rm -r game-folder
 * Now you can delete the game folder itself

Deleting games installed with old preenv 0.1
$ sudo gainroot $ rm -r game-folder
 * Become root and delete the folder

$ rm /usr/share/applications/hildon/filename.desktop $ rm /usr/share/dbus-1/services/filename.service $ rm /usr/share/icons/hicolor/scalable/hildon/filename.png
 * To remove the menu icon, you need to delete three files

$ killall hildon-desktop
 * Refresh your menu

How to get N.O.V.A working?

 * You need to install a few extra packages first, and then you can follow the regular install guide.

$ sudo gainroot $ apt-get update $ apt-get install libsdl-net1.2

How to get Monopoly Classic working with an icon?

 * After installing and creating an icon, perform the following step:

$ cd *monopoly $ root
 * 1) chmod -R 777 monopolyclassic/save

How to get Asphalt5 working?

 * Here is another video guide http://www.youtube.com/watch?v=8rDCbZ3gyYE

How to make it run:

$ mkdir -p /home/user/webos/gamesave $ ln -s /home/user/webos/gamesave /media/internal $ chown -R user:root /home/user/webos/ $ chmod -R 755 /home/user/webos/ $ chown -R user:root /home/user/webos/gamesave $ chmod -R 755 /home/user/webos/gamesave

How to get NFSU Working?
Easy way:


 * Install nfsu-installer from extras-devel via Application Manager and run it. See the youtube video on how it works.

Manual way:

root apt-get install libgles1 preenv mkdir -p /home/user/MyDocs/Games/nfs cd /home/user/MyDocs/Games/nfs scp user@COMPUTER:/path/to/game/com.ea.app.nfsuc_20.0.28_all.ipk /home/user/MyDocs/Games/nfs dd if=/dev/zero of=/home/user/MyDocs/Games/nfs/nfsu.ext2 count=120 bs=1024k mkfs.ext2 /home/user/MyDocs/Games/nfs/nfsu.ext2 mkdir /mnt/nfsu echo -e "/home/user/MyDocs/Games/nfs/nfsu.ext2\t/mnt/nfsu\text2\tloop,auto\t0\t0" >> /etc/fstab mount /mnt/nfsu/ ln -s /mnt/nfsu/ /usr/palm dpkg -X /home/user/MyDocs/Games/nfs/com.ea.app.nfsuc_20.0.28_all.ipk /mnt/nfsu/ chmod +x /mnt/nfsu/applications/com.ea.app.nfsuc/nfsuc desktopgen /mnt/nfsu/applications/com.ea.app.nfsuc/appinfo.json
 * Get root privileges:
 * Install preenv and OpenGLES1 (you need to enable extras-devel):
 * Create main game dirECTORY on eMMC card:
 * Go to that directory and copy dowloaded .ipk file from your desktop (or download here directly) :
 * Create file for loopback mount:
 * Create ext2 filesystem on it
 * Press 'y'
 * Make a mount-point:
 * Save it to the /etc/fstab :
 * Finally, mount it:
 * Create symlink from /usr/palm (NFSU installs there) to the mount-point:
 * Extract the .ipk file:
 * Make binary executable:
 * Create desktop launcher:

Unable to connect to USB after above method?
After following the above tutorial, if you are unable to access your N900 on your PC via USB Mass Storage mode, open xterm on your device:

root
 * Get root privileges:

umount /mnt/nfsu
 * Unmount the image file:

mount /mnt/nfsu
 * Once you're done with USB you can remount the image:

How to get Driver working
Install libgles root apt-get install libgles1 libgles2
 * Get root privileges
 * Install OpenGLES1 and OpenGLES2 (needs extras-devel)

Fix corrupt/black screen problem
 * Create the file  containing these two lines:

[default] ForceExternalZBuffer=0

If the two lines above does not fix the corrupt/black screen problem, add ONE extra BLANK line (so a total of three lines) and try again.

see http://talk.maemo.org/showpost.php?p=862561&postcount=455

How to get Shrek Karting working
Install libgles1 root apt-get install libgles1 libgles2
 * Get root privileges
 * Install OpenGLES1 and OpenGLES2 (needs extras-devel)

Improve corrupted/black graphics problem
 * Create the file  containing these two lines:

[default] ForceExternalZBuffer=0

Graphics is still not perfect - lighting textures are still not good.

Save space (Transfer games to MyDocs folder)
If you are running out of space in the  directory, you can move part of the game, which usually takes up the most space, to.

NOTE: You still need the game folders to be in the  directory; only some of the files are transferred to.

Example using NFSU:

This example assumes NFSU does not exist in.

mkdir /home/user/MyDocs/preenv mkdir /home/user/MyDocs/preenv/nfsu
 * Open xterm and create a folder in  :

mkdir /home/user/[webos]/com.ea.app.nfsuc
 * Create NFSU folder in :

cp [SOURCE]/com.ea.app.nfsuc/appinfo.json /home/user/[webos]/com.ea.app.nfsuc/ cp [SOURCE]/com.ea.app.nfsuc/nfsuc /home/user/[webos]/com.ea.app.nfsuc/
 * Copy only the files indicated as below from the NFSU source (location where ipk file has been extracted) to

cp -r [SOURCE]/com.ea.app.nfsuc/res_nfsuc /home/user/MyDocs/preenv/nfsu/
 * Copy res_nfsuc folder from NFSU to :

ln -s /home/user/MyDocs/preenv/nfsu/res_nfsuc /home/user/[webos]/com.ea.app.nfsuc/res_nfsuc
 * Now create a symbolic link   in the [webos] nfsuc folder that points to the actual    folder in the   folder:

sudo gainroot chmod +rwx /home/user/[webos]/com.ea.app.nfsuc/res_nfsuc/nfsuc exit
 * Don't forget to change the permission of the executable nfsu file in [webos]:


 * Now you should still be able to play NFSU, having saved roughly 110MB on.

Example using BrainChallenge

The example assumes BrainChallenge does not exist in.

mkdir /home/user/MyDocs/preenv mkdir /home/user/MyDocs/preenv/brainchallenge
 * Open xterm and create a folder in :

mkdir /home/user/[webos]/com.gameloft.app.brainchallenge
 * Create BrainChallenge folder in :

cp [SOURCE]/com.gameloft.app.brainchallenge/appinfo.json /home/user/[webos]/com.gameloft.app.brainchallenge/ cp [SOURCE]/com.gameloft.app.brainchallenge/icon.png /home/user/[webos]/com.gameloft.app.brainchallenge/
 * Copy only the files indicated as below from the BrainChallenge source (location where ipk file has been extracted) to

cp [SOURCE]/com.gameloft.app.brainchallenge/brainchallenge/*.* /home/user/MyDocs/preenv/brainchallenge/
 * Copy files from the brainchallenge folder from BrainChallenge source to :

cp -r [SOURCE]/com.gameloft.app.brainchallenge/brainchallenge/sounds /home/user/MyDocs/preenv/brainchallenge/
 * Also copy any subdirectories in the brainchallenge folder to :


 * Copy the following code and save it to a file with the name 'createln.sh'. NOTE: Do not save this file using Windows Notepad; if using Windows, use software like TextPad to save the file in unix format. Copy this file to any folder on your N900.

cd $1 files="`ls -1 $1`" for file in $files do    echo $file ln -s $1/$file $2/$file done
 * 1) !/bin/sh

mkdir /home/user/[webos]/com.gameloft.app.brainchallenge/brainchallenge
 * Create folder brainchallenge in [webos] brainchallenge folder:

cp [source]/com.gameloft.app.brainchallenge/brainchallenge/brainchallenge /home/user/[webos]/com.gameloft.app.brainchallenge/brainchallenge/
 * Copy the brainchallenge executable file from Brainchallenge source location to the [webos] folder:

sh [..]/createln /home/user/MyDocs/preenv/brainchallenge/brainchallenge/ /home/user/[webos]/com.gameloft.app.brainchallenge/brainchallenge
 * Now create symbolic links in the [webos] brainchallenge folder that point to the actual files in the brainchallenge folder located in  (using createln):

ln -s /home/user/MyDocs/preenv/brainchallenge/brainchallenge/sounds /home/user/[webos]/com.gameloft.app.brainchallenge/brainchallenge/sounds
 * Also create symbolic links to any folders inside the brainchallenge folder in :

sudo gainroot chmod +rwx /home/user/[webos]/com.gameloft.app.brainchallenge/brainchallenge/brainchallenge exit
 * Don't forget to change the permission of the executable brainchallege file in [webos]:


 * Now you should still be able to play BrainChallenge, having saved roughly 114MB on.

This method has been confirmed to work with Asphalt 5, Blades of Fury, Oregon Trail and X-Plane Airliner also.

Save space (Transfer games to MyDocs folder) NOOB Version 1.0
Use this method if previous method is too tricky as it was for me. You will need FileBox, Rootsh, and a basic understanding of X Terminal

Step 1: Locate your game folders. There are two possible locations:

Either at  or

Step 2: Once found you need to distinguish which files are the largest and would be wise to move to save space. I suggest moving sound folders, music folders, and videos folders. Leave save files and executable files as it is.

NB: Save folders usually are named "save" and are usually small in size (kb/b) To locate executable files for games use this command:

Using Hero Of Sparta as an example: cd /home/user/webOS/com.gameloft.app.heroofsparta grep main appinfo.json

This will give you the result: "main" : "HeroOfSparta/HeroOfSparta" So you know not to move this file. Step 3: Time to move! DELETE the originals from the game folder.
 * Using FileBox's "Create New Folder" feature {found after you tap the wrench icon} go to  and make a folder their called.
 * Now using the copy feature {which is accessed when a specific folder is "pressed" for about 2seconds, a menu pops up giving options such as copy, etc}, copy the folders and files desired from the game folder to the   folder in  

Step 4: Time to create some symlinks! Open up X Terminal and get rooted. TIP: Have FileManager open in the  folder to see what files and folders you need to link.

The command to create symlinks is: ln -s {source} {link}

Using NFSUC as an example: ln -s /home/user/MyDocs/WebOSGames/res_nfsuc /home/user/webOS/com.ea.app.nfsuc/res_nfsuc

This will create a link from the NFSUC game folder to the folder containing the res_nfsuc folder

Now your game will still run and you have lots of space to add more games.

TIP: You can also delete videos from game folders that are not necessary or that do not play. Asphalt 5 has videos not necessary for the game to run so they can be DELETED.

For some games you will need to create symlinks for multiple folders e.g. Driver and N.O.V.A. this is why I suggest having a separate filemanager open such as the one that comes with the N900, so that you can see which file/folder you have to link next.

Enjoy :)