iPhone
iPhone
Tethering Ubuntu Lucid Lynx with iPhone OS
Thanks to the guys behind iFuse, which is now called libimobiledevice, Linux world can now enjoy tethering, file system access, music and video synching, backup and app management! Here I will describe how to do some of this deliciousness in the latest Ubuntu 10.4 LTS
Teethering
In most cases the following shall suffice:
sudo add-apt-repository ppa:pmcenery/ppa sudo apt-get update sudo apt-get install gvfs ipheth-dkms ipheth-utils
Reboot to have the ipheth modules linked into the running kernel. If the above does not quite work for you or you need extra functionality follow my original suggestions.
First, make sure you have the teethering option enabled by your carrier by looking for Settings->General->Network->Internet Tethering. Chances are, though, you are a an AT&T user and do not have it. This means you have to jailbreak, if you have not done so yet. Go ahead and do it. Done? Good. Now you have two paths. Either patch up your CommCenter file with the DevTeam patch, or use the MyWi app:
The CommCenter route
Get the patch from the DevTeam. Link the iPhone filesystem at the root (for details see the latter section) Backup the /System/ Library/PrivateFrameworks/CoreTelephony.framework/Support/CommCenter Patch it up by running
bspatch CommCenter CommCenter-new CommCenter.patch
Replace the original CommCenter with CommCenter-new and reboot the device. (if you did everything via ifuse your CommCenter shall retain it’s executable attribute ‘x’. You can verify it by looking at the file from iPhone’s MobileTerminal (ls -al then chmod +x as needed). The attribute is required, otherwise you’ll have do a restore to the phone as it will not boot the next time) Now, update the mobile config by browsing from your iPhone using Safari either to “http://www.benm.at/help/help.php” or to “http://m.peacefulinsanity.com/Tether.mobileconfig”
The MyWi route
(this sucks as it requires a third party app, but it works when CommCenter fails): Get MyWi from Cydia. Get a RockID and register the app. The internet setting will now show up. In case you are wondering – the app works by injecting /Library/RockExtensions/DynamicLibraries/MyWi.dylib code into /System/Libarary/LaunchDaemons/com.apple.MobileInternetSharing.plist and modding preferences on the fly
Once you got your tethering setting figured out, you’ve got two paths again. Either get the necessary software for Ubuntu Tethering and build it yourself, or get it the easy way, via apt-get (thanks, Tom F!):
The easy path
Inhale:
sudo add-apt-repository ppa:pmcenery/ppa
sudo apt-get update
sudo apt-get install gvfs ipheth-utils
Exhale
The custom built route
Aptget the essentials:
sudo apt-get install build-essential ifuse git-core libimobiledevice-dev
Get the code:
git clone ''git://github.com/dgiagio/ipheth.git''
Make it:
cd ipheth-pair
make
sudo make install
cd ../ipheth-driver
make
sudo insmod ipheth.ko
Now enable tethering on the phone and connect it. Run dmesg to verify that everything is ok (you’ll get a blue “tethering” header on the phone too) If/when everything works, finish it up by making the module permanent
sudo make install
sudo cp ipheth-modprobe.conf /etc/modprobe.d/
sudo depmod
Make sure that ipheth-modprobe.conf does not contain ipheth-pair (the pairing is done though a udev call)
Essential iPhone Cydia cmd packages
Once you have your Mobile Terminal up and running on the iPhone you'll realize that many of the normal unix/linux tools are missing from the iPhoneOS. Here is the list of the Cydia deb distributions that contain most common command line tools. First is the package name, next is the name of the tools it contains.
If you want to have everything below and more, you might want to consider installing "BigBoss Recommended Packages" package, which is simply a collection of "depends" for the packages that I mentioned above and several more. It installs everything in one big swoop.
- adv-cmds - ps, lsvfs, finger
- inetutils - ftp, ping, telnet, tftp
- Diff Utilities - diff, diff2
- Find Utilities - find, locate, updatedb
- grep - grep
- network-cmds - ifconfig, route, traceroute
- Sudo - sudo
- shell-cmds - killall, which
- Top - top
- less - less