Я пытаюсь настроить эмулятор Android для запуска внутри контейнера докера.
Я установил Android SDK и эмулятор, но когда я запускаю emulatr, adb теряет соединение и начинает создавать процессы зомби.
Вот как я установил и создал эмулятор:
# sdkmanager "system-images;android-26;google_apis;x86_64"
# echo 'no' | /opt/android-sdk/tools/bin/avdmanager \
-v create avd -n x86_64 \
-k "system-images;android-26;google_apis;x86_64" \
-g "google_apis"
Это конец вывода -verbose
:
# /opt/android-sdk/emulator/emulator -list-avds
x86_64
# /opt/android-sdk/tools/emulator -avd x86)_64 -noaudio -no-boot-anim -gpu off -verbose
emulator: Starting QEMU main loop
emulator: registered 'boot-properties' qemud service
emulator: Adding boot property: 'ro.opengles.version' = '131072'
emulator: Adding boot property: 'qemu.sf.fake_camera' = 'back'
emulator: Adding boot property: 'dalvik.vm.heapsize' = '192m'
emulator: Adding boot property: 'qemu.hw.mainkeys' = '1'
emulator: Adding boot property: 'qemu.sf.lcd_density' = '160'
emulator: goldfish_events.have-dpad: true
emulator: goldfish_events.have-trackball: true
emulator: goldfish_events.have-camera: true
emulator: goldfish_events.have-keyboard: false
emulator: goldfish_events.have-lidswitch: false
emulator: goldfish_events.have-tabletmode: false
emulator: goldfish_events.have-touch: false
emulator: goldfish_events.have-multitouch: true
emulator: control console listening on port 5554, ADB on port 5555
Not using any http proxy
emulator: Adding boot property: 'qemu.timezone' = 'SystemV/EST5'
emulator: android_hw_fingerprint_init: fingerprint qemud listen service initialized
emulator: onGuestSendCommand: [0x7f8c48f652a0] Adb connected, start proxing data
emulator: onGuestRecvData: [0x7f8c48f652a0] Adb closed by host
emulator: onGuestClose: [0x7f8c48f652a0] Adb closed by guest
emulator: onGuestSendCommand: [0x7f8c48aa2020] Adb connected, start proxing data
emulator: onGuestClose: [0x7f8c48aa2020] Adb closed by guest
emulator: onGuestClose: [0x7f8c48a48090] Adb closed by guest
emulator: onGuestSendCommand: [0x7f8c4840e020] Adb connected, start proxing data
...
При перечислении процессов я вижу кучуиз adb
зомби:
root 1090 0.0 0.0 0 0 pts/0 Z+ 18:17 0:00 [adb] <defunct>
root 1092 0.0 0.0 0 0 pts/0 Z+ 18:17 0:00 [adb] <defunct>
root 1094 0.0 0.0 0 0 pts/0 Z+ 18:17 0:00 [adb] <defunct>
root 1096 0.0 0.0 0 0 pts/0 Z+ 18:17 0:00 [adb] <defunct>
root 1098 0.0 0.0 0 0 pts/0 Z+ 18:17 0:00 [adb] <defunct>
root 1100 0.0 0.0 0 0 pts/0 Z+ 18:17 0:00 [adb] <defunct>
root 1102 0.0 0.0 0 0 pts/0 Z+ 18:17 0:00 [adb] <defunct>
root 1116 0.0 0.0 0 0 pts/0 Z+ 18:17 0:00 [adb] <defunct>
И они продолжают вращаться вечно, пока я не убью эмулятор.
Я подозреваю, что эмулятор не загружается должным образом.
Как мне отладить это дальше?