2

我正在尝试将 HOSTS 文件复制到使用 jenkins 中的 android-emulator-plugin 创建的 avd。我已将分区大小指定为 128,这在从命令行运行时工作得很好,但是当我将主机文件复制到 /system/etc/hosts 时,它总是在推送期间返回内存不足错误。构建的输出如下:

/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

有什么我想念的魔法吗?

4

1 回答 1

1

你确定128MB就够了吗?

我刚刚创建了一个 android-15 x86 模拟器,它需要至少 220MB 左右的分区大小才能有足够的可用空间进行写入。

您可以通过adb shell df /system.

于 2015-02-25T21:16:44.197 回答