title: How do root apps access the ui of other apps?
body: <p>I am looking to build an app that (with root privileges) can access the ui on another app and click buttons on the screen. I have seen this done with many of the macro apps and some "bot" apps. I know they use the 'device administrator' and i have seen some that need the 'overlay over other apps' permission. I'm not looking for a comprehensive guide, and i know i would have to use some kind of ocr software to process the ui elements. Can someone give me some pointers? Example:  <a href="https://forum.xda-developers.com/showthread.php?t=2241770" rel="nofollow noreferrer">https://forum.xda-developers.com/showthread.php?t=2241770</a>
  Thanks for any help!
  Taine</p>