Preenv/FAQ
andrewfblack (Talk | contribs) |
m (Protected "Preenv/FAQ" [edit=autoconfirmed:move=autoconfirmed]) |
||
(120 intermediate revisions not shown) | |||
Line 2: | Line 2: | ||
Gain [[root access]] and use <code>apt-get</code> in the [[terminal]]: | Gain [[root access]] and use <code>apt-get</code> in the [[terminal]]: | ||
- | root | + | $ root |
- | apt-get install preenv | + | # apt-get install preenv |
+ | # exit | ||
- | ==What do I use to extract an ipk file | + | == What do I use to extract an ipk file == |
- | 7- | + | An .ipk file can be extracted with [http://7-zip.org 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== | ==How to install a game== | ||
+ | |||
+ | You will need '''FileBox''' and '''rootsh''' from the [[Extras]] repository. | ||
+ | |||
+ | *Use 7-zip to extract the game-folder from the .ipk file. | ||
+ | |||
+ | *Copy the game-folder to <code>/home/user/[webOS-games]</code> | ||
$ sudo gainroot | $ sudo gainroot | ||
- | + | # preenv | |
+ | # cd game-folder | ||
+ | # chmod +rwx filename | ||
- | + | where, <code>filename</code> = <code>nfsuc</code> in case of Need for Speed or <code>sims</code> in case of Sims3. | |
- | + | *You also 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. | ||
- | + | *Launch the game | |
$ preenv | $ preenv | ||
$ ./filename | $ ./filename | ||
- | Once you know that the | + | *Once you know that the game runs properly, you can add a menu icon |
- | + | $ sudo gainroot | |
- | $ | + | $ preenv |
- | $ desktopgen appinfo.json | + | # desktopgen game-folder/appinfo.json |
+ | # exit | ||
+ | # exit | ||
==How to delete a game== | ==How to delete a game== | ||
- | Become root and delete the | + | *Run preenv and <code>cd</code> to the game-folder |
+ | $ preenv | ||
+ | $ cd game-folder | ||
+ | |||
+ | *Become root and use desktopgen to delete the menu entry | ||
$ sudo gainroot | $ sudo gainroot | ||
+ | # preenv | ||
+ | # desktopgen -r appinfo.json | ||
+ | # exit | ||
+ | # exit | ||
+ | *Now you can delete the game folder itself | ||
+ | $ cd .. | ||
$ rm -r game-folder | $ rm -r game-folder | ||
- | + | === Deleting games installed with old preenv 0.1 === | |
- | + | ||
- | + | ||
- | + | ||
- | Refresh your menu | + | *Become root and delete the folder |
+ | $ sudo gainroot | ||
+ | # rm -r game-folder | ||
+ | |||
+ | *To remove the menu icon, you need to delete three files | ||
+ | # rm /usr/share/applications/hildon/filename.desktop | ||
+ | # rm /usr/share/dbus-1/services/filename.service | ||
+ | # rm /usr/share/icons/hicolor/scalable/hildon/filename.png | ||
+ | |||
+ | *Or try this (if you used nfsuc installer before) : | ||
+ | $ rm -rf /home/user/NFS* | ||
+ | $ rm -rf /home/user/MyDocs/NFS* | ||
+ | $ rm /home/user/.local/share/applications/hildon/filename.desktop | ||
+ | $ rm /home/user/.local/share/icons/hicolor/scalable/hildon/filename.png | ||
+ | |||
+ | *Refresh your menu | ||
$ killall hildon-desktop | $ killall hildon-desktop | ||
- | ==How to get | + | == How to get a specific game working == |
- | + | === N.O.V.A === | |
+ | |||
+ | *You need to install a few extra packages first, and then you can follow the regular install guide. | ||
- | $ sudo gainroot | + | $ sudo gainroot |
- | + | # apt-get update | |
- | + | # apt-get install libsdl-net1.2 | |
- | == | + | === Monopoly === |
- | + | *After installing and creating an icon, perform the following step: | |
+ | $ cd *monopoly | ||
$ sudo gainroot | $ sudo gainroot | ||
- | + | # chmod -R 777 monopolyclassic/save | |
- | + | ||
- | + | === Asphalt5 === | |
+ | *Here is another video guide http://www.youtube.com/watch?v=8rDCbZ3gyYE | ||
- | $ | + | How to make it run: |
- | $ | + | |
- | $ | + | $ mkdir -p /home/user/webos/gamesave |
- | $ chmod | + | $ 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 | ||
+ | |||
+ | *if using preenv 0.1.7, you also need to install libvorbisidec1 in the case of music problems: | ||
+ | $ root | ||
+ | # apt-get install libvorbisidec1 | ||
+ | |||
+ | === NFSU === | ||
+ | '''Easy way:''' | ||
+ | |||
+ | *Install [http://maemo.org/packages/view/nfsu-installer/ nfsu-installer] from extras-devel via Application Manager and run it. See the [http://www.youtube.com/watch?v=-f-a-7yakkM youtube video] on how it works. | ||
- | + | '''Manual way:''' | |
- | + | *Get root privileges: | |
root | root | ||
- | + | *Install preenv and OpenGLES1 (you need to enable [[extras-devel]]): | |
apt-get install libgles1 preenv | apt-get install libgles1 preenv | ||
- | + | *Create main game dirECTORY on eMMC card: | |
mkdir -p /home/user/MyDocs/Games/nfs | mkdir -p /home/user/MyDocs/Games/nfs | ||
- | + | *Go to that directory and copy dowloaded .ipk file from your desktop (or download here directly) : | |
cd /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 | scp user@COMPUTER:/path/to/game/com.ea.app.nfsuc_20.0.28_all.ipk /home/user/MyDocs/Games/nfs | ||
- | + | *Create file for loopback mount: | |
- | + | ||
dd if=/dev/zero of=/home/user/MyDocs/Games/nfs/nfsu.ext2 count=120 bs=1024k | dd if=/dev/zero of=/home/user/MyDocs/Games/nfs/nfsu.ext2 count=120 bs=1024k | ||
- | + | *Create ext2 filesystem on it | |
mkfs.ext2 /home/user/MyDocs/Games/nfs/nfsu.ext2 | mkfs.ext2 /home/user/MyDocs/Games/nfs/nfsu.ext2 | ||
- | + | *Press 'y'<br> | |
- | + | *Make a mount-point: | |
mkdir /mnt/nfsu | mkdir /mnt/nfsu | ||
- | + | *Save it to the /etc/fstab : | |
echo -e "/home/user/MyDocs/Games/nfs/nfsu.ext2\t/mnt/nfsu\text2\tloop,auto\t0\t0" >> /etc/fstab | echo -e "/home/user/MyDocs/Games/nfs/nfsu.ext2\t/mnt/nfsu\text2\tloop,auto\t0\t0" >> /etc/fstab | ||
- | + | *Finally, mount it: | |
mount /mnt/nfsu/ | mount /mnt/nfsu/ | ||
- | + | *Create symlink from /usr/palm (NFSU installs there) to the mount-point: | |
ln -s /mnt/nfsu/ /usr/palm | ln -s /mnt/nfsu/ /usr/palm | ||
- | + | *Extract the .ipk file: | |
dpkg -X /home/user/MyDocs/Games/nfs/com.ea.app.nfsuc_20.0.28_all.ipk /mnt/nfsu/ | dpkg -X /home/user/MyDocs/Games/nfs/com.ea.app.nfsuc_20.0.28_all.ipk /mnt/nfsu/ | ||
- | + | *Make binary executable: | |
chmod +x /mnt/nfsu/applications/com.ea.app.nfsuc/nfsuc | chmod +x /mnt/nfsu/applications/com.ea.app.nfsuc/nfsuc | ||
- | + | *Create desktop launcher: | |
desktopgen /mnt/nfsu/applications/com.ea.app.nfsuc/appinfo.json | desktopgen /mnt/nfsu/applications/com.ea.app.nfsuc/appinfo.json | ||
+ | |||
+ | ==== 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: | ||
+ | |||
+ | *Get root privileges: | ||
+ | root | ||
+ | |||
+ | *Unmount the image file: | ||
+ | umount /mnt/nfsu | ||
+ | |||
+ | *Once you're done with USB you can remount the image: | ||
+ | mount /mnt/nfsu | ||
[[Category:Software]] | [[Category:Software]] | ||
+ | |||
+ | === Driver === | ||
+ | '''Install libgles''' | ||
+ | * Get root privileges | ||
+ | root | ||
+ | * Install OpenGLES1 and OpenGLES2 (needs [[extras-devel]]) | ||
+ | apt-get install libgles1 libgles2 | ||
+ | |||
+ | '''Fix corrupt/black screen problem''' | ||
+ | * Create the file <code>/etc/powervr.d/driver.ini</code> 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. | ||
+ | |||
+ | === Shrek Karting === | ||
+ | '''Install libgles1''' | ||
+ | * Get root privileges | ||
+ | root | ||
+ | * Install OpenGLES1 and OpenGLES2 (needs extras-devel) | ||
+ | apt-get install libgles1 libgles2 | ||
+ | |||
+ | '''Improve corrupted/black graphics problem''' | ||
+ | * Create the file <code>/etc/powervr.d/ShrekKarting.ini</code> containing these two lines: | ||
+ | |||
+ | [default] | ||
+ | ForceExternalZBuffer=0 | ||
+ | |||
+ | If the two lines above does not fix the corrupt/black screen problem, add TWO extra BLANK lines (so a total of four lines) and try again. | ||
+ | |||
+ | Graphics is still not perfect - lighting textures are still not good. | ||
+ | |||
+ | === Galcon , Cronk , Cosmic Nitro === | ||
+ | *First download the external libsdlpre.so and replace it with your own's: | ||
+ | $ sudo gainroot | ||
+ | # mv libsdlpre.so /opt/preenv/lib/libsdlpre.so | ||
+ | *Then rotate the screen to 0 by typing the following command in X-Terminal): | ||
+ | $ gconftool-2 --set --type int /apps/preenv/Galcon/screen_rotation 0 | ||
+ | Replace your "Galcon" exe name for other games.(i.e:"application" for cronk and "cosmicnitro" for Cosmic Nitro game.) | ||
+ | |||
+ | === Settlers === | ||
+ | *If using preenv 0.1.7, in order to get the music working you need to install libvorbisidec1: | ||
+ | # apt-get install libvorbisidec1 | ||
+ | '''Hint:''' Though N900 has resistive display and the game requires you to select a group of workers with multi touch, you can double tap workaround to select groups of workers instead. | ||
+ | ==== If you have encountered the "asking for device id" issue ==== | ||
+ | *Download the file [http://talk.maemo.org/attachment.php?attachmentid=21001&d=1308911019 texture10.bar] and copy the file to the settlers folder. | ||
+ | *Remove the texture11.bar | ||
+ | === H.A.W.X , Castle of Magic === | ||
+ | *Create the cryptofs folder and symlink it to your installation directory: | ||
+ | # mkdir -p /media/cryptofs/apps/usr/palm/applications | ||
+ | # ln -s /(Installation path)/com.gameloft.app.hawx / /media/cryptofs/apps/usr/palm/applications/ | ||
+ | *For Castle of Magic, replace the H.A.W.X folder name with Castle of Magic's(i.e:com.gameloft.app.castleofmagic) | ||
+ | |||
+ | ==== H.A.W.X only ==== | ||
+ | If you get a crash while trying to start a mission, delete H.A.W.X and follow the instructions here: [http://talk.maemo.org/showthread.php?t=81033] | ||
+ | |||
+ | === Angry Birds Rio === | ||
+ | If the game crashes, perform the following step: | ||
+ | $ cd (Angry Birds Rio folder(the folder with settings.lua)) | ||
+ | $ sudo gainroot | ||
+ | # chmod 777 settings.lua | ||
+ | |||
+ | === Angry Birds Seasons HD === | ||
+ | If the game error while loading shared libraries: libSDL.so: cannot open shared object file: No such file or directory | ||
+ | # sudo gainroot | ||
+ | # cd /home/opt/preenv/lib | ||
+ | # ln libSDL_mixer-1.2.so.0.10.1 libSDL.so | ||
+ | |||
+ | === Avatar === | ||
+ | |||
+ | '''Improve corrupted/black graphics problem''' | ||
+ | * Create the file <code>/etc/powervr.d/Avatar.ini</code> containing these two lines: | ||
+ | |||
+ | [default] | ||
+ | ForceExternalZBuffer=0 | ||
+ | |||
+ | If the two lines above does not fix the corrupt/black screen problem, add TWO extra BLANK lines (so a total of four lines) and try again. | ||
+ | |||
+ | ==== If using preenv 0.1.5 or earlier ==== | ||
+ | *Create an empty file named libavcodec.so.52 in preenv/lib | ||
+ | *Example command: | ||
+ | # cd /opt/preenv/lib | ||
+ | # ln -s libstub.so libavcodec.so.52 | ||
+ | |||
+ | === Real Soccer 2010 === | ||
+ | If the game crashes at start, type the following command: | ||
+ | sudo gainroot | ||
+ | # cd (game folder) | ||
+ | # chown -R user:users RealSoccer2010/* | ||
+ | # chmod 777 RealSoccer2010/* | ||
+ | |||
+ | === Plasma Cannon === | ||
+ | Remove assets/music.mp3 (or fix bad ID3 tag) | ||
+ | |||
+ | == A note for games with bad touch screen behavior(Or bad scaling) == | ||
+ | *Although these games are listed as "Unplayable" in the compatibility list, you can get them to work by rotating the screen to 0 and resizing them(External libsdlpre.so is required); however, these games will not work perfectly after the changes are made | ||
+ | *Changes that should be made are: | ||
+ | $ gconftool-2 --set --type int /apps/preenv/(exe name)/screen_rotation 0 | ||
+ | $ gconftool-2 --set --type int /apps/preenv/(exe name)/screen_width 320 | ||
+ | |||
+ | == Is there a way to get multitouch working in Preenv(a.k.a Keyboard mapping) == | ||
+ | Currently there is [http://members.cox.net/jflatt/libsdlpre.so an unofficial modifiable patch] for preenv 0.1.4 that is using the keyboard as the second touch.It needs to be configured properly for each game to get the QWERTY keyboard to work.There is a [http://members.cox.net/jflatt/earthwormjim.ods tutorial] for it. | ||
+ | *To get the patch working,download the patch to your device and type in X-terminal(Assuming that your patch is allocated in MyDocs): | ||
+ | cd MyDocs | ||
+ | sudo gainroot | ||
+ | /home/user/MyDocs # mv libsdlpre.so /opt/preenv/lib/libsdlpre.so | ||
+ | There are also some unofficial Mods that makes the configuration easier: | ||
+ | [http://n900.darktl.com/downloads/gconf_set_avatar.sh Avatar] | ||
+ | |||
+ | Download all configuration files from [http://www.mediafire.com/?h7vvck3lrccf1 Here] or [http://talk.maemo.org/showthread.php?t=69263 Here] (also includes PS3 Controller and Game Gripper) | ||
+ | |||
+ | *To get the mods working to, you need to type the following commands in the X-terminal(Assuming that the file is allocated in the MyDocs): | ||
+ | $ mv /home/user/MyDocs/(Modname).sh (Modname).sh | ||
+ | $ chmod +x (Modname).sh | ||
+ | $ ./(Modname).sh | ||
+ | |||
+ | == Save space (Transfer games to MyDocs folder) == | ||
+ | |||
+ | If you are running out of space in the <code>/home/user/</code> directory, you can move part of the game, which usually takes up the most space, to <code>/home/user/MyDocs</code>. | ||
+ | |||
+ | ''NOTE'': You still need the game folders to be in the <code>/home/user/[webos]</code> directory; only some of the files are transferred to <code>MyDocs</code>. | ||
+ | |||
+ | '''Example using NFSU:''' | ||
+ | |||
+ | This example assumes NFSU does not exist in <code>/home/user/[webos]</code>. | ||
+ | |||
+ | *Open xterm and create a folder in <code>MyDocs</code>: | ||
+ | mkdir /home/user/MyDocs/preenv | ||
+ | mkdir /home/user/MyDocs/preenv/nfsu | ||
+ | |||
+ | *Create NFSU folder in <code>/home/user/[webos]</code>: | ||
+ | mkdir /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 <code>/home/user/[webos]</code> | ||
+ | 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 res_nfsuc folder from NFSU to <code>MyDocs</code>: | ||
+ | cp -r [SOURCE]/com.ea.app.nfsuc/res_nfsuc /home/user/MyDocs/preenv/nfsu/ | ||
+ | |||
+ | *Now create a symbolic link <code>res_nfsuc</code> in the [webos] nfsuc folder that points to the actual <code>res_nfsuc</code> folder in the <code>MyDocs</code> folder: | ||
+ | ln -s /home/user/MyDocs/preenv/nfsu/res_nfsuc /home/user/[webos]/com.ea.app.nfsuc/res_nfsuc | ||
+ | |||
+ | *Don't forget to change the permission of the executable nfsu file in [webos]: | ||
+ | sudo gainroot | ||
+ | chmod +rwx /home/user/[webos]/com.ea.app.nfsuc/res_nfsuc/nfsuc | ||
+ | exit | ||
+ | |||
+ | *Now you should still be able to play NFSU, having saved roughly 110MB on <code>/home/user/[webos]</code>. | ||
+ | |||
+ | '''Example using BrainChallenge''' | ||
+ | |||
+ | The example assumes BrainChallenge does not exist in <code>/home/user/[webos]</code>. | ||
+ | |||
+ | *Open xterm and create a folder in <code>MyDocs</code>: | ||
+ | mkdir /home/user/MyDocs/preenv | ||
+ | mkdir /home/user/MyDocs/preenv/brainchallenge | ||
+ | |||
+ | *Create BrainChallenge folder in <code>/home/user/[webos]</code>: | ||
+ | mkdir /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 <code>/home/user/[webos]</code> | ||
+ | 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 files from the brainchallenge folder from BrainChallenge source to <code>MyDocs</code>: | ||
+ | cp [SOURCE]/com.gameloft.app.brainchallenge/brainchallenge/*.* /home/user/MyDocs/preenv/brainchallenge/ | ||
+ | |||
+ | *Also copy any subdirectories in the brainchallenge folder to <code>MyDocs</code>: | ||
+ | cp -r [SOURCE]/com.gameloft.app.brainchallenge/brainchallenge/sounds /home/user/MyDocs/preenv/brainchallenge/ | ||
+ | |||
+ | *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. | ||
+ | |||
+ | #!/bin/sh | ||
+ | |||
+ | cd $1 | ||
+ | files="`ls -1 $1`" | ||
+ | |||
+ | for file in $files | ||
+ | do | ||
+ | echo $file | ||
+ | ln -s $1/$file $2/$file | ||
+ | done | ||
+ | |||
+ | *Create folder brainchallenge in [webos] brainchallenge folder: | ||
+ | mkdir /home/user/[webos]/com.gameloft.app.brainchallenge/brainchallenge | ||
+ | |||
+ | *Copy the brainchallenge executable file from Brainchallenge source location to the [webos] folder: | ||
+ | cp [source]/com.gameloft.app.brainchallenge/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 <code>MyDocs</code> (using ''createln''): | ||
+ | sh [..]/createln /home/user/MyDocs/preenv/brainchallenge/brainchallenge/ /home/user/[webos]/com.gameloft.app.brainchallenge/brainchallenge | ||
+ | |||
+ | *Also create symbolic links to any folders inside the brainchallenge folder in <code>MyDocs</code>: | ||
+ | ln -s /home/user/MyDocs/preenv/brainchallenge/brainchallenge/sounds /home/user/[webos]/com.gameloft.app.brainchallenge/brainchallenge/sounds | ||
+ | |||
+ | *Don't forget to change the permission of the executable brainchallege file in [webos]: | ||
+ | sudo gainroot | ||
+ | chmod +rwx /home/user/[webos]/com.gameloft.app.brainchallenge/brainchallenge/brainchallenge | ||
+ | exit | ||
+ | |||
+ | *Now you should still be able to play BrainChallenge, having saved roughly 114MB on <code>/home/user/</code>. | ||
+ | |||
+ | 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 <code>/home/user/</code> or <code>/home/opt/preenv/usr/palm/applications</code> | ||
+ | |||
+ | '''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! | ||
+ | *Using FileBox's "Create New Folder" feature {found after you tap the wrench icon} go to <code>MyDocs</code> and make a folder their called <code>WebOSGames</code>. | ||
+ | |||
+ | *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 '''<code>WebOSGames</code>''' folder in '''<code>MyDocs</code>''' | ||
+ | '''DELETE''' the originals from the game folder. | ||
+ | |||
+ | '''Step 4:''' Time to create some symlinks! | ||
+ | Open up X Terminal and get rooted. | ||
+ | TIP: Have '''FileManager''' open in the <code>WebOSGames</code> 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 :) | ||
+ | == References == | ||
+ | *1. Asphalt fix TMO post [http://talk.maemo.org/showpost.php?p=852796&postcount=54 #1], [http://talk.maemo.org/showpost.php?p=854747&postcount=131 #2] | ||
+ | *2. Avatar fix TMO post [http://talk.maemo.org/showpost.php?p=924677&postcount=1214 #1], [http://talk.maemo.org/showpost.php?p=921025&postcount=1049 #2] | ||
+ | *3. H.A.W.X fix TMO post [http://talk.maemo.org/showpost.php?p=859289&postcount=336 #1], [http://talk.maemo.org/showpost.php?p=859893&postcount=366 #2] | ||
+ | *4. Diver fix TMO [http://talk.maemo.org/showpost.php?p=862561&postcount=455 post] | ||
+ | == External links == | ||
+ | [http://members.cox.net/jflatt/libsdlpre.so External libsdlpre.so download] | ||
+ | |||
+ | [http://maemo.org/packages/view/wgames/ WebOS game manager package link] |
Latest revision as of 11:24, 1 October 2012
How to install Preenv?
Gain root access and use apt-get
in the terminal:
$ root # apt-get install preenv # 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
You will need FileBox and rootsh from the Extras repository.
- Use 7-zip to extract the game-folder from the .ipk file.
- Copy the game-folder to
/home/user/[webOS-games]
$ sudo gainroot # preenv # cd game-folder # chmod +rwx filename
where, filename
= nfsuc
in case of Need for Speed or sims
in case of Sims3.
- You also 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.
- Launch the game
$ preenv $ ./filename
- Once you know that the game runs properly, you can add a menu icon
$ sudo gainroot $ preenv # desktopgen game-folder/appinfo.json # exit # exit
How to delete a game
- Run preenv and
cd
to the game-folder
$ preenv $ cd game-folder
- Become root and use desktopgen to delete the menu entry
$ sudo gainroot # preenv # desktopgen -r appinfo.json # exit # exit
- Now you can delete the game folder itself
$ cd .. $ rm -r game-folder
Deleting games installed with old preenv 0.1
- Become root and delete the folder
$ sudo gainroot # rm -r game-folder
- To remove the menu icon, you need to delete three files
# rm /usr/share/applications/hildon/filename.desktop # rm /usr/share/dbus-1/services/filename.service # rm /usr/share/icons/hicolor/scalable/hildon/filename.png
- Or try this (if you used nfsuc installer before) :
$ rm -rf /home/user/NFS* $ rm -rf /home/user/MyDocs/NFS* $ rm /home/user/.local/share/applications/hildon/filename.desktop $ rm /home/user/.local/share/icons/hicolor/scalable/hildon/filename.png
- Refresh your menu
$ killall hildon-desktop
How to get a specific game working
N.O.V.A
- 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
Monopoly
- After installing and creating an icon, perform the following step:
$ cd *monopoly $ sudo gainroot # chmod -R 777 monopolyclassic/save
Asphalt5
- 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
- if using preenv 0.1.7, you also need to install libvorbisidec1 in the case of music problems:
$ root # apt-get install libvorbisidec1
NFSU
Easy way:
- Install nfsu-installer from extras-devel via Application Manager and run it. See the youtube video on how it works.
Manual way:
- Get root privileges:
root
- Install preenv and OpenGLES1 (you need to enable extras-devel):
apt-get install libgles1 preenv
- Create main game dirECTORY on eMMC card:
mkdir -p /home/user/MyDocs/Games/nfs
- Go to that directory and copy dowloaded .ipk file from your desktop (or download here directly) :
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
- Create file for loopback mount:
dd if=/dev/zero of=/home/user/MyDocs/Games/nfs/nfsu.ext2 count=120 bs=1024k
- Create ext2 filesystem on it
mkfs.ext2 /home/user/MyDocs/Games/nfs/nfsu.ext2
- Press 'y'
- Make a mount-point:
mkdir /mnt/nfsu
- Save it to the /etc/fstab :
echo -e "/home/user/MyDocs/Games/nfs/nfsu.ext2\t/mnt/nfsu\text2\tloop,auto\t0\t0" >> /etc/fstab
- Finally, mount it:
mount /mnt/nfsu/
- Create symlink from /usr/palm (NFSU installs there) to the mount-point:
ln -s /mnt/nfsu/ /usr/palm
- Extract the .ipk file:
dpkg -X /home/user/MyDocs/Games/nfs/com.ea.app.nfsuc_20.0.28_all.ipk /mnt/nfsu/
- Make binary executable:
chmod +x /mnt/nfsu/applications/com.ea.app.nfsuc/nfsuc
- Create desktop launcher:
desktopgen /mnt/nfsu/applications/com.ea.app.nfsuc/appinfo.json
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:
- Get root privileges:
root
- Unmount the image file:
umount /mnt/nfsu
- Once you're done with USB you can remount the image:
mount /mnt/nfsu
Driver
Install libgles
- Get root privileges
root
- Install OpenGLES1 and OpenGLES2 (needs extras-devel)
apt-get install libgles1 libgles2
Fix corrupt/black screen problem
- Create the file
/etc/powervr.d/driver.ini
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.
Shrek Karting
Install libgles1
- Get root privileges
root
- Install OpenGLES1 and OpenGLES2 (needs extras-devel)
apt-get install libgles1 libgles2
Improve corrupted/black graphics problem
- Create the file
/etc/powervr.d/ShrekKarting.ini
containing these two lines:
[default] ForceExternalZBuffer=0
If the two lines above does not fix the corrupt/black screen problem, add TWO extra BLANK lines (so a total of four lines) and try again.
Graphics is still not perfect - lighting textures are still not good.
Galcon , Cronk , Cosmic Nitro
- First download the external libsdlpre.so and replace it with your own's:
$ sudo gainroot # mv libsdlpre.so /opt/preenv/lib/libsdlpre.so
- Then rotate the screen to 0 by typing the following command in X-Terminal):
$ gconftool-2 --set --type int /apps/preenv/Galcon/screen_rotation 0
Replace your "Galcon" exe name for other games.(i.e:"application" for cronk and "cosmicnitro" for Cosmic Nitro game.)
Settlers
- If using preenv 0.1.7, in order to get the music working you need to install libvorbisidec1:
# apt-get install libvorbisidec1
Hint: Though N900 has resistive display and the game requires you to select a group of workers with multi touch, you can double tap workaround to select groups of workers instead.
If you have encountered the "asking for device id" issue
- Download the file texture10.bar and copy the file to the settlers folder.
- Remove the texture11.bar
H.A.W.X , Castle of Magic
- Create the cryptofs folder and symlink it to your installation directory:
# mkdir -p /media/cryptofs/apps/usr/palm/applications # ln -s /(Installation path)/com.gameloft.app.hawx / /media/cryptofs/apps/usr/palm/applications/
- For Castle of Magic, replace the H.A.W.X folder name with Castle of Magic's(i.e:com.gameloft.app.castleofmagic)
H.A.W.X only
If you get a crash while trying to start a mission, delete H.A.W.X and follow the instructions here: [1]
Angry Birds Rio
If the game crashes, perform the following step:
$ cd (Angry Birds Rio folder(the folder with settings.lua)) $ sudo gainroot # chmod 777 settings.lua
Angry Birds Seasons HD
If the game error while loading shared libraries: libSDL.so: cannot open shared object file: No such file or directory
# sudo gainroot # cd /home/opt/preenv/lib # ln libSDL_mixer-1.2.so.0.10.1 libSDL.so
Avatar
Improve corrupted/black graphics problem
- Create the file
/etc/powervr.d/Avatar.ini
containing these two lines:
[default] ForceExternalZBuffer=0
If the two lines above does not fix the corrupt/black screen problem, add TWO extra BLANK lines (so a total of four lines) and try again.
If using preenv 0.1.5 or earlier
- Create an empty file named libavcodec.so.52 in preenv/lib
- Example command:
# cd /opt/preenv/lib # ln -s libstub.so libavcodec.so.52
Real Soccer 2010
If the game crashes at start, type the following command:
sudo gainroot # cd (game folder) # chown -R user:users RealSoccer2010/* # chmod 777 RealSoccer2010/*
Plasma Cannon
Remove assets/music.mp3 (or fix bad ID3 tag)
A note for games with bad touch screen behavior(Or bad scaling)
- Although these games are listed as "Unplayable" in the compatibility list, you can get them to work by rotating the screen to 0 and resizing them(External libsdlpre.so is required); however, these games will not work perfectly after the changes are made
- Changes that should be made are:
$ gconftool-2 --set --type int /apps/preenv/(exe name)/screen_rotation 0 $ gconftool-2 --set --type int /apps/preenv/(exe name)/screen_width 320
Is there a way to get multitouch working in Preenv(a.k.a Keyboard mapping)
Currently there is an unofficial modifiable patch for preenv 0.1.4 that is using the keyboard as the second touch.It needs to be configured properly for each game to get the QWERTY keyboard to work.There is a tutorial for it.
- To get the patch working,download the patch to your device and type in X-terminal(Assuming that your patch is allocated in MyDocs):
cd MyDocs sudo gainroot /home/user/MyDocs # mv libsdlpre.so /opt/preenv/lib/libsdlpre.so
There are also some unofficial Mods that makes the configuration easier: Avatar
Download all configuration files from Here or Here (also includes PS3 Controller and Game Gripper)
- To get the mods working to, you need to type the following commands in the X-terminal(Assuming that the file is allocated in the MyDocs):
$ mv /home/user/MyDocs/(Modname).sh (Modname).sh $ chmod +x (Modname).sh $ ./(Modname).sh
Save space (Transfer games to MyDocs folder)
If you are running out of space in the /home/user/
directory, you can move part of the game, which usually takes up the most space, to /home/user/MyDocs
.
NOTE: You still need the game folders to be in the /home/user/[webos]
directory; only some of the files are transferred to MyDocs
.
Example using NFSU:
This example assumes NFSU does not exist in /home/user/[webos]
.
- Open xterm and create a folder in
MyDocs
:
mkdir /home/user/MyDocs/preenv mkdir /home/user/MyDocs/preenv/nfsu
- Create NFSU folder in
/home/user/[webos]
:
mkdir /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
/home/user/[webos]
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 res_nfsuc folder from NFSU to
MyDocs
:
cp -r [SOURCE]/com.ea.app.nfsuc/res_nfsuc /home/user/MyDocs/preenv/nfsu/
- Now create a symbolic link
res_nfsuc
in the [webos] nfsuc folder that points to the actualres_nfsuc
folder in theMyDocs
folder:
ln -s /home/user/MyDocs/preenv/nfsu/res_nfsuc /home/user/[webos]/com.ea.app.nfsuc/res_nfsuc
- Don't forget to change the permission of the executable nfsu file in [webos]:
sudo gainroot chmod +rwx /home/user/[webos]/com.ea.app.nfsuc/res_nfsuc/nfsuc exit
- Now you should still be able to play NFSU, having saved roughly 110MB on
/home/user/[webos]
.
Example using BrainChallenge
The example assumes BrainChallenge does not exist in /home/user/[webos]
.
- Open xterm and create a folder in
MyDocs
:
mkdir /home/user/MyDocs/preenv mkdir /home/user/MyDocs/preenv/brainchallenge
- Create BrainChallenge folder in
/home/user/[webos]
:
mkdir /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
/home/user/[webos]
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 files from the brainchallenge folder from BrainChallenge source to
MyDocs
:
cp [SOURCE]/com.gameloft.app.brainchallenge/brainchallenge/*.* /home/user/MyDocs/preenv/brainchallenge/
- Also copy any subdirectories in the brainchallenge folder to
MyDocs
:
cp -r [SOURCE]/com.gameloft.app.brainchallenge/brainchallenge/sounds /home/user/MyDocs/preenv/brainchallenge/
- 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.
#!/bin/sh cd $1 files="`ls -1 $1`" for file in $files do echo $file ln -s $1/$file $2/$file done
- Create folder brainchallenge in [webos] brainchallenge folder:
mkdir /home/user/[webos]/com.gameloft.app.brainchallenge/brainchallenge
- Copy the brainchallenge executable file from Brainchallenge source location to the [webos] folder:
cp [source]/com.gameloft.app.brainchallenge/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
MyDocs
(using createln):
sh [..]/createln /home/user/MyDocs/preenv/brainchallenge/brainchallenge/ /home/user/[webos]/com.gameloft.app.brainchallenge/brainchallenge
- Also create symbolic links to any folders inside the brainchallenge folder in
MyDocs
:
ln -s /home/user/MyDocs/preenv/brainchallenge/brainchallenge/sounds /home/user/[webos]/com.gameloft.app.brainchallenge/brainchallenge/sounds
- Don't forget to change the permission of the executable brainchallege file in [webos]:
sudo gainroot chmod +rwx /home/user/[webos]/com.gameloft.app.brainchallenge/brainchallenge/brainchallenge exit
- Now you should still be able to play BrainChallenge, having saved roughly 114MB on
/home/user/
.
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 /home/user/
or /home/opt/preenv/usr/palm/applications
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!
- Using FileBox's "Create New Folder" feature {found after you tap the wrench icon} go to
MyDocs
and make a folder their calledWebOSGames
.
- 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
WebOSGames
folder inMyDocs
DELETE the originals from the game folder.
Step 4: Time to create some symlinks!
Open up X Terminal and get rooted.
TIP: Have FileManager open in the WebOSGames
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 :)
References
- 1. Asphalt fix TMO post #1, #2
- 2. Avatar fix TMO post #1, #2
- 3. H.A.W.X fix TMO post #1, #2
- 4. Diver fix TMO post
External links
- This page was last modified on 1 October 2012, at 11:24.
- This page has been accessed 142,757 times.