]> glassweightruler.freedombox.rocks Git - waydroid.git/commitdiff
upgrade: Migrate auto_adb to False on first upgrade
authorAlessandro Astone <ales.astone@gmail.com>
Sun, 29 Jun 2025 19:38:13 +0000 (21:38 +0200)
committerAlessandro Astone <ales.astone@gmail.com>
Sun, 29 Jun 2025 19:38:15 +0000 (21:38 +0200)
Because we now default adb to secure, disable auto_adb to avoid prompting the user on every session startup

tools/actions/upgrader.py

index 0643f9c969ada5a35431a1550c8bc9684ba0fc20..e85b7bbf9a1096888776e2d64eb5899ac3785032 100644 (file)
@@ -23,6 +23,11 @@ def migration(args):
             tools.helpers.run.user(args, ["chmod", "-R", "g-w,o-w"] + [os.path.join(args.work, f) for f in chmod_paths], check=False)
             tools.helpers.run.user(args, ["chmod", "g-w,o-w", args.work], check=False)
             os.remove(os.path.join(args.work, "session.cfg"))
+        if versiontuple(old_ver) <= versiontuple("1.6.0"):
+            # Because we now default adb to secure, disable auto_adb to avoid prompting the user on every session startup
+            cfg = tools.config.load(args)
+            cfg["waydroid"]["auto_adb"] = "False"
+            tools.config.save(args, cfg)
     except:
         pass