Chinaunix首页 | 论坛 | 博客
  • 博客访问: 861699
  • 博文数量: 182
  • 博客积分: 1992
  • 博客等级: 上尉
  • 技术积分: 1766
  • 用 户 组: 普通用户
  • 注册时间: 2010-10-18 11:49
文章分类

全部博文(182)

文章存档

2019年(1)

2016年(5)

2015年(29)

2014年(38)

2013年(21)

2012年(36)

2011年(52)

我的朋友

分类: 嵌入式

2011-11-30 12:06:08

转自:
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) |
给主人留下些什么吧!~~