SCRCPY Black screen

Hi,

We know that the official way to mirror the screen of the Magic Leap 2 is the ML Hub Device Device Stream. SCRCPY also provide the ability to send control (click) and wanted to check if it was working with the ML2, unfortunately the stream isn't display, there is only a black screen.

We did try to use the different encoders, without success.

What could be the issue ?

Posting logs here, in case someone find them interesting:

Blockquote
2024-07-01 15:27:38.468 17299-17299 scrcpy pid-17299 I Device: [Magic Leap] ml Magic Leap 2 (Android 10)
2024-07-01 15:27:38.499 17299-17318 scrcpy pid-17299 W Audio disabled: it is not supported before Android 11
2024-07-01 15:27:38.503 17299-17319 app_process pid-17299 I Thread[18,tid=17319,Native,Thread*=0x7c269df1f800,peer=0x12c3ff18,"video"] recursive attempt to load library "libmedia_jni.so"
2024-07-01 15:27:38.503 17299-17319 MtpDeviceJNI pid-17299 D register_android_mtp_MtpDevice
2024-07-01 15:27:38.503 17299-17319 app_process pid-17299 I Thread[18,tid=17319,Native,Thread*=0x7c269df1f800,peer=0x12c3ff18,"video"] recursive attempt to load library "libmedia_jni.so"
2024-07-01 15:27:38.503 17299-17319 app_process pid-17299 I Thread[18,tid=17319,Native,Thread*=0x7c269df1f800,peer=0x12c3ff18,"video"] recursive attempt to load library "libmedia_jni.so"
2024-07-01 15:27:38.505 2890-2890 hwservicemanager hwservicemanager I getTransport: Cannot find entry android.hardware.media.omx@1.0::IOmx/default in either framework or device manifest.
2024-07-01 15:27:38.505 17299-17321 OMXClient pid-17299 I IOmx service obtained
2024-07-01 15:27:38.502 3370-3370 HwBinder:3370_1 media.codec W type=1400 audit(0.0:2702): avc: denied { search } for name="traces" dev="nvme0n1p37" ino=4112387 scontext=u:r:mediacodec:s0 tcontext=u:object_r:trace_data_file:s0 tclass=dir permissive=0
2024-07-01 15:27:38.521 3370-3535 OMXNodeInstance media.codec E setParameter(0x7d1ac7458180:mesa._encoder.avc, OMX.google.android.index.enableAndroidNativeBuffers(0x7f000006): Input:0 en=0) : UnsupportedIndex(0x8000101a)
2024-07-01 15:27:38.521 3370-3535 OMXNodeInstance media.codec E setParameter(0x7d1ac7458180:mesa._encoder.avc, OMX.google.android.index.enableAndroidNativeBuffers(0x7f000006): Output:1 en=0) : UnsupportedIndex(0x8000101a)
2024-07-01 15:27:38.521 3370-3535 OMXNodeInstance media.codec E setParameter(0x7d1ac7458180:mesa._encoder.avc, OMX.google.android.index.allocateNativeHandle(0x7f00000a): Output:1 en=0) : UnsupportedIndex(0x8000101a)
2024-07-01 15:27:38.522 17299-17321 OMXUtils pid-17299 W do not know color format 0x7f000789 = 2130708361
2024-07-01 15:27:38.523 17299-17321 ACodec pid-17299 I setupAVCEncoderParameters with [profile: Baseline] [level: Level51]
2024-07-01 15:27:38.524 17299-17321 ACodec pid-17299 I [OMX.mesa.video_encoder.avc] cannot encode HDR static metadata. Ignoring.
2024-07-01 15:27:38.524 17299-17321 ACodec pid-17299 I setupVideoEncoder succeeded
2024-07-01 15:27:38.524 17299-17321 OMXUtils pid-17299 W do not know color format 0x7f000789 = 2130708361
2024-07-01 15:27:38.524 3370-4426 OMXNodeInstance media.codec E getConfig(0x7d1ac7458180:mesa._encoder.avc, ConfigAndroidVendorExtension(0x6f100004)) : UnsupportedIndex(0x8000101a)
2024-07-01 15:27:38.525 17299-17320 MediaCodec pid-17299 D Add resource non-secure-codec/video-codec:1/avc/encoder/hardware-codec/720:920:60 into resource manager
2024-07-01 15:27:38.535 3370-4426 OMXNodeInstance media.codec E getConfig(0x7d1ac7458180:mesa._encoder.avc, ??(0x7f00000d)) : UnsupportedSetting(0x80001019)
2024-07-01 15:27:38.540 3370-4426 GraphicBufferSource media.codec D setting dataspace: 0x102, acquired=0
2024-07-01 15:27:38.540 3370-4426 GraphicBufferSource media.codec D requesting color aspects (R:2(Limited), P:3(BT601_6_625), M:3(BT601_6), T:3(SMPTE170M))
2024-07-01 15:27:38.540 17299-17321 AHierarchi...ateMachine pid-17299 W Warning message AMessage(what = 'omxI') = {
int32_t type = 0
int32_t event = 3
int32_t data1 = 1
int32_t data2 = 0
} unhandled in root state.
2024-07-01 15:27:38.542 3280-3562 PermissionCache surfaceflinger D checking android.permission.ACCESS_SURFACE_FLINGER for uid=2000 => granted (385 us)
2024-07-01 15:27:38.553 2890-2890 hwservicemanager hwservicemanager I getTransport: Cannot find entry android.hardware.graphics.mapper@3.0::IMapper/default in either framework or device manifest.
2024-07-01 15:27:38.554 3370-3535 Gralloc3 media.codec W mapper 3.x is not supported
2024-07-01 15:27:38.555 2890-2890 hwservicemanager hwservicemanager I getTransport: Cannot find entry android.hardware.graphics.allocator@3.0::IAllocator/default in either framework or device manifest.
2024-07-01 15:27:38.556 3370-3535 Gralloc3 media.codec W allocator 3.x is not supported
2024-07-01 15:27:38.559 3344-6392 ResourceManagerService mediaserver D Ignore non-codec resources, such as battery/graphic-memory/cpu-boost
2024-07-01 15:27:38.566 3370-4426 GraphicBufferSource media.codec D got buffer with new dataSpace #102
2024-07-01 15:27:38.566 3370-17335 OMXNodeInstance media.codec E getConfig(0x7d1ac7458180:mesa._encoder.avc, ??(0x7f00000d)) : UnsupportedSetting(0x80001019)
2024-07-01 15:27:38.567 17299-17321 ACodec pid-17299 D dataspace changed to 0x10c20000 (R:2(Limited), P:3(BT601_6_625), M:3(BT601_6), T:3(SMPTE170M)) (R:2(Limited), S:2(BT601_625), T:3(SMPTE_170M))
2024-07-01 15:27:38.590 3370-4426 media.codec I radeon_efc_get_efc_conversion_table: currentTableType = 1, EfcVersion = 1, currentTableSize = 46817
2024-07-01 15:27:38.591 3370-4426 media.codec I radeon_efc_get_efc_conversion_table: currentTableType = 1, EfcVersion = 1, currentTableSize = 46817
2024-07-01 15:27:38.592 17313-17313 AndroidRuntime pid-17313 D >>>>>> START com.android.internal.os.RuntimeInit uid 2000 <<<<<<
2024-07-01 15:27:38.592 3280-3280 HWComposer surfaceflinger E getRefreshTimestamp failed for display 0: Invalid display
2024-07-01 15:27:38.594 17313-17313 AndroidRuntime pid-17313 I Using default boot image
2024-07-01 15:27:38.594 17313-17313 AndroidRuntime pid-17313 I Leaving lock profiling enabled
2024-07-01 15:27:38.605 3344-6392 ResourceManagerService mediaserver D Ignore non-codec resources, such as battery/graphic-memory/cpu-boost
2024-07-01 15:27:38.634 17313-17313 ICU pid-17313 D Time zone APEX file found: /apex/com.android.tzdata/etc/icu/icu_tzdata.dat
2024-07-01 15:27:38.653 17313-17313 app_process pid-17313 W JNI RegisterNativeMethods: attempt to register 0 native methods for android.media.AudioAttributes
2024-07-01 15:27:38.656 17313-17313 AndroidRuntime pid-17313 D Calling main entry com.genymobile.scrcpy.CleanUp

This is probably due to how the Magic Leap 2 renders content. Unlike a traditional android device, the Magic Leap 2 renders applications that are anchored in your environment and depends on head-pose and stereoscopic rendering. Because of this, streaming the content is not as straightforward as a simple device.

That said, I will let our voice of customer team know that you are interested in this plugin and that you would find sending clicks beneficial. Do you mind expanding on your usecase for using this app on Magic Leap 2?

1 Like

@kbabilinski, Thanks for the feedback !

You are already familiar for the use case - for the Paraverse app :slight_smile:
The idea behind using this SCRCPY plugin would be to have a solution to assist the user which can only interact through eye gaze, with any System UI which needs to be clicked through (controller or / and hand).

Thank you for that information, I have submitted the request to our voice of customer team. I will close this ticket for now.