cfg = tools.config.load(args)
android_api = 0
try:
- mnt = "/tmp/waydroid-" + str(uuid.uuid1())
- helpers.mount.mount(args, cfg["waydroid"]["images_path"] + "/system.img", mnt)
- android_api = int(helpers.props.file_get(args, mnt + "/system/build.prop",
+ android_api = int(helpers.props.file_get(args,
+ tools.config.defaults["rootfs"] + "/system/build.prop",
"ro.build.version.sdk"))
except:
logging.error("Failed to parse android version from system.img")
- finally:
- helpers.mount.umount_all(args, mnt);
if android_api < 28:
binder_protocol = "aidl"
stop(args)
sys.exit(0)
- set_aidl_version()
-
status = helpers.lxc.status(args)
if status == "STOPPED":
# Load binder and ashmem drivers
# Mount rootfs
helpers.images.mount_rootfs(args, cfg["waydroid"]["images_path"])
+ set_aidl_version()
+
# Mount data
helpers.mount.bind(args, session_cfg["session"]["waydroid_data"],
tools.config.defaults["data"])
args.BINDER_DRIVER = cfg["waydroid"]["binder"]
args.VNDBINDER_DRIVER = cfg["waydroid"]["vndbinder"]
args.HWBINDER_DRIVER = cfg["waydroid"]["hwbinder"]
- args.BINDER_PROTOCOL = cfg["waydroid"]["binder_protocol"]
- args.SERVICE_MANAGER_PROTOCOL = cfg["waydroid"]["service_manager_protocol"]
+ # These might not be in cfg on package upgrade
+ args.BINDER_PROTOCOL = cfg["waydroid"].get("binder_protocol")
+ args.SERVICE_MANAGER_PROTOCOL = cfg["waydroid"].get("service_manager_protocol")