Truecrypt- MMC card encryption

Maemo is great. except – ooops, no built in security for data.
Its not so hard to change this in the open-source device though.

sudo gainroot
sfdisk -l
 


According to the output /dev/mmcblk1p1 seems to be the mmc card on my device. So proceeding… i install the power kernal and truecrypt. It seems a hassle to load sudo modprobe dm-crypt manually each time i restart the device. So adding it to /etc/modules seems to be the best way. So its apt-get install nano and nano /etc/modules that did just the trick. (edit>> just add “dm-crypt” to the very end of the file in a new line)
Proceeding, I format the mmc card the geeky terminal way (trust me, hook it upto your computer… format the card there…[makes life easire than in a 600Mhz processor] ) … and hello truecrypt /dev/mmcblk1p1 /media/mmc1…. It works… It immediatly shows up on the file manager.
So to dismount the volume: truecrypt -d… Well its a whole lotta commands to mount and dismount even after setting up… huh ryte?… The tiny keyboard (thank god that much is there though) is a pain in the ass fingers..
So i did what anyone else would do… being lazy, i didnt want to write all those commands just to get my baby up and running, and accidently leaving it open would be the worst thing that could happen [figuratively].. Uh oh- yeah as i was saying….  i wrote a little script…

echo Enter password:
stty -echo
read n1
stty echo
echo Loading…
truecrypt /dev/mmcblk1p1 /media/mmc1 -p $n1 –non-interactive
echo “Done…”
sleep 2 && clear
echo “Press [ENTER] key to continue… “
read n1
truecrypt -d
echo Action successfully completed!
echo … exiting

there… so muh easire…. chmod+x /whatever/wherever/scriptname.sh once and ./whatever/wherever/scriptname.sh would run the script. But look at all that writing ./blah/blah/blah.sh again…. all effort wasted? eh- noway. Where there is a way there will be a way… so i decide to make a little desktop shortcut to link to this script..
In the terminal: nano /usr/share/applications/hildon/MMCrypt.desktop

[Desktop Entry]
Encoding=UTF-8
Version=1.0
Name: MMCrypt
Comment: MMC Encryption
Exec=/whatever/wherever/scriptname.sh
Icon=/some/icon/from/icon/archives/com(google.it).png
Terminal=true
Type=Application
 


Note: The text in RED require some brain to workout… alter to your need before use.
So thats it.. voila. I now have the safe/vault icon on my device which when pressed opens the container after i supply the password (note:its not echoed… just like sudo passwords).. and when it tells me done, i know the safe is open… and hence i minimize the terminal and do what i want in there before i press [Enter] which closes the safe..
PS:its not foolproof.. sometimes the mmc1 folder isnt available, still the script continues, etc etc, but it covers my needs… EoF.
PPS: I am not responsible for upset stomaches due to this..(though its quite safe.)
Advertisements

About unhackmee

typical teenager rumbling about everything not worth your time... Mostly about things that would waste precious seconds from your life, stolen- and never to be returned. WARNING: Discontinue use and seek immediate medical attention should rashes or itchiness occur.

Posted on November 4, 2010, in N900. Bookmark the permalink. 4 Comments.

  1. Hello, i was very happy that i found this manual to mount truecrypt volumes easier… But unfortunately it doesn´t work!
    I have crypted the MyDocs partition and wrote a skript to mount it, now i tired – like you – to make a .desktop file…
    But i can´t find it anywhere, not in the menue and not at the shortcuts on the desktop. Have i forgotten anything?
    The directorys are all right and the .sh skript runs in Terminal without problems!

    I would be very happy if you can help me! Thank you!

  2. for some weird reason, i found that the shortcut is – indeed not working.
    i had a really heavily modified n900 back then, so it isnt surprising though.
    last i tried… this code seemed to work:

    [Desktop Entry]
    Encoding=UTF-8
    Version=0.1
    Type=Application
    Terminal=true
    Name=Mount Krypt
    Exec=/usr/bin/osso-xterm “/home/user/mountsomethinghere.sh”
    Icon=terminal
    X-Osso-Type=application/x-executable

    :::
    glad to see someone actually making head or tail of what i wrote…

  3. First of all thank you for your help…
    I´ve corrected my .desktop file, but it won´t work as well 😦
    I think the Desktop Shortcut could not be created? I have no idea, it appears not
    Is there anything more to do? I only created the .sh file, which runs without problems in Terminal and i created the .desktop file
    Have i forgotten anything… anything simple?
    I´m frustrated!!
    If it is important, i´m using the PowerKernel v46, but that shouln´t be the problem i think…

  4. Since the n900 is no longer my primary device, im not so sharp on the details. I’d advice you to copy an existing .desktop file, then rename it, and edit that.

    If memory serves me correct, then that should replicate any needed file attributes..Also, you might want to restart the device afterwards (i know – its a loootta time :p)…

    It would be helpful if you could post whatever method works for you… I think this ppst needs updating

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: