How to install a network folder in the internal folder of Android?

I want to connect the network shared folder (Ex: \ 10.0.0.240 \ Folder) to the Android internal folder (Ex: / mnt / sdcard / MountedFolder), as the MountManager application does.

My question is: how can I do this, or how can I at least enter a network folder and see the files on it right from my application?

I am working on a rooted device, so it doesn't matter about permissions.

+3
source share
2 answers

So you do this in Kit Kat from the command line:

mount -o username=<user>,password=<pwd>,file_mode=0777,dir_mode=0777 -t cifs //<NAS IP Addr>/<share name> <mount point dir>

eg.

mount -o username=guest,password=guest,file_mode=0777,dir_mode=0777 -t cifs //192.168.1.254/public /storage/nas/public

Notes:

  • Make sure the directory / repository / nas / public exists and you set the appropriate permissions.
  • file_mode dir_mode, root.
+1

, Android Xamarin (#), , Mount Manager CIFS;

root, , unix .

, :

Java.Lang.Runtime proc = Java.Lang.Runtime.GetRuntime();

proc.Exec(new String[] {"su", "-c", "mount -t cifs -o username=USER, " +
    "password=YOURPASS //xxx.xxx.xxx.xxx/SharedFolder /mnt/sdcard/MountPoint"});

USER YOURPASS .

xxx.xxx.xxx.xxx IP- .

MountPoint , , sdcard /mnt , SD-, , , sd, , sd.

0

All Articles