Oooh, a hidden gem in the cupcake sources

Posted on December 19th, 2008 in Android Hacking by Disconnect  Tagged , , ,

One of the unnoticed parts of the cupcake source release has been brought to my attention by it’s main author, and boy is it a doozey.  You’re gonna love this. SanMehat has been working on a great new feature for an upcoming version of Android.

This file will be self-explanatory to some of you, but let me break it down a little. The first clue is in the code:


static const char *MODULES[] = { "dm_mod", "crypto", "crypto_algapi", "crypto_blkcipher",
"cryptomgr", "dm_crypt", "jbd",
"twofish_common", "twofish", "cbc",
"mbcache", "ext3",
NULL };

If those names don’t look familiar, keep reading. If they do, you already know where I am going with this (and it is GREAT!)  They are basically encryption drivers, for filesystems. So if you wanted to encrypt your hard disk, for example, you would use those kernel drivers.

A little farther down is:

static const char MKE2FS_PATH[] = "/system/bin/mke2fs";
static const char E2FSCK_PATH[] = "/system/bin/e2fsck";

That is the tool that is used to check/repair an ext2 file system. (Well that’s weird. There’s no ext2 file systems on the g1.) EXT2 is an older Linux filesystem that provides all sorts of goodies like users and groups.  The sort of thing that is lacking on the SD card (you may recall that this is one of the reasons you can’t install applications to sd.)

Well.. hmm. So we have a filesystem that supports users, and encryption. What could we be doing?

hmm…. OH!

APPS ON SD CARD!!!!

It’s not done yet, its not even particularly testable, and there are still some outstanding questions (what do you do when the card is ejected?) but they are really and truly working on it.

Remember, if you repost this, give proper attribution! (That means a link back and acknowledgment that you got the story here.) It’s been a big problem with my announcements, and if it gets too bad I’m going to stop posting publicly..




Post a comment