2

I'm trying to copy a HOSTS file over to an avd created using the android-emulator-plugin in jenkins. I've specified the partition-size to be 128, which works just fine when running from the command line, but when i copy the hosts file to /system/etc/hosts it always returns an out of memory error during the push. Output from the build is as follows:

/Users/Shared/Jenkins/Home/tools/android-sdk/tools/emulator -no-boot-anim -ports 5644,5645 -prop persist.sys.language=en -prop persist.sys.country=US -avd hudson_en-US_240_WXGA720_android-17_x86_blackwidow_integration_test -no-snapshot-load -no-snapshot-save -no-window -partition-size 128
_RegisterApplication(), FAILED TO establish the default connection to the WindowServer, _CGSDefaultConnection() is NULL.
emulator: WARNING:    1: key name doesn't start with valid character. line ignored
Failed to create Context 0x3005
emulator: WARNING: Could not initialize OpenglES emulation, using software renderer.
HAX is working and emulator runs in fast virt mode
$ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb connect emulator-5644
[android] Waiting for emulator to finish booting...
$ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb -s emulator-5644 shell getprop dev.bootcomplete
error: device offline
$ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb -s emulator-5644 shell getprop dev.bootcomplete
error: device offline
$ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb -s emulator-5644 shell getprop dev.bootcomplete
$ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb -s emulator-5644 logcat -v time
[android] Emulator is ready for use (took 35 seconds)
[android] Searching for Android projects...
[android] Project file 'smartfusion-android/project.properties' requires platform 'android-21'
[android] Ensuring platform(s) are installed: [android-21]
$ /Users/Shared/Jenkins/Home/tools/android-sdk/tools/android list target
[fusion-android] $ /bin/sh -xe /Users/Shared/Jenkins/tmp/hudson4186611571599232820.sh
+ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb remount
remount succeeded
+ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb push hosts.txt /system/etc/hosts
failed to copy 'hosts.txt' to '/system/etc/hosts': Out of memory
Build step 'Execute shell' marked build as failure
[android] Stopping Android emulator

Is there some magic that I'm missing?

Christopher Orr
  • 110,418
  • 27
  • 198
  • 193
kingargyle
  • 1,239
  • 10
  • 15

1 Answers1

1

Are you sure that 128MB is enough?

I just created an android-15 x86 emulator, and it required a partition size of least 220MB or so before there was enough free space to write to.

You can check what the partition size is after boot via adb shell df /system.

Christopher Orr
  • 110,418
  • 27
  • 198
  • 193