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

Black screen for android 12 beta in pixel device #107

Closed
krishtoautomate opened this issue Jun 15, 2021 · 5 comments
Closed

Black screen for android 12 beta in pixel device #107

krishtoautomate opened this issue Jun 15, 2021 · 5 comments

Comments

@krishtoautomate
Copy link

krishtoautomate commented Jun 15, 2021

Android 12 beta is showing black screen in pixel device.

Please refer to bug, it might help to add a patch here. thanks

Genymobile/scrcpy#2129

@drauggres
Copy link
Collaborator

@drauggres
Copy link
Collaborator

I tried scrcpy v1.18 and was not able to stream screen from android emulator with Android 12 beta.

@krishtoautomate
Copy link
Author

i tired this repo and it is working: https://github.com/me-abhishekpal/scrcpy-quickfix-secure-flag-MacOS.git

@krishtoautomate
Copy link
Author

scrcpy 1.19 got the fix for this issue

@krishtoautomate
Copy link
Author

./server/src/main/java/com/genymobile/scrcpy/ScreenEncoder.java

 private static IBinder createDisplay() {
        // Since Android 12 (preview), secure displays could not be created with shell permissions anymore.
        // On Android 12 preview, SDK_INT is still R (not S), but CODENAME is "S".
        boolean secure = Build.VERSION.SDK_INT < Build.VERSION_CODES.R || (Build.VERSION.SDK_INT == Build.VERSION_CODES.R && !"S"
                .equals(Build.VERSION.CODENAME));
        return SurfaceControl.createDisplay("scrcpy", secure);
    }

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

2 participants