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

Secure display doesn't work on the latest Android build #1935

Closed
wjf3121 opened this issue Nov 26, 2020 · 8 comments
Closed

Secure display doesn't work on the latest Android build #1935

wjf3121 opened this issue Nov 26, 2020 · 8 comments

Comments

@wjf3121
Copy link

wjf3121 commented Nov 26, 2020

In the latest Android code, secure display can only be created by UID AID_GRAPHICS or AID_SYSTEM:
https://android.googlesource.com/platform/frameworks/native/+/refs/heads/master/services/surfaceflinger/SurfaceFlinger.cpp#5661

While scrcpy will try to create one by shell user, which will no longer work:
https://github.com/Genymobile/scrcpy/blob/master/server/src/main/java/com/genymobile/scrcpy/ScreenEncoder.java#L201

I'm not sure if there's any fix other than creating a non-secure display when the OS version is after Q, any thoughts?

@wjf3121
Copy link
Author

wjf3121 commented Nov 26, 2020

Sorry, the Andoird OS Code I pointed is not corrected. Looks like the code I was looking at is still not merged to the public repo. Closing it.

@wjf3121 wjf3121 closed this as completed Nov 26, 2020
@rom1v
Copy link
Collaborator

rom1v commented Nov 26, 2020

Oh, that's a bad news 😞

I'm not sure if there's any fix other than creating a non-secure display when the OS version is after Q?

I think that we won't have the choice, indeed.

@rom1v
Copy link
Collaborator

rom1v commented Feb 19, 2021

I'm not sure if there's any fix other than creating a non-secure display when the OS version is after Q, any thoughts?

After R? (Android 12 is S)

Refs #2129

@wjf3121
Copy link
Author

wjf3121 commented Mar 30, 2021

Yep, should be "after R". Sorry for the confusion.

@VishalKumarX100
Copy link

How to create a non secure display

@rom1v
Copy link
Collaborator

rom1v commented Jan 10, 2023

Use scrcpy >= 1.18.

@VishalKumarX100
Copy link

I meant the complete set of steps

@RiggiG
Copy link

RiggiG commented Jun 23, 2023

Root users may use this fork which simply runs the scrcpy-server as the system user: #3049 (comment)

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

No branches or pull requests

4 participants