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

Rename the new uid option #3729

Closed
1 task done
yume-chan opened this issue Feb 11, 2023 · 3 comments
Closed
1 task done

Rename the new uid option #3729

yume-chan opened this issue Feb 11, 2023 · 3 comments

Comments

@yume-chan
Copy link
Contributor

dev branch has a new option called uid, for differentiating multiple running Scrcpy instances. IMO it should not be called uid, because uid is a common Linux concept, which might be useful in other cases.

For example, with this little change, I can create a secure display on rooted Android 12+ devices (tested in an emulator):

https://github.com/Genymobile/scrcpy/compare/dev...yume-chan:scrcpy:feat/secure-display?expand=1

Unrooted:

image

Rooted:

image

Use setUid(2000) instead of 1000 can fix issues like #1606

So, the new option should be renamed, the new name can be instance_id or other more descriptive names.

rom1v added a commit that referenced this issue Feb 11, 2023
A random identifier is generated to differentiate multiple running
scrcpy instances. Rename it from 'uid' to 'scid' (scrcpy id) not to
confuse it with Linux UID.

Fixes #3729 <#3729>
Refs 4315be1
@rom1v
Copy link
Collaborator

rom1v commented Feb 11, 2023

I renamed from uid to scid: 439a1fd 👍

(I want to keep the name short, because on some devices app_process segfaults when the total command length exceeds 256)

For example, with this little change, I can create a secure display on rooted Android 12+ devices

Oh, great 👍


I see that you are doing a lot of R&D work, that's awesome 👍 (I'm still working on audio integration, I'm refactoring a lot of things in scrcpy to handle it properly.)

Do you work on it in the context of ya-webadb?

@rom1v rom1v closed this as completed Feb 11, 2023
@yume-chan
Copy link
Contributor Author

ya-webadb is my personal open-source side project, which starts at an experiment of WebUSB API. Before that, I had very little experience on C, Java and Android.

I wouldn't say my works on Scrcpy is "for" or "in the context of" that project. I knew and used Scrcpy way before starting ya-webadb. Integration of Scrcpy in ya-webadb is simply because Scrcpy is the best application I know that uses ADB and Android Shell permission.

@rom1v
Copy link
Collaborator

rom1v commented Feb 11, 2023

Thank you for your work anyway, very useful! 👍

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