[Android] pc_magas:
I did build a custom kernel like this:

mkdir -p ~/dlink-decompile

cd ./dlink-decompile

git clone https://android.googlesource.com/kernel/common.git

cd common

git checkout android14-6.1-2024-04_r11

make clean

make mrproper

make ARCH=x86_64 defconfig

make menuconfig

make scripts

make

cd ..

git clone https://github.com/aircrack-ng/rtl8188eus.git

cd rtl8188eus

make -C /home/pcmagas/dlink-decompile/common ARCH=x86_64 KSRC=~/dlink-decompile/common KDIR=~/dlink-decompile/common

Aiming to have the kernel embeded with an `rtl8188eus` module. Then I made an AVD:

avdmanager create avd -n CustomKernel -k "system-images;android-34;google_apis_playstore;x86_64" -b "x86_64"

And I boot the AVD with the custom kernel:

emulator -avd CustomKernel -kernel /home/pcmagas/dlink-decompile/common/arch/x86_64/boot/bzImage -qemu -m 2048 -enable-kvm

But emulator fails to boot. Whereas if I ommit the `-kernel /home/pcmagas/dlink-decompile/common/arch/x86_64/boot/bzImage` param, emulator boots fine.

Looking at the path `/home/pcmagas/dlink-decompile/common/arch/x86_64/boot/bzImage` I see:

lrwxrwxrwx 1 pcmagas pcmagas 22 Ιουν 19 21:15 /home/pcmagas/dlink-decompile/common/arch/x86_64/boot/bzImage -> ../../x86/boot/bzImage

And Also file exists ion the symlinked path:

ls -l /home/pcmagas/dlink-decompile/common/arch/x86_64/boot/../../x86/boot/bzImage
-rw-rw-r-- 1 pcmagas pcmagas 11513440 Ιουν 19 19:22 /home/pcmagas/dlink-decompile/common/arch/x86_64/boot/../../x86/boot/bzImage

The emulator shows a grey screen as attatchment shows. The image is shown for a long time.

And after a while, still remains the same. The emulator output upon console is:

INFO | Storing crashdata in: /tmp/android-pcmagas/emu-crash-34.2.14.db, detection is enabled for process: 77641
INFO | Android emulator version 34.2.14.0 (build_id 11834374) (CL:N/A)
INFO | Found systemPath /home/pcmagas/system-images/android-34/google_apis_playstore/x86_64/
INFO | Storing crashdata in: /tmp/android-pcmagas/emu-crash-34.2.14.db, detection is enabled for process: 77641
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 2048MB
INFO | Warning: QMetaObject::connectSlotsByName: No matching signal for on_new_posture_requested(int) ((null):0, (null))
INFO | Warning: QMetaObject::connectSlotsByName: No matching signal for on_dismiss_posture_selection_dialog() ((null):0, (null))
INFO | Warning: QMetaObject::connectSlotsByName: No matching signal for on_new_resizable_requested(PresetEmulatorSizeType) ((null):0, (null))
INFO | Warning: QMetaObject::connectSlotsByName: No matching signal for on_dismiss_resizable_dialog() ((null):0, (null))
INFO | Warning: QMetaObject::connectSlotsByName: No matching signal for on_sleep_timer_done() ((null):0, (null))
INFO | Warning: QMetaObject::connectSlotsByName: No matching signal for on_unfold_timer_done() ((null):0, (null))
library_mode host gpu mode host
INFO | Initializing hardware OpenGLES emulation support
android_startOpenglesRenderer: gpu infoI0620 21:37:23.875587 77641 HealthMonitor.cpp:279] HealthMonitor disabled.
cannot add library libvulkan.so: failed
added library libvulkan.so.1
createGlobalVkEmulation:995 Selecting Vulkan device: AMD Radeon RX 550 Series (RADV POLARIS11)
initialize: Supports id properties, got a vulkan device UUID
I0620 21:37:24.082889 77641 VkCommonOperations.cpp:1276] Initializing VkEmulation features:
I0620 21:37:24.082906 77641 VkCommonOperations.cpp:1277] glInteropSupported: true
I0620 21:37:24.082924 77641 VkCommonOperations.cpp:1278] useDeferredCommands: true
I0620 21:37:24.082927 77641 VkCommonOperations.cpp:1280] createResourceWithRequirements: true
I0620 21:37:24.082932 77641 VkCommonOperations.cpp:1281] useVulkanComposition: false
I0620 21:37:24.082935 77641 VkCommonOperations.cpp:1282] useVulkanNativeSwapchain: false
I0620 21:37:24.082939 77641 VkCommonOperations.cpp:1283] enable guestRenderDoc: false
I0620 21:37:24.082942 77641 VkCommonOperations.cpp:1284] ASTC LDR emulation mode: 2
I0620 21:37:24.082960 77641 VkCommonOperations.cpp:1285] enable ETC2 emulation: true
I0620 21:37:24.082963 77641 VkCommonOperations.cpp:1286] enable Ycbcr emulation: false
I0620 21:37:24.082983 77641 VkCommonOperations.cpp:1287] guestUsesAngle: false
I0620 21:37:24.082986 77641 VkCommonOperations.cpp:1288] useDedicatedAllocations: true
I0620 21:37:24.083206 77641 FrameBuffer.cpp:506] Graphics Adapter Vendor Google (AMD)
I0620 21:37:24.083213 77641 FrameBuffer.cpp:507] Graphics Adapter Android Emulator OpenGL ES Translator (AMD Radeon RX 550 Series (polaris11, LLVM 15.0.7, DRM 3.42, 5.15.0-112-generic))
I0620 21:37:24.083230 77641 FrameBuffer.cpp:508] Graphics API Version OpenGL ES 3.0 (4.6 (Core Profile) Mesa 23.2.1-1ubuntu3.1~22.04.2)
I0620 21:37:24.083233 77641 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_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
I0620 21:37:24.083252 77641 FrameBuffer.cpp:510] Graphics Device Extensions N/A
INFO | OpenGL Vendor=[Google (AMD)]
INFO | OpenGL Renderer=[Android Emulator OpenGL ES Translator (AMD Radeon RX 550 Series (polaris11, LLVM 15.0.7, DRM 3.42, 5.15.0-112-generic))]
INFO | OpenGL Version=[OpenGL ES 3.0 (4.6 (Core Profile) Mesa 23.2.1-1ubuntu3.1~22.04.2)]
INFO | Enabled VulkanAllocateDeviceMemoryOnly feature for gpu vendor AMD on Linux
INFO | Sending adb public key [QAAAAA35gig7grg+E7kDJj7JMLZ2lE8gXpjq8HXYB0V7UZHHe8uA9ma9OmwDT09UAb85aArFqRNLiJegREOaV2R/Co4wWRVBInXqCoRRkKEnbqO53SLzdRnyh1z6DYkXFQIfFkd9JqeOD46UItc/ru4SQi5hdY4FSjevalU3u0SIZGu7OdJ+pRAozzvKcfTU7F33cs2FJ0plzVl7Corqhyi53ncpoMRSfkearMDVTxPIKn4QjR1u6xv+oa5N8itlCw+benFmd7Da4n07MhDWt/vC4f5QeNwYKi1m0ncnPUh3/7NV5c+CdcGZJQfrldI/MNY+VIRJzt0PtyBRsn3u3xmtP/KjPC+gyGHuAh5jeY6u1dKsm0Oub6oDsBg46J7WXLul5xCuScdT7WR2RRjYE9PAp7KyXgoOYsIrNTgJH0Q0WbeVHwGbidqSZjp/GymyDdciW7+c1aBbyaA2fbB1O1kAGi+Ko8cpHPM9LmApqGvn2mvV2bdpHbFH8QYEXvTMxUHEPyA6MQ0LYFRXL1mu4yIFFaaQQ80Lb2wdv6jke1WIoXWYagnH7RIQ3lRRjgcWQlUAHkM2YjrJKN77f08A5/nP/pcbGZYRrfVnfp9S+St/R9uUVJK3dmoEW1SRVctwGZmlz4UgMn2aLZH+JxAU7WL25L3mwuMkUcLF4uLDOaelYEJnzBAXcAEAAQA= pcmagas@unknown]
WARNING: cannnot unmap ptr 0x7f9ced403000 as it is in the protected range from 0x7f9ced403000 to 0x7f9d6d603000
WARNING: cannnot unmap ptr 0x7f9d6d601000 as it is in the protected range from 0x7f9ced403000 to 0x7f9d6d603000
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/pcmagas/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: /run/user/1000/avd/running/77641/jwks/b6206e94-a6c8-4fb0-9c0b-1622ab1dbd73/active.jwk
INFO | Scanning /run/user/1000/avd/running/77641/jwks/b6206e94-a6c8-4fb0-9c0b-1622ab1dbd73 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_77641.ini
I0620 21:37:24.292412 77712 FrameBuffer.cpp:2853] setDisplayConfigs w 320 h 640 dpiX 160 dpiY 160
I0620 21:37:24.292439 77712 FrameBuffer.cpp:2866] setDisplayActiveConfig 0
INFO | Loading snapshot 'default_boot'...
WARNING | Device 'cache' does not have the requested snapshot 'default_boot'
WARNING | Failed to load snapshot 'default_boot'
INFO | Activated packet streamer for bluetooth emulation

And I have no idea how I can debug this or find the error why. Can you help me?

The reason why I do this is that I want to use the TPLINK TL-WN722N in my android emulator, so I can develop apps that manage the wifi connections directly. Using emulated wifi does not help me because the app needs to be able to register wifi networks and connect to them.