X-Git-Url: https://glassweightruler.freedombox.rocks/gitweb/waydroid.git/blobdiff_plain/55d12fb776c696396739f180a7a93a8aeb9069b0..c9ea5abff749e660c9aca0fcd224875464c3dacd:/tools/actions/initializer.py diff --git a/tools/actions/initializer.py b/tools/actions/initializer.py index 41a0be3..8f6c2c3 100644 --- a/tools/actions/initializer.py +++ b/tools/actions/initializer.py @@ -23,6 +23,8 @@ def get_vendor_type(args): ret = "MAINLINE" if vndk_str != "": vndk = int(vndk_str) + if vndk > 31: + vndk -= 1 # 12L -> Halium 12 if vndk > 19: ret = "HALIUM_" + str(vndk - 19) @@ -57,6 +59,10 @@ def setup_config(args): if not args.system_type: args.system_type = channels_cfg["channels"]["system_type"] + if not args.system_channel or not args.vendor_channel: + logging.error("ERROR: You must provide 'System OTA' and 'Vendor OTA' URLs.") + return False + args.system_ota = args.system_channel + "/" + args.rom_type + \ "/waydroid_" + args.arch + "/" + args.system_type + ".json" system_request = helpers.http.retrieve(args.system_ota) @@ -99,6 +105,7 @@ def setup_config(args): cfg["waydroid"]["vndbinder"] = args.VNDBINDER_DRIVER cfg["waydroid"]["hwbinder"] = args.HWBINDER_DRIVER tools.config.save(args, cfg) + return True def init(args): if not is_initialized(args) or args.force: @@ -107,7 +114,8 @@ def init(args): initializer_service = tools.helpers.ipc.DBusContainerService("/Initializer", "id.waydro.Initializer") except dbus.DBusException: pass - setup_config(args) + if not setup_config(args): + return status = "STOPPED" if os.path.exists(tools.config.defaults["lxc"] + "/waydroid"): status = helpers.lxc.status(args)