Repository navigation
Conversation
Modify the return logic such that exit code 1 is used when the initial connection fails, but if a session is established, and then the device disconnects, exit code 2 is emitted. Closes: Github:Genymobile#3083 Signed-off-by: martin f. krafft <madduck@madduck.net>
rom1v
added a commit
that referenced
this pull request
Mar 6, 2022
We must distinguish 3 cases for await_for_server(): - an error occurred - no error occurred, the device is connected - no error occurred, the device is not connected (user requested to quit) For this purpose, use an additional output parameter to indicate if the device is connected (only set when no error occurs). Refs #3085 <#3085>
rom1v
pushed a commit
that referenced
this pull request
Mar 6, 2022
Modify the return logic such that exit code 1 is used when the initial connection fails, but if a session is established, and then the device disconnects, exit code 2 is emitted. Fixes #3083 <#3083> PR #3085 <#3085> Signed-off-by: martin f. krafft <madduck@madduck.net> Signed-off-by: Romain Vimont <rom@rom1v.com>
Collaborator
|
Hi, Thank you for your PR. I added a preliminary commit to report the 3 possible states in Then I made minor changes to your commit:
The resulting branch is here: Please review/test :) |
Contributor
Author
|
@rom1v I've been running |
Contributor
Author
|
Do you need me to migrate your branch over to this PR or should we just close this and make a new one on the basis of your branch? |
rom1v
added a commit
that referenced
this pull request
Mar 10, 2022
Collaborator
|
Merged into I also added a commit to document the exit statis in |
rom1v
added a commit
that referenced
this pull request
Jun 18, 2023
Audio did not work on Honor devices. Two workarounds are necessary: - a system context must be set as a base context of FakeContext (so that a PackageManager is available), - the same workaround as for Meizu phones must also be applied (so that ActivityThread.currentApplication() return a valid instance). These workarounds must not be applied for all devices, they cause other issues. Fixes #4015 <#4015> Refs #3085 <#3805> Co-authored-by: Simon Chan <1330321+yume-chan@users.noreply.github.com>
rom1v
added a commit
that referenced
this pull request
Jun 19, 2023
Audio did not work on Honor devices. To make it work, a system context must be set as a base context of FakeContext (so that a PackageManager is available), and a current ActivityThread must be initialized. These workarounds must not be applied for all devices, because they might cause other issues. Fixes #4015 <#4015> Refs #3085 <#3805> Co-authored-by: Simon Chan <1330321+yume-chan@users.noreply.github.com>
rom1v
added a commit
that referenced
this pull request
Jun 19, 2023
Audio did not work on Honor devices. To make it work, a system context must be set as a base context of FakeContext (so that a PackageManager is available), and a current ActivityThread must be initialized. These workarounds must not be applied for all devices, because they might cause other issues. Fixes #4015 <#4015> Refs #3085 <#3805> Co-authored-by: Simon Chan <1330321+yume-chan@users.noreply.github.com>
rom1v
added a commit
that referenced
this pull request
Jun 19, 2023
Audio did not work on Honor devices. To make it work, a system context must be set as a base context of FakeContext (so that a PackageManager is available), and a current Application must be initialized. These workarounds must not be applied for all devices, because they might cause other issues. Fixes #4015 <#4015> Refs #3085 <#3805> Co-authored-by: Simon Chan <1330321+yume-chan@users.noreply.github.com>
rom1v
added a commit
that referenced
this pull request
Jun 19, 2023
Audio did not work on Honor devices. To make it work, a system context must be set as a base context of FakeContext (so that a PackageManager is available), and a current Application must be initialized. These workarounds must not be applied for all devices, because they might cause other issues. Fixes #4015 <#4015> Refs #3085 <#3805> Co-authored-by: Simon Chan <1330321+yume-chan@users.noreply.github.com>
rom1v
added a commit
that referenced
this pull request
Jun 19, 2023
Audio did not work on Honor devices. To make it work, a system context must be set as a base context of FakeContext (so that a PackageManager is available), and a current Application and ActivityThread must be set. These workarounds must not be applied for all devices, because they might cause other issues. Fixes #4015 <#4015> Refs #3085 <#3805> Co-authored-by: Simon Chan <1330321+yume-chan@users.noreply.github.com>
Linux4
pushed a commit
to Linux4/scrcpy
that referenced
this pull request
Sep 5, 2025
scrcpy v1.24 Changes since v1.23: - Adapt input injection for Android 13 (Genymobile#3186, Genymobile#3190) - Add --no-power-on (Genymobile#3148, Genymobile#3210) - Read $ANDROID_SERIAL if no selector is specified (Genymobile#3111, Genymobile#3113) - Consider emulators as TCP/IP devices (-e) (Genymobile#3137) - Apply requested window size in OTG mode (Genymobile#3099, Genymobile#3219) - Add specific exit code for device disconnection (Genymobile#3083, Genymobile#3085) - Enable libusb support for Windows 32-bit releases (Genymobile#3204, Genymobile#3206) - Upgrade libusb to 1.0.26 in Windows releases (Genymobile#3206) - Upgrade platform-tools to 33.0.1 (adb) in Windows releases (Genymobile#3206) - Upgrade SDL to 2.0.22 in Windows releases - Upgrade FFmpeg to 5.0.1 in Windows 64-bit releases - Improve some error messages - Various technical fixes
lingyicute
pushed a commit
to lingyicute/scrcpy
that referenced
this pull request
Nov 19, 2026
Audio did not work on Honor devices. To make it work, a system context must be set as a base context of FakeContext (so that a PackageManager is available), and a current ActivityThread must be initialized. These workarounds must not be applied for all devices, because they might cause other issues. Fixes Genymobile#4015 <Genymobile#4015> Refs Genymobile#3085 <Genymobile#3805> Co-authored-by: Simon Chan <1330321+yume-chan@users.noreply.github.com>
lingyicute
pushed a commit
to lingyicute/scrcpy
that referenced
this pull request
Nov 19, 2026
Audio did not work on Honor devices. To make it work, a system context must be set as a base context of FakeContext (so that a PackageManager is available), and a current Application must be initialized. These workarounds must not be applied for all devices, because they might cause other issues. Fixes Genymobile#4015 <Genymobile#4015> Refs Genymobile#3085 <Genymobile#3805> Co-authored-by: Simon Chan <1330321+yume-chan@users.noreply.github.com>
lingyicute
pushed a commit
to lingyicute/scrcpy
that referenced
this pull request
Nov 19, 2026
Audio did not work on Honor devices. To make it work, a system context must be set as a base context of FakeContext (so that a PackageManager is available), and a current ActivityThread must be initialized. These workarounds must not be applied for all devices, because they might cause other issues. Fixes Genymobile#4015 <Genymobile#4015> Refs Genymobile#3085 <Genymobile#3805> Co-authored-by: Simon Chan <1330321+yume-chan@users.noreply.github.com>
lingyicute
pushed a commit
to lingyicute/scrcpy
that referenced
this pull request
Nov 19, 2026
Audio did not work on Honor devices. To make it work, a system context must be set as a base context of FakeContext (so that a PackageManager is available), and a current Application must be initialized. These workarounds must not be applied for all devices, because they might cause other issues. Fixes Genymobile#4015 <Genymobile#4015> Refs Genymobile#3085 <Genymobile#3805> Co-authored-by: Simon Chan <1330321+yume-chan@users.noreply.github.com>
lingyicute
pushed a commit
to lingyicute/scrcpy
that referenced
this pull request
Nov 19, 2026
Audio did not work on Honor devices. Two workarounds are necessary: - a system context must be set as a base context of FakeContext (so that a PackageManager is available), - the same workaround as for Meizu phones must also be applied (so that ActivityThread.currentApplication() return a valid instance). These workarounds must not be applied for all devices, they cause other issues. Fixes Genymobile#4015 <Genymobile#4015> Refs Genymobile#3085 <Genymobile#3805> Co-authored-by: Simon Chan <1330321+yume-chan@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Modify the return logic such that exit code 1 is used when the initial
connection fails, but if a session is established, and then the device
disconnects, exit code 2 is emitted.
Closes: Github:#3083
Signed-off-by: martin f. krafft madduck@madduck.net