From 42459df920cf1428ca8dfd11cdbdc5e2540d83ba Mon Sep 17 00:00:00 2001 From: YoursFunny Date: Sun, 5 Jul 2026 23:41:55 +0800 Subject: [PATCH] fix: add method uninstall_uiautomator2 --- module/device/method/uiautomator_2.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/module/device/method/uiautomator_2.py b/module/device/method/uiautomator_2.py index c15ac10..f4b03d2 100644 --- a/module/device/method/uiautomator_2.py +++ b/module/device/method/uiautomator_2.py @@ -241,6 +241,17 @@ class Uiautomator2(Connection): hierarchy = etree.fromstring(content.encode('utf-8')) return hierarchy + def uninstall_uiautomator2(self): + logger.info('Removing uiautomator2') + for file in [ + 'app-uiautomator.apk', + 'app-uiautomator-test.apk', + 'minitouch', + 'minitouch.so', + 'atx-agent', + ]: + self.adb_shell(["rm", f"/data/local/tmp/{file}"]) + @retry def resolution_uiautomator2(self, cal_rotation=True) -> t.Tuple[int, int]: """