Repository: baldurk/renderdoc

Issue #3183: Failed to find the global layer 'VK_LAYER_RENDERDOC_Capture' from renderdoc apk when launching the test appliction on oppo device
Created: 2023-12-21T08:00:34Z
Description
I was trying to launch some vulkan android app with RenderDoc on oppo device(android 13).
The RenderDoc was installed successfully on android device. But when launch some applications, it crashed immediately.
I found a similar issue from github.  I used two apk (jake-kart-vk.apk, jake-runner-gles3.apkfrom the link to test on my oppo device.
The failed log for vk apk.
12-21 10:38:49.153 17225 20465 I Unity   : MemoryManager: Using 'Dynamic Heap' Allocator.
12-21 10:38:49.174 17225 20465 I Unity   : SystemInfo CPU = ARM64 FP ASIMD AES, Cores = 8, Memory = 11383mb
12-21 10:38:49.174 17225 20465 I Unity   : SystemInfo ARM big.LITTLE configuration: 4 big (mask: 0xf0), 4 little (mask: 0xf)
12-21 10:38:49.174 17225 20465 I Unity   : ApplicationInfo com.DefaultCompany.TestKartGameVk version 0.1.0
12-21 10:38:49.175 17225 20465 I Unity   : Built from '2021.3/staging' branch, Version '2021.3.23f1 (213b516bf396)', Build type 'Release', Scripting Backend 'il2cpp', CPU 'arm64-v8a', Stripping 'Enabled'
12-21 10:38:49.300 17225 20465 I Unity   : Company Name: DefaultCompany
12-21 10:38:49.300 17225 20465 I Unity   : Product Name: TestKartGameVk
12-21 10:38:49.303 17225 20465 D vulkan  : searching for layers in '/data/user/0/com.DefaultCompany.TestKartGameVk'
12-21 10:38:49.303 17225 20465 D vulkan  : searching for layers in '/data/app/~~a8k2EFYaYPBQDUGrsdfZ7A==/com.DefaultCompany.TestKartGameVk-oEZoF7Lfs8JmfL6r5njwuw==/lib/arm64'
12-21 10:38:49.303 17225 20465 D vulkan  : searching for layers in '/data/app/~~a8k2EFYaYPBQDUGrsdfZ7A==/com.DefaultCompany.TestKartGameVk-oEZoF7Lfs8JmfL6r5njwuw==/base.apk!/lib/arm64-v8a'
I done some research for the issues. The problem of the issue seems the value of "targetSdkVersion" of application>=30.  'FILTER_APPLICATION_QUERY' will cause the issue. It is the new change for targetSdkVersion >= 30. When ‘targetSdkVersion’ >= 30, the ‘filter_application_query’ change are enabled automaticly. It will restrict the application from accessing package of other application directly.  For the older ‘targetSdkVersion’, the application can access other application directly. For the ‘targetSdkVersion’ >= 30 or ‘filter_application_query’enabled, the vulkan processing of application will only search the vulkan library from itself and the apps which packages are visible automatically. On my oppo device, the packages of ‘ org.renderdoc.renderdcocmd’ app is not visible to the application. So the library(libVkLayer_GLES_RenderDoc.so) of ‘ org.renderdoc.renderdcocmd’ apk can’t been found. The renderdoc launch application failed.
Why different results on different devices for the same application which 'targetSdkVersion' >=30? For example, one application can work on vivo device(Android 13). But it failed on oppo. The reason seems that the apps which are visible automatically are different for one test application on different devices. The android system automatically makes some apps visible so that your app can interact with them without needing to done some changes( declare "queries" elements) for test application. On my vivo device, the 'org.renderdoc.renderdcocmd.arm64’ is the app which is visible automatically to all application. On oppo, the 'org.renderdoc.renderdcocmd.arm64’ isn't visible automatically to the test application.
I have done some test for the application(jake-kart-vk.apk

Change the 'targetSdkVersion' from 33 to 28, no "queries" element, disable 'FILTER_APPLICATION_QUERY' of android settings
Result: pass
Declare the "queries" element and keep 'targetSdkVersion' as 33
Result: pass
Change the 'targetSdkVersion' from 33 to 28, no "queries" element, enable 'FILTER_APPLICATION_QUERY' of android settings
Result: failed, the issue is 'Failed to find layer VK_LAYER_RENDERDOC_Capture'

Steps to reproduce

Run the origin jake-kart-vk.apk
Change the application with above changes.

Environment

RenderDoc version: 1.28
Operating System: Ubuntu22.04, oppo (Android 13), vivo( Android 13)
Graphics API: XXX

Duplicate issue #3198: [Andorid] Error connecting to debugger 
Created: 2024-01-03T12:29:42Z
Description
I am encountering the following error when trying to obtain a captcha with RenderDoc on an Android device.

I have followed all the steps suggested in the message to resolve the error, but it did not help.


Steps to reproduce

Clone repository https://github.com/DiligentGraphics/DiligentEngine?tab=readme-ov-file#cloning
Build application Tutorial01_HelloTriangle for Android https://github.com/DiligentGraphics/DiligentEngine?tab=readme-ov-file#build_and_run_android
Attach the Android device by USB to PC
Set USB Debugging in developer mode on the Android device
Switch USB Configuration to Media Transfer Protocol
Connect to device from RenderDoc
Select the appropriate application in ExeculablePath
[optional step] Paste Intent Arguments: --es mode vk or --es mode gles
Start the application

Environment


RenderDoc version: v1.30
Operating System: Windows 11
Graphics API: Vulkan/GLES Android 14
Smartphone: OnePlus 10 Pro (Android: Version 14 Security update: November 5, 2023)
Android Debug Bridge: 34.0.5-10900879

Closing comment (2024-01-11T14:49:39Z): Thank you for the info. I do not have a OnePlus on hand but have tried with an OPPO, which is their parent company - they share many quirks- but I have not been able to reproduce. It certainly looks device specific...
Could you attach Android logs around the time of a capture attempt on the OnePlus (adb logcat will suffice)?
This may yet be related to #3183, which is resolved in the latest nightly build. If you are able to rule out this possibility it would be helpful to our investigation  https://renderdoc.org/builds#nightly