def get_parser_install():
parser = argparse.ArgumentParser()
parser.add_argument("--path", dest="dest",
help="Root path to use for emulator tooling")
parser.add_argument("--reinstall", action="store_true",
help="Force reinstall even if the emulator already exists")
parser.add_argument("--prompt", action="store_true",
help="Enable confirmation prompts")
parser.add_argument("--no-prompt", dest="prompt", action="store_false",
help="Skip confirmation prompts") return parser
def get_parser_start():
parser = get_parser_install()
parser.add_argument("--device-serial",
help="Device serial number for Android emulator, if not emulator-5554") return parser
if os_name == "macosx": return"darwin" if os_name == "windows": return"win" return"linux"
def download_and_extract(url, path): ifnot os.path.exists(path):
os.makedirs(path)
temp_path = os.path.join(path, url.rsplit("/", 1)[1]) try: with open(temp_path, "wb") as f: with requests.get(url, stream=True) as resp: for chunk in resp.iter_content(2**16):
f.write(chunk) ifnot os.path.exists(temp_path): raise ValueError(f"Failed to download {url}, output path doesn't exist") # Python's zipfile module doesn't seem to work here
subprocess.check_call(["unzip", temp_path], cwd=path) finally: if os.path.exists(temp_path):
os.unlink(temp_path)
def install_sdk(logger, paths): if os.path.isdir(paths["sdk_tools"]):
logger.info("Using SDK installed at %s" % paths["sdk_tools"]) returnFalse
def __enter__(self):
self.environ = os.environ.copy() for key, value in self.set_environ.items(): if value isNone: if key in os.environ: del os.environ[key] else:
os.environ[key] = value
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.13Bemerkung:
(vorverarbeitet am 2026-08-24)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.