The only issue is that the button resides in the com.android.systemui package, or so I imagine. It is the OK button that a user has to press in order to allow adb over USB. My touchscreen is dead, and I am controlling the phone through an USB mouse, so I am unable to click that OK button to enable debugging (non rooted phone). I was thinking that an instrumentation apk would do it, but... there goes trouble.
Another approach I have taken has been signing the instrumentation .apk with systemui's certificate. That has only led to Failure [INSTALL_FAILED_INVALID_INSTALL_LOCATION] though.
So, any way to click that button ?