[Android General] ArghArgh200:
Hey all, This is my first post on the forum, so I thought I'd make it a guide.

I've run into a few roadblocks with installing some development tools like python and stuff, so I figured I'd try and make a filesystem image to hold all of it, what with Android preventing executables on your SD card from actually executing. You should NOT try and use this for freeing up space by moving apps to it. That just breaks things.

Things to know

A mount point is where you access the contents of a filesystem through.

A filesystem is basically a virtual disk.

I'm not responsible for your phone melting into a pool of acid or anything else you want to blame me for. You executed the commands, not me.

If there's been guides for this already, I didn't find them.

Playing with your system files is dangerous. Be careful

Playing with filesystems is even MORE dangerous. Don't do it unless you know what's going on.

Reversing and then combining two words in a sentence, then calling it a bit more dangerous is incredibly dangerous and can kill you. Don't do it.

As I said earlier: This is not intended to free up internal storage on your phone. It is intended to create extra space to put command-line executables.

This was created for those of us who have older phones that don't have a whole lot of internal storage. (Like the Milestone) This should also work on anything that meets the requirements listed below. I use it on a Motorola Milestone A853 running CyanogenMod 7.2.4f UMTS/SHOLES, and it took some tweaking, but it worked. Commands you put into your shell are marked with `bolded text and surrounded by back-ticks. Leave the back-ticks out. (`)`

Requirements! (obtained using `which <command name>` or a specified command)

Free space on your mSD

losetup (configuring loop devices)

mknod (creating loop devices)

mount (mounting filesystems)

mkdir (making directories)

su (root access)

umount (unmounting)

mke2fs (formatting)

Linux filesystem support (`cat /proc/filesystems | grep ext`)

Here we go!

This assumes you are going to use an ext4-formatted filesystem image mounted on /data/development/, with the image located at /mnt/sdcard/development.img. You WILL need to determine your phone's supported ext<num> filesystems using `cat /proc/filesystems | grep ext`. Choose the highest-numbered one.

Create the mountpoint, the image, and then format the image to ext4.

`mkdir /data/development/`​

`dd if=/dev/zero of=/mnt/sdcard/development.img count=409600 bs=1024`​

`mke2fs -l /mnt/sdcard/development.img -b 1024 -t ext4`​

Create the block device, set it to point at the image, then mount it.

`mknod /dev/block/loop250 b 7 250`​

`losetup /dev/block/loop250 /mnt/sdcard/development.img`​

`mount -t ext4 /dev/block/loop250 /data/development`​

Test it to see if it works.

`touch /data/development/testfile;ls /data/development/`​

Use it.

Unmounting (

/!\

For connecting to a computer to avoid corruption

/!\

)

`umount /mnt/sdcard/development.img`​

`losetup -d /dev/block/loop250`​

Well, that's all I've got. Suggestions and corrections, as well as good feedback are appreciated.

Some PAQs (Possibly Asked Questions)

Q: I'm getting some errors. Here they are: pastebin.com/some-errors

A: Great, I'll see what I did wrong, and if it's something on your end, I'll try and help you out.

Q: It dun werk

A: Tell me the errors instead of complaining about them. Just saying that does not help me and wastes my time and bandwidth.

Q: "No space left on device"; "Operation not permitted"; "No such file or directory"

A: SD card full; not root (or SD card is full, or something broke); Mount point doesn't exist or (if 'mount' returns that and the point exists) something not cool happened.