12

I'm in the process of extending monkey for software testing purposes, so I would like to replace the current monkey.jar which my own compiled monkey.jar in the emulator. The current monkey.jar is located at /system/framework/monkey.jar.

When I try to run the following command:

adb push monkey.jar /system/framework/monkey.jar

i get the following: 'failed to copy 'monkey.jar' to '/system/framework/monkey.jar': Out of memory'

Any ideas on how to replace the current monkey.jar?

This actually works if I'm running Android 1.6 in the Emulator, but nothing after that. Yes, i've tried 'abd remount'

EDIT: This is not a .jar specific issue. I can't push any type of file to /system/framework

Thanks.

CodingWithoutComments
  • 35,598
  • 21
  • 73
  • 86

4 Answers4

23

Found the answer on the following thread:

As an 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.

CodingWithoutComments
  • 35,598
  • 21
  • 73
  • 86
  • +1 Hey thats good. Now I know what to do when i come accross something like this – naikus Jul 30 '10 at 03:33
  • I am using Eclipse in Windows and I have same problem, but I cant understand where I must write $emulator –avd youravdname –partition-size 128 – Viktor Apoyan May 19 '11 at 11:38
  • For any reason I receive followin error message: invalid command-line parameter: –partition-size. – Vitalii Jul 09 '13 at 17:49
  • 512 works for me. If you failed, try to increase your number, such as 1024 or more. I tried 128(not work), 256(not work), and then 512(work). My VM heap is 64. API 18, Nexus 4.65". – Nick Dong Apr 30 '14 at 05:14
2

Faced the same problem some little while ago. The problem is not because of low memory; it is because users do not have permission to write to the /system.

This issue can be solved by changing permissions to the /system partition using 'chmod' from the adb command line.

knmanish
  • 51
  • 4
  • 1
    Good thought, but I was able to successfully change the permissions of the /system (and /system/app) folders but the Out of Memory issue still persists when trying to push a file. – jrz Dec 12 '12 at 15:50
0

I happen to increase the "VM heap" size in the AVD configuration, to 128, and the error was gone. Hope this helps.

0

What does your "adb logcat" show? Does your emulator go out of memory? In that case, how about creating an AVD with more Device Ram Size? Have you tried that? Its in Hardware properties while creating an AVD

naikus
  • 24,302
  • 4
  • 42
  • 43
  • @CodingWithoutComments I know you didn't cause you had not logged in for some time, I don't know who did it, just left the comment for whoever did it. :) – naikus Jul 29 '10 at 02:58
  • Good idea, didn't work however. Even when I jack the memory up really high I still get the 'Out of Memory' error. – CodingWithoutComments Jul 29 '10 at 17:54
  • @CodingWithougComments I shall spend some time on this today and see if I find something – naikus Jul 30 '10 at 03:31