INNER CODE UNIT · Python

command_connect

cvet/fonline · BuildTools/android_device.py:292

def command_connect(workspace_root: Path, explicit_endpoint: str | None) -> int:
	adb_path = resolve_adb_path(workspace_root)
	endpoint = resolve_endpoint(adb_path, workspace_root, explicit_endpoint)
	log('Using Android device', endpoint)
	return 0


def command_install(workspace_root: Path, apk_path: str, explicit_endpoint: str | None) -> int:
	adb_path = resolve_adb_path(workspace_root)
	endpoint = resolve_endpoint(adb_path, workspace_root, explicit_endpoint)
	return_code, output = run_capture_result([adb_path, '-s', endpoint, 'install', '-r', apk_path])
	if output:
		print(output, flush=True)
	if return_code != 0 and 'INSTALL_FAILED_USER_RESTRICTED' in output:
		log_install_failed_user_restricted(adb_path, endpoint)
	return return_code

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…