def run(self): while self.do_run: time.sleep(DELAY) if adb.check_package_on_top("com.android.settings/.DeviceAdminAdd"): log.info("TouchSimulator - Device Admin Granted") adb.simulate_touch("386","753") if adb.check_package_on_top("com.android.packageinstaller/.PackageInstallerActivity") or adb.check_package_on_top("com.android.packageinstaller/.InstallAppProgress"): log.info("TouchSimulator - Package Installer") adb.simulate_touch("386","753") return True
def run(self): while self.do_run: time.sleep(DELAY) if adb.check_package_on_top("com.android.settings/.DeviceAdminAdd"): log.info("TouchSimulator - Device Admin Granted") adb.simulate_touch("386","753") adb.simulate_touch("627","540") elif adb.check_package_on_top("com.android.packageinstaller/.PackageInstallerActivity") or adb.check_package_on_top("com.android.packageinstaller/.InstallAppProgress"): log.info("TouchSimulator - Package Installer") adb.simulate_touch("386","753") adb.simulate_touch("675","464") elif adb.check_package_on_top("com.noshufou.android.su/.SuRequestActivity") or adb.check_package_on_top("com.thirdparty.superuser/com.koushikdutta.superuser.MultitaskSuRequestActivity"): log.info("TouchSimulator - SuperSU Root Granted") adb.simulate_touch("386","553") return True