How to debug accessibility service?

1.2k views Asked by At

I have some problem with debugging AccessibilityService and can not find a solution - with every deployment/debug from Eclipse the service is not restarted automatically and it requires the manual action of restarting the service.

What I am forced to do now:

  1. I am adding some new code and deploying/debugging with Eclipse.
  2. Application is deployed correctly and started but the new version of service is not started (messages from service are not shown and breakpoints are not working).
  3. I am manually opening settings -> accessibility and see that my service runs.
  4. I am manually stopping and starting service - now service is working.

I want to do it in a faster way:

  • I am adding some code and deploying, service is restarted, and then the breakpoint works without any manual boring restarting!

Could you suggest how to debug accessibility service without manually restarting?

1

There are 1 answers

0
Lukas Hanacek On

use adb

adb shell settings put secure enabled_accessibility_services appPackage/YourAccessibilityService