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

Screen is not being fetched for Pixel Device after updating apk with Android Security Patch for March 2024 #143

Closed
KishanDasani opened this issue May 2, 2024 · 2 comments

Comments

@KishanDasani
Copy link

KishanDasani commented May 2, 2024

  • I recently came across the issue of pixel devices, running on Android 14 with Security patch of March '24, are getting stuck in "Preparing" state on stf.
  • I updated my apk file with fix provided in this commit and this helped to get my pixel devices enroll on stf.
  • now the new error I am facing is, when I try to use this device, it tries to fetch the screen and crashes, which causes the device to re-enroll.
  • Below is the logs I get once I take use the device.
 [<serial_number>] [19] Installed apps found.
 [<serial_number>] Device SDK : 34
 [<serial_number>] Setting frame producer projection to 767x1134
 [<serial_number>] Keeping 767x1134 as current frame producer projection
 [<serial_number>] Requesting frame producer to start
 [<serial_number>] Not changing quality settings as size is [6.396046316030102]
 [<serial_number>] Launching screen service minicap-bin
 [<serial_number>] Screen jpeg quality  60
 [<serial_number>] Screen fps  8
 [<serial_number>] Missing resources/unknown minicap grabber: minicap-bin
 [<serial_number>] undefined
 [<serial_number>] [10] Running Apps.
 [<serial_number>] minicap says: "/system/bin/sh: undefined: inaccessible or not found"
 [<serial_number>] entered end listener riskystream
 [<serial_number>] entered expected end false
 [<serial_number>] Shell keeping minicap running ended unexpectedly
 [<serial_number>] Capturing screenshot
 [<serial_number>] CLASSPATH=/data/local/tmp/minicap.apk app_process /system/bin io.devicefarmer.minicap.Main -P 1080x2400@1080x2400/0 -s >/data/local/tmp/minicap_1714645570976.jpg
 [<serial_number>] <serial_number> created sucessfully
 [<serial_number>] Disconnecting from minicap service
 [<serial_number>] Stopping minicap service
 [<serial_number>] Not changing quality settings as size is [6.396046316030102]
 [<serial_number>] Launching screen service minicap-apk
 [<serial_number>] Screen jpeg quality  60
 [<serial_number>] Screen fps  8
 [<serial_number>] CLASSPATH=/data/local/tmp/minicap.apk app_process /system/bin io.devicefarmer.minicap.Main -S -Q 60 -P 1080x2400@767x1134/0
 [<serial_number>] minicap says: "04:26:13.367 [main] INFO  BaseProvider - framePeriodMs: 0"
 [<serial_number>] minicap says: "PID: 13379"
 [<serial_number>] minicap says: "INFO: 1080x2400@510x1134/0"
 [<serial_number>] minicap says: "04:26:13.375 [main] INFO  Main - Listening on socket : minicap"
 [<serial_number>] Connecting to minicap service
 [<serial_number>] Reading minicap banner
 [<serial_number>] minicap error: "04:26:13.486 [main] ERROR SurfaceControl - SurfaceControl error"
 [<serial_number>] Shutting down due to fatal error gracefully```
 
SurfaceControl error on 2nd last log is the unique one. I never saw this error ever.

Is anyone facing similar issue or can help with this?
@KishanDasani
Copy link
Author

I suspect 2 things here.

  • SurfaceControl error. I can see below logs in adb logcat related to this.
'SurfaceControl error'
    'java.lang.NoSuchMethodException: android.view.SurfaceControl.createDisplay [class java.lang.String, boolean]'
    '\tat java.lang.Class.getMethod(Class.java:2950)'
    '\tat java.lang.Class.getMethod(Class.java:2450)'
    '\tat io.devicefarmer.minicap.utils.SurfaceControl.createDisplay(SurfaceControl.kt:93)'
    '\tat io.devicefarmer.minicap.provider.SurfaceProvider.initSurface(SurfaceProvider.kt:87)'
    '\tat io.devicefarmer.minicap.provider.SurfaceProvider.initSurface(SurfaceProvider.kt:106)'
    '\tat io.devicefarmer.minicap.provider.SurfaceProvider.onConnection(SurfaceProvider.kt:75)'
    '\tat io.devicefarmer.minicap.SimpleServer.start(SimpleServer.kt:41)'
    '\tat io.devicefarmer.minicap.Main$Companion.main(Main.kt:87)'
    '\tat io.devicefarmer.minicap.Main.main(Unknown Source:2)'
    '\tat com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)'
    '\tat com.android.internal.os.RuntimeInit.main(RuntimeInit.java:369)'
  • missing resources related to minicap-bin. Error related to that in stf is as below:
[<serial number>] Missing resources/unknown minicap grabber: minicap-bin
[<serial number>] undefined
[<serial number>] minicap says: "/system/bin/sh: undefined: inaccessible or not found"
[<serial number>] entered end listener riskystream

Can anyone see if anything helpful can be found with this?

@KishanDasani
Copy link
Author

closing as it is fixed with this

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