X-Git-Url: https://glassweightruler.freedombox.rocks/gitweb/waydroid.git/blobdiff_plain/5dbaef56a19ed1bfcd78e21d75443eadefe67f00..a62118db494bfd3d1fc176b60fe2abec92241e4f:/tools/actions/upgrader.py diff --git a/tools/actions/upgrader.py b/tools/actions/upgrader.py index 9c5d04a..e85b7bb 100644 --- a/tools/actions/upgrader.py +++ b/tools/actions/upgrader.py @@ -5,7 +5,6 @@ import os from tools import helpers from tools.helpers.version import versiontuple import tools.config -import dbus def get_config(args): cfg = tools.config.load(args) @@ -23,6 +22,12 @@ def migration(args): chmod_paths = ["cache_http", "host-permissions", "lxc", "images", "rootfs", "data", "waydroid_base.prop", "waydroid.prop", "waydroid.cfg"] 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 @@ -46,7 +51,7 @@ def upgrade(args): if args.images_path not in tools.config.defaults["preinstalled_images_paths"]: helpers.images.get(args) else: - logging.info("Upgrade refused because a pre-installed image is detected at {}.".format(args.images_path)) + logging.info("Upgrade refused because Waydroid was configured to load pre-installed image from {}.".format(args.images_path)) helpers.drivers.probeAshmemDriver(args) helpers.lxc.setup_host_perms(args) helpers.lxc.set_lxc_config(args)