ws-scrcpy icon indicating copy to clipboard operation
ws-scrcpy copied to clipboard

Android 15 support

Open Okra0o0 opened this issue 1 year ago • 8 comments

Currently Android 15 devices have no screen, but it can be control, whether it's scrcpy-server.jar problem, can you fix it? Thanks~

Okra0o0 avatar Jul 18 '24 02:07 Okra0o0

Currently Android 15 devices have no screen, but it can be control, whether it's scrcpy-server.jar problem, can you fix it? Thanks~

Yeah, been trying to create scrcpy-server.jar from the latest version of scrcpy, but to no avail

ituberus avatar Jul 18 '24 06:07 ituberus

Currently Android 15 devices have no screen, but it can be control, whether it's scrcpy-server.jar problem, can you fix it? Thanks~

Yeah, been trying to create scrcpy-server.jar from the latest version of scrcpy, but to no avail

I also trid the Genymobile/scrcpy v2.5, but it didn't work, after all, Genymobile/scrcpy has committed many versions

Okra0o0 avatar Jul 18 '24 07:07 Okra0o0

Currently Android 15 devices have no screen, but it can be control, whether it's scrcpy-server.jar problem, can you fix it? Thanks~

Yeah, been trying to create scrcpy-server.jar from the latest version of scrcpy, but to no avail

With this Issue 4657, I modified the source code based on NetrisTV/scrcpy version 1.19 and compiled a new version of the scrcpy-server.jar. It can work in Android 15 beta.

Okra0o0 avatar Jul 31 '24 07:07 Okra0o0

Currently Android 15 devices have no screen, but it can be control, whether it's scrcpy-server.jar problem, can you fix it? Thanks~

Yeah, been trying to create scrcpy-server.jar from the latest version of scrcpy, but to no avail

With this Issue 4657, I modified the source code based on NetrisTV/scrcpy version 1.19 and compiled a new version of the scrcpy-server.jar. It can work in Android 15 beta.

HI, i would appreciate if you could share your scrcpy-server.jar with me, been trying to do it myself but no success, thanks

ituberus avatar Jul 31 '24 07:07 ituberus

Currently Android 15 devices have no screen, but it can be control, whether it's scrcpy-server.jar problem, can you fix it? Thanks~

Yeah, been trying to create scrcpy-server.jar from the latest version of scrcpy, but to no avail

With this Issue 4657, I modified the source code based on NetrisTV/scrcpy version 1.19 and compiled a new version of the scrcpy-server.jar. It can work in Android 15 beta.

HI, i would appreciate if you could share your scrcpy-server.jar with me, been trying to do it myself but no success, thanks

You can give it a try, although it needs to be optimized. scrcpy-server15.zip

Okra0o0 avatar Jul 31 '24 07:07 Okra0o0

Currently Android 15 devices have no screen, but it can be control, whether it's scrcpy-server.jar problem, can you fix it? Thanks~

Yeah, been trying to create scrcpy-server.jar from the latest version of scrcpy, but to no avail

With this Issue 4657, I modified the source code based on NetrisTV/scrcpy version 1.19 and compiled a new version of the scrcpy-server.jar. It can work in Android 15 beta.

HI, i would appreciate if you could share your scrcpy-server.jar with me, been trying to do it myself but no success, thanks

You can give it a try, although it needs to be optimized. scrcpy-server15.zip

It worked, thanks man

ituberus avatar Jul 31 '24 08:07 ituberus

@Okra0o0 I've tried it with your updated scrcpy server and it didnt worked with android 14 pixel. Which scrcpy version did you use for it?

or may i see your codebase to debug?

Check out this issue: https://github.com/NetrisTV/ws-scrcpy/issues/306

denizkoele avatar Aug 09 '24 21:08 denizkoele

@Okra0o0 I've tried it with your updated scrcpy server and it didnt worked with android 14 pixel. Which scrcpy version did you use for it?

or may i see your codebase to debug?

Check out this issue: #306

Caused by: java.lang.NoSuchMethodException: android.view.SurfaceControl.createDisplay [class java.lang.String, boolean] ---> SurfaceControl will be deprecated in new version, so change to VirtualDisplay. Associated files such as attachments. And these changes based on NetrisTV/scrcpy version 1.19 branch. By the way, it worked in my android 14 (AP1A.240405.019.A1) pixel 6 pro. java.zip

Okra0o0 avatar Aug 12 '24 02:08 Okra0o0

@Okra0o0 can you give some instruction what to do with the attached files? I'm assuming by the heart reactions it fixes the issue...

eschoenawa avatar Sep 10 '24 10:09 eschoenawa

@Okra0o0 can you give some instruction what to do with the attached files? I'm assuming by the heart reactions it fixes the issue...

You just need to replace the scrcpy .jar file in the project

It's somewhere in the vendors / Genymobile folder

denizkoele avatar Sep 10 '24 11:09 denizkoele

I tried, but the screen of my Pixel remained blank :eyes: . It works fine with a xiaomi device... I'm just running npm start after replacing the jar, is that enough or even more required?

eschoenawa avatar Sep 10 '24 11:09 eschoenawa

Yes it haven't worked with my pixel at first time too. After clearing caches, few pc restarts and phone restarts it suddenly started to work. Idk what of them exactly fixed the problem

denizkoele avatar Sep 10 '24 11:09 denizkoele

Awesome, a reboot did indeed fix the issue.

@Okra0o0 could you still share your changes somewhere? I'd like to be able to further customize the server jar.

eschoenawa avatar Sep 10 '24 16:09 eschoenawa

Awesome, a reboot did indeed fix the issue.

@Okra0o0 could you still share your changes somewhere? I'd like to be able to further customize the server jar.

Here you go java.zip

Credits to @Okra0o0

denizkoele avatar Sep 11 '24 04:09 denizkoele

So those four files are the only changes in the scrcpy fork we have to make to build that jar?

I saw them earlier, but thought that can't be it 😅 .

eschoenawa avatar Sep 11 '24 07:09 eschoenawa

awesome! thanks @Okra0o0 and thanks everyone! for this support.

SPrasadT avatar Oct 08 '24 18:10 SPrasadT

Hi everyone. Please check #344

drauggres avatar Jan 05 '25 18:01 drauggres

Hi everyone. Please check #344

I tested phones with both 14 and 15 system on the feature/android_14_15 branch. It encountered the following errors.

  java.lang.NoSuchMethodException: android.content.IClipboard$Stub$Proxy.addPrimaryClipChangedListener [interface android.content.IOnPrimaryClipChangedListener, class java.lang.String, int]
  at java.lang.Class.getMethod(Class.java:2950)
  at java.lang.Class.getMethod(Class.java:2450)
  at com.genymobile.scrcpy.wrappers.ClipboardManager.getAddPrimaryClipChangedListener(ClipboardManager.java:104)
  at com.genymobile.scrcpy.wrappers.ClipboardManager.addPrimaryClipChangedListener(ClipboardManager.java:112)
  at com.genymobile.scrcpy.Device.(Device.java:110)
  at com.genymobile.scrcpy.Connection.(Connection.java:37)
  at com.genymobile.scrcpy.WebSocketConnection.(WebSocketConnection.java:23)
  at com.genymobile.scrcpy.WSServer.joinStreamForDisplayId(WSServer.java:163)
  at com.genymobile.scrcpy.WSServer.onMessage(WSServer.java:126)
  at org.java_websocket.server.WebSocketServer.onWebsocketMessage(WebSocketServer.java:648)
  at org.java_websocket.drafts.Draft_6455.processFrameBinary(Draft_6455.java:835)
  at org.java_websocket.drafts.Draft_6455.processFrame(Draft_6455.java:794)
  at org.java_websocket.WebSocketImpl.decodeFrames(WebSocketImpl.java:381)
  at org.java_websocket.WebSocketImpl.decode(WebSocketImpl.java:218)
  at org.java_websocket.server.WebSocketServer$WebSocketWorker.doDecode(WebSocketServer.java:1011)
  at org.java_websocket.server.WebSocketServer$WebSocketWorker.run(WebSocketServer.java:993)

I have experienced this before and then made a another version of the scrcpy-server. scrcpy.zip scrcpy-server(1.19-ws6).jar.zip

Okra0o0 avatar Jan 06 '25 10:01 Okra0o0

Hi, @Okra0o0. Could you open PR in https://github.com/NetrisTV/scrcpy?

drauggres avatar Jan 06 '25 10:01 drauggres

Hi, @Okra0o0. Could you open PR in https://github.com/NetrisTV/scrcpy?

Looks likeI can't. remote: Permission to NetrisTV/scrcpy.git denied to Okra0o0. fatal: unable to access 'https://github.com/NetrisTV/scrcpy.git/': The requested URL returned error: 403

Okra0o0 avatar Jan 06 '25 10:01 Okra0o0

You need to create a fork. Then create a new branch in you fork from feature/websocket-v1.19.x and add commits to it. After that open new PR to NetrisTV/scrcpy. image

drauggres avatar Jan 06 '25 10:01 drauggres

You need to create a fork. Then create a new branch in you fork from feature/websocket-v1.19.x and add commits to it. After that open new PR to NetrisTV/scrcpy. image

Oh, I see, thank you. Excuse me, I made a mistake, this feature/android_14_15 branch has already fixed the screen problem. Just need to choose [H264 Converter].

Okra0o0 avatar Jan 06 '25 10:01 Okra0o0