Tuesday, April 6, 2010

[How To] Get access to your MicroSD card through Bluetooth !

Posted on 10:01 PM by SlipKoRnSaad

The N900's OBEX FTP service ("File Transfer Server" bluetooth service in WinXP) by default only gives you access to six directories - the five main document directories ("Documents", "Audio clips", etc.) and MyDocs root (named "Data").

Turns out this is controlled via symlinks in /home/user/.obex-root/, making it ridiculously easy to customize (from a Linux user's standpoint, at least). The sole thing keeping it from being a total walk in the park for anybody and everybody is that the permissions default to being set with no write access for anybody (geek note: octal 550, owned by user.users), so they have to be adjusted first.

So! As an example, here's a novice user tutorial on how to get access to your MicroSD card through Bluetooth with this method:

1. Open an X terminal.
2. Type the following commands:


Code:
chmod 750 .obex-root
(This modifies permissions so that we can make this mod.)


Code:
ln -s /media/mmc1 .obex-root/Memory\ Card
(Create the symlink "symbolic link" which is a very useful files like shortcuts in windows)


Code:
chmod 550 .obex-root
(Change the permissions back to what they were before. Not strictly necessary...)

When this is done, the Bluetooth file transfer server will now show a "Memory Card" directory in addition to the usual "Audio Clips", "Video Clips", "Documents", et cetera. In there will be the contents of your memory card.

If you have the Nokia PC Suite installed, this also affects the directories shown in the Nokia Phone Browser - with both Bluetooth and USB connections. That last is particularly nice because it allows you to access filesystems with the "PC Suite mode" USB connection without them having to be unmounted first, as is necessary for "Storage device mode". (The latter is still useful because it's 1) universal to all computers, and 2) an actual filesystem which lets you, say, edit-in-place rather than copy back and forth.)

Finally, you can create symlinks to anywhere in the filesystem and it'll work. Browsing and read/write is done with "user" level privs - i.e. you can't symlink to /etc and thereafter edit config files this way, but you will have read-only access. Also, the service doesn't let you access dotfiles - if they're hidden to "ls", they're inaccessible via this system.

Also, be aware that this constitutes a potential security hole if you're incautious about your Bluetooth pairing habits - see http://talk.maemo.org/showthread.php?t=48044 for an example. (Pairing with devices you don't 100% trust is always a Bad Idea, no matter what. It's like giving out your password. Don't do it!)

Via : talk.maemo.org

1 Response to "[How To] Get access to your MicroSD card through Bluetooth !"

Leave A Reply