您的位置:首页 > 移动开发 > Android开发

android 模拟器 system 操作

2012-06-05 17:32 169 查看
参考文章:http://blog.csdn.net/assassin4824/article/details/6428074;http://ifeisu.iteye.com/blog/1148314

1、删除 /system 中的文件  报错 readonly

  

接下来要做的是获取权限,首先查看权限,输入

mount

可以看到

/dev/block/mtdblock0 /system yaffs2 ro 0 0

说明在system这个地方我们没有权限

那么接下来我们就来获取权限,输入
mount -o remount,rw -t yaffs2 /dev/block/mtdblock0 /system   

(在root过的手机上命令为:mount -o remount -rw /system /system)

没有提示错误,再次查看权限,输入

mount

可以看到

/dev/block/mtdblock0 /system yaffs2 rw 0 0

说明我们已经获取到权限了

此时再输入

rm Phone.apk

就可以成功删除了

 2、更改了system后 重新启动又恢复原样

如何永久删除呢,很简单,删除SdkSetup.apk,输入   

rm SdkSetup.apk

还没完,找到avd目录(一般在我的文档),进入xxxx.avd目录,删除cache.img和userdata-qemu.img

还有还有,找到%SDK_HOME%/platforms/android-X/images/system.img,复制到上面的目录中。

最后最后,再重启模拟器,大功告成!

3、向android模拟器中复制文件报out of memory

用Elcipse或者是android sdk下的程序启动的模拟器,都会报这个错.

试试直接在命令行下输入

emulator -avd你创建的avd名字(比如android2.1) -partition-size 128

启动.

然后在复制文件就不会有问题了.

英文原文:

As android developer, if you use the following command like:

adb push file /system/..

and meet problems like “failed to copy file to /system/…”, such as:

failed to copy ‘file’ to ‘/system/…’: No space left on device

failed to copy ‘file’ to ‘/system/…’: Out of memory

The resolve method is not using the Eclipse or AVD Manager to start the Android emulator, but by use the command first:

$emulator -avd youravdname -partition-size 128

Then you can try the command “adb push file /system/…”, and the problem maybe resolved.

    
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息