Wednesday, October 12, 2011

How to mount/unmount network drives without pain

Network Drives - Enyo Network Drive Mapper

by Norf @ Precentral 

Attached is the first alpha release of an Enyo app "Network Drives" which aims to take the pain (and command line) out of mounting and unmounting network drives. This has been put together with the help of others on the forum. It's free. It may end the universe as we know it so be careful out there.

- A few brave (wo)men to try out the app. It's alpha at the minute so if it doesn't work then no shouting please.
- Not to expect files in mounted shares to be available to all apps on the device. webOS doesn't work like that and you probably wouldn't want it to - just imagine the time it would take the webOS media indexer to index all of your photos and music!
- A TouchPad running UberKernel (other homebrew kernels with SMB / CIFS support included may work but are untested at this time).
- Preware / Inernalz *Pro* or webOS Quick Install.
- A network share (currently only tested against Windows shares) to try mounting to.
- Maybe something else I've forgotten...

Download the attached zip file, extract the ipk file inside it and either save it to your device (install it with Preware or Internalz Pro) or your PC (install it with webOS Quick Install).

Once installed look for the Network Drives icon to launch the app.
Tap the "Add profile..." item in the main list (or the "+" item in the lower toolbar).
Give the profile a name and enter the rest of the relevant configuration data for the network share e.g. server/sharename, user name and password etc.
When entering the "Drive Path" note that this is a path relative to /media/internal (the USB drive). The app will check for the path entered and offer to create it if it's not found. Examples would be (without the quotes) "shares/music", "network pics" etc.
Save the profile and be returned to the list.
Tapping on a profile in the main list will attempt to mount the share if it's not already mounted (no tick against the profile) or unmount it when it is already mounted (has a tick against it).

The app uses a custom node service to call exec to run the command line to mount / unmount a drive. Script gods can look in /media/cryptofs/apps/usr/palm/services/com.nelsun.networkdrives.node/scripts for the 2 scripts in question.
Each script attempts to mount / unmount the share under the "Drive Path" folder and each app that has a jail on the device. The upshot of this is that certain other apps (ones that use a custom service to browse local files) should be able to access the files once mounted. At this time there are only a very few that can do this e.g. Gemini File Manager, TouchPlayer.

Known issues:
Drives mounted and accessible to other jailed apps are read-only. the script does try and mount them as read-write... but they're read-only. Hmph.

1 comment: