How to Mount a USB Stick on the iPad and Access it With GoodReader

Sebastien, Jun 4, 2010

goodreader ipad usbA few weeks ago we saw how to mount an external hard drive on the iPad. Today I’ll show you how to mount a USB stick on your iPad and access its content with GoodReader for iPad, all this compliments of French iPhone.

By default, a USB stick is automatically mounted in /var/mnt/mount1, which is a hidden directory of GoodReader. With the following hack, you’ll be able to bypass this issue once and for all.

This is what you need:

Step 1: Connect to your iPad via SSH.

Step 2: Execute the following command lines.

mkdir /Volumes
mkdir /Volumes/USB
cd /var
mv mnt mnt_old
ln -s /Volumes/USB mnt
cd `find / -name GoodReaderIPad.app`/../Documents
ln -s /Volumes/USB/mount1 USB

Step 3: Plug your USB stick in the camera kit. Wait for the error message and launch GoodReader.

Now you can navigate the USB directory directly from your iPad within GoodReader. By using “Manafe Files” in GoodReader you can get the “open with” option which allows you to choose what application to use to open a file. You will for example be able to open a .doc file with Pages and edit it.

Nice hack, isn’t it?

 
  • Josh

    iFile does this as soon as you plug in the Camera Kit + USB Stick or SD Card. Just navigate to var/mnt/mount1 and you can access all your files, use it as a backup disk, play movies, music, etc. Just throwing this out there because iFile is a more robust file browser than GoodReader and it requires zero command line work to get it going. Just plug and play baby!

  • Matt

    Hi

    I’m the guy that created this hack…

    There’s a huge different between iFile use and GoodReader use: with goodreader you have the “open with…” option and then you can open PPT/DOC/XLS files using Pages/Numbers/Keynote…

    That’s the reason why I did this : have acces to the “open with” function to open files with specific applications… otherwise, iFile can do the basic viewing, that’s true.

    Other advantage: Goodread is better in handling by PDF files that might be existant on a SD/USB plugged to the ipad.

    My post in French is providing explanation about why I did this.

    Regards
    Matt

  • Matt

    “Goodread is better in handling by PDF” must be read “Goodread is better in handling big PDF”

  • Beak

    So does this mean we are going to be able to use a usb wifi stick in the near future that way we dont have to use the 3g or for the wifi only ipad ?

  • Matt

    Don’t know.

    But that mean that if Samba is available on ipad, then a samba network share could be mounted in ipad filesystem and then accessible from it…

  • Sancho

    HELP ME PLEASE!!! I typed in the commands but now i cant mount my USB. I typed in the command lines as is…please help me

  • Matt

    Hi

    does that mean that you don’t have the “unsupported” mount message when you plug your USB ?

    If Yes, reboot your ipad.

    PS: the thing was done without a fault on many Ipads in France after my tip publication on FrenchIphone forum.

    Matt

  • Marius

    Hey Matt, would i be able to play videos from my sd-card through original video app from ipad?
    Thanks

  • Matt

    Hello

    from iFile or GoodReader, you can open any file format that ipad natively support… then yes, video (MP4 only) will be playable from SD when you click on it from GR or iFile

    Matt

  • Matthew

    Hey Matt. How do you undo this command? Because somehow it’s not working and now ifile cannot find the USB stick.. Thanks.

  • MAtt

    Hi

    that’s not normal. More than 50 people did the mod without problem until today.

    iFile does not have to “find” the USB stick by itself except if you did something wrong in the commands I provided: do you have a /var/mnt directory and is this directory a link to /Volumes/USB ? If yes, it’s fine and you should have no problem.

    To reset everything, the work is to create a “mnt” directory in /var instead of the newely created “mnt” that is in fact a link to /Volumes/USB.

    Matt

  • Matthew

    No I cannot find a /var/mnt directory. But if I try to create one. It says directory already exists.

  • Matt

    Ok… If you plug a usb pen, do you have a error warning popup ?

  • Matt You gotta Fan

    I have just ordered a camera connector kit from Apple!

    Thanks for the great little find!

  • Mike

    Thank for this! SSH was easy to do from MAC using terminal and typing “ssh root@IP” pw alpine. you can then use the passwd command to change it and continue with the mod.

  • CM

    Ok,

    I followed the directions exactly and yet I have a problem. Here is the step by step I did – result

    mkdir /Volumes – SUCCESS

    mkdir /Volumes/USB – SUCCESS
    cd /var – SUCCESS
    mv mnt mnt_old – SUCCESS
    ln -s /Volumes/USB – SUCCESS

    cd `find / -name GoodReaderIPad.app`/../Documents -sh: cd: find: No such file or directory

    ln -s /Volumes/USB/mount1 USB – SUCCESS

    So now when I run GoodReader I don’t see the the way under “Manage File” to access my USB drive

  • MAtt

    Hello CM,

    Are you sure you have GoodReader for *ipad* installed or only standard GoodReader (for iphone that runs also with ipad) ?

    You do not have any application called “GoodReaderIPad.app” in your filesystem tree… and that’s the name of the GR ipad version

    Matt

  • CM

    To make sure please tell me the exact path of where the goodr
    eader app is supposed to be.

  • MAtt

    In fact it depends of each phone (iun the path there’s a “qsdfqsdf65746qsd4f654dsf” kind of reference)… that’s the reason why I use the GoodReaderIpad.app search method.

  • CM

    Hi – I really appreciate you getting back with me – this looks like a great hack if I can get it working on my iPad.

    Yes I have Goodreader for iPad on my iPad.

    Is the syntax of the command correct (cd ‘find) Any typos?
    What is the purpose of the command? Is it something I can do on my iPad manually with ifile?

  • Matt

    Hi

    With a registered ifile you can search for “goodreader” and check that you find a goodreaderipad.app

    TrY also this simple command under ssh

    find / -name GoodReaderIPad.app

    Matt

  • CM

    I typed the simple command you gave me and I assume it worked because I got no error. So then I ran SSH and re-typed everything and got at the last command an error – no such directory exists

    I used ifile and did find goodreaderipad.app under applications under a directory something like this: ksjhfviwruntviruwtv87576

    Now what’s the next step?

  • MAtt

    Hi

    what’s the exact type (including uppercases/lower cases) of the “goodreaderipad.app” you found ?

    It should be written like this : GoodReaderIPad.app

    If it’s not, then the error comes from here: re-execute the full command with the exact program name:

    cd `find / -name [exact_Typo]`/../Documents

    Matt

  • CM

    Ok I will but the way file finds it is as I have typed it: GoodReaderIPad.app.

    Question: Does the syntax of the command you’ve given above mean that there must be a “Documents” directory under GoodReaderIPad.app? Because there is not one on my iPad – it is on then same path “udwugcjyc764688″ as the app is.

  • MAtt

    CM,

    It seems to me that iFile is not case sensitive.

    My command search for a directory containing GoodReaderIPad.app file, jump to this directory and goes one level back in a directory called “Documents”.

    Matt

  • CM

    Hello again,

    Unfortunately your hack doesn’t work on my iPad. After typing everything exactly as you stated – the cd ‘find command can’t find the file/directory.

    Would be nice to have this working

  • MAtt

    Hi

    Does iFile find “GoodReaderIPad.app” ? If yes, could you please report here the exact typo (upper/lower case included) & filesystem path found.

    Regards
    Matt

  • CM

    Here’s the exact error I’m getting when I type: cd `find / -name GoodReaderIPad.app`/../Documents

    -sh: cd: find / -name GoodReaderIPad.app/../Documents: No such file or directory

    Not sure what else to do:

  • MAtt

    Hi

    my request was about a search in iFile, not with SSH.

    Question: do you copy/paste the commands from this post or do you type it fully ?

    Matt

  • MAtt

    Update: let me guess… did you use the regular quote (‘) instead of the “reverse quote” (`) in the SSH command ?

    Please check. You must use the reverse quote

    Matt

  • CM

    Wow, you’re the man, yeah I got my syntax wrong – wasn’t using the reverse quotation (which doesn’t exist on the iPad keyboard by the way) I was using the regular mark (‘)

    Thanks again! 5 gold stars for you!

  • MAtt

    Happy to read that ! :)

    Matt

  • Dirk

    Matt,

    I followed the instructions and now see the USB drive that is connected to the iPad in my SSH connection on my main computer. I can even move files from computer to iPad and back using the connection. However, I do not see the files in Goodreader. Could you tell me what I am doing wrong? thanks,

    Dirk

  • MAtt

    Hi

    seems that the USB directory in GoodReader documents directory is missing…

    This is done by those two commands :

    cd `find / -name GoodReaderIPad.app`/../Documents
    ln -s /Volumes/USB/mount1 USB

    Please copy/paste the commands and give me feedback. Check also my reply #29 here.

    MAtt

  • Dirk

    Matt,

    Thanks for your quick reply. The commands now seem to be accepted, at least I am not getting any error messages. But I still do not see the directory or files in GoodReader. I noy tried it in iFile and it works (it also provides me the option to “open with” but I am stubborn and want it to work with GoodReader!
    thanks,

    Dirk

  • MAtt

    Hi

    what’s the return of the following command:

    find / -name GoodReaderIPad.app

    Matt

  • Dirk

    Hi

    In the terminal, the next line comes up:
    /private/var/mobile/Applications/013F2821-F0CF-4C3F-BA4E-6F003A6FC135/GoodReaderIPad.app

    Dirk

  • MAtt

    OK…

    and if you do a, what’s teh feedback ? :

    ls -la /private/var/mobile/Applications/013F2821-F0CF-4C3F-BA4E-6F003A6FC135/GoodReaderIPad.app/../Documents

    Matt

  • Dirk

    this is the answer..

    total 720
    drwxr-xr-x 2 mobile mobile 170 Aug 12 15:30 .
    drwxr-xr-x 6 mobile mobile 272 Aug 12 11:35 ..
    -rwxrwxrwx 1 mobile mobile 74240 Aug 24 2007 070824 Klad.doc
    -rw-r–r– 1 mobile mobile 644051 Aug 8 16:59 Carnegie Mellon Ercott CAES Wind Integration Study.pdf
    lrwxr-xr-x 1 root mobile 19 Aug 12 15:18 USB -> /Volumes/USB/mount1

    Dirk

  • MAtt

    Hi

    and you don’t have any “USB” directory displayes in GR ?

    What if you change rights :

    chmod mobile:mobile /private/var/mobile/Applications/013F2821-F0CF-4C3F-BA4E-6F003A6FC135/GoodReaderIPad.app/../Documents/USB

    Matt

  • Dirk

    Hi Matt,

    I am afraid this doesn’t work. The reply is:

    /private/var/root$ chmod mobile:mobile /private/var/mobile/Applications/013F2821-F0CF-4C3F-BA4E-6F003A6FC135/GoodReaderIPad.app/../Documents/USB
    chmod: invalid mode: `mobile:mobile’
    Try `chmod –help’ for more information.

    Not sure what else I could try. It’s ok if you don’t know other options..

    Thanks for your help,

    Dirk

  • MAtt

    Sorry : chown, not chmod :)

  • Dirk

    also does not work.. same error

  • MAtt

    OK

    Then

    cd private/var/mobile/Applications/013F2821-F0CF-4C3F-BA4E-6F003A6FC135/GoodReaderIPad.app/../Documents/

    chown mobile:mobile USB

  • Dirk

    sorry, still no luck
    reply:
    private/var/root$ cd private/var/mobile/Applications/013F2821-F0CF-4C3F-BA4E-6F003A6FC135/GoodReaderIPad.app/../Documents/
    -sh: line 35: cd: private/var/mobile/Applications/013F2821-F0CF-4C3F-BA4E-6F003A6FC135/GoodReaderIPad.app/../Documents/: No such file or directory

  • MAtt

    Hi

    Sorry a / was missing:

    cd /private/var/mobile/Applications/013F2821-F0CF-4C3F-BA4E-6F003A6FC135/GoodReaderIPad.app/../Documents/

    chown mobile:mobile USB

    Matt

  • Dirk

    Hi Matt,

    Thanks a million, that worked!

    Very kind of you to help.

    Regards,

    Dirk

  • Matt

    Nice ! :)

  • Noway

    Hi Matt, congratulations for your fantastic work!
    It work perfect with Goodreader. I was wondering if it is possible to do a similar hack to watch movies directly form the usb device? I mean, watch the movie directly from usb without coping it in the iPad.
    Can it work using the same commands just changing the app name? for Oplayer for example?
    Thank you very much!

  • Matt

    Hi

    I guess that yes… the only thing that need to be found is the directory where OPlayer store its downloaded movies… other option is to access the USB drive from iFile, and through iFile you’ll be able to read all natively supported file format.

    Matt