I use an emulator (genymotion) and intermittently i would see a “android.intent.action.ACTION_POWER_DISCONNECTED” which essentially shutdown UIAutomator2 server. I’m not sure where this intent is coming from since i use emulator. If you have idea where to look for settings or how to fix this that would be great.
Also, i’m interested if i can just set shutdownOnPowerDisconnect to false so it does not shutdown the server since it is emulator.