Monday, January 12, 2009

e2fsprogs utils for Android (EABI ARM)

I've been playing around with my brand new Android (cool Christmas gift from my employer ;).
Because of the security model by default you cannot store apps into /sdcard (only at /data/apps, which is mounted from the internal MTD device), and this is something you'll eagerly want for freakin'ly installing bunch of cool applications.

After some hacking around I could get it to like /data/app as a loop-mount:

/ # df
Filesystem 1k-blocks Used Available Use% Mounted on
tmpfs 49564 0 49564 0% /dev
tmpfs 4096 0 4096 0% /sqlite_stmt_journals
/dev/block/mtdblock3 69120 57248 11872 83% /system
/dev/block/mtdblock5 76544 58596 17948 77% /data
/dev/block/mtdblock4 69120 1256 67864 2% /cache
/dev/block/mmcblk0p1 991488 950448 41040 96% /sdcard
/dev/block/loop0 128949 19098 103186 16% /data/app
, where /dev/block/loop0 is actually a loop mount on /sdcard/data-extra.img ext2 image file.

I will post a more detailed mini-howto about this hack, but the 1st thing you'll need (and I couldn't find out there before) are the e2fsprogs utils built for Android.
So I went ahead, changed some e2fsprogs src bits and compiled with my android sdk arm gcc toolchain (built @my workstation from the Android git repo).

You can find them at: , namely:
e2fsprogs-android.diff, e2fsprogs-base_arm-eabi.tar.gz, e2fsprogs-xtra_arm-eabi.tar.gz.

15 years have passed since I first touched my 1st Linux, 13 so far since I hacked the Linux kernel for ip aliasing support ... been a long trip, and now I can finally carry it in my pocket ;-)


Anonymous said...

I'd be interested in how to do this.

Can you post a howto if you have time?

Anonymous said...

Also, what happens when you try to mount the sdcard to your pc? Does it cause any issues with the apps in the ext2 object?

Android app developer said...

Its a interesting blog and i got a good knowledge to read this information. so i would like to thank for providing this good information about android.