Unattended remote access and remote control - #45
Conversation
- Add foreground service, boot receiver, and accessibility remote control - Route agent lifecycle through shared runtime controller - Add unattended setup prompts and settings status entries - Improve remote desktop refresh and session notifications - Update Gradle and scanner dependency versions
…tter battery usage - Add retry backoff logic with delay for agent reconnection attempts - Introduce `shouldKeepForegroundServiceRunning` for better service control - Optimise frame encoding with idle frame delay adjustments - Enhance user disconnect handling via shared preferences - Adjust remote desktop frame capturing to dynamically handle delays
- MeshAgent: stop starting projection immediately after the agent control connection authenticates. - AgentRuntime: require an active desktop tunnel before starting screen projection.
|
Ive had this running on two devices without any issues for the past week or so. My initial commit introduce some battery issues but that was resolved and now its back to basically using nothing. |
…s disabled - Implement user consent prompt via dialogs and notifications for remote desktop access. - Add new notification channel for "Approve/Deny" screen sharing actions. - Ensure thread-safe handling and lifecycle management for capture processes. - Remove redundant battery optimization request logic. - Optimize screenshot capture flow with throttling and backoff mechanisms.
|
A few fixes to the unattended consent flow, with Play Store approval in mind.
To hopefully get this through review we need to do this in Play Console:
How to sideload this with the accessibility changes:Play Store > profile icon > Play Protect > gear/settings icon > toggle off "Scan apps with Play Protect" > install the APK > turn it back on after. Then it blocks the accessibility access until we do this: |
|
I hope that this get official one day, it's really a useful feature. The app itself without that is basically useless, it's not ok to ask a user how to go to the home menu, find all the apps, start the agent and then allow the screen sharing. Plus you can't see when a device is online on the MeshCentral dashboard since the app is not running in the background if it wasn't started at the launch of the device. It would also be cool to add the "device administrator" rights to the app so that it can be set as the device owner, disable FRP on the device and so that the user can't uninstall it unless the device is wiped. |
…gent into feature/unattended-remote-access
…ility handling - Add `.github/workflows/android-pr-build.yml` to automate pull request builds, including debug APK upload. - Refactor `MeshAccessibilityService` screenshot handling with callback extraction. - Prevent unintended `NullPointerException` by introducing safe access and cleanup methods. - Harden navigation logic in fragments with exception handling. - Improve encoded bitmap memory handling during desktop frame capture. - Update remote desktop input documentation to reflect accessibility feature improvements. - Enhance WebSocket handling with safe null checks and connection closures. - Add enhanced test coverage for edge cases and validation logic.
|
@GlitchedCod Yeah I hope this gets merged as well, I brought it up at the community meeting last night so hopefully it will get some traction. As for your request around device administrator functionality, that would be out of scope for this PR. One thing of note around that, I don't think that sort of functionality would ever make it to the play store build, so if it was to be development it would be something that needs to get manually deployed to each device you want to manage via ADB. |
|
I know @kambereBr is testing this PR. yay! I look forward to this as I have an Android device which I need to manage from time to time :-) |
…gent into feature/unattended-remote-access
- Add `android:fitsSystemWindows="true"` to adjust layout for system bars. - Set `app:statusBarForeground` in `AppBarLayout` for better visual consistency.
…le gesture execution - Add drag gesture support with motion path tracking and duration-based gestures. - Introduce gesture queueing mechanism to ensure sequential input handling. - Optimise screenshot capture timing with dynamic wake handling and backoff adjustments. - Enhance text input handling with precise cursor control and focused field management. - Refine global action handling and keyboard interaction for seamless remote desktop experience.
That is so cool ! This is definitely gonna be a game changer. Fun fact I actually read this merge request yesterday to see if they were any update onto it. |
|
I have created a MeshCentral PR which implements some UI changes to facilitate interactions with this agent, things like buttons to go home/back/recents menu/etc. |
Turns the Android agent into a full unattended remote-control agent: background screen sharing and remote input, running as a persistent foreground service.
Unattended operation
Remote control (previously view-only)
Platform & tooling
Known limitations
adb installor enterprise deployment. On Android 13+ the accessibility toggle is a Restricted Setting unless installed via ADB/EMM.Disclaimer: developed with an AI coding assistant.