Rooting ICS emulator; pushing su fails with “Out of memory”

限于喜欢 提交于 2019-12-20 10:54:20

问题


I'm trying to root my ICS AVD, and have tried this:

adb shell mount -o rw,remount -t yaffs2 /dev/block/mtdblock03 /system  
adb push su /system/xbin/su  
adb shell chmod 06755 /system  
adb shell chmod 06755 /system/xbin/su

It fails with the following error:

failed to copy 'su' to '/system/xbin/su': Out of memory

How can I fix this?


回答1:


This blog explains the problem:

To avoid the "Out of memory" error when trying to copy the su-executable to /system/bin, you need to start the emulator manually with a large –partion-size argument:

$ emulator -avd MYNAME -partition-size 300

Then:

$ adb remount
$ adb push su /system/bin/su
$ adb shell chmod 06755 /system/bin/su

Note that MYNAME above is the name of the emulator. Also note that if you are using snapshots, you will need to start the emulator without it due to the change in hardware configuration. Append -no-snapshot-load to do so.




回答2:


With this you'll have 512MB of size on /system

ICS is the name I gave to my android emulator:

android-sdk-linux/tools$ emulator -avd ICS -partition-size 512



来源:https://stackoverflow.com/questions/9921874/rooting-ics-emulator-pushing-su-fails-with-out-of-memory

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!