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

Chrome OS support #2156

Open
RevGemmy opened this issue Mar 1, 2021 · 4 comments
Open

Chrome OS support #2156

RevGemmy opened this issue Mar 1, 2021 · 4 comments

Comments

@RevGemmy
Copy link

RevGemmy commented Mar 1, 2021

it would be nice if there was a port to Chrome OS, yes i know linux exists on chromebooks, but it would be nice to have it on the chrome webstore to download since some chromebooks cant run linux

@Lucaacer
Copy link

Lucaacer commented Mar 14, 2021

I don't think scrcpy, in its current iteration, might work without a "real" linux OS, i.e. without crostini or crouton and the latter is the way to go if your device does not support crostini.

Chome OS, without crostini, supports web apps only, but the main requisite for scrcpy is adb which cannot run in a web app.

Maybe, in the future, someone will make a wasm (webassembly) port of adb... But so far a "real" linux is required to rub adb.

I must stand corrected, please have a look here https://www.xda-developers.com/webadb-run-adb-from-web-browser/

It works well in landscape mode only, btw.

@smithj76
Copy link

scrcpy works but you have to update the Linux distribution to bullseye. Add deb http://deb.debian.org/debian bullseye main to /etc/apt/source.list . sudo apt update and scrcpy should be there. And I believe unless you enable development Android apps you can only connect to it via ADB connect local IP address. This program works better than of even Samsung flow on Windows.

@Inderix
Copy link

Inderix commented Nov 17, 2022

This appears to have worked at one point but as of now on Crostini running Debian Bullseye, scrcpy fails to create the window it seems.

This is what I get attempting to connect to a Samsung Galaxy A12, connected via wireless debugging. ChromeOS version 110.0.5421.0, Canary channel.

INFO: scrcpy 1.17 <https://github.com/Genymobile/scrcpy>
/usr/share/scrcpy/scrcpy-server: 1 file push...0 skipped. 73.2 MB/s (34015 bytes in 0.000s)
No protocol specified
error: XDG_RUNTIME_DIR not set in the environment.
[server] INFO: Device: samsung SM-A125U (Android 12)ERROR: Could not retrieve device information

[server] ERROR: Exception on thread Thread[main,5,main]
java.lang.AssertionError: java.lang.reflect.InvocationTargetException
        at com.genymobile.scrcpy.wrappers.SurfaceControl.setDisplaySurface(SurfaceControl.java:75)
        at com.genymobile.scrcpy.ScreenEncoder.setDisplaySurface(ScreenEncoder.java:243)
        at com.genymobile.scrcpy.ScreenEncoder.internalStreamScreen(ScreenEncoder.java:91)
        at com.genymobile.scrcpy.ScreenEncoder.streamScreen(ScreenEncoder.java:60)
        at com.genymobile.scrcpy.Server.scrcpy(Server.java:80)
        at com.genymobile.scrcpy.Server.main(Server.java:252)
        at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
        at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:378)
Caused by: java.lang.reflect.InvocationTargetException
        at java.lang.reflect.Method.invoke(Native Method)
        at com.genymobile.scrcpy.wrappers.SurfaceControl.setDisplaySurface(SurfaceControl.java:73)
        ... 7 more
Caused by: java.lang.IllegalArgumentException: displayToken must not be null
        at android.view.SurfaceControl$Transaction.setDisplaySurface(SurfaceControl.java:3371)
        at android.view.SurfaceControl.setDisplaySurface(SurfaceControl.java:2345)
        ... 9 more
WARN: Killing the server...

@rom1v
Copy link
Collaborator

rom1v commented Nov 17, 2022

Android 12 requires scrcpy >= 1.18. #2129

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

5 participants