Welcome to the Android Central Forums Create Your Account or Ask a Question Answers in 5 minutes - no registration required!
Page 1 of 2 12 LastLast
Results 1 to 25 of 28
  1. Thread Author  Thread Author    #1  
    Chris3D's Avatar

    Posts
    647 Posts
    Global Posts
    646 Global Posts

    Default [HOW TO] 2-way network file sharing on Android

    Hi everyone, just thought I'd write up some quick instructions on how to set up file sharing between Android and a PC - both mounting Windows shares on Android, and Android on Windows. I was always frustrated by iOS's inability to do this easily, and it was one of the major reasons I switched to Android. With the following two (free) utilities, you'll almost never need to connect your phone to your PC using the USB cable (to transfer files at least).
    (It should be noted that both these utilities require root permissions)

    Anyway, here goes:

    First, mounting Windows shares on Android.


    Step 1: Install CIFS Manager

    Download and install CIFS Manager from the Android Market.

    Download one of the following two files:
    CIFS Module for Android 2.1
    CIFS Module for Android 2.2

    Unzip whichever one of these you'll be using and place the file(s) on your SD card somewhere, I put them in /sdcard/Stuff/System.


    Step 2: Set up file sharing on Windows
    (These screengrabs are from Windows 7, but previous versions of Windows should be sufficiently similar to follow along)



    Go into My Computer and select the drive or folder you want to share. In my case, I'm sharing my entire D Drive. Right click on your drive/folder, select Properties, then the Sharing tab, then click the Advanced Sharing button:



    Click the Share this folder checkbox to enable sharing. Type in a name for the share and click OK. At this point, Windows is now sharing your drive/folder.

    Step 3: Configure CIFS Manager



    Back on Android, launch CIFS Manager, click the menu button and select Settings:



    In settings, click the checkboxes for Load cifs module and Load via insmod.

    Next, you need to enter the path(s) to the cifs module(s) you placed on your SD card. If you're on Android 2.1, you only have one of these, on Android 2.2, there's two.

    On 2.1, using my example of placing the files in folders Stuff/System, you'd enter /sdcard/Stuff/System/cifs_3.ko If you placed the files elsewhere, adjust this path accordingly.

    On 2.2, you need to load two files and you do that by entering them both, separated by a colon. So, you enter /sdcard/Stuff/System/slow-work.ko:/sdcard/Stuff/System/cifs.ko (slow-work needs to be first). Back back out to the main CIFS Manager screen.


    Step 4: Configure the share



    Click the menu button and then select Add new share. In Share Path, type in the IP address of your PC, followed by the name you gave your share. For me, this is: 192.168.1.42/D Drive

    If you don't know your IP address, start a command prompt (Start>run>cmd), and then type ipconfig in the command window. Your IP address will be listed under IPv4 address under Ethernet adapter Local Area Connection.

    For mount point, type /mnt/cifs/D Drive or whatever name you want it mounted at. (I've read conflicting things on this, but it seems safer to mount shares under /mnt as opposed to somewhere on your SD card.)

    For Username and Password, enter the username and password of a valid Windows user account. (It seems to require a password to work, so if you don't use a user account password, you'll have to set up a second account with a password)

    Save the share settings and return to the main CIFS Manager screen.




    Step 5: Mount the share



    In CIFS Manager, click on the share and it should mount. If it mounts successfully, the little gray dot next to the share will turn green. If not, you'll get some completely useless error message, so let's hope it mounts successfully!



    Now, just launch a root file explorer like Root Explorer and navigate to the share location you set up, in my case, /mnt/cifs/D Drive. You should have full read/write access to the share (assuming you shared it with R/W access).

    Next, mounting your SD card on your PC



    Step 1: Install Samba server on Android.

    Download and install Samba Filesharing from the Android Market.

    Step 2: Configure Samba on Android.



    Launch Samba Filesharing, click the menu button and select settings.



    For password and username, enter the username and password you'd like to use to access your SD card over the network.

    Enter your network workgroup name, this is commonly just "Workgroup" on Windows.

    For Netbios name, enter whatever you'd like your phone to appear as to other systems on your network. This is Android by default.

    You can check or uncheck Enable Wakelock depending on your preference. If selected, this will keep your phone awake when Samba is sharing your SD card.


    Step 3: Starting sharing





    Return to the main Samba Filesharing screen, click the menu button and select Enable

    If all goes well, you should get a message that the Samba service will be automatically started and stopped with your WiFi connection, and then you'll return to a screen indicating that sharing is enabled and listing your phone's IP address.



    Step 4: Access your SD card from your PC.







    In windows, open up your network window and you should see a new connection called Android (or whatever you entered in the Netbios setting). Open that, and you should see your shared SD card, and in that, you should have full read/write access to your SD card.


    Step 5: Enjoy not having to dig up your USB cable every time you want to get a file on or off of your phone!
  2. #2  
    DroidXcon's Avatar

    Posts
    11,644 Posts
    Global Posts
    11,775 Global Posts
    ROM
    Stock for now

    Default

    Chris thank you so much for Sharing.. Outstanding post , great job
    If i've made life easier buy me a Macchiato
  3. #3  
    MolecularGraph's Avatar

    Posts
    635 Posts
    ROM
    Swapping them all out

    Default

    You used the first wrong step, step one is "Make a HUGE single post in Android Central".
    Kyocera Strobe> Motorola Razor> Motorola Q> Blackberry Curve> Droid X> Fascinate>iPhone 4>iPhone 4S>iPhone 5>Verizon LG G2 and LOVIN' it.
  4. #4  

    Default

    thanks Chris! I was thinking about trying to figure this out for myself when you had posted about how you were accessing your computer's network share from your phone a month or so ago. this makes it a whole lot easier.
  5. #5  
    Suicide Shift's Avatar

    Posts
    259 Posts
    ROM
    ROM / Kernel of the day

    Default

    Very nice indeed. I'll be trying this out for sure. For the amount of times I am copying items between the two I am sick of having to mount / unmount from phone and unmount USB Device from computer each time.

    I give this two thumbs up!
  6. #6  
    Ytaay's Avatar

    Posts
    235 Posts
    Global Posts
    236 Global Posts
    ROM
    VGNex:4.1; ATP:Stock

    Default

    Totally awesome, totally righteous stuff Chris! I've been so bamboozled and combobulated with ROMs and kernels and themes and animations and recoveries (OH MY!), that I completely forgot about this core-should-have feature.

    You are to be commended, sir! ! (commend, commend, commend)

    Swyped by my FASN8.EB01.superFRANKNBEANSclean2.9voodoo
    "One Really Really Deep Thought" by Ytaay...

    "Test is test and production is production but production is the only true test."
  7. #7  
    Suicide Shift's Avatar

    Posts
    259 Posts
    ROM
    ROM / Kernel of the day

    Default

    I think your links to the CIFS_2.1 and CIFS_2.2 are the same?

    I downloaded 2.2 and extracted only one file. When I go to download either of these from those links they both point to a CIFS_2.1.zip file?

    I am using 2.2 so I have this setup but not working. I think it is because I don't have the right CIFS files.

    *EDIT*

    I just copied the link and changed the cifs_2.1.zip to cifs_2.2.zip and now I am getting the correct file. You need to fix the link for the 2.2 version.

    http://www.chris3d.com/Android/networking/cifs_2.2.zip
  8. #8  
    Suicide Shift's Avatar

    Posts
    259 Posts
    ROM
    ROM / Kernel of the day

    Default

    Also what Kernels supports cifs? I am running into the issue below where I found an answer from the developer that wrote the app:

    2."No such device".
    A: Your current kernel or rom lacks the necessary CIFS support. Try to find a matching kernel module (cifs.ko) or use a rom with explicit CIFS support.

    I am runing SuperFrankenClean 2.9 Voodoo

    Developer: f3d0r

    **EDIT**

    I think I found the answer. I need to find a module that works with my kernel / rom. I'll see if I can find a match:

    -- specify multiple modules in the "Path to cifs.ko" preference by separating them via a colon ( : ).
    -- e.g. /system/lib/modules/cifs.ko:/system/lib/modules/nls_utf8.ko

    - you can now review the list of loaded kernel modules via the "Modules..." button in the "Info..." dialog
    -- if your kernel has cifs support built-in, the cifs will not show up there, this is no problem
  9. Thread Author  Thread Author    #9  
    Chris3D's Avatar

    Posts
    647 Posts
    Global Posts
    646 Global Posts

    Default

    Quote Originally Posted by Ytaay View Post
    Totally awesome, totally righteous stuff Chris! I've been so bamboozled and combobulated with ROMs and kernels and themes and animations and recoveries (OH MY!), that I completely forgot about this core-should-have feature.
    Thanks, yea, I was thrilled when I discovered I could mount network shares on the phone, and again a few days ago when I found out I could mount the SD card on Windows. At this point, the only thing I need the USB cable for is to charge the phone. For putting files onto the phone or grabbing stuff off it (photos, videos, etc), it's sooooooo much easier to just browse to it on the network and get the stuff directly.

    Quote Originally Posted by Suicide Shift View Post
    I think your links to the CIFS_2.1 and CIFS_2.2 are the same?
    Sorry about that, it's been fixed... that's what I get for posting at 2am...

    Quote Originally Posted by Suicide Shift View Post
    Also what Kernels supports cifs?

    **EDIT**

    I think I found the answer. I need to find a module that works with my kernel / rom.
    I included the necessary kernel modules in the original post. There's different ones for 2.1 and 2.2, so make sure you grab the right one.

    With these (set up properly per the instructions), it should work on any kernel. I've used it on both stock and Voodoo kernels and it always works fine once the kernel modules are loaded.
  10. #10  
    Suicide Shift's Avatar

    Posts
    259 Posts
    ROM
    ROM / Kernel of the day

    Default

    Quote Originally Posted by Chris3D View Post
    Thanks, yea, I was thrilled when I discovered I could mount network shares on the phone, and again a few days ago when I found out I could mount the SD card on Windows. At this point, the only thing I need the USB cable for is to charge the phone. For putting files onto the phone or grabbing stuff off it (photos, videos, etc), it's sooooooo much easier to just browse to it on the network and get the stuff directly.



    Sorry about that, it's been fixed... that's what I get for posting at 2am...



    I included the necessary kernel modules in the original post. There's different ones for 2.1 and 2.2, so make sure you grab the right one.

    With these (set up properly per the instructions), it should work on any kernel. I've used it on both stock and Voodoo kernels and it always works fine once the kernel modules are loaded.
    I just got it working. I used Terminal Emulator and typed:

    insmod <path to modules> and got an error that it could not access them. No permission denied or anytihng.

    I then created a modules directory under /system/lib

    I then placed both .ko files into /system/lib/modules/ and updated the settings. Now it is working.
  11. Thread Author  Thread Author    #11  
    Chris3D's Avatar

    Posts
    647 Posts
    Global Posts
    646 Global Posts

    Default

    Quote Originally Posted by Suicide Shift View Post
    I just got it working. I used Terminal Emulator and typed:

    insmod <path to modules> and got an error that it could not access them. No permission denied or anytihng.

    I then created a modules directory under /system/lib

    I then placed both .ko files into /system/lib/modules/ and updated the settings. Now it is working.
    Yup, you can do it that way too. Just remember if you flash a new rom/kernel, you might loose these modules and need to copy them back. That's why I prefer to just keep them on my SD card so they're always there.
  12. #12  
    craigcls's Avatar

    Posts
    71 Posts
    ROM
    TSM Pool Party 1.6 / ICS

    Default

    I downloaded the CIFS Mangager from the market, and it said it installed, but when I tried to open it, it says "application not installed on phone". I uninstalled, rebooted, and reinstalled, but same thing.....

    Running SC 2.9 nonvoodoo.
  13. #13  
    Suicide Shift's Avatar

    Posts
    259 Posts
    ROM
    ROM / Kernel of the day

    Default

    Quote Originally Posted by Chris3D View Post
    Yup, you can do it that way too. Just remember if you flash a new rom/kernel, you might loose these modules and need to copy them back. That's why I prefer to just keep them on my SD card so they're always there.
    Ohh that I did not realize. I keep forgetting about that. I may have to move them back and see if I can get it to work. Hopefully if I cannot somebody here (hint hint) can help me

    Oh and I got it working from PC > Android too very nice.
  14. #14  
    Suicide Shift's Avatar

    Posts
    259 Posts
    ROM
    ROM / Kernel of the day

    Default

    Quote Originally Posted by craigcls View Post
    I downloaded the CIFS Mangager from the market, and it said it installed, but when I tried to open it, it says "application not installed on phone". I uninstalled, rebooted, and reinstalled, but same thing.....

    Running SC 2.9 nonvoodoo.
    So how did you go about uninstalling if it was not on the phone?

    Did you go back to market search for app click on it and there was an uninstall option?

    OR

    Did you go into Settings > Applications > Manage Applications and uninstall it from here?

    Reason I ask is that the first time I downloaded it from the market it did not even show up in my Apps drawer even though my status bar showed that it downloaded and "successfully" installed it.

    I then searched market again and clicked on it. It showed up with a FREE button as if I never installed it. So I clicked it and installed it again. Now it showed up in my app drawer.
  15. #15  
    Suicide Shift's Avatar

    Posts
    259 Posts
    ROM
    ROM / Kernel of the day

    Default

    I found something much easier.

    ES File Explorer on the Market. It allows you to add your local PC and provide the same functionality. The user interface IMO so far is also much better than Root Explorer.

    The reverse Samba however is great.
  16. #16  
    craigcls's Avatar

    Posts
    71 Posts
    ROM
    TSM Pool Party 1.6 / ICS

    Default

    I tried it both ways. The app is in my app drawer and it shows up with an uninstall option when I go into manage applications. When I go back into the market, it shows as already being installed and there is an uninstall option there as well. But when I try to open the app, it says "this application is not installed on phone". I have uninstalled it both ways now and reinstalled from the market. I have tried rebooting after uninstall, and then again after reinstall. 3rd time now and same thing.
  17. #17  
    Suicide Shift's Avatar

    Posts
    259 Posts
    ROM
    ROM / Kernel of the day

    Default

    In my forum travels I have not seen that reported nor have I seen it happen myself. That is odd.

    The only thought off the top of my head is if you are rooted without issues. You just went to SC2.9 which includes root so I would think your root access is OK.

    You could try ES File Manager from the market. I found that while playing with this posted setup. You can go into the ES File Manager and set your IP / user / password to your PC and it works as well. It also has a nicer User Interface in my opinion.
  18. #18  
    geocomp's Avatar

    Posts
    104 Posts
    Global Posts
    121 Global Posts

    Default

    Great write up! I will have to try this when I get home tonight. Thanks
  19. #19  
    representingcochran's Avatar

    Posts
    29 Posts
    ROM
    SC 2.9.2 / ComaVolt NV

    Default

    Deleted comment due to above comments answering question!
  20. Thread Author  Thread Author    #20  
    Chris3D's Avatar

    Posts
    647 Posts
    Global Posts
    646 Global Posts

    Default

    Quote Originally Posted by craigcls View Post
    I tried it both ways. The app is in my app drawer and it shows up with an uninstall option when I go into manage applications. When I go back into the market, it shows as already being installed and there is an uninstall option there as well. But when I try to open the app, it says "this application is not installed on phone". I have uninstalled it both ways now and reinstalled from the market. I have tried rebooting after uninstall, and then again after reinstall. 3rd time now and same thing.
    That's really strange, definitely some sort of market or installer bug.

    When it says it's installed, use a root file manager and look in /data/app. Does it show up there? It should be called ws.plattner.cifsmanager-1.apk
  21. #21  
    gunnermike53's Avatar

    Posts
    3,199 Posts
    ROM
    Gummy, AOKP

    Default

    ok, this is awsome. chris, you are the man!
  22. #22  
    craigcls's Avatar

    Posts
    71 Posts
    ROM
    TSM Pool Party 1.6 / ICS

    Default

    Quote Originally Posted by Chris3D View Post
    That's really strange, definitely some sort of market or installer bug.

    When it says it's installed, use a root file manager and look in /data/app. Does it show up there? It should be called ws.plattner.cifsmanager-1.apk
    Yes, it does show up there, but still says "app not installed on phone" when I try to open it. Strange???

    I'll probably go ahead and give ES File Explorer a try like Suicide Shift suggested.
  23. #23  
    Suicide Shift's Avatar

    Posts
    259 Posts
    ROM
    ROM / Kernel of the day

    Default

    Quote Originally Posted by craigcls View Post
    I'll probably go ahead and give ES File Explorer a try like Suicide Shift suggested.
    I am liking it better than Root Explorer and there are no extra files to keep track of on your SD card.

    Has the same setup other than copying files over and typing in the path to them.

    Just give it your PC's IP username and password BAM you are in!
  24. #24  
    craigcls's Avatar

    Posts
    71 Posts
    ROM
    TSM Pool Party 1.6 / ICS

    Default

    I never could get CIFS to open so I gave up and got rid of it. ES File Explorer is working great!
  25. #25  

    Default Re: [HOW TO] 2-way network file sharing on Android

    Hi Chris,

    I was wondering if you still have the cifs_2.2.zip file? The links in this thread lead to a 404 page not found. I've been trying to get a copy of cifs.ko that works with the kernel (2.6.32.9) for T-Mobile's LG G2X running froyo (2.2.2) but have been unsuccessful. I've found several that say they work with this kernel but when I try to insmod the cifs.ko file as superuser in adb it returns "exec format error".

    Any help you can provide would be great.

    Thanks,

    Paul
Page 1 of 2 12 LastLast

Posting Permissions