amrsa1 / Android-Emulator-image

The use of this Docker image simplifies the process of running an Android emulator within a Docker container
MIT License
103 stars 52 forks source link

ADB cannot find emulator/device #27

Closed asharbinkhalil closed 2 months ago

asharbinkhalil commented 3 months ago

I followed all the steps but adb is not detecting any devices/emulators in any mode headed or headless Do i need to connect with some adb device? I'm using windows machine


PS C:\Users\abc\Android-Emulator-image> docker exec --privileged -it -e EMULATOR_TIMEOUT=300 androidContainer bash -c "./start_emu_headless.sh"
* daemon not running; starting now at tcp:5037
* daemon started successfully
linux-gnu: emulator @nexus -no-window -no-snapshot -noaudio -no-boot-anim -memory 2048 -accel off -camera-back none -gpu off
nohup: appending output to 'nohup.out'
==> Checking emulator booting up status 🧐
==> Timeout after 300 seconds elapsed 🕛.. 
adb: device offline
adb: device offline
adb: device offline
adb: device offline
`
asharbinkhalil commented 3 months ago
v= cat nohup.out 
INFO    | Storing crashdata in: /tmp/android-unknown/emu-crash-34.2.16.db, detection is enabled for process: 32
INFO    | Android emulator version 34.2.16.0 (build_id 12038310) (CL:N/A)
INFO    | Found systemPath /opt/android/system-images/android-34/google_apis_playstore/x86_64/
WARNING | File System is not ext4, disable QuickbootFileBacked feature
WARNING | x86_64 emulation may not work without hardware acceleration!
WARNING | Your AVD has been configured with an in-guest renderer, but the system image does not support guest rendering.Falling back to 'swiftshader_indirect' mode.
INFO    | Storing crashdata in: /tmp/android-unknown/emu-crash-34.2.16.db, detection is enabled for process: 32
INFO    | Duplicate loglines will be removed, if you wish to see each individual line launch with the -log-nofilter flag.  
INFO    | Increasing RAM size to 3072MB
library_mode swiftshader_indirect gpu mode swiftshader_indirect
INFO    | Initializing hardware OpenGLES emulation support
android_startOpenglesRenderer: gpu infoI0712 13:25:18.271471      32 HealthMonitor.cpp:279] HealthMonitor disabled.        
cannot add library /opt/android/emulator/qemu/linux-x86_64/lib64/vulkan/libvulkan.so: failed
cannot add library /opt/android/emulator/qemu/linux-x86_64/lib64/vulkan/libvulkan.so.1: failed
added library /opt/android/emulator/lib64/vulkan/libvulkan.so
createGlobalVkEmulation:995 Selecting Vulkan device: SwiftShader Device (Subzero)
initialize: Supports id properties, got a vulkan device UUID
WARNING: could not open libX11.so, try libX11.so.6
I0712 13:25:18.465772      32 VkCommonOperations.cpp:1276] Initializing VkEmulation features:
I0712 13:25:18.465798      32 VkCommonOperations.cpp:1277]     glInteropSupported: false
I0712 13:25:18.465803      32 VkCommonOperations.cpp:1278]     useDeferredCommands: true
I0712 13:25:18.465806      32 VkCommonOperations.cpp:1280]     createResourceWithRequirements: true
I0712 13:25:18.465810      32 VkCommonOperations.cpp:1281]     useVulkanComposition: false
I0712 13:25:18.465813      32 VkCommonOperations.cpp:1282]     useVulkanNativeSwapchain: false
I0712 13:25:18.465816      32 VkCommonOperations.cpp:1283]     enable guestRenderDoc: false
I0712 13:25:18.465820      32 VkCommonOperations.cpp:1284]     ASTC LDR emulation mode: 2
I0712 13:25:18.465823      32 VkCommonOperations.cpp:1285]     enable ETC2 emulation: true
I0712 13:25:18.465827      32 VkCommonOperations.cpp:1286]     enable Ycbcr emulation: false
I0712 13:25:18.465830      32 VkCommonOperations.cpp:1287]     guestUsesAngle: false
I0712 13:25:18.465834      32 VkCommonOperations.cpp:1288]     useDedicatedAllocations: false
I0712 13:25:18.466525      32 FrameBuffer.cpp:506] Graphics Adapter Vendor Google (Google Inc.)
I0712 13:25:18.466543      32 FrameBuffer.cpp:507] Graphics Adapter Android Emulator OpenGL ES Translator (Google SwiftShader)
I0712 13:25:18.466547      32 FrameBuffer.cpp:508] Graphics API Version OpenGL ES 3.0 (OpenGL ES 3.0 SwiftShader 4.0.0.1)  
I0712 13:25:18.466551      32 FrameBuffer.cpp:509] Graphics API Extensions GL_OES_EGL_sync GL_OES_EGL_image GL_OES_EGL_image_external GL_OES_depth24 GL_OES_depth32 GL_OES_element_index_uint GL_OES_texture_float GL_OES_texture_float_linear GL_OES_compressed_paletted_texture GL_OES_compressed_ETC1_RGB8_texture GL_OES_depth_texture GL_OES_texture_half_float GL_OES_texture_half_float_linear GL_OES_packed_depth_stencil GL_OES_vertex_half_float GL_OES_standard_derivatives GL_OES_texture_npot GL_OES_rgb8_rgba8 GL_EXT_color_buffer_float GL_EXT_color_buffer_half_float GL_EXT_texture_format_BGRA8888 GL_APPLE_texture_format_BGRA8888
I0712 13:25:18.466555      32 FrameBuffer.cpp:510] Graphics Device Extensions N/A
INFO    | OpenGL Vendor=[Google (Google Inc.)]
INFO    | OpenGL Renderer=[Android Emulator OpenGL ES Translator (Google SwiftShader)]
INFO    | OpenGL Version=[OpenGL ES 3.0 (OpenGL ES 3.0 SwiftShader 4.0.0.1)]
INFO    | Sending adb public key [QAAAADFwZ6wvF04PLGDW2XlfTX1cN8dEKy5WhXsxKya5SKQquCed3+Tm5PFOiDeHVm+/36xJo+tdJ2YBj5Cr9sUmogKcKXAj02NulzMcWCSftuidGq/3OuuD9A+xproOndyofh5RM19y82XOImOFmZB880g3g7GsiLaWdcf9/6X01w48erU4tFFzPO35l++Txzd4i18aEOv/6yvSsxffHr1HfFwEXU59t3F15kf5hIndXirie9sV4XsvxhOh2E7fJNhy6vVf6Sv0D0boPs+cHnXIuGwgdrIRGnmfw5SQAOCIWRiZGXitt7Z9gh3nNPo4IFOytaAEcbmRcyfwSCoUJkxmDC0Hu+LEQPn/p+xMkag0wTqAaT7INhPOKssCxLQ5v7rK22lc3A3+nL7Ui7ZM/6Jks6mVBNsryKYjLgtyRsz15KvVnx0hswa3QMKTlOlIIRHELeCHg5+cne5mt43YHFgY5QdWijCv/xwlm6ovhHcNsWeFW4se4stgQZNHhSAgsXphxr8ghmgyfRsRjECPah2dst5G4Q5FEqs0pFmaRgTw8aXi8j1FyzH/4SfIQg9vKB/kBcx9yI13KwgE8iDg1lXzSVG9WyToDviBUXFnmwheugvyFM5GT7uXNpum++nskMT4D1zLcR81OKTZMpZXIcSriRher3MowvJq8GxAg/p6iZN7hQYSXAEAAQA= @unknown]
TCG doesn't support requested feature: CPUID.01H:ECX.tsc-deadline [bit 24]
TCG doesn't support requested feature: CPUID.01H:ECX.avx [bit 28]
TCG doesn't support requested feature: CPUID.01H:ECX.f16c [bit 29]
TCG doesn't support requested feature: CPUID.01H:ECX.tsc-deadline [bit 24]
TCG doesn't support requested feature: CPUID.01H:ECX.avx [bit 28]
TCG doesn't support requested feature: CPUID.01H:ECX.f16c [bit 29]
WARNING: cannnot unmap ptr 0x7f6a994df000 as it is in the protected range from 0x7f6a994df000 to 0x7f6b596df000
WARNING: cannnot unmap ptr 0x7f6b59601000 as it is in the protected range from 0x7f6a994df000 to 0x7f6b596df000
INFO    | Monitoring duration of emulator setup.
WARNING | Using fallback path for the emulator registration directory.
WARNING | The emulator now requires a signed jwt token for gRPC access! Use the -grpc flag if you really want an open unprotected grpc port
INFO    | Using security allow list from: /opt/android/emulator/lib/emulator_access.json
WARNING | *** Basic token auth should only be used by android-studio ***
INFO    | The active JSON Web Key Sets can be found here: /root/.android/avd/running/32/jwks/d9430fc8-05a5-4ad0-9bc4-02ce8e35c59f/active.jwk
INFO    | Scanning /root/.android/avd/running/32/jwks/d9430fc8-05a5-4ad0-9bc4-02ce8e35c59f for jwk keys.
INFO    | Started GRPC server at 127.0.0.1:8554, security: Local, auth: +token
WARNING | Using fallback path for the emulator registration directory.
INFO    | Advertising in: /root/.android/avd/running/pid_32.ini
I0712 13:25:18.712423      92 FrameBuffer.cpp:2853] setDisplayConfigs w 1440 h 2560 dpiX 560 dpiY 560
I0712 13:25:18.712459      92 FrameBuffer.cpp:2866] setDisplayActiveConfig 0
##############################################################################
##                        WARNING - ACTION REQUIRED                         ##
##  Consider using the '-metrics-collection' flag to help improve the       ##
##  emulator by sending anonymized usage data. Or use the '-no-metrics'     ##
##  flag to bypass this warning and turn off the metrics collection.        ##
##  In a future release this warning will turn into a one-time blocking     ##
##  prompt to ask for explicit user input regarding metrics collection.     ##
##                                                                          ##
##  Please see '-help-metrics-collection' for more details. You can use     ##
##  '-metrics-to-file' or '-metrics-to-console' flags to see what type of   ##
##  data is being collected by emulator as part of usage statistics.        ##
##############################################################################
INFO    | Cold boot: requested by the user
WARNING | Cold boot: requested by the user
WARNING | Failed to process .ini file /root/.android/emu-update-last-check.ini for reading.
qemu-system-x86_64-headless: Unable to connect character device modem: address resolution failed for ::1:35981: Name or service not known
WARNING | Failed to process .ini file /root/.android/emu-update-last-check.ini for reading.
INFO    | Activated packet streamer for bluetooth emulation
asharbinkhalil commented 2 months ago

Got it, This image not works with windows host.