hacksugar: Working with iPad-mounted USB drives
Recently, TUAW has looked at using the iPad's camera connection kit to attach and use USB drives. If you're using a jailbroken iPad, you'll be pleased to discover that the camera connection kit allows you to connect a USB stick or hard drive and access it from your iPad. That means you can easily bring extra files on-the-go and copy them into third party (i.e. no, you're not going to update your iTunes library on the go...yet) applications.Mounting drives is the province of a built-in application called MobileStorageMounter. It's part of the iPad's core services. When it sees a new FAT or HFS USB device, it attempts to mount that device using standard Unix services. If it finds a built-in DCIM folder on the drive, it launches the iPad Photos application. If not, it throws up the dialog shown at the top of this post, reporting that the attached USB device is not supported.
As far as you're concerned, that error message is good news. It means that the device has been properly mounted and is ready for use. If you do not see the dialog, it's time to take one of two courses of action: a quick fix that works most of the time and a thorough fix that always works.
Read on to learn more...
To use the quick fix, you'll need access to the iPad command line, so install OpenSSH. (Make sure to change your password once you do, to avoid those rotten little exploits that have been floating around for the last few months.) Then connect via an ssh connection, either from your computer or via the fabulous iSSH application. iSSH costs $9.99 at the App Store. I looked at iSSH as a VNC client last week but that overview didn't highlight the utility's basic strength, i.e. connecting to secure shell sessions.
To connect via iSSH, create a new configuration. Set the host to 127.0.0.1 (i.e. the local iPad), set the login to "root" and the password to your normal account credentials. Leave the command option blank. When you connect, iSSH puts you right at the iPad command line -- very handy.
Once you're at the command line, either through your computer's ssh session or via iSSH, issue the following command:
killall "MobileStorageMounter"
This kills the running MobileStorageMounter process, and immediately a new process is spawned. When it starts running, it automatically checks for any attached devices and mounts them. This solution works about 80% of the time.
If you do not quickly (within 5-10 seconds) see the "device not supported" error message, try again. If two or three attempts fail, you may have to switch to the backup strategy, namely rebooting your system. The easiest way to do this is to enter reboot at the command line. Keep the USB drive inserted into the camera connection kit. Upon rebooting, the mounter should recognize and mount it, displaying the "device not supported" message when you unlock the screen.
To identify what items are mounted on your system, enter the mount command at the command line. This returns a list of devices and their mount points. Your primary USB drive is normally /dev/disk1s1, and is mounted in the /var/mnt/ folder. The mount command will specify the exact subfolder for that mount point.
You can use standard Unix command to copy files from the drive into an application Documents folder. However, keep in mind that App Store apps have limited permissions. You'll need to chown those copied files from "root" ownership to "mobile." Otherwise, the items will not be usable by applications.
Some USB devices will not properly mount on the system. These are generally high powered devices such as USB-based Flip-like video cameras. I have been unable to access storage on these cameras, even when using a powered hub in response to the "Accessory Unavailable. The attached accessory uses too much power" system error message. You can, however, connect more than one USB device at a time by using hubs. I have connected multiple keyboards, drives, etc. using both powered and unpowered hubs without any problem.
Should you need to unmount a device, without physically removing it, you can use the standard umount Unix command. Pass it the device path, e.g. /dev/disk1s1 as an argument. You can also use fsck to check the drive's file system consistency.
USB drive support offers a handy way to carry extra files around, especially if you bought one of the more restricted iPad sizes, such as the 16GB model. No, you cannot use this to extend your media library (yet... although someone is sure to be working on that already) but you can use this feature to copy files from and to your iPad while on the go using a standard USB thumb drive, a jailbroken iPad (thanks, Comex), and the USB dongle from the iPad camera connection kit.
Got more ways to manage or use USB drives with your iPad? Let us know in the comments.
Share
Source: http://www.tuaw.com/tag/ipad
Categories
Recently, TUAW has looked at using the iPad's camera connection kit to attach and use USB drives. If you're using a jailbroken iPad, you'll...
Add a Comment
how would you create a symbolic link so that a mounted usb drive would automatically show up in good reader?
so far it is nice to access and manipulate files over ifile but would be nice over goodreader too...
thx, dan
This is awesome. Thanks Erica.
This has been my greatest curiosity about the iPad (if external storage could be attached). 64GB just doesn't cut it for a professional photographer in the field... I want I iPad regardless, but it'd be easier to justify if I knew I could use it in the field for offloading and backing up images from memory cards. At 32GB per CF card the iPad's 64GB just doesn't cut it... however I'd be willing to offload 32GB at a time to the iPad and then offload it from the iPad to an external HD (or better yet just THROUGH the iPad with a powered hub connecting the card reader and HD at the same time.
How long before there is a GUI iPad app to enable coping files around, or is it already available? Suggestions?
Knowing this is techincally possible I suspect that some of this functionality may be coming formerly in iOS 4. I doubt however it'll include full support for copying from acard reader through a hub to a portable HD... but who knows...
Curious if anyone has gotten this to work with an HFS formatted drive??
Works great with FAT32, but cannot get HFS to work, even on same drive(s).
Or buy AirShare and you can play them over Wifi with transcode on the fly (or it can convert them so you can sync 'em)
May 11 2010 at 5:28 PM Report abuse Permalink rate up rate down ReplyI just tried Air Video last night and it worked great... but I love the idea of being able to access a usb drive; if I'm ever in a place without internet connection, Air Video and other streaming options will be useless on my WiFi iPad.
May 11 2010 at 5:55 PM Report abuse Permalink rate up rate down ReplyWe really need a hack to allow us to play avi's (divx) media straight from our USB drives, that would be awesome, save us transcoding everything and having to sync!
May 11 2010 at 2:51 PM Report abuse Permalink rate up rate down ReplyI don't have an iPad, but there's apps for iPhones that will play Divx files, like VLC or MPlayer. They don't work too good on the iPhone 3G, but the iPad should have more than enough CPU juice to pull it off.
May 11 2010 at 3:26 PM Report abuse Permalink rate up rate down ReplyYou can install an app from Cydia called iFiles and directly access any supported file such as converted .m4v or .mp4 at the mount point. The movie will play instantly.
May 11 2010 at 2:31 PM Report abuse Permalink rate up rate down ReplyCould we see a hacksugar article on using the connectivity kit with the iPhone?
May 11 2010 at 2:18 PM Report abuse Permalink rate up rate down ReplyMmm this is some sweet commentsugar right herr.
May 11 2010 at 2:17 PM Report abuse Permalink rate up rate down ReplyHot Apps on TUAW
Deals of the Day
more deals- Refurb Apple MacBook Air Laptops: 12" 64GB SSD for $699 + free shipping
- JVC Motion Sensing Clock Radio with Dual iPod Docks for $55 + free shipping
- Apple iPhone Headset with Mic for $4 + $2 s&h
- miFrame Picture Frame Dock for iPad for $64 + $8 s&h
- Refurb Apple iPod nano 8GB MP3 Player for $99 + free shipping, 16GB for $119
- Hannspree Apple-Shaped 28" 1080p LCD HDTV for $270 + free shipping
Software Updates
more updates- EFI Firmware Update brings Lion Internet Recovery to 2010-model Macs
- OS X Lion 10.7.3 released with Safari 5.1.3, Wi-Fi bug fix
- Aperture updated to 3.2.2, addresses Photo Stream issue
- Apple updates Keynote to address Lion issues
- Google Search app gets new look on iPad
- Apple releases Apple TV Software Update 4.4.3



10 Comments