Nexus 7 Tutorial: Use Network Share as a Mount Point



Filed under : Android Tablets, Tablets

UPDATED TO WORK ON JELLYBEAN 4.1.2!

This tutorial requires your Nexus 7 have ROOT access.  It is an “intermediate” difficulty level tutorial.

The Nexus 7 has no external storage medium like a microSD card.  You can use an OTG (on the go) cable to get access to removable media, keyboards, mice, etc. But wouldn’t it be nice if you could just use your home network’s Windows shares, NAS or network drive as a big fat storage unit for your brand new Nexus 7?

I know what you’re thinking.  But Shane … We have file managers with SMB (Samba/sharing) capabilities – why would we need this tutorial?

The simple answer is – this mounts your network shares as a device MOUNT POINT – meaning that share is available to all apps (emulators, media players, etc.) not just your favorite file manager.

That’s right – use any shared hard drive, network attached drive, NAS in your house/network as storage for your Nexus 7.   Sounds great, right?

For Windows folks; this is like mapping Drive S: to a network drive or remote network share.

You will need a few things:

  • Nexus 7 (Unlocked and Rooted – very easy to do with Nexus 7 Toolkit)
  • CIFS Modules (Download here)
  • Mount Manager App (Install here)
  • BusyBox (Install here)
  • Network Share on your WiFi (I’m using a GoFlex Home network drive – but any Windows share will do)
  • Some basic knowledge of working with files

Pre-Requisites:

  • Unlock/Root your Nexus 7.  This is not optional.
  • Install BusyBox
  • Ensure your network share is up and working.  If you’re sharing a Windows drive, I recommend setting up a NEW USER on Windows – one just to use for permissions for this share.

Getting it Working:

  • Unzip the CIFS modules – should be three .ko files in there.  You can put these anywhere you like – I put them on the Nexus “SDCard” folder under “mods” (/sdcard/mods)
  • Install Mount Manager on your Nexus 7.  Run it.  Grant ROOT access.
  • On the toolbar, hit the gear icon (settings).
  • Hit MANAGE MODULES.
  • Select ADD MODULE. Add each of the .ko files you extracted in Step 1.  Should look like this:

  •  Hit BACK.
  • Hit FORCE LOADING OF MODULES .. it should say CIFS MODULES ARE LOADED
    • Note: This may not work until you FORCE CLOSEthe app once:
      • Leave the app with BACK or HOME.
      • Hit the Apps button
      • Swipe off the Mount Manager app to close it
      • Reopen the app.
      • Check to see of the Modules loaded properly.
  • Hit BACK.
  • Hit the + toolbar icon to add a new mount.
  • Under Share Path, put your share: like 192.168.1.209/GoFlex Home Public or 10.1.1.14/Videos
  • (Use IP addresses not Windows PC names)
  •  Under MOUNT POINT, click the folder and it will open the default share folder.
  • Create a new folder for your share (if one wasn’t created) – the UI is a bit weird – use the Down Caret button for actions and SELECT the folder.
  • Under OPTIONS hit the + and add USERNAME.  Fill this in with your network resource username (PC username)
  • Hit the + again, add PASSWORD.  Fill this in with your network resource password (PC password()
  • Hit the + again, add IOCHARSET – fill this in with: utf8.
  • At this point it should look something like this:
    (if file_mode and dir_mode don’t fill in, add them)

  • Hit OK and your new mount is on the main screen.  Tap it.
  • If you did everything right, you will get a green check mark and it will look something like this:

  • At this point, you are ready to test.  Open a file manager, and navigate to the mount folder you made.
  • If all is good – you’re done!  You can mount and dismount this anytime from the Mount Manager.  You can automate this on boot up with the next steps.
  • Go to Mount Manager’s preferences and check LOAD MODULES and LOAD ON BOOT.  Also check ENABLE AUTO MOUNTS and AUTO MOUNT ON BOOT.
    There are also options to connect when wifi connections.

That’s it!  Enjoy your new found freedom.  Needless to say, this only works on your own network – but clever people might find a way to make it work from ANY access point anywhere.  Maybe the topic of a different tutorial.

About Shane Monroe

Shane R. Monroe has been doing technical and social commentary writing for over 20 years. Google+

52 comments to “Nexus 7 Tutorial: Use Network Share as a Mount Point”

  1. Nick Donlon says:

    Hi, thanks so much for this wonderful walk through and my drive is working like a dream. This is following the disappointment of buying a nexus 7 with a goflex home and being really upset with the rubbish software provided by seagate for android.

    It was no easy task as my nexus was fully loaded and locked. The whole task took me about 8 hours from start to finish but it has really opened up the device and I have gone an extra step and done some of the mods on the toolkit.

    Your walkthrough is the only one I could find on the internet but its a brilliant and easy to follow. The instructions were spot on and the only real difficulty I had was my own confidence. Finding the IP address was also tricky but I eventually found this by logging on to the seagate home drive via chrome. Then you need to choose preferences and you can find it in the ip section. This cost me a good 2 hours and I think it would be beneficial to include it in your walk through if you get chance to update it for future nexus/seagate users.

    Thank you so much what a Star you are to work this out and if you have any further suggestions of improvements with this drive please let me know.

    Cheers Dude

  2. Vincent says:

    Hey,

    I got a rooted and unlocked nexus 7 running stock rom.

    When I add the modules and I click “force loading of modules” nothing happens, it keeps saying: “Cifs modules are not yet leaded on the device”.
    Do I need some kind of custom kernel?

    Thanks in advance.

    Vincent

    • Normally you wouldn’t but Jelly Bean 4.1.2 seems to kill the CIFS modules that are out there … Currently the solution is a custom kernel.

      • Erik says:

        Hey I tried using a custom kernal but it would not load the modules

        • Which kernel? Try TinyKernel or Bricked … both I know for sure work.

          • Phalkon13 says:

            Shane, I’m currently using CM10 Nightly (10/25/2012) on a rooted Nexus 7 and I cannot get the modules loading. Once, the cifs.ko module loaded, but the other two didn’t, and since a reboot then, nothing has worked. I have them in the sdcard/mods directory, just like you laid out. (it lists it as storage/sdcard/mods).
            Any thoughts?

          • Honestly, with all the issues people are having, my recommendation is to simply shoot a new kernel in that has built in CIFS support. I have a feeling we’re going to be chasing this issue for awhile.

            I’ve had good luck with Bricked, Trinity, LeanKernal. I’m currently running Bricked 5.5 and it seems hella stable, good on battery life and has full CIFS built in. Super easy to flash, too – if you’ve never done a kernel before it’s pretty straight forward.

  3. Phalkon13 says:

    I think I might have found what works. For the cifs.ko, the file is already included with CM10, in the /system/lib/modules directory.
    From the XDA forum post here: http://forum.xda-developers.com/showthread.php?t=1794593 , I found this: https://www.dropbox.com/s/izzdca4gvr0a0l9/md4.zip
    which seemed to load, no sweat.
    Also, for the other files, this might help:
    http://forum.xda-developers.com/showpost.php?p=22446091&postcount=12

  4. phalkon13 says:

    So, after a bit of issues with one of my other apps, I just flashed stock 4.1.2 onto my Nexus 7. I ended up getting the .ko mods working with CIFS Manager, and with Mount Manager. When I added the mount, if I manually log in to that mount, it works perfectly, but for some reason the only way I got it to auto login was to add the password last, after everything else (I have my options set thusly:
    1. user: (my login)
    2. iocharset: utf8
    3. file_mode: 0777
    4. dir_mode: 0777
    5. password: (my password)
    I played around with the settings, and as long as I have the password set as the last option, it always works.
    I hope this helps.

  5. clapton11 says:

    I tried and it´s no problem to copy and paste files from the mounted cifs to lokal SD. But I can´t play MP3 as a stream with any other player except the MX-Player (open as VIDEO not as audio). It was not possible to play only a single MP3-file with any other player I tried (ES-Explorer, VMC-Player, Real Player, etc.). – Many thanks, I am android-greenhorn!

  6. chrkad says:

    Hi,
    I’m the one that compiled and put together the CIFS modules linked in this post. These modules are only built against the Stock kernel (kernel 3.1.10-g009b6d1) shipped with Nexus 7 Jelly Bean 4.1.2 (JZO54K), and as such, it will most likely *not* load on any other kernel used.

    What might be an issue is that the modules doesn’t have the correct permissions.

    Either run “chmod 644” on each the modules in shell, or use some file explorer and set the following permissions:

    Owner: Read+Write
    Group: Read
    Others: Read

  7. Techmaster says:

    Just ran through the installation on my stock rooted Nexus 7 and it works fine. The Force Loadof Modules game me some trouble. I just ticked Load Modules and Load existing CIFs and restarted the app and the modules finally loaded.

    Excellent work. 🙂

  8. Pablo says:

    Great tutorial!

    But now I updated the Nexus 7 to 4.2 stock and the modules are not working any more. There is anything to do about it?

    • There is nothing we can do until a compatible version of the files are released for 4.2.

      I’m VERY concerned this may not be possible. The Faux 123 kernel runs under 4.2 – and has CIFS backed into it.

      Much like OTG, the network share MOUNTS, but you can’t see anything in it. I’m worried that both CIFS and OTG might be a thing of the past. I downgraded my Nexus 7 back to 4.1.2 until the clever developers work it out.

  9. Pablo says:

    Tks Shane.

    I will do the same. Nexus 7 without “Mount Manager” is almost useless to me.

  10. ngeo says:

    Hi,

    I’ve been trying to do this for a few days now with 4.2.
    I have cifs modules and mount commands work great from a shell but the share displayed in green in mount manager are not working. And this could be due to the fact there is no mounted shares when looking in a terminal (mount command with no args lists all mount points).

  11. Gigaherx says:

    Thank you Shane – have you seen any relevant news on Nexus 7 / Android JB 4.2 / CIFS mount within the last two weeks?

  12. Ricardo says:

    Hey guys, following these instructions worked for me on Nexus 7 with JB 4.2.1
    http://forum.xda-developers.com/showthread.php?t=2003836
    Note the busybox command line with UNC.
    At least the files are available using Terminal and root.
    Now I’ll try to make them available to the apps too.
    Cheers.

  13. Jamie says:

    Apologies if this has already been asked but why on earth would Google not allow you to map a network drive to the android file directories? It seems absolutely ridiculous. I’ve just got a Nexus 4 and it p*ssing me off somewhat!

    • Well, you have to understand there are two different issues here. One is SAMBA and the other is CIFS.

      Samba is easy; it’s open source, easy to implement – and allows you R/W access to local network shares. However, that isn’t STREAMING access (so you can’t play videos across it) and unless an app has SMB built in, you cannot use SMB for direct access to content (say, storing all your MAME roms on a file share and accessing them through MAME4Droid).

      CIFS takes Samba one step farther and exposes it as a real mount point – allowing streaming and “real access” to apps without built in Samba.

      So, why would Google forgo this feature innately?

      1) They really don’t want you having access to large local storage. That might stop you from buying crap in their store. It is in their best interest to keep that from you.
      2) More importantly, CIFS has to be provided at the kernel level – which is DIFFERENT per device. Now, it isn’t “Android OS”, it is Galaxy Nexus or HTC One or . I think Google is trying to ensure their stuff is device agnostic – which would take CIFS out of the loop.
      3) CIFS is niche. While most custom rommers roll it into their stuff, it is VERY LOW priorit; which is why we still don’t have working CIFS in Android 4.2.x … not enough people care enough to hound the developers to get it fixed; hence CIFS Manager, Mount Manager, et al still can’t work with 4.2+. “Just use Samba” is the common answer; and that is what MOST people want; R/W access to a share; not a true mount point in the OS.

  14. Gigaherx says:

    Hi Shane,

    In regards to CIFS mounting for JB 4.2: This oneclickmount.sh looks promising (haven’t yet tried it myself), “but” it involves a Kernel-Patch

    http://forum.xda-developers.com/showthread.php?t=2107224

    If you like it: I volunteer to noob-read your tutorial update 😉

  15. Pablo says:

    Hi Shane,

    I have a nexus 10 rooted with the original kernel
    And i want to know if is possible to do this in that device without using another kernel.

    Thanks in advance and sorry for my english, i am from Argentina.
    Best regards,
    Pablo.

  16. Pablo says:

    Hi,

    Do you know if is possible to do this in a rooted Google Nexus 10 with android 4.2.2, with the official kernel?

    Thanks in advance.

    Regards,
    Pablo.

  17. Max says:

    Hello,

    could you please provide kernel modules for the nexus’ 7 4.2.2 android kernel as you did above for the 4.2.1 kernel ?

    The kernel magic number for the cifs.ko, md.ko and nls_utf8.ko kernel modules is:
    3.1.10-g05b777c

    Thanks
    BR
    Max.

  18. YahooUser says:

    Hello Shane,

    thanks very much for your excellent post.

    I want to do the same with my htc desire X
    (running Android 4.1.1. and Kernel 3.4.0 – g87fbd93).

    How can I do this ?
    Can you provide me the needed CIFS.ko files or any help how to get them ?

  19. shane.

    i have been messing around with this on a new nexus 7 (running 4.3) and here is what i have been able to do so far. first, a command line approach with a shell script:

    #!/system/bin/sh
    mount -o noperm,unc=\\\\192.168.2.16\\Volume_2,username=guest,password=guest -t cifs foo /sdcard/NAS

    note how the source (nas storage here) is specified in the “unc” parameter. the “foo” bit gets ignored, but something has to go there. to replicate with the mount manager app, i did this:

    http://qstatistic.com/00/mnt_2.png

    ..and the result is a green checkmark:

    http://qstatistic.com/00/mnt_1.png

    howver, if i look at the mount point (command line, gui app, etc.) nothing shows up–directory is empty. not sure if this is related, but in my shell script at the very top, which must be run as root, only root can see the mounted share.

    this is being disussed over here, but a bit over my head:
    https://groups.google.com/forum/#!topic/android-kernel/JeY_u-pHcxQ

    any tips from you would be appreciated.

Leave a reply


You must be logged in to post a comment.