World’s knowledge at your fingertips - Wikipedia for offline use on your iPhone/iPod Touch


The title is right: you can install Wikipedia on your iPhone. Most articles on Wikipedia are there, in only 2GB of disk space. Sure, there are no pictures(nor other multimedia items), and the navigation is crappy, but after all… it’s Wikipedia on your iPhone, to read and to love whenever you’re offline.
In the author’s words:
What
An offline Wikipedia reader for the iPhone or iPod Touch. I wanted to write an iPhone app over Christmas, and so hacked this together during the break.
Why
It’s the warm fuzzy feeling of having the sum of all human knowledge in your pocket. It’s the hitchhiker’s guide to the galaxy realised. EDGE is slow; search is slow; you’re abroad, in a plane, a tunnel, or on top of a mountain. You have an iPod Touch.
Here’s the noob’s step-by-step guide on how to install it on your iPhone or iPod Touch.
Prerequisites
1. First of all, make sure u have BSD Subsystem and SSH working on it.
Download to computer
2. Second: download the Wikipedia data files(2 GB worth of them). There’s a torrent file available for the data files, but I got better download speed for classic download (English version, 2GB). You should consider using a download manager for this, in case u get interrupted u don’t want to start the download all over again. If you’re downloading from ftp, you’ll need another 2GB extra space on your computer to unzip the archive.
3. Third, download Wikipedia.app - this is the executable file that you’re going to use. The latest version can be found on code.google.com, and so can the sources for it. Unzip the archive to obtain Wikipedia.app
Copy to iPhone
4. We need to copy all our files onto the iPhone/iPod Touch. The files u need to copy are:
Wikipedia.app and its contents
The data files - wp folder and the files within(the one unpacked by the torrent or unzipped from ftp):
locate.prefixdb
processed
blocks.db
locate.db
If on Windows, get WinSCP, connect to the iPhone and just copy them. You’ll want:
Wikipedia.app copied inside /Applications/ folder on the iPhone
the wp folder and the 4 files mentioned above, copied on /var/root/.
Open up Terminal.app (I’m assuming u use MacOSX or Linux) you’ll achieve this using the marvelous scp command:
First of all:
scp -r Wikipedia.app/ root@10.168.1.102:/Applications/
scp -r wp root@10.168.1.102:/var/root/
Obviously, you’ll need to change the IP address there with the one of your iPhone or iPod. If u don’t know what it is, read this article again.
Scp will ask you for the password - as I mentioned before, for BSD Subsystem 2.1 for 1.1.4, the password is “alpine” (no quotes).
Done? If we’re lucky, it might actually work. You’ll need to kill Springboard to see Wikipedia appear on the screen. Rebooting the iPhone is one way to do it, but even simpler we can just restart the Springboard process.
Restarting Springboard
5. Ssh into the iPhone from Putty or Terminal.app, still as root.
run ps -A | grep Springboard
The first number this shows you is what we’re interested in, namely the PID of the process.
run kill 575 (where instead of 575 you have the PID we got previously). Looking at the iPhone you’ll see the spinning circle and Springboard restarting.
If you see the Wikipedia icon on the screen, give it a try. Hopefully it will work.
Chmod, Chown and other tuneup
If not, we have some tuning to do:
Still in the ssh session, logged in as root on the iPhone/iPod, you’ll have to make sure the correct access rights and ownership is assigned to the files we’re interested in:
What works for me is:
# ls -la /Applications/ | grep Wikipedia
drwxr-xr-x 2 root admin 204 Apr 10 11:33 Wikipedia.app
# ls -la /Applications/Wikipedia.app
total 360
drwxr-xr-x 2 root admin 204 Apr 10 11:33 .
drwxrwxr-x 51 root admin 1734 Apr 10 11:33 ..
-rw-r--r-- 1 root admin 71168 Apr 10 11:33 Default.png
-rw-r--r-- 1 root admin 613 Apr 10 11:33 Info.plist
-rwxr-xr-x 1 root admin 96624 Apr 10 11:33 Wikipedia
-rw-r--r-- 1 root admin 7563 Apr 10 11:33 icon.png
If you don’t have something similar, you could also try something like
chmod -R 777 /Applications/Wikipedia.app
and
chown root -R /Applications/Wikipedia.app
which will grant all rights to all files inside the Wikipedia.app folder, and will change the user name to root.
Also, now for the data files:
# ls -la /var/root
total 0
drwxrwxrwx 6 root wheel 204 Apr 10 11:32 .
drwxr-xr-x 16 root wheel 612 Mar 30 14:23 ..
drwxr-xr-x 2 mobile wheel 68 Mar 30 23:38 Downloads
drwxrwxrwx 6 mobile wheel 204 Mar 30 15:15 Library
drwx------ 5 mobile wheel 170 Apr 10 09:10 Media
drwxr-xr-x 2 root wheel 204 Apr 10 11:32 wp
you should see wp over there, with at least r and x as access rights everywhere.
Same as before, just to make sure we could run
chmod -R 777 /var/root/wp
and
chown root -R /var/root/wp
Well.. that was about it. If the last part about access rights was confusing for you, you’ll just need to remember to copy-paste and run the 4 commands I mentioned:
chmod -R 777 /Applications/Wikipedia.app
chown root -R /Applications/Wikipedia.app
chmod -R 777 /var/root/wp
chown root -R /var/root/wp
Congrats!
More reading material on installing Wikipedia, over at the author’s page over here.


aaasa sd asd
test
24 Apr 08 at 6:40 pm