向android模拟器中复制文件报out of memory错误解决
来源:互联网 发布:淘宝四海认证鱼竿双宝 编辑:程序博客网 时间:2024/05/16 15:41
转:http://blog.csdn.net/xiaoxiaosunzhao/article/details/6407745
参照:http://blog.csdn.net/gumanren/archive/2010/09/02/5858266.aspx
在android开发过程中,要经常用到模拟器
原因:
用Elcipse或者是android sdk下的程序启动的模拟器,都会报这个错.
试试直接在命令行下输入
emulator -avd 你创建的avd名字(比如android2.1) -partition-size 128
启动.
然后在复制文件就不会有问题了.
分析:
a. 默认情况下system分区和data分区的信息如下:
# df
/dev: 47048K total, 0K used, 47048K available (block size 4096)
/mnt/asec: 47048K total, 0K used, 47048K available (block size 4096)
/system: 77568K total, 77568K used, 0K available (block size 4096)
/data: 65536K total, 27004K used, 38532K available (block size 4096)
/cache: 65536K total, 1156K used, 64380K available (block size 4096)
/mnt/sdcard: 258064K total, 2K used, 258062K available (block size 512)
/mnt/secure/asec: 258064K total, 2K used, 258062K available (block size 512)
和使用的image是差不多的。
root@romulus-laptop:/work/android/froyo_stk/out/host/linux-x86/sdk/android-sdk_eng.root_linux-x86/platforms/android-2.2.1/images# ll
-rwxrwxrwx 1 root root 1466272 2011-02-28 22:32 kernel-qemu*
-rw-rw---- 1 root root 292233 2011-02-28 22:34 NOTICE.txt
-rw-rw-r-- 1 root root 164888 2011-02-28 22:32 ramdisk.img
-rw-rw---- 1 root root 80912832 2011-02-28 22:32 system.img
-rw-rw---- 1 root root 4105728 2011-02-28 22:32 userdata.img
b. 如果使用-partition-size 128后,指定模拟器的system和data分区的大小是128M
-partition-size <size> system/data partition size in MBs
# df
/dev: 47048K total, 0K used, 47048K available (block size 4096)
/mnt/asec: 47048K total, 0K used, 47048K available (block size 4096)
/system: 127104K total, 77904K used, 49200K available (block size 4096)
/data: 127104K total, 27460K used, 99644K available (block size 4096)
/cache: 65536K total, 1212K used, 64324K available (block size 4096)
/mnt/sdcard: 258064K total, 2K used, 258062K available (block size 512)
/mnt/secure/asec: 258064K total, 2K used, 258062K available (block size 512)
注:127104K=124.125M ~ 128M
英文原文:
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.
- 向android模拟器中复制文件报out of memory错误解决
- 向android模拟器中复制文件报out of memory错误解决
- 向Android模拟器中复制文件报out of memory错误解决
- 向android模拟器中复制文件报out of memory错误解决
- 如何解决tomcat运行报out of memory错误
- Android模拟器adb push文件 Out of Memory
- android 模拟机 无法push文件到system目录报out of memory错误
- 运行Ant报Out of Memory错误
- 解决domino服务器错误:out of memory
- 从PC中向Android模拟器中复制文件
- 从PC中向Android模拟器中复制文件
- CMD下运行Ant报Out of Memory错误 的解决方式
- 解决out of memory
- 一图解决:navicat for mysql 导入.sql大文件 报out of memory 错误
- 64位 linux 中 oracle 11g dbca 报 ora-27102 out of memory 错误
- 调用系统相册报out of memory 错误的解决办法
- 解决adroid adb push 报 Out of memory
- android out of memory
- MySQL DBA 招聘小结
- 【block编程第五篇】block中使用 weak–strong dance 技术避免循环引用
- MP4文件格式的解析
- eclipse中Android模拟器启动过一段时间DDMS假死问题
- 在Debian系的Linux中编译并安装ixgbe驱动的教程[转载]
- 向android模拟器中复制文件报out of memory错误解决
- android中Activity的启动模式是singleTask或singleInstance与startActivityForResult,onActivityResult
- uva10602
- Android中Broadcast Receiver组件详解
- 面试题36:数组中的逆序对
- sqlplus详细命令详解
- 研发管理01:项目管理(PM) 与 Scrum Master (SM)
- 我的2012-分享我的四个项目经验
- open和fopen的区别(unix/linux编程实现2.3)