Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connecting to minicap Socket Causes a NoSuchMethodException on Android 15 #70

Open
treibo opened this issue Jan 24, 2025 · 1 comment
Open

Comments

@treibo
Copy link

treibo commented Jan 24, 2025

Hello Guys,

I am currently Trying to get Minicap working on an Android 15 Device, I used to work with the Minicap binary and the shared object File, which worked like a Charm until Android 13.
Last Year I discovered the possibility to Use the Minicap.apk, which worked even better for me because that Way you got rid of maintaining all ABI for each SDK.
Last week I got my Hands on an Android 15 Device, I got Minitouch working but My screen of Minicap Keeps blank. When invoking Minicap it starts up with this Output:
137|CHEETAH:/ $ CLASSPATH=/data/local/tmp/minicap-debug.apk app_process /system/bin io.devicefarmer.minicap.Main -P 1080x2436@540x1218/0
14:16:27.919 [main] INFO BaseProvider - framePeriodMs: 0
PID: 31693
INFO: 1080x2436@540x1218/0
14:16:27.929 [main] INFO Main - Listening on socket : minicap

Unti this Point it looks good to me, after trying to Access the forwarded Socket I get a NoSuchMethodException:
java.lang.NoSuchMethodException: android.view.SurfaceControl.createDisplay [class java.lang.String, boolean]
at java.lang.Class.getMethod(Class.java:2950)
at java.lang.Class.getMethod(Class.java:2450)
at io.devicefarmer.minicap.utils.SurfaceControl.createDisplay(SurfaceControl.kt:93)
at io.devicefarmer.minicap.provider.SurfaceProvider.initSurface(SurfaceProvider.kt:87)
at io.devicefarmer.minicap.provider.SurfaceProvider.initSurface(SurfaceProvider.kt:106)
at io.devicefarmer.minicap.provider.SurfaceProvider.onConnection(SurfaceProvider.kt:75)
at io.devicefarmer.minicap.SimpleServer.start(SimpleServer.kt:41)
at io.devicefarmer.minicap.Main$Companion.main(Main.kt:87)
at io.devicefarmer.minicap.Main.main(Unknown Source:2)
at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:369)
Killed

Is anybody else having such problems, or are you able to run it with the Binary + shared object Solution if there is any?

Sadly I also cannot find any references to the minicap.apk in any repositories here anymore is this solution decommissioned?

Thank you and Looking for your Answers.

@treibo
Copy link
Author

treibo commented Jan 24, 2025

I was able to help Myself, I had to rebuild the minicap apk. Now I am able to stream the display with the new apk, but during startup I am still getting the same Exception.

CHEETAH:/ $ CLASSPATH=/data/local/tmp/minicap-debug.apk app_process /system/bin io.devicefarmer.minicap.Main -P 1080x2436@540x1218/0
16:16:47.409 [main] INFO BaseProvider - framePeriodMs: 0
PID: 15207
INFO: 1080x2436@540x1218/0
16:16:47.419 [main] INFO Main - Listening on socket : minicap
Handle the exception gracefully
NoSuchMethodException Method not found: android.view.SurfaceControl.createDisplay [class java.lang.String, boolean]
Try Display: using DisplayManager API

But I am no longer blocked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant