Originally Posted by b0uncer
As of now I don't think there's a smoothly working, bullet-proof solution to get your device work like a dream. The best you can do is follow the unsupported routes, and before going there, backing up your iPod content - so that if you manage to wreck it up, you can try to recover it.
Well I do have it working like a dream! Everything but Photo support (Not a huge deal for me.) Even better then it could work with a mac!
- Wireless Sync (no need to ever plug my iPod in except to charge it!)
- Album Art
- Video Files
- Instant Access to all my media over wifi (streaming)
- gcc and other wonderful unixy things in the palm of my hand
- Metasploit 3.2 (Pen testing from an iPod is slick.)
Not that anyone cares but this is what worked for me:
1) buy and iPod touch. This was the most simple and most difficult step. Simple because all I had to do was go to the apple store and whip out a wad of cash. (after finding out I had to wait in a special line because I intended to pay in cash.) Difficult because I work hard for my money and $300 was nothing to sneeze at. I justified this to myself by reasoning: this will be my new laptop; I need a new portable anyways as my iBook now runs of a 30lbs. battery pack making it not quite portable.
2) Set up your wireless network: no DHCP People! you want to use static IP addresses so your iPod always has the same address. mine is at 10.0.0.3 with 10.0.0.1 being my linksys wrt54g and 10.0.0.2 being my gentoo box.
3) Jailbreak the motherfscker. I don't know why everyone wouldn't do this the device is quite lame as it comes from apple. I bought mine last fall I took it out of the box and went to jailbreakme.com to jailbreak it. the site exploited a weakness in safari and was able to execute it's code afterwards it patched the weakness in safari making it much more secure then stock. Unless your iPod has firmware 1.1.1 the procedure for jailbreaking may differ but won't be overly complicated.
4) Install a few essentials. Use the new installer icon to install some cool new stuff like: OpenSSH and BSD subsystem (both required to make your iPod work with linux.) I would recommend installing Cydia it is a graphical front end for an apt-get based package management system with some very nice unixy things all ported over to the iPod/iPhone. get mobileTerminal from Cydia. It is the best terminal app available and supports 4 simultaneous terminals custom colors and programmable multitouch shortcuts. it also works in landscape mode making typing much more tolerable.
Basically the situation is this: while all previous iPods (this is my 5th iPod) were standard usb mass-storage devices the new iPod isn't. they use an encrypted system that doesn't work with linux, so we say "well screw you apple and your little white cable too!" we use fuse to mount the iPods filesystem over wifi using ssh. I can put new songs on my ipod even if I forgot it in my car. try that with a mac!
WARNING: Some of the following will be gentoo specific I will try to note where as to not confuse you but I don't have much experience with other distros.
5) make sure your kernel supports fuse if it doesn't rebuild it. you should be able to check like this:
zcat /proc/config.gz | grep CONFIG_FUSE_FS
it should return this:
install sshfs-fuse for gentoo this is as simple as:
but if all else fails get it from:
6. passwordless ssh. now you should be able to mount your iPod and get at the files but you need a password; that's no ggod if you want to automate things with a script. so lets make it work without a password. do this stuff as your regular user not root!
check if you already have a keyfile:
If not make one like this:
Just push enter a bunch to use all the defaults. do not put in a key phrase! just push enter.
now copy your key to your ipod like so:
scp ~/.ssh/id_rsa.pub email@example.com:~/.ssh/authorized_keys
WARNING: Newer iPods use the account media instead of root you may have to adjust some things.
Log into your iPod:
now do this:
chmod 0755 ~ ~/.ssh
chmod 0644 ~/.ssh/*
and edit the config file:
adjust it a bit:
Reboot you iPod:
If you did it right you should now be able to log into or mount your iPod without entering a password.
7. Get and install iPod Convenience: I got it off the web site:
this is just a few shell-scripts to simplify things follow the instructions in the README and you should be able to mount and unmount your iPod like so:
WARNING: Make sure your iPod is pluged in the first time it needs to get some information from lsusb in order to work properly if it isn't plugged in it writes the incorect information to your ipod and you have to find it and delete it or it won't try again.
8) Linux side software: I am using:
this is important older versions won't work.
At this point you should have a fully funtional iPod adding photos seems to work but when you try to view them on the iPod it doesn't.
I found out that the ipod will play ipod formatted files off the web through safari and thought since I have many, many tv shows and movies on a 250Gb hard disk in my gentoo box, why limit myself to 8Gb.
So I set up an apache web server on my gentoo box and put symbolic links to my ~/Movies , ~/Music and ~/Roms in /var/www/localhost/htdocs . now (on my ipod outside in the shade with a nice cold beer) I surf over to:
and I can watch any of my movies or tv shows listen to any of my music and download roms to play on the emulators i have on the ipod. this is by far my favorite thing to do at home with my iPod but since it would be a whole lot less cool without my huge collection of ipod friendly .mp4 files here are some simple scripts I use to encode video:
This one rips a dvd and encodes it in 1 step with mencoder if you can watch your dvd with mplayer this should make it work on your iPod:
# Rip a dvd and encode it to an iPod friendly .mp4
# blatantly plagiarized from others and the Advanced bash scripting guide
if [ -n "$1" ]
# Should we rip a real dvd or an image file?
echo "Using dvd image: $1"
echo "No dvd image Specified Using: /dev/dvd" # Default, if not specified
# What movie is it?
title=`lsdvd $drive | grep "Disc Title:" | sed 's/Disc Title: //'`
echo "Ripping dvd: " $title
mencoder -dvd-device $drive -ofps 25 -of lavf -lavfopts format=mp4 -af lavcresample=44100 -vf-add harddup -vf-add scale=480:-11 -oac lavc -ovc lavc -lavcopts aglobal=1:vglobal=1:acodec=libfaac:abitrate=128:vcodec=mpeg4:vbitrate=384:keyint=25 -o "$title.mp4" dvd://$2
./rip2mp4 - to rip a dvd
./rip2mp4 movie.iso - to rip a dvd from an image file
./rip2mp4 /dev/dvd 2 - to rip title #2 off a dvd (usefull when a dvd has 2 versions of a movie on it) replace /dev/dvd with an image file to use that instead.
this one converts video files
# Create the MP4
mencoder -ofps 25 -of lavf -lavfopts format=mp4 -af lavcresample=44100 -vf-add harddup -vf-add scale=480:320 -oac lavc -ovc lavc -lavcopts aglobal=1:vglobal=1:acodec=libfaac:abitrate=128:vcodec=mpeg4:vbitrate=384:keyint=25 -o "$1.mp4" "$1"
this streches the file to fit the ipod screen. this is not always desirable but I had a bunch of svcd format .mpg movies that were 480x480 with an aspect of 0 and looked terrible otherwise if you are working with better source files change:
scale=480:320 to scale=480:-11
this will scale the width to fit but not the hight this works very good for widescreen formats.
Well I'm going to stop now as I want a sandwich. If anyone finds this useful, or confusing please let me know.