rustdesk icon indicating copy to clipboard operation
rustdesk copied to clipboard

Android Screen Record Stops after hours (service killed by system)

Open vavolkova opened this issue 8 months ago • 26 comments

Hi guys,

Not sure if that has been discussed before, but I didn't find anything under this topic. I was looking to set unattended access on few Android devices (Android 11). I have set Pro account with Linux server and it all worked properly until I noticed that after 2-3 hours the service stops (Screen Record automatically turns off) and I need to manually turn it on and continue using it.

Is there a solution for that?

Upvote & Fund

  • We're using Polar.sh so you can upvote and help fund this issue.
  • We receive the funding once the issue is completed & confirmed by you.
  • Thank you in advance for helping prioritize & fund our backlog.
Fund with Polar

vavolkova avatar Oct 25 '23 09:10 vavolkova

During the 2-3 hours, was the Android screen on or off?

21pages avatar Oct 25 '23 09:10 21pages

Screen was off in 10-15 minutes, but it stopped working in 2-3 hours

vavolkova avatar Oct 25 '23 10:10 vavolkova

Thanks, I'll test with screen off.

21pages avatar Oct 25 '23 10:10 21pages

Thank you, appreciated

vavolkova avatar Oct 25 '23 10:10 vavolkova

I ran a test on my phone for about 3 hours. The connection was Remote desktop is offline, the service button still showed as on, probably because Android stopped it. We talked about it and would like to improve this, but need to find a good solution and it will take some time.

21pages avatar Oct 26 '23 00:10 21pages

Thanks, can you, please, keep me posted?

vavolkova avatar Oct 26 '23 12:10 vavolkova

Preferably close this and post a link on rustdesk repo.

21pages avatar Oct 26 '23 12:10 21pages

Frankly, we still have no good solution, also this is not our high priority. Not sure if awaking service via message notification is feasible.

rustdesk avatar Oct 27 '23 03:10 rustdesk

/bounty $100

rustdesk avatar Oct 27 '23 03:10 rustdesk

💎 $100 bounty • RustDesk

Steps to solve:

  1. Start working: Comment /attempt #6192 with your implementation plan
  2. Submit work: Create a pull request including /claim #6192 in the PR body to claim the bounty
  3. Receive payment: 100% of the bounty is received 2-5 days post-reward. Make sure you are eligible for payouts

Thank you for contributing to rustdesk/rustdesk!

Add a bountyShare on socials

Attempt Started (GMT+0) Solution
🟢 @scshiv29-dev Oct 27, 2023, 4:32:08 AM WIP
🟢 @nagasai-iitr Oct 27, 2023, 11:42:32 AM WIP

algora-pbc[bot] avatar Oct 27 '23 03:10 algora-pbc[bot]

May work, may not on some phone https://support.anydesk.com/knowledge/anydesk-for-android-chromeos

image

rustdesk avatar Oct 27 '23 04:10 rustdesk

image

rustdesk avatar Oct 27 '23 04:10 rustdesk

/attempt #6192

Options

scshiv29-dev avatar Oct 27 '23 04:10 scshiv29-dev

/attempt #6192

Options

nagasai-iitr avatar Oct 27 '23 11:10 nagasai-iitr

Note: The user @scshiv29-dev is already attempting to complete issue #6192 and claim the bounty. If you attempt to complete the same issue, there is a chance that @scshiv29-dev will complete the issue first, and be awarded the bounty. We recommend discussing with @scshiv29-dev and potentially collaborating on the same solution versus creating an alternate solution.

algora-pbc[bot] avatar Oct 27 '23 11:10 algora-pbc[bot]

I have the same issue on Xperia 5 and Xperia 1. It's utterly ridiculous - I need to keep TeamViewer Host installed so that I can re-enable the service. This also forces me to have no screen lock on these phones as TeamViewer Host cannot get to an unlock prompt with them.

TheGrave avatar Nov 10 '23 01:11 TheGrave

Hi @scshiv29-dev ,

I'm not sure how the bounty process works, but is there going to be a solution for this problem anytime soon?

Thanks!

vavolkova avatar Nov 23 '23 11:11 vavolkova

Hey @vavolkova the bounty process is designed to give incentives and get open source contributions to the project. The thing is I did the battery optimization setting on my phone and tried 2-3 other phones and rustdesk was working fine . I still think this is an android issue rather than the app code itself, like if the app is stopped from running in the background it will just terminate the session with the server and it would stop.

scshiv29-dev avatar Nov 23 '23 12:11 scshiv29-dev

@scshiv29-dev Thanks for your effort.

rustdesk avatar Nov 23 '23 14:11 rustdesk

@rustdesk Yea sure, I figured this was getting stopped by the android OS only. It would be better if we also ask users to add the app to ignore list of battery optimization.

scshiv29-dev avatar Nov 23 '23 14:11 scshiv29-dev

ignore list of battery optimization.

I have never seen any app does this. Need a good design for this.

rustdesk avatar Nov 23 '23 14:11 rustdesk

@rustdesk for me the 'allow background activity ' is the setting that basically made sure the app was working fine even for long hours but the battery consumption is obviously higher. I don't have rustdesk installed anymore so sending a generic screenshot.

Screenshot_2023-11-23-20-29-25-79_0ba066473b79d6e213a1f6f52505e2ee.jpg

scshiv29-dev avatar Nov 23 '23 15:11 scshiv29-dev

Stock android only has these options. They don't guarantee it won't get killed tho. Screenshot_20231123-161239_Settings.png

cikeZ00 avatar Nov 23 '23 15:11 cikeZ00

@rustdesk Yea sure, I figured this was getting stopped by the android OS only. It would be better if we also ask users to add the app to ignore list of battery optimization.

This won't be sufficient. I have battery optimization for the app turned off and it still dies. There are vendor-specific battery optimizations (usually called Adaptive Battery or something similar) which surely can contribute to the problem.

TheGrave avatar Nov 24 '23 03:11 TheGrave

@TheGrave okay , for the devices I tested it did not stopped for me so I thought this was android setting specific.

scshiv29-dev avatar Nov 24 '23 07:11 scshiv29-dev

Hi everyone,

I just wanted to drop a quick update to let you know that the issue I was facing with Rustdesk has been successfully resolved on my Samsung A10. Big thanks to all of you for the valuable advice and suggestions!

For those who might be experiencing a similar problem, here's what worked for me:

  1. Allow Background Activity: Make sure to allow Rustdesk to run in the background. Sometimes, restrictive background activity settings can interfere with the app's functionality.
  2. Remove Rustdesk from Battery Optimization: Go to your phone's settings and navigate to the list of apps with battery optimization. Remove Rustdesk from this list to ensure it can operate without any restrictions.

By following these steps, I was able to get Rustdesk up and running smoothly on my Samsung A10. I hope this solution proves helpful to others facing the same issue.

Once again, thank you all for your support and suggestions!

vavolkova avatar Dec 09 '23 10:12 vavolkova