转自:
EDIT NOTE: The standard remount command is accessible via the adb utility. "adb remount" should remount your partition in read write mode. I access via ssh, and remount wasn't found when I entered that command, so I created this script. Thanks Kendon for pointing "adb remount" out in post #2.
Thanks for the great ROM. Been testing away here on my CDMA Hero and just loving it. I've been moving apps from the /system/app directory to the /system/sd/app directory and back as needed to clear space and keep things working properly. That means alot of ssh into the system and remounting of the /system partition.
I read somewhere that there was a remount command on MoDaCo's ROM, but it doesn't seem to be on mine, so I made my own. Maybe someone else here would like to use the script. You can change the mount back and forth between read-write and read-only settings, as well as status the current mode.
Place this file in /system/bin/
filename remount, or whatever you would like to call it.
Don't forget to change the mode to 755, and then reboot the system to get it recognized.
Here's the script body:
#!/system/bin/sh
#
# Remount /system partition
case "$1" in
ro)
echo "Setting /system to RO (read only)"
mount -o ro,remount -t yaffs2 /dev/block/mtdblock3 /system
echo ""
echo "Current status of /system mount:"
mount |grep "/system type"
echo ""
;;
rw)
echo "Setting /system to RW (read write)"
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
echo ""
echo "Current status of /system mount:"
mount |grep "/system type"
echo ""
;;
status)
echo ""
echo "Current status of /system mount:"
mount |grep "/system type"
echo ""
;;
*)
echo "Valid input format:"
echo " remount [ro|rw|status]"
echo " ro = read only (default)"
echo " rw = read write (to make modifications)"
echo " status = current mount mode"
echo ""
echo "Current status of /system mount:"
mount |grep "/system type"
echo ""
exit 1
esac
阅读(1700) | 评论(0) | 转发(0) |