I have installed Android SDK along with emulator and React Native project in my Ubuntu EC2 server. I got connected with EC2 server by using Visual Studio Code through SSH from my Windows 11 but emulator is not working and `npm run android` is displaying the following message below:
ubuntu@ip-172-31-18-243:~/ecommerce$ npm run android
> ecommerce@1.0.0 android
> expo start --android
Starting project at /home/ubuntu/ecommerce
Starting Metro Bundler
ERROR An unknown error occurred while installing React Native DevTools. Details:
LaunchProcess: failed to execvp:
/home/ubuntu/.cache/dotslash/64/ed7915e5fef86802e862c274e17f780fa75388/React
[6914:0903/170755.169896:FATAL:content/browser/zygote_host/zygote_host_impl_linux.cc:207] Check failed: . : Invalid argument (22)
› Opening emulator rn_test
Error: The emulator (rn_test) quit before it finished opening. You can try starting the emulator manually from the terminal with: /home/ubuntu/android-sdk/emulator/emulator @rn_test
Error: The emulator (rn_test) quit before it finished opening. You can try starting the emulator manually from the terminal with: /home/ubuntu/android-sdk/emulator/emulator @rn_test
at stopWaitingAndReject (/home/ubuntu/ecommerce/node_modules/expo/node_modules/@expo/cli/build/src/start/platforms/android/emulator.js:170:20)
at ChildProcess.<anonymous> (/home/ubuntu/ecommerce/node_modules/expo/node_modules/@expo/cli/build/src/start/platforms/android/emulator.js:180:13)
at ChildProcess.emit (node:events:514:20)
at ChildProcess._handle.onexit (node:internal/child_process:294:12)
I tried to run emulator manually but the emulator gets aborted.
/home/ubuntu/android-sdk/emulator/emulator @rn_test -no-window -gpu swiftshader_indirect -noaudio
This is the result:
INFO | Android emulator version 37.1.11.0 (build_id 15917651) (CL:N/A)
INFO | Graphics backend: gfxstream
INFO | Found systemPath /home/ubuntu/android-sdk/system-images/android-35/google_apis/x86_64/
INFO | Increasing RAM size to 2560MB
##############################################################################
## 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 | Guest GLES Driver: Auto (ext controls)
INFO | emuglConfig_init: vulkan_mode_selected:swiftshader gles_mode_selected:swiftshader
INFO | Checking system compatibility:
INFO | Checking: hasSufficientDiskSpace
INFO | Ok: Disk space requirements to run avd: `rn_test` are met
INFO | Checking: hasSufficientHwGpu
INFO | Ok: Hardware GPU compatibility checks are not required
INFO | Checking: hasSufficientSystem
INFO | Ok: System requirements to run avd: `rn_test` are met
WARNING | Feature QuickbootFileBacked is disabled due to stability issues, if you really want that, the environment variable ANDROID_EMU_FORCE_QUICKBOOT_FILE_BACKED need to set to 1
INFO | Storing crashdata in: /tmp/android-ubuntu/emu-crash-37.1.11.db, detection is enabled for process: 7064
INFO | Initializing gfxstream backend
INFO | startOpenglesRendererImpl: gpu info
INFO |
INFO | initIcdPaths: ICD set to 'swiftshader', using Swiftshader ICD
INFO | Setting ICD filenames for the loader = /home/ubuntu/android-sdk/emulator/lib64/vulkan/vk_swiftshader_icd.json
INFO | SharedLibrary::open for [/home/ubuntu/android-sdk/emulator/qemu/linux-x86_64/lib64/vulkan/libvulkan.so]
INFO | SharedLibrary::open for [/home/ubuntu/android-sdk/emulator/qemu/linux-x86_64/lib64/vulkan/libvulkan.so.1]
INFO | SharedLibrary::open for [/home/ubuntu/android-sdk/emulator/lib64/vulkan/libvulkan.so]
INFO | Added library: /home/ubuntu/android-sdk/emulator/lib64/vulkan/libvulkan.so
INFO | Selecting Vulkan device: SwiftShader Device (Subzero), Version: 1.3.0
INFO | Using Vulkan externalMemoryMode: OpaqueFd for VkEmulation
INFO | SharedLibrary::open for [libX11]
INFO | SharedLibrary::open for [libX11-xcb]
WARNING | Could not open libX11-xcb.so, try libX11-xcb.so.1
INFO | SharedLibrary::open for [libX11-xcb.so.1]
INFO | Initializing VkEmulation features:
INFO | glInteropSupported: false
INFO | useDeferredCommands: true
INFO | createResourceWithRequirements: true
INFO | useVulkanComposition: false
INFO | useVulkanNativeSwapchain: false
INFO | enable guestRenderDoc: false
INFO | ASTC LDR emulation mode: Gpu
INFO | enable ETC2 emulation: true
INFO | enable Ycbcr emulation: false
INFO | guestVulkanOnly: false
INFO | useDedicatedAllocations: false
INFO | guestVulkanMaxApiVersion: 1.3.0
INFO | enableProtectedMemoryEmulation: false
INFO | Graphics Adapter Vendor Google (Google Inc.)
INFO | Graphics Adapter Android Emulator OpenGL ES Translator (Google SwiftShader)
INFO | Graphics API Version OpenGL ES 3.0 (OpenGL ES 3.0 SwiftShader 4.0.0.1)
INFO | 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
INFO | Graphics Device Extensions N/A
INFO | Disabling sparse binding feature support
INFO | Sending adb public key [QAAAAA9ZKqcRivL+v8T+CW6r/osL6OQISl00cAeSWzr7F6A362Pvmmfqlf/t/KF32bShJxKhQdjDrp/sODKRU3nRHJKhHHJXB9dxSZPDy4Kj4psbyZQrSeHmzUybHrGQN3fJn+FT8zEpxFx/iFGLJYVxw2eumrdZdLTamFocWxnpFRk28FosSlFUX3dNO4nY4xYfRfRTcL9e7/TwOV+0EpwMQn2ITDV6o9gD14bvmisWXKUFl8jsVo1tRKbriyfk105dCDyuiwHk+HWeEWMXcZtka0qkiZXZYqxcQrB51lwVr+gIHHYP5SyegBbrwb9jKrV3HmzJO3ECH5jqVzXKVvZZ5mHgws2+59kjD4RXfSFn6ZfmjbpU8p3ZOjrohCBUJH6uQkQ1uydFGt1Ooded2UgbRYXdWqcgvqzvBB3/i0OHG8cJ7GVjAgtPlDZSFpqOXbCOgnHnSUyRkD0xB8b8z1XYqn2uGOkOoZqRVKQKya5FFIjPdeHpBgrQu1WT1UKdnLyxkPSvRM4l57gS0DyHeTRwoxs8YTbmROa825qxNCwtweoLnpmAxo1Z0cw7+F8JCKwB7fMy/SOioHbDOww7ZtlNlDyiY257jmo7x4z69nY4eS9l5uly5xT3fkBu1tWHmsAcEcDFzQkoQlbAOmnQgd8HXr8REd5VOvso+bq2oou+Yh6NCzNaOwEAAQA= ubuntu@unknown]
INFO | Userspace boot properties:
INFO | androidboot.boot_devices=pci0000:00/0000:00:03.0 pci0000:00/0000:00:06.0
INFO | androidboot.dalvik.vm.heapsize=576m
INFO | androidboot.debug.hwui.renderer=skiagl
INFO | androidboot.hardware=ranchu
INFO | androidboot.hardware.gltransport=pipe
INFO | androidboot.hardware.vulkan=ranchu
INFO | androidboot.logcat=*:V
INFO | androidboot.opengles.version=196608
INFO | androidboot.qemu=1
INFO | androidboot.qemu.adb.pubkey=QAAAAA9ZKqcRivL+v8T+CW6r/osL6OQISl00cAeSWzr7F6A362Pvmmfqlf/t/KF32bShJxKhQdjDrp/sODKRU3nRHJKhHHJXB9dxSZPDy4Kj4psbyZQrSeHmzUybHrGQN3fJn+FT8zEpxFx/iFGLJYVxw2eumrdZdLTamFocWxnpFRk28FosSlFUX3dNO4nY4xYfRfRTcL9e7/TwOV+0EpwMQn2ITDV6o9gD14bvmisWXKUFl8jsVo1tRKbriyfk105dCDyuiwHk+HWeEWMXcZtka0qkiZXZYqxcQrB51lwVr+gIHHYP5SyegBbrwb9jKrV3HmzJO3ECH5jqVzXKVvZZ5mHgws2+59kjD4RXfSFn6ZfmjbpU8p3ZOjrohCBUJH6uQkQ1uydFGt1Ooded2UgbRYXdWqcgvqzvBB3/i0OHG8cJ7GVjAgtPlDZSFpqOXbCOgnHnSUyRkD0xB8b8z1XYqn2uGOkOoZqRVKQKya5FFIjPdeHpBgrQu1WT1UKdnLyxkPSvRM4l57gS0DyHeTRwoxs8YTbmROa825qxNCwtweoLnpmAxo1Z0cw7+F8JCKwB7fMy/SOioHbDOww7ZtlNlDyiY257jmo7x4z69nY4eS9l5uly5xT3fkBu1tWHmsAcEcDFzQkoQlbAOmnQgd8HXr8REd5VOvso+bq2oou+Yh6NCzNaOwEAAQA= ubuntu@unknown
INFO | androidboot.qemu.avd_name=rn_test
INFO | androidboot.qemu.camera_hq_edge_processing=0
INFO | androidboot.qemu.camera_protocol_ver=1
INFO | androidboot.qemu.cpuvulkan.version=4206592
INFO | androidboot.qemu.gltransport.drawFlushInterval=800
INFO | androidboot.qemu.gltransport.name=pipe
INFO | androidboot.qemu.hwcodec.avcdec=2
INFO | androidboot.qemu.hwcodec.hevcdec=2
INFO | androidboot.qemu.hwcodec.vpxdec=2
INFO | androidboot.qemu.settings.system.screen_off_timeout=2147483647
INFO | androidboot.qemu.skin=320x640
INFO | androidboot.qemu.virtiowifi=1
INFO | androidboot.qemu.vsync=60
INFO | androidboot.serialno=EMULATOR37X1X11X0
INFO | androidboot.vbmeta.digest=b3271ba499104f4631ae3723913d5c12574e01715fce5b82d60beed097ead264
INFO | androidboot.vbmeta.hash_alg=sha256
INFO | androidboot.vbmeta.size=6720
INFO | androidboot.veritymode=enforcing
WARNING: cannnot unmap ptr 0x757a65801000 as it is in the protected range from 0x7579c5800000 to 0x757a65a00000
INFO | Monitoring duration of emulator setup.
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: /home/ubuntu/android-sdk/emulator/lib/emulator_access.json
INFO | The active JSON Web Key Sets can be found here: /run/user/1000/avd/running/7064/jwks/90f71b64-18b6-41de-b1a3-45d7bd3a687c/active.jwk
INFO | Scanning /run/user/1000/avd/running/7064/jwks/90f71b64-18b6-41de-b1a3-45d7bd3a687c for jwk keys.
INFO | Started GRPC server at 127.0.0.1:8554, security: Local, auth: +token
INFO | Advertising in: /run/user/1000/avd/running/pid_7064.ini
INFO | Successfully initialized netsim WiFi
INFO | Activated packet streamer for bluetooth emulation
INFO | Setting display: 0 configuration to: 320x640, dpi: 160x160
INFO | setDisplayActiveConfig: id:0, 320x640
INFO | emulatorSetupEnvironment: Environment scene is not required
INFO | Loading snapshot 'default_boot'...
INFO | Successfully loaded snapshot 'default_boot' using 217 ms
INFO | Boot completed in 16156 ms
INFO | Increasing screen off timeout, logcat buffer size to 2M.


My instance type is c71.2xlarge
Please I need your help to understand what is wrong in the configuration of Android SDK and display Android Emulator when running it from VS Code to be displayed in my Windows 11. I need assistance on how to resolve this issue. Thank you very appreciated.