-
Notifications
You must be signed in to change notification settings - Fork 76
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
update to scrcpy v2.4 (debugging) #57
Conversation
@aentwist Do you have any chance to test this PR? I don't have any android device currently. |
I don't know if it is normal but Im actually using an Android emulator on my PC, ldplayer in my case 😅 That is how my project is. Although I do have an android I am not up to speed on using it. Anyways testing using an emulator is probably fine, |
Hey, Im open up for testing only problem is I cant build the av version of your repo. Could u sync your fork for it to work? |
Seems to work smoothly, thanks! |
Cool |
This commit has the test suite failing, looks like only one test. The test probably just needs updated for the new version of scrcpy, but I don't know whether anyone is up to speed enough at the moment to fix it. Any ideas? def test_control_touch():
> assert control.touch(100, 200, scrcpy.ACTION_DOWN) == (
b"\x02" # TYPE_INJECT_TOUCH_EVENT
+ b"\x00" # ACTION_DOWN
+ b"\xff\xff\xff\xff\xff\xff\xff\xff" # Virtual touch id
+ b"\x00\x00\x00\x64" # X: 100
+ b"\x00\x00\x00\xc8" # Y: 200
+ b"\x07\x80\x04\x38" # Resolution: (1920, 1080)
+ b"\xff\xff" # Pressure: 100%
+ b"\x00\x00\x00\x01" # Primary button
)
E AssertionError: assert b'\x02\x00\x124Vx\x87eC!\x00\x00\x00d\x00\x00\x00\xc8\x07\x80\x048\xff\xff\x00\x00\x00\x01\x00\x00\x00\x01' == b'\x02\x00\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00d\x00\x00\x00\xc8\x07\x80\x048\xff\xff\x00\x00\x00\x01'
E At index 2 diff: b'\x12' != b'\xff'
E Full diff:
E (
E - b'\x02\x00\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00d\x00\x00'
E + b'\x02\x00\x124Vx\x87eC!\x00\x00\x00d\x00\x00\x00\xc8\x07\x80\x048\xff\xff'
E - b'\x00\xc8\x07\x80\x048\xff\xff\x00\x00\x00\x01',
E ? ---- ---- ^^ ^^^^^^
E + b'\x00\x00\x00\x01\x00\x00\x00\x01',
E ? ^ ^^
E )
tests/test_control.py:34: AssertionError |
Ok got it, the test did just need updated. Next time maybe try using it... spooky otherwise :) |
1、更新到scrcpy v2.4 目前最新版(2024-03-03发布)
2、home back click 已测试