Skip to content

Android settings not restored after scrcpy is normally closed. #6540

Closed

Description

@js4jiang5

Environment

  • OS: macOS
  • Scrcpy version: 3.3.3
  • Installation method: brew
  • Device model: Galaxy S25
  • Android version: 16

Describe the bug

Scrcpy crashed and closed unexpectedly on 2025/12/14.
Since then the android settings cannot be restored anymore even if scrcpy is closed normally.
ADB is connected wirelessly with Wi-Fi ADB. (No USB cable is used)
Let me show the problem using show_touches as an example.

bash-3.2$ adb shell settings get system show_touches
0
bash-3.2$ scrcpy --show-touches
scrcpy 3.3.3 <https://github.com/Genymobile/scrcpy>
INFO: ADB device found:
INFO:     --> (tcpip)  192.168.3.253:5555              device  SM_S9310
/opt/homebrew/Cellar/scrcpy/3.3.3/share/scrcpy/scrcpy-server: 1 file pushed, 0 skipped. 319.2 MB/s (90164 bytes in 0.000s)
[server] INFO: Device: [samsung] samsung SM-S9310 (Android 16)
INFO: Renderer: metal
INFO: Texture: 1080x2336
^CWARN: Device disconnected
bash-3.2$ adb shell settings get system show_touches
1

I've tried below and nothing works.

  1. reboot phone
  2. adb kill-server, then adb start-server
  3. turn off "wireless debugging" and turn back on
  4. turn off Developer options, and turn back on

I recorded scrcpy logcat below. Hope someone can help me restore the original settings after scrcpy is normally closed.
scrcpy_logcat.txt

Activity

  1. changed the title [-]Android settings not restored after scrcpy closed.[/-] [+]Android settings not restored after scrcpy is normally closed.[/+] on Dec 17, 2025
  2. rom1v commented on Dec 17, 2025

    @rom1v
    Collaborator

    Scrcpy crashed and closed unexpectedly on 2025/12/14.

    What was the crash? Do you have some error message?

    https://github.com/Genymobile/scrcpy/blob/master/doc/device.md#show-touches

    # disable show_touches
    adb shell settings put system show_touches 0
  3. js4jiang5 commented on Dec 17, 2025

    @js4jiang5
    Author

    Scrcpy crashed and closed unexpectedly on 2025/12/14.

    What was the crash? Do you have some error message?

    I used scrcpy to remotely click and switch off "USB debugging" in Developer option, then scrcpy was closed unexpectedly. I checked my phone and found that it's turned off. Then I long pressed the power button to boot the phone. After that, the issue ocurred. Any settings changed by scrcpy (stay-awake, screen-off-timeout 99999, show-touches, etc) never reverted as I showed in the example.

    Do you know how to fix it?

  4. js4jiang5 commented on Dec 17, 2025

    @js4jiang5
    Author

    I found my issue to be the same with #6405. Problem solved after using that scrcpy-server. This issue can be closed.
    Thank @rom1v for reaching out and help.

  5. rom1v commented on Dec 17, 2025

    @rom1v
    Collaborator

    Oh, maybe I should release a 3.3.4 soon.

  6. rom1v commented on Dec 17, 2025

    @rom1v
    Collaborator

    Fixed in scrcpy 3.3.4.

  7. js4jiang5 commented on Dec 18, 2025

    @js4jiang5
    Author

    Fixed in scrcpy 3.3.4.

    I've tested and confirm that scrcpy 3.3.4 has solved the issue.

  8. js4jiang5 commented on Dec 18, 2025

    @js4jiang5
    Author

    Hi, @rom1v
    Sorry I reopen the issue. Although 3.3.4 works, its CPU usage is significantly increased. For 3.3.3, the CPU usage is less than 10% CPU, but for 3.3.4, the CPU is 50%. Is that normal?

  9. rom1v commented on Dec 18, 2025

    @rom1v
    Collaborator

    Sorry I reopen the issue. Although 3.3.4 works, its CPU usage is significantly increased. For 3.3.3, the CPU usage is less than 10% CPU, but for 3.3.4, the CPU is 50%. Is that normal?

    Probably not related to 3.3.3 vs 3.3.4.

    If you alternate between 3.3.3 and 3.3.4 with the same use case with the same parameters, can you reproduce consistenly that 3.3.4 has a higher CPU usage?

  10. js4jiang5 commented on Dec 18, 2025

    @js4jiang5
    Author

    Sorry I reopen the issue. Although 3.3.4 works, its CPU usage is significantly increased. For 3.3.3, the CPU usage is less than 10% CPU, but for 3.3.4, the CPU is 50%. Is that normal?

    Probably not related to 3.3.3 vs 3.3.4.

    If you alternate between 3.3.3 and 3.3.4 with the same use case with the same parameters, can you reproduce consistenly that 3.3.4 has a higher CPU usage?

    You're right.
    After finding the high CPU of 50% in 3.3.4, I didn't know how to roll back to 3.3.3, so I run with 3.3.3 with static build. Therefore the comparison was not fair.
    One thing is for sure. When I run with the "brew" version, the CPU is as high as 50%, but when I run with static build, the CPU is as low as 4.6%. Same parameters and same phone. Is that what you expected? In that case I'll use the static build version in the future.

  11. js4jiang5 commented on Dec 18, 2025

    @js4jiang5
    Author

    Since the new issue (significant CPU usage gap between "brew install" and "static build" versions) is a totally different one, I'll close this issue again.
    Right now I'm satisifed with low CPU usage of "static build" version. If you want me to open another issue to dig into the cause of high CPU of "brew install", I'll do it and provide more input.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions