com.android.ddmlib.SyncException: Read-only file system

通过eclipse运行Android 程序到测试机时候

控制台出现如下错误:

[2014-02-13 15:06:03 - MPlay] Failed to install MPlay.apk on device ‘0123456789ABCDEF‘: Read-only file system
[2014-02-13 15:06:03 - MPlay] com.android.ddmlib.SyncException: Read-only file system
[2014-02-13 15:06:03 - MPlay] Launch canceled!

咋一看,怎么文件系统变成只读呢,就关机重启问题还是不能解决 。

然后

1、进入命令行输入adb shell 

然后#mount 查看挂载状况

C:\Users\Administrator>adb shell
adb server is out of date.  killing...
* daemon started successfully *
root@android:/ # mount
mount
rootfs / rootfs ro,relatime 0 0
tmpfs /dev tmpfs rw,nosuid,relatime,mode=755 0 0
devpts /dev/pts devpts rw,relatime,mode=600 0 0
proc /proc proc rw,relatime 0 0
sysfs /sys sysfs rw,relatime 0 0
none /acct cgroup rw,relatime,cpuacct 0 0
tmpfs /mnt/asec tmpfs rw,relatime,mode=755,gid=1000 0 0
tmpfs /mnt/obb tmpfs rw,relatime,mode=755,gid=1000 0 0
tmpfs /mnt/shm tmpfs rw,relatime,size=1024k,mode=775,uid=1000,gid=1003 0 0
none /dev/cpuctl cgroup rw,relatime,cpu 0 0
/dev/block/mmcblk0p5 /system ext4 ro,relatime,user_xattr,barrier=1,data=ordered 0 0
/dev/block/mmcblk0p7 /data ext4 ro,nosuid,nodev,noatime,nodiratime,errors=panic,user_xattr,barrier=1
,nomblk_io_submit,data=ordered,noauto_da_alloc,discard 0 0
/dev/block/mmcblk0p6 /cache ext4 ro,nosuid,nodev,relatime,user_xattr,barrier=1,data=ordered 0 0
/dev/block/mmcblk0p8 /device ext4 ro,nosuid,nodev,relatime,user_xattr,barrier=1,data=ordered 0 0
/dev/block/sda1 /mnt/sata ext4 ro,relatime,user_xattr,barrier=1,data=ordered 0 0
none /sys/kernel/debug debugfs rw,relatime 0 0
/dev/block/vold/179:4 /mnt/sdcard vfat ro,dirsync,nosuid,nodev,noexec,relatime,uid=1000,gid=1015,fma
sk=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=r
emount-ro 0 0
/dev/block/vold/179:4 /mnt/secure/asec vfat ro,dirsync,nosuid,nodev,noexec,relatime,uid=1000,gid=101
5,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,err
ors=remount-ro 0 0
tmpfs /mnt/sdcard/.android_secure tmpfs ro,relatime,size=0k,mode=000 0 0
/dev/block/dm-0 /mnt/asec/com.xsdl.count-1 vfat ro,dirsync,nosuid,nodev,relatime,uid=1000,fmask=0222
,dmask=0222,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
在这一行

/dev/block/mmcblk0p5 /system ext4 ro,relatime,user_xattr,barrier=1,data=ordered 0 0

显示的是ro 然后执行

mount -o remount -o rw /system

root@android:/ # mount -o remount -o rw /system
mount -o remount -o rw /system
root@android:/ # mount
mount
rootfs / rootfs ro,relatime 0 0
tmpfs /dev tmpfs rw,nosuid,relatime,mode=755 0 0
devpts /dev/pts devpts rw,relatime,mode=600 0 0
proc /proc proc rw,relatime 0 0
sysfs /sys sysfs rw,relatime 0 0
none /acct cgroup rw,relatime,cpuacct 0 0
tmpfs /mnt/asec tmpfs rw,relatime,mode=755,gid=1000 0 0
tmpfs /mnt/obb tmpfs rw,relatime,mode=755,gid=1000 0 0
tmpfs /mnt/shm tmpfs rw,relatime,size=1024k,mode=775,uid=1000,gid=1003 0 0
none /dev/cpuctl cgroup rw,relatime,cpu 0 0
/dev/block/mmcblk0p5 /system ext4 rw,relatime,user_xattr,barrier=1,data=ordered 0 0
/dev/block/mmcblk0p7 /data ext4 ro,nosuid,nodev,noatime,nodiratime,errors=panic,user_xattr,barrier=1
,nomblk_io_submit,data=ordered,noauto_da_alloc,discard 0 0
/dev/block/mmcblk0p6 /cache ext4 ro,nosuid,nodev,relatime,user_xattr,barrier=1,data=ordered 0 0
/dev/block/mmcblk0p8 /device ext4 ro,nosuid,nodev,relatime,user_xattr,barrier=1,data=ordered 0 0
/dev/block/sda1 /mnt/sata ext4 ro,relatime,user_xattr,barrier=1,data=ordered 0 0
none /sys/kernel/debug debugfs rw,relatime 0 0
/dev/block/vold/179:4 /mnt/sdcard vfat ro,dirsync,nosuid,nodev,noexec,relatime,uid=1000,gid=1015,fma
sk=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=r
emount-ro 0 0
/dev/block/vold/179:4 /mnt/secure/asec vfat ro,dirsync,nosuid,nodev,noexec,relatime,uid=1000,gid=101
5,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,err
ors=remount-ro 0 0
tmpfs /mnt/sdcard/.android_secure tmpfs ro,relatime,size=0k,mode=000 0 0
/dev/block/dm-0 /mnt/asec/com.xsdl.count-1 vfat ro,dirsync,nosuid,nodev,relatime,uid=1000,fmask=0222
,dmask=0222,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0

再执行还是不行 。由于是安装app再执行一下

 mount -o remount -o rw /data


再运行就OK了。问题的出现或许很多种 自然解决办法也有多种

也可以试着重启,USB拔掉重插等等。

郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。