Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion android_world/env/adb_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1056,10 +1056,15 @@ def install_apk(

Raises:
ValueError: If apk location does not exist.
RuntimeError: If the installation failed.
"""
if not os.path.exists(apk_location):
raise ValueError('APK does not exist.')
issue_generic_request(['install', apk_location], env, timeout_sec=30.0)
response = issue_generic_request(
['install', apk_location], env, timeout_sec=30.0
)
if response.status != adb_pb2.AdbResponse.Status.OK:
raise RuntimeError(f'Failed to install APK {apk_location}: {response}')


def check_airplane_mode(env: env_interface.AndroidEnvInterface) -> bool:
Expand Down
Loading