Mount a filesystem on Android

Very often when you want to write files to a particular partition on ADP1, you will get a "Permission Denied" if the partition is mounted read-only.
To get around this, you need to mount the partition read-write. Typically this is done with /system partition

$ adb shell
$ su
$ mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system

(Replace /dev/block/mtdblock3 & /system with appropriate device path and mount point, as obtained from cat /proc/mounts)

if you have busybox in your device then 1 line for this:
grep " /system " /proc/mounts | awk '{system("mount -o rw,remount -t "$3" "$1" "$2)}'



$ su
# mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
# CHMOD 777 /SYSTEM

and then you can modify anything in /SYSTEM

I used this trick to replace my boot animation, because I had enough perms to modify after doing the CHMOD above.

cp /SDCARD/bootscreen/* /SYSTEM/MEDIA/bootscreen/*

The HTC HERO with 2.1 will boot with either a BOOTANIMATION.ZIP or a BOOTSCREEN folder in /System/Media/

I used terminal emulator from Android Market.

OR you can install Root Explorer from Android Market and click mount R/W