Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

cwolves

macrumors regular
Original poster
Oct 11, 2007
120
0
As discussed on another thread, I wrote a media browser for the iPod touch/iPhone. I wrote it today, from scratch, including the code to decrypt the iTunes database, so it's very rough.

At the moment it only shows the iTunes database but I plan to make it browse the file system as well shortly.

- Jailbreak your iPod
- Install Apache
- Install PHP
- Configure PHP: http://www.peterelst.com/blog/2007/10/12/ipod-touch-apache-and-php-523/
- Download http://www.jslibrary.org/temp/Browser.tar
- place Browser.tar in /Library/WebServer/Documents on your iPod
- log into your iPod via ssh
- type "cd /Library/WebServer/Documents"
- type "tar -xvzf Browser.tar"
- in safari, on your iPod, visit: http://127.0.0.1/Browser
- from another computer, visit: http://<<YOUR IPOD'S IP ADDRESS>>/Browser

When clicking the "iTunes" link the first time, your ipod will lock for 15 sec --> a few minutes while it builds a database from your iTunes database. It won't do this again until you re-sync your ipod.

you can use this to stream anything FROM your ipod to anywhere else.

Please post any bugs/questions here. Thanks.

screen1.png

screen2.png

screen3.png
 

Numzie

macrumors newbie
Oct 17, 2007
24
0
Looks like its working great! Only error I've got so far is while untaring. I got
tar: Browser/MediaLink: Cannot change ownership to uid 0, gid 0: Function not implemented
tar: Error exit delayed from previous errors
But its not a big deal everything still seems to be working(Building DB right now).
 

solyd

macrumors regular
Oct 15, 2007
181
0
Nice. I'll see if I can improve on it some.

REMINDER
1. set your "database" folder permission to 777 or else the database won't be built.
2. Create a symbolic link named MediaLink to the directory /private/var/root/Media

Also, I tried loading the listing from IE7 on my computer and it does not display. Works great from the iPod though. Should use user-agent to separate from iPod/iPhones from computer browsers.
 

Numzie

macrumors newbie
Oct 17, 2007
24
0
Edit: The permissions and symbolic link are automatically created. Although I still cant get a db made.
 

cwolves

macrumors regular
Original poster
Oct 11, 2007
120
0
Edit: The permissions and symbolic link are automatically created. Although I still cant get a db made.

how large is your library?

Try visiting: http://<<IPOD's IP ADDRESS>>/Browser/browse.php?path=/iTunes

and tell me if it shows any error messages.
 

Numzie

macrumors newbie
Oct 17, 2007
24
0
how large is your library?

Try visiting: http://<<IPOD's IP ADDRESS>>/Browser/browse.php?path=/iTunes

and tell me if it shows any error messages.

If I try access it on my PC I get
Bad Request
Your browser sent a request that this server could not understand.

Invalid URI in request GET /Browser/browse.php?path=/iTunes HTTP/1.1
 

artman4life

macrumors newbie
Oct 20, 2007
3
0
I'm getting an error too

how large is your library?

Try visiting: http://<<IPOD's IP ADDRESS>>/Browser/browse.php?path=/iTunes

and tell me if it shows any error messages.
I'm installing on an iPod Touch. I went to the address you said and got this:

Warning: sqlite_open() [function.sqlite-open]: unable to open database: /Library/WebServer/Documents/Browser/database/iTunes.sqlite in /Library/WebServer/Documents/Browser/browse.php on line 41
Can not create SQLite Database. Please check your permissions

My Library is just under 4GB of songs.
 

solyd

macrumors regular
Oct 15, 2007
181
0
I'm installing on an iPod Touch. I went to the address you said and got this:

Warning: sqlite_open() [function.sqlite-open]: unable to open database: /Library/WebServer/Documents/Browser/database/iTunes.sqlite in /Library/WebServer/Documents/Browser/browse.php on line 41
Can not create SQLite Database. Please check your permissions

My Library is just under 4GB of songs.

Set the permission on your database folder to 777
 

cmuench

macrumors member
May 15, 2007
82
0
Thanks for making this cool little program. I installed apache and php and got it working fine. However I click the tunes link on my touch and it just spins forever. I have about 3-4gigs of songs. Also I can't browse to it form my computer because when I go to my ip address then it redirects me to localhost. Which being on my mac does me know good. So is their a way that I can see what is going on?

Also do you have any sort of wiki or anything? If you need webhosting I would be more than happy to set you up with a subdomain and a mediawiki install.
 

Xai

macrumors member
Oct 14, 2007
61
0
Hmm Im confused to what this can potentially do, is it me or am I thinking to much into what this does...??
 

solyd

macrumors regular
Oct 15, 2007
181
0
Thanks for making this cool little program. I installed apache and php and got it working fine. However I click the tunes link on my touch and it just spins forever. I have about 3-4gigs of songs. Also I can't browse to it form my computer because when I go to my ip address then it redirects me to localhost. Which being on my mac does me know good. So is their a way that I can see what is going on?

Also do you have any sort of wiki or anything? If you need webhosting I would be more than happy to set you up with a subdomain and a mediawiki install.

You need to set the permission of the 'database' folder you copied over to 777 so the php script can write to it.

If you want to browse to it from your computer, you need to enter your iPod's IP address, not 127.0.0.1
 

solyd

macrumors regular
Oct 15, 2007
181
0
Hmm Im confused to what this can potentially do, is it me or am I thinking to much into what this does...??

You can give your iPod's IP to your friend anywhere you have wifi connection and they can browse through your entire library and listen to the songs.
 

Xai

macrumors member
Oct 14, 2007
61
0
Hmm thats what I thought....just wasnt sure...so...would there be a way to make this app mixed with stumbler some how to be able to share songs through wifi locally with other touches or iPhones?
 

solyd

macrumors regular
Oct 15, 2007
181
0
Hmm thats what I thought....just wasnt sure...so...would there be a way to make this app mixed with stumbler some how to be able to share songs through wifi locally with other touches or iPhones?


Well so far, you can only listen to songs, and it only works from your own or another iPod/iPhone. All you have to do is give your iPod's IP to your friend. Locally you can just give out your local IP (the one you see in your settings), otherwise you can give out your general IP (you can easily find this by pointing Safari to http://www.whatismyip.org).
 

stockmopar

macrumors newbie
Oct 26, 2007
1
0
Wow, I was just thinking that an application like this would be awesome. I started looking into developing something similar, but when I came to a roadblock when I got to the iTunesDB file. I like how a small development group has sprung up centering around PHP. :D Great Work! :D

So potentially, if you have the ability to decode the iTunesDB file, down the road could you write a new iTunesDB file (on the go syncing / adding songs)?
 

loungebob

macrumors newbie
Oct 29, 2007
5
0
OMG! I think I love you ;)

now, pleeeeeease, pretty please make it browse system files and folders (yeah, I know, I read.....just trying to push a lil) so I can use this as an image browser for full res pictures.

weeeeee, you're the hero.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.