IMPORTANT NOTES: -This has nothing to do with Ubuntu. I've decided to post it here since this is the only technical forum I visit consistently and I figured I'd try to give back to the community.
-Your iPhone must be jailbroken for this to work. I'm not sure what firmware version would be required to follow this guide, but for what it's worth my iPhone has version 4.2.1 firmware.
-Your iPhone must have the following software installed: OpenSSH, some kind of ssh terminal client (I'm using Touch Term), and VLC (I'm not sure if the version from the App Store would work, I think you'll need one of the versions from Cydia).
-This is a somewhat cumbersome way to hide videos on your iPhone, but it is also fairly discreet.
The problem with most of the apps that protect your data is that they include icons and other things that make them less incognito than I would like. This method makes it so that your data will be inaccessible unless someone ssh's into your device and starts snooping around the file system.
First, you need to ssh into your iPhone and create a directory that you will use to hold your videos. Then you will need to create the following two scripts and transfer them onto your iPhone (make sure they are not in the directory you just created):
"/var/root/hello/" = the directory I created for my videosCode:folder1="/var/root/hello/" folder2="/var/mobile/Media/" restoreifs=$IFS IFS=" " for filename in `ls $folder1` do ln "$folder1$filename" "$folder2$filename" done IFS=$restoreifs
"/var/mobile/Media/" = the directory my version of VLC uses for videos
This first script reads the file name of each of my videos in /var/root/hello/, creates a hard link for each of these videos and places it in /var/mobile/Media/ where VLC can see it.
This second script looks at each of my video files in /var/root/hello/ and removes any hard links of them in /var/mobile/Media/.Code:folder1="/var/root/hello/" folder2="/var/mobile/Media/" restoreifs=$IFS IFS=" " for filename in `ls $folder1` do rm "$folder2$filename" done IFS=$restoreifs
So basically, whenever you want to watch your videos you will execute the first script (from the ssh client on your iPhone) that will create hard links that make them visible in VLC. When you want to make them hidden again you will execute the second script which will remove the hard links.
Optional: You can make the execution of the scripts even easier by setting up a .bashrc file and adding aliases to it. Information on that here: http://www.f-77.com/2011/01/07/add-bashrc-to-iphone/
I'm still somewhat of a noob when it comes to ssh and bash scripting, so if anybody has any comments or corrections to this guide, please reply.