Skip to content
Merged
Show file tree
Hide file tree
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
11 changes: 9 additions & 2 deletions android_world/env/setup_device/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,15 @@ def setup(cls, env: interface.AsyncEnv) -> None:
try:
controller = tools.AndroidToolController(env=env.controller)
time.sleep(2.0)
# Welcome screen.
controller.click_element("Accept & continue")
try:
# Welcome screen.
controller.click_element("Accept & continue")
except ValueError as e:
# Use without an account
logging.warn("Can't find `Accept & continue`, try to clock `Use without an account`.")
time.sleep(10)
action = json_action.JSONAction(action_type='click', x=540, y=2096)
actuation.execute_adb_action(action, [], (0, 0), env.controller)
time.sleep(2.0)
# Turn on sync?
controller.click_element("No thanks")
Expand Down
8 changes: 4 additions & 4 deletions android_world/task_evals/single/browser.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@ def initialize_task(self, env: interface.AsyncEnv):
adb_utils.get_adb_activity('chrome')
)

adb_utils.clear_app_data(
chrome_activity,
env.controller,
)
# adb_utils.clear_app_data(
# chrome_activity,
# env.controller,
# )
adb_utils.grant_permissions(
chrome_activity,
'android.permission.POST_NOTIFICATIONS',
Expand Down