Advertisement
SpawnHappyJake

Why ifuse is a Big Deal!

Jun 3rd, 2011
749
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.93 KB | None | 0 0
  1. Remember the days when you had a pre-iPod Touch iPod? You plug it into a computer running Linux, Windows, Mac, or anything with a modern kernel, and it would show up as a hard drive that mounted and you could browse it with your file browser and copy files on and off (though you had to have your file browser set to show hidden files and folders to see the music files), right? You could use it as a USB external hard drive.
  2. It did so because it was programmed to use the SCSI command set protocol through the USB cable with a computer. This command set is a way of querying for sectors on a disk, as well as writing them. See here:[url]http://en.wikipedia.org/wiki/SCSI_command[/url] . Of course, the SCSI command set does things other than reading and writing. This command set is standard across modern CD drives, internal hard drives, and external hard drives, including thumb drives. In fact, the "sd" in /dev/sdx stands for "SCSI disk" because it is using those commands.
  3. One day I plug my iPhone in. Didn't show as a hard drive. Not in Windows, Mac, or Linux. The device isn't programmed to "show" itself as a hard drive, and I'm assuming because it doesn't use the SCSI command set. However, Apple created a (closed, I'm sure) proprietary protocol to transfer data between iTunes and the iPhone/ iPod Touch/ iPad.
  4. However, some geniuses (I'm assuming via reverse-engineering and USB sniffing) figured out how to mount an iPhone as a hard drive in Linux without jailbreaking, by using the existing proprietary protocol.
  5. So that's quite the victory. Syncing an iPhone (or iPod Touch or iPad) through iTunes just wasn't working in WINE, but now, since you can mount the iPhone as a hard drive, other Linux native media-playing programs can copy music onto such devices by copying music to the proper directory on the iPhone, all possible because it is mounted. So you don't need iTunes as badly.
  6.  
  7. Here's the instructions on how to mount an iOS device in Linux:
  8. http://geeknizer.com/sync-iphone-linux/
  9. But replace "libiphone-utils" and "libiphone0" with "ifuse". "ifuse-dbg" is a good idea too.
  10. Don't worry about the fetch UUID part.
  11. You shouldn't have to do all the steps they give. Once you plug it in and it mounts, you can stop.
  12.  
  13. In Unix operating systems (like Linux and Mac OS X),when you mount something, the normal way of doing that is to assign a path to a file linked to the drive. When the kernel (heart of the operating system) detects a piece of hardware that can be of use to software, it creates a file in /dev to represent it. The file is 0 bytes in size. When a program wants to send or receive data from the hardware, it writes or reads from the file, respectively. The kernel intercepts the read/ write calls, keeping the file at 0 bytes, and sends info to the program as if it was read out of the file, or to the hardware. It translates the read/ write call data into a language the hardware can use via a driver. So, for example, the 3rd partition of the 2nd SCSI disk (hence the "b") has a representing file, called an abstraction file, at /dev/sdb3.
  14. So you say "sudo mount /dev/sdb3 /media/internal/third" to mount that partition at the given path.
  15.  
  16. Other times you can actually mount the output of a program. For example, you can do "sudo mount ifuse /media/iphone" to mount the output of the ifuse program to that directory, /media/iPhone.
  17. Ever wondered how audio cds are mounted in Linux? Pure audio CDs don't actually have files on them. They don't have a partition. They don't have a filesystem. Rather, they are just tracks of audio. So why is it that they are mounted to a path, and you see audio files where it's mounted, and you can just copy the files off? It's because you're not mounting the audio cd. You're mounting the output of a program called gvfs that takes the audio tracks off the CD as input.
  18. In the same way, we mount the output of the ifuse program, which uses data exchanges with the iOS device as input, to indirectly mount the iPhone, iPad, or iPod Touch.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement