Skip to content

AppCleaner: Launch accessibility service on demand if WRITE_SECURE_SETTINGS is available - #466

Merged
d4rken merged 1 commit into
mainfrom
acs_ondemand
Jul 2, 2023
Merged

d4rken merged 1 commit into
mainfrom
acs_ondemand

Conversation

@d4rken

@d4rken d4rken commented Jul 2, 2023

Copy link
Copy Markdown
Member

If SD Maid has access to Shizuku, or has been manually granted the WRITE_SECURE_SETTINGS permission, then SD Maid is able to self launch the accessibility service.

SD Maid will now detect this, and only launch the accessibility service for the duration of task. This is good for resource use, and also prevents the system from annoying the user with notifications about "SD Maid SE" being able to read the screen.

20:32:40.706 SDMSE:Automation:Manager             D  submit(): eu.darken.sdmse.appcleaner.core.automation.ClearCacheTask@df294a6
20:32:40.710 SDMSE:Automation:Manager:SR          D  Acquiring shared resource...
20:32:40.710 SDMSE:Automation:Manager             V  serviceLauncher.onStart()
20:32:40.710 SDMSE:Automation:Manager             D  serviceLauncher: serviceWasRunning=false
20:32:40.711 SDMSE:Automation:Manager             D  serviceLauncher: canToggle=true
20:32:40.711 SDMSE:Automation:Manager             V  startService()
20:32:40.712 SDMSE:Automation:Manager             D  startService(): Starting service...
20:32:40.714 SDMSE:Automation:Manager             D  startService(): Before writing ACS settings: []
20:32:40.728 SDMSE:Automation:Manager             D  setAutomationServices([ComponentInfo{eu.darken.sdmse/eu.darken.sdmse.automation.core.AutomationService}]) -> [ComponentInfo{eu.darken.sdmse/eu.darken.sdmse.automation.core.AutomationService}]
20:32:40.728 SDMSE:Automation:Manager             V  startService(): Waiting for service to start
20:32:41.229 SDMSE:Automation:Manager             I  startService(): Service started!
20:32:41.229 SDMSE:Automation:Manager             D  serviceLauncher: Service provided, waiting for close...
20:32:41.229 SDMSE:Automation:Manager             V  serviceLauncher.onEach(): ServiceWrapper(service=eu.darken.sdmse.automation.core.AutomationService@831dbad)
20:32:41.229 SDMSE:Automation:Manager:SR          V  Resource ready: Resource(resource=ServiceWrapper(service=eu.darken.sdmse.automation.core.AutomationService@831dbad))
20:32:43.740 SDMSE:Automation:Manager             D  serviceLauncher: Closing...
20:32:43.740 SDMSE:Automation:Manager             D  serviceLauncher: Service wasn't running, let's toggle it off again
20:32:43.740 SDMSE:Automation:Manager             V  stopService()
20:32:43.752 SDMSE:Automation:Manager             D  setAutomationServices([]) -> []
20:32:43.752 SDMSE:Automation:Manager             V  stopService(): Waiting for service to stop
20:32:44.252 SDMSE:Automation:Manager             I  stopService(): Service stopped!
20:32:44.253 SDMSE:Automation:Manager             V  serviceLauncher.onCompletion()
20:32:44.253 SDMSE:Automation:Manager:SR          V  Releasing shared resource...
20:32:44.253 SDMSE:Automation:Manager:SR          D  Shared resource flow completed.

Screenshot from 2023-07-02 19-01-44

@d4rken d4rken added enhancement New feature, request, improvement or optimization c: AppCleaner Automation Accessibility service related (ACS) labels Jul 2, 2023
@d4rken
d4rken merged commit 1a83a11 into main Jul 2, 2023
@d4rken
d4rken deleted the acs_ondemand branch July 2, 2023 19:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Automation Accessibility service related (ACS) c: AppCleaner enhancement New feature, request, improvement or optimization

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant