Skip to content

Conversation

@NingLi670
Copy link
Contributor

@NingLi670 NingLi670 commented Mar 2, 2025

Three changes make AndroidWorld runnable on Windows operating system:

  • Change the hard-coded path /tmp to automatically obtain it according to the operating system.
  • Change most os.path.join into str(Path(*args).as_posix()) to adapt to the path in posix format.
  • Add strip() to deal with \r in Windows platform.

More changes you need to do to make it work on WIndows Platform:

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have you check that this worked on unix-based environments as well? I will try and confirm that it does before merging this

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I haven't check it on unix-based environments. It will be great if you can do this.

@anunay1
Copy link

anunay1 commented Mar 4, 2025

@NingLi670 @crawles Tried it on windows. I am running cmd in admin mode.
(android_world) PS C:\Users\xxxx\Documents\android_world\android_world> python .\minimal_task_runner.py --task=SystemBluetoothTurnOff
C:\Users\anuthakur\AppData\Local\anaconda3\envs\android_world\Lib\site-packages\pydub\utils.py:170: RuntimeWarning: Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may not work
warn("Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may not work", RuntimeWarning)
Traceback (most recent call last):
File "C:\Users\anuthakur\Documents\android_world\android_world\minimal_task_runner.py", line 131, in
app.run(main)
File "C:\Users\anuthakur\AppData\Local\anaconda3\envs\android_world\Lib\site-packages\absl_py-2.1.0-py3.11.egg\absl\app.py", line 308, in run
_run_main(main, args)
File "C:\Users\anuthakur\AppData\Local\anaconda3\envs\android_world\Lib\site-packages\absl_py-2.1.0-py3.11.egg\absl\app.py", line 254, in _run_main
sys.exit(main(argv))
^^^^^^^^^^
File "C:\Users\anuthakur\Documents\android_world\android_world\minimal_task_runner.py", line 127, in main
_main()
File "C:\Users\anuthakur\Documents\android_world\android_world\minimal_task_runner.py", line 89, in _main
env = env_launcher.load_and_setup_env(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\anuthakur\Documents\android_world\android_world\android_world\env\env_launcher.py", line 114, in load_and_setup_env
env = _get_env(console_port, adb_path, grpc_port)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\anuthakur\Documents\android_world\android_world\android_world\env\env_launcher.py", line 35, in _get_env
controller = android_world_controller.get_controller(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\anuthakur\Documents\android_world\android_world\android_world\env\android_world_controller.py", line 320, in get_controller
android_env_instance = loader.load(config)
^^^^^^^^^^^^^^^^^^^
File "C:\Users\anuthakur\AppData\Local\anaconda3\envs\android_world\Lib\site-packages\android_env-1.2.2-py3.11.egg\android_env\loader.py", line 56, in load
File "C:\Users\anuthakur\AppData\Local\anaconda3\envs\android_world\Lib\site-packages\android_env-1.2.2-py3.11.egg\android_env\components\simulators\emulator\emulator_simulator.py", line 144, in init
File "C:\Users\anuthakur\AppData\Local\anaconda3\envs\android_world\Lib\site-packages\android_env-1.2.2-py3.11.egg\android_env\components\adb_controller.py", line 72, in init_server
File "C:\Users\anuthakur\AppData\Local\anaconda3\envs\android_world\Lib\site-packages\android_env-1.2.2-py3.11.egg\android_env\components\adb_controller.py", line 122, in execute_command
File "C:\Users\anuthakur\AppData\Local\anaconda3\envs\android_world\Lib\subprocess.py", line 466, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\anuthakur\AppData\Local\anaconda3\envs\android_world\Lib\subprocess.py", line 548, in run
with Popen(*popenargs, **kwargs) as process:
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\anuthakur\AppData\Local\anaconda3\envs\android_world\Lib\subprocess.py", line 1026, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\Users\anuthakur\AppData\Local\anaconda3\envs\android_world\Lib\subprocess.py", line 1538, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
PermissionError: [WinError 5] Access is denied

@NingLi670
Copy link
Contributor Author

@anunay1 Thanks for your feedback! But sorry I can't pinpoint the exact problem. Can you provide more information? You can change logging.set_verbosity(logging.WARNING) into logging.set_verbosity(logging.INFO) to get a detailed log.
Besides, does the problem happens in all tasks, or just SystemBluetoothTurnOff task? Can you try to run in user mode? It seems that you haven't install ffmpeg, can you try to install ffmpeg first?

Copy link
Collaborator

@crawles crawles left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've tested it on UNIX (Mac).

@crawles
Copy link
Collaborator

crawles commented Mar 5, 2025

Thank for sending this :D. Will follow-up with additional fixes

@crawles crawles merged commit 639b3ff into google-research:main Mar 5, 2025
1 check passed
@anunay1
Copy link

anunay1 commented Mar 6, 2025

@NingLi670 @crawles seems like it's not able to tun adb commands
(android_world) PS C:\Users\anuthakur\Documents\android_world\android_world> python .\minimal_task_runner.py --task=SystemBluetoothTurnOff
I0306 12:03:41.835390 19836 task_manager.py:85] Task config: id: "default"
name: "Default task for device control."
description: "Empty task"
max_episode_sec: 7200

I0306 12:03:41.837401 19836 emulator_simulator.py:110] Connecting to existing emulator "'emulator-5554'"
I0306 12:03:41.838400 19836 adb_controller.py:34] config: AdbControllerConfig(adb_path='C:\Users\anuthakur\AppData\Local\Android\Sdk\build-tools\30.0.3', adb_server_port=5037, default_timeout=120.0, device_name='emulator-5554')
I0306 12:03:41.838400 19836 adb_controller.py:48] self._os_env_vars: {'CONDA_DEFAULT_ENV': 'android_world', 'CONDA_EXE': 'C:\Users\anuthakur\AppData\Local\anaconda3\Scripts\
conda.exe', 'CONDA_PREFIX': 'C:\Users\anuthakur\AppData\Local\anaconda3\envs\android_world', 'CONDA_PREFIX_1': 'C:\Users\anuthakur\AppData\Local\anaconda3', 'CONDA_PROM
PT_MODIFIER': '(android_world) ', 'CONDA_PYTHON_EXE': 'C:\Users\anuthakur\AppData\Local\anaconda3\python.exe', 'CONDA_SHLVL': '2', 'PSEXECUTIONPOLICYPREFERENCE': 'RemoteSigne
d', 'SSL_CERT_FILE': 'C:\Users\anuthakur\AppData\Local\anaconda3\envs\android_world\Library\ssl\cacert.pem', 'TERM_SESSION_ID': '3222456a-1227-403d-846c-cb3a9a722370', 'Z
ES_ENABLE_SYSMAN': '1', 'PROGRAMW6432': 'C:\Program Files', 'COMMONPROGRAMW6432': 'C:\Program Files\Common Files', 'EFC_11716': '1', 'USERNAME': 'AnuThakur', 'ALLUSERSPROFILE':
'C:\ProgramData', 'USERPROFILE': 'C:\Users\anuthakur', 'PROCESSOR_REVISION': '9a04', 'IDEA_INITIAL_DIRECTORY': 'C:\Program Files\JetBrains\PyCharm Community Edition 2023.3\b
in', 'PUBLIC': 'C:\Users\Public', 'PATH': 'C:\Users\anuthakur\AppData\Local\anaconda3\envs\android_world\Lib\site-packages\cv2\../../x64/vc14/bin;C:\Users\anuthakur
\AppData\Local\anaconda3\envs\android_world;C:\Users\anuthakur\AppData\Local\anaconda3\envs\android_world\Library\mingw-w64\bin;C:\Users\anuthakur\AppData\Local\
anaconda3\envs\android_world\Library\usr\bin;C:\Users\anuthakur\AppData\Local\anaconda3\envs\android_world\Library\bin;C:\Users\anuthakur\AppData\Local\anaconda3
\envs\android_world\Scripts;C:\Users\anuthakur\AppData\Local\anaconda3\envs\android_world\bin;C:\Users\anuthakur\AppData\Local\anaconda3\condabin;C:\Program Files
\Eclipse Adoptium\jdk-21.0.6.7-hotspot\bin;C:\ffmpeg\bin;C:\Program Files\Java\jdk-17\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System
32\WindowsPowerShell\v1.0;C:\WINDOWS\System32\OpenSSH;C:\Program Files\dotnet;C:\Program Files (x86)\Vector CANdb++ 3.1\Exec32;C:\Android\platform-tools_r34.0.5-windows
\platform-tools;C:\Program Files\Java\jdk-17\bin;C:\Program Files\Microsoft VS Code\bin;C:\Program Files\Git\cmd;C:\Users\anuthakur\AppData\Local\Android\Sdk\buil
d-tools\30.0.3;C:\Program Files\Python39;C:\Program Files\Python39\Scripts;C:\Program Files\Jarvis\Foundation\Reference Assemblies;C:\Program Files\Tesseract-OCR;C:\Pr
ogram Files\Graphviz\bin;C:\Program Files\Graphviz\bin;C:\Program Files\OpenSSL-Win64\bin;C:\Users\anuthakur\AppData\Roaming\Python\Python39\Scripts;C:\Program File
s\RedHat\Podman;C:\Users\anuthakur\AppData\Local\Microsoft\WindowsApps;C:\Users\anuthakur\.dotnet\tools;C:\Us;C:\Program Files\PuTTY;C:\Program Files\GitHub CLI;C:
\Users\anuthakur\AppData\Local\anaconda3\Scripts;C:\Program Files\nodejs;C:\ProgramData\chocolatey\bin;C:\Users\anuthakur\AppData\Local\Microsoft\WindowsApps;.;C:
\Users\anuthakur\.dotnet\tools;C:\Users\anuthakur\AppData\Local\Microsoft\WinGet\Packages\Schniz.fnm_Microsoft.Winget.Source_8wekyb3d8bbwe;C:\Users\anuthakur\AppData
\Roaming\npm;C:\Users\anuthakur\AppData\Local\Programs\Ollama', 'DRIVERDATA': 'C:\Windows\System32\Drivers\DriverData', 'HOMEDRIVE': 'C:', 'IGCCSVC_DB': 'AQAAANCMnd8BFdE
RjHoAwE/Cl+sBAAAAEOOM1tK9xUSO02U8MN2xYgQAAAACAAAAAAAQZgAAAAEAACAAAACwwD8VvHo10io/voFi8/KJhZOgmEsSN2cNKVyDBxtcAQAAAAAOgAAAAAIAACAAAAAxaRi1XqlDgsVBX2sCHO2rY097X8ipfNw6h2Gbc/0uY2AAAAD
Vg3X3wCTtcyiRrQJFyf0aV0WsKj0vY3wXFRXCcN3ksChEGjoKjiKBE07kIQl3E6AJtm2suFHoDz/MrKVM6/8pY2w+VUVe0O8BtVAfOqi2UpTZOBJZV04RO4UkvsztJ0hAAAAARrl7M41xgARZ495yCM0IVYQAB+XJNQzXyAurev61RfSUNV/
XFAFK2VLqqYAWGkefSnAByXGKfwbhwJet9mTQwQ==', 'SESSIONNAME': 'Console', 'LOGONSERVER': '\\INBAW16DCAD09', 'OPENAI_API_KEY': 'xxx', 'TERMINAL_EMULATOR': 'JetBrains-JediTerm', 'HOMEPATH': '\Users\anuthakur', 'SYSTEMROOT': 'C:\WINDOWS', 'CHOCOLATEYINSTALL': 'C:\ProgramData\cho
colatey', 'LOCALAPPDATA': 'C:\Users\anuthakur\AppData\Local', 'APPDATA': 'C:\Users\anuthakur\AppData\Roaming', 'PROCESSOR_IDENTIFIER': 'Intel64 Family 6 Model 154 Stepping
4, GenuineIntel', 'PATHEXT': '.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.CPL', 'PSMODULEPATH': 'C:\Users\anuthakur\OneDrive - HARMAN\Documents\WindowsPowerShell\M
odules;C:\Program Files\WindowsPowerShell\Modules;C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules;C:\Program Files\MicrosoftManagedDesktop\Powershell;C:\Program File
s (x86)\Microsoft Purview Information Protection\Powershell', 'PROGRAMFILES(X86)': 'C:\Program Files (x86)', 'ROBOFLOW_API_KEY': 'GVs6rbUbzje3fKSK3rwl', 'CANOE_INSTALLDIR64': 'C
:\Program Files\Vector CANoe 15\Exec64\', 'OS': 'Windows_NT', 'USERDNSDOMAIN': 'AD.HARMAN.COM', 'PROCESSOR_ARCHITECTURE': 'AMD64', 'NUMBER_OF_PROCESSORS': '12', 'JAVA_HOME': 'C
:\Program Files\Java\jdk-21', 'COMSPEC': 'C:\WINDOWS\system32\cmd.exe', 'PROCESSOR_LEVEL': '6', 'WINDIR': 'C:\WINDOWS', 'USERDOMAIN_ROAMINGPROFILE': 'ADHARMAN', 'PROGRAMFILE
S': 'C:\Program Files', 'VBOX_MSI_INSTALL_PATH': 'C:\Program Files\Oracle\VirtualBox\', 'PYTHONPATH': 'C:\Users\anuthakur\Documents\CAT_Projects', 'TEMP': 'C:\Users\ANUT
HA1\AppData\Local\Temp', 'TMP': 'C:\Users\ANUTHA1\AppData\Local\Temp', 'COMMONPROGRAMFILES(X86)': 'C:\Program Files (x86)\Common Files', 'ONEDRIVE': 'C:\Users\anuthak
ur\OneDrive - HARMAN', 'PICO_DRIVER': 'C:\Program Files\Vector_CANoe_CANalyzer_Scope\Drivers', 'USERDOMAIN': 'ADHARMAN', 'SYSTEMDRIVE': 'C:', 'ONEDRIVECOMMERCIAL': 'C:\Users\
anuthakur\OneDrive - HARMAN', 'COMPUTERNAME': 'INBAWN180334', 'PROGRAMDATA': 'C:\ProgramData', 'CANOE_INSTALLDIR': 'C:\Program Files\Vector CANoe 15\Exec64\', 'CHOCOLATEYLAST
PATHUPDATE': '133857139319892385', 'COMMONPROGRAMFILES': 'C:\Program Files\Common Files', '_CONDA_EXE': 'C:\Users\anuthakur\AppData\Local\anaconda3\Scripts\conda.exe', '_CONDA_ROOT': 'C:\Users\anuthakur\AppData\Local\anaconda3', '__CONDA_OPENSLL_CERT_FILE_SET': '1', 'HOME': ''}
I0306 12:03:41.841586 19836 adb_controller.py:121] Executing ADB command: [adb -P 5037 devices]
Traceback (most recent call last):
File "C:\Users\anuthakur\Documents\android_world\android_world\minimal_task_runner.py", line 110, in
app.run(main)
File "C:\Users\anuthakur\AppData\Local\anaconda3\envs\android_world\Lib\site-packages\absl_py-2.1.0-py3.11.egg\absl\app.py", line 308, in run
_run_main(main, args)
File "C:\Users\anuthakur\AppData\Local\anaconda3\envs\android_world\Lib\site-packages\absl_py-2.1.0-py3.11.egg\absl\app.py", line 254, in _run_main
sys.exit(main(argv))
^^^^^^^^^^
File "C:\Users\anuthakur\Documents\android_world\android_world\minimal_task_runner.py", line 106, in main
_main()
File "C:\Users\anuthakur\Documents\android_world\android_world\minimal_task_runner.py", line 68, in _main
env = env_launcher.load_and_setup_env(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\anuthakur\Documents\android_world\android_world\android_world\env\env_launcher.py", line 114, in load_and_setup_env
env = _get_env(console_port, adb_path, grpc_port)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\anuthakur\Documents\android_world\android_world\android_world\env\env_launcher.py", line 35, in _get_env
controller = android_world_controller.get_controller(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\anuthakur\Documents\android_world\android_world\android_world\env\android_world_controller.py", line 320, in get_controller
android_env_instance = loader.load(config)
^^^^^^^^^^^^^^^^^^^
File "C:\Users\anuthakur\AppData\Local\anaconda3\envs\android_world\Lib\site-packages\android_env-1.2.2-py3.11.egg\android_env\loader.py", line 56, in load
File "C:\Users\anuthakur\AppData\Local\anaconda3\envs\android_world\Lib\site-packages\android_env-1.2.2-py3.11.egg\android_env\components\simulators\emulator\emulator_simulator.py", line 144, in init
File "C:\Users\anuthakur\AppData\Local\anaconda3\envs\android_world\Lib\site-packages\android_env-1.2.2-py3.11.egg\android_env\components\adb_controller.py", line 72, in init_server
File "C:\Users\anuthakur\AppData\Local\anaconda3\envs\android_world\Lib\site-packages\android_env-1.2.2-py3.11.egg\android_env\components\adb_controller.py", line 122, in execute_command
File "C:\Users\anuthakur\AppData\Local\anaconda3\envs\android_world\Lib\subprocess.py", line 466, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\anuthakur\AppData\Local\anaconda3\envs\android_world\Lib\subprocess.py", line 548, in run
with Popen(*popenargs, **kwargs) as process:
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\anuthakur\AppData\Local\anaconda3\envs\android_world\Lib\subprocess.py", line 1026, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\Users\anuthakur\AppData\Local\anaconda3\envs\android_world\Lib\subprocess.py", line 1538, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
PermissionError: [WinError 5] Access is denied
(android_world) PS C:\Users\anuthakur\Documents\android_world\android_world>

@NingLi670
Copy link
Contributor Author

@anunay1

More changes you need to do to make it work on WIndows Platform:

  • Changes in AndroidEnv: Install a11y forwarding apk from filesystem google-deepmind/android_env#265 (The problem has been fixed. It requires python>=3.12)
  • Instead of ~/Library/Android/sdk/emulator/emulator, start the emulator.exe from another path. Usually it is ~\AppData\Local\Android\Sdk\emulator\emulator.exe.
  • Manually specify the adb path and disable _find_adb_directory in minimal_task_runner.py and run.py.
  • Disable _increase_file_descriptor_limit in env_launcher.py.

@anunay1
Copy link

anunay1 commented Mar 6, 2025

@anunay1

More changes you need to do to make it work on WIndows Platform:

  • Changes in AndroidEnv: Install a11y forwarding apk from filesystem google-deepmind/android_env#265 (The problem has been fixed. It requires python>=3.12)
  • Instead of ~/Library/Android/sdk/emulator/emulator, start the emulator.exe from another path. Usually it is ~\AppData\Local\Android\Sdk\emulator\emulator.exe.
  • Manually specify the adb path and disable _find_adb_directory in minimal_task_runner.py and run.py.
  • Disable _increase_file_descriptor_limit in env_launcher.py.

Followed the above. still throws error:
(android_world) PS C:\Users\anuthakur\Documents\android_world\android_world> python .\minimal_task_runner.py --task=SystemBluetoothTurnOff
I0306 13:51:02.916175 12680 task_manager.py:85] Task config: id: "default"
name: "Default task for device control."
description: "Empty task"
max_episode_sec: 7200

I0306 13:51:02.918175 12680 emulator_simulator.py:110] Connecting to existing emulator "'emulator-5554'"
I0306 13:51:02.918175 12680 adb_controller.py:34] config: AdbControllerConfig(adb_path='C:\Users\anuthakur\AppData\Local\Android\Sdk\build-tools\30.0.3', adb_server_port=5037, default_timeout=120.0, device_name='emulator-5554')
I0306 13:51:02.919182 12680 adb_controller.py:48] self._os_env_vars: {'CONDA_DEFAULT_ENV': 'android_world', 'CONDA_EXE': 'C:\Users\anuthakur\AppData\Local\anaconda3\Scripts\
conda.exe', 'CONDA_PREFIX': 'C:\Users\anuthakur\AppData\Local\anaconda3\envs\android_world', 'CONDA_PREFIX_1': 'C:\Users\anuthakur\AppData\Local\anaconda3', 'CONDA_PROM
PT_MODIFIER': '(android_world) ', 'CONDA_PYTHON_EXE': 'C:\Users\anuthakur\AppData\Local\anaconda3\python.exe', 'CONDA_SHLVL': '2', 'PSEXECUTIONPOLICYPREFERENCE': 'RemoteSigne
d', 'SSL_CERT_FILE': 'C:\Users\anuthakur\AppData\Local\anaconda3\envs\android_world\Library\ssl\cacert.pem', 'TERM_SESSION_ID': 'e112b291-2770-4bb8-9a66-36b8e4e678fc', 'Z
ES_ENABLE_SYSMAN': '1', 'PROGRAMW6432': 'C:\Program Files', 'COMMONPROGRAMW6432': 'C:\Program Files\Common Files', 'USERNAME': 'AnuThakur', 'ALLUSERSPROFILE': 'C:\ProgramData',
'USERPROFILE': 'C:\Users\anuthakur', 'PROCESSOR_REVISION': '9a04', 'IDEA_INITIAL_DIRECTORY': 'C:\Program Files\JetBrains\PyCharm Community Edition 2023.3\bin', 'PUBLIC': 'C:
\Users\Public', 'PATH': 'C:\Users\anuthakur\AppData\Local\anaconda3\envs\android_world\Lib\site-packages\cv2\../../x64/vc14/bin;C:\Users\anuthakur\AppData\Local\a
naconda3\envs\android_world;C:\Users\anuthakur\AppData\Local\anaconda3\envs\android_world\Library\mingw-w64\bin;C:\Users\anuthakur\AppData\Local\anaconda3\envs\a
ndroid_world\Library\usr\bin;C:\Users\anuthakur\AppData\Local\anaconda3\envs\android_world\Library\bin;C:\Users\anuthakur\AppData\Local\anaconda3\envs\android_wo
rld\Scripts;C:\Users\anuthakur\AppData\Local\anaconda3\envs\android_world\bin;C:\Users\anuthakur\AppData\Local\anaconda3\condabin;C:\Program Files\Eclipse Adoptium
\jdk-21.0.6.7-hotspot\bin;C:\ffmpeg\bin;C:\Program Files\Java\jdk-17\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerSh
ell\v1.0;C:\WINDOWS\System32\OpenSSH;C:\Program Files\dotnet;C:\Program Files (x86)\Vector CANdb++ 3.1\Exec32;C:\Android\platform-tools_r34.0.5-windows\platform-tools;C
:\Program Files\Java\jdk-17\bin;C:\Program Files\Microsoft VS Code\bin;C:\Program Files\Git\cmd;C:\Users\anuthakur\AppData\Local\Android\Sdk\build-tools\30.0.3;C:
\Program Files\Python39;C:\Program Files\Python39\Scripts;C:\Program Files\Jarvis\Foundation\Reference Assemblies;C:\Program Files\Tesseract-OCR;C:\Program Files\Graph
viz\bin;C:\Program Files\Graphviz\bin;C:\Program Files\OpenSSL-Win64\bin;C:\Users\anuthakur\AppData\Roaming\Python\Python39\Scripts;C:\Program Files\RedHat\Podman;
C:\Users\anuthakur\AppData\Local\Microsoft\WindowsApps;C:\Users\anuthakur\.dotnet\tools;C:\Us;C:\Program Files\PuTTY;C:\Program Files\GitHub CLI;C:\Users\anuthakur
\AppData\Local\anaconda3\Scripts;C:\Program Files\nodejs;C:\ProgramData\chocolatey\bin;C:\Users\anuthakur\AppData\Local\Microsoft\WinGet\Packages\Schniz.fnm_Micros
oft.Winget.Source_8wekyb3d8bbwe;C:\Users\anuthakur\AppData\Roaming\npm;C:\Users\anuthakur\AppData\Local\Programs\Ollama', 'DRIVERDATA': 'C:\Windows\System32\Drivers\
DriverData', 'HOMEDRIVE': 'C:', 'IGCCSVC_DB': 'AQAAANCMnd8BFdERjHoAwE/Cl+sBAAAAEOOM1tK9xUSO02U8MN2xYgQAAAACAAAAAAAQZgAAAAEAACAAAACwwD8VvHo10io/voFi8/KJhZOgmEsSN2cNKVyDBxtcAQAAAAAOg
AAAAAIAACAAAAAxaRi1XqlDgsVBX2sCHO2rY097X8ipfNw6h2Gbc/0uY2AAAADVg3X3wCTtcyiRrQJFyf0aV0WsKj0vY3wXFRXCcN3ksChEGjoKjiKBE07kIQl3E6AJtm2suFHoDz/MrKVM6/8pY2w+VUVe0O8BtVAfOqi2UpTZOBJZV04RO
4UkvsztJ0hAAAAARrl7M41xgARZ495yCM0IVYQAB+XJNQzXyAurev61RfSUNV/XFAFK2VLqqYAWGkefSnAByXGKfwbhwJet9mTQwQ==', 'LOGONSERVER': '\\INBAW16DCAD09', 'TERMINAL_EMULATOR': 'JetBrains-JediTe
rm', 'HOMEPATH': '\Users\anuthakur', 'SYSTEMROOT': 'C:\WINDOWS', 'CHOCOLATEYINSTALL': 'C:\ProgramData\chocolatey', 'LOCALAPPDATA': 'C:\Users\anuthakur\AppData\Local', 'APP
DATA': 'C:\Users\anuthakur\AppData\Roaming', 'PROCESSOR_IDENTIFIER': 'Intel64 Family 6 Model 154 Stepping 4, GenuineIntel', 'PATHEXT': '.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.
WSF;.WSH;.MSC;.CPL', 'PSMODULEPATH': 'C:\Users\anuthakur\OneDrive - HARMAN\Documents\WindowsPowerShell\Modules;C:\Program Files\WindowsPowerShell\Modules;C:\WINDOWS\syst
em32\WindowsPowerShell\v1.0\Modules;C:\Program Files\MicrosoftManagedDesktop\Powershell;C:\Program Files (x86)\Microsoft Purview Information Protection\Powershell', 'PROGR
AMFILES(X86)': 'C:\Program Files (x86)', 'ROBOFLOW_API_KEY': 'GVs6rbUbzje3fKSK3rwl', 'CANOE_INSTALLDIR64': 'C:\Program Files\Vector CANoe 15\Exec64\', 'OS': 'Windows_NT', 'USE
RDNSDOMAIN': 'AD.HARMAN.COM', 'PROCESSOR_ARCHITECTURE': 'AMD64', 'NUMBER_OF_PROCESSORS': '12', 'JAVA_HOME': 'C:\Program Files\Java\jdk-21', 'COMSPEC': 'C:\WINDOWS\system32\cm
d.exe', 'PROCESSOR_LEVEL': '6', 'WINDIR': 'C:\WINDOWS', 'USERDOMAIN_ROAMINGPROFILE': 'ADHARMAN', 'PROGRAMFILES': 'C:\Program Files', 'AZUREOPENAI_BASE_URL': 'https://androidworld
openai.openai.azure.com', 'VBOX_MSI_INSTALL_PATH': 'C:\Program Files\Oracle\VirtualBox\', 'PYTHONPATH': 'C:\Users\anuthakur\Documents\CAT_Projects', 'TEMP': 'C:\Users\ANU
THA1\AppData\Local\Temp', 'TMP': 'C:\Users\ANUTHA1\AppData\Local\Temp', 'AZUREOPENAI_API_KEY': 'xxx', 'COMMONPROGRAMFILES(X86)': 'C:\Program Files (x86)\Common Files', 'ONEDRIVE': 'C:\Users\anuthakur\OneDrive - HARMAN', 'PICO_DRIVER': 'C:\Program Files\Vector_CA
Noe_CANalyzer_Scope\Drivers', 'USERDOMAIN': 'ADHARMAN', 'SYSTEMDRIVE': 'C:', 'ONEDRIVECOMMERCIAL': 'C:\Users\anuthakur\OneDrive - HARMAN', 'COMPUTERNAME': 'INBAWN180334', 'PROG
RAMDATA': 'C:\ProgramData', 'CANOE_INSTALLDIR': 'C:\Program Files\Vector CANoe 15\Exec64\', 'CHOCOLATEYLASTPATHUPDATE': '133857139319892385', 'COMMONPROGRAMFILES': 'C:\Progra
m Files\Common Files', '_CONDA_EXE': 'C:\Users\anuthakur\AppData\Local\anaconda3\Scripts\conda.exe', '_CONDA_ROOT': 'C:\Users\anuthakur\AppData\Local\anaconda3', '__CONDA_OPENSLL_CERT_FILE_SET': '1', 'HOME': ''}
I0306 13:51:02.921722 12680 adb_controller.py:121] Executing ADB command: [adb -P 5037 devices]
Traceback (most recent call last):
File "C:\Users\anuthakur\Documents\android_world\android_world\minimal_task_runner.py", line 130, in
app.run(main)
File "C:\Users\anuthakur\AppData\Local\anaconda3\envs\android_world\Lib\site-packages\absl_py-2.1.0-py3.11.egg\absl\app.py", line 308, in run
_run_main(main, args)
File "C:\Users\anuthakur\AppData\Local\anaconda3\envs\android_world\Lib\site-packages\absl_py-2.1.0-py3.11.egg\absl\app.py", line 254, in _run_main
sys.exit(main(argv))
^^^^^^^^^^
File "C:\Users\anuthakur\Documents\android_world\android_world\minimal_task_runner.py", line 126, in main
_main()
File "C:\Users\anuthakur\Documents\android_world\android_world\minimal_task_runner.py", line 88, in _main
env = env_launcher.load_and_setup_env(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\anuthakur\Documents\android_world\android_world\android_world\env\env_launcher.py", line 114, in load_and_setup_env
env = _get_env(console_port, adb_path, grpc_port)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\anuthakur\Documents\android_world\android_world\android_world\env\env_launcher.py", line 35, in _get_env
controller = android_world_controller.get_controller(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\anuthakur\Documents\android_world\android_world\android_world\env\android_world_controller.py", line 320, in get_controller
android_env_instance = loader.load(config)
^^^^^^^^^^^^^^^^^^^
File "C:\Users\anuthakur\AppData\Local\anaconda3\envs\android_world\Lib\site-packages\android_env-1.2.2-py3.11.egg\android_env\loader.py", line 56, in load
File "C:\Users\anuthakur\AppData\Local\anaconda3\envs\android_world\Lib\site-packages\android_env-1.2.2-py3.11.egg\android_env\components\simulators\emulator\emulator_simulator.py", line 144, in init
File "C:\Users\anuthakur\AppData\Local\anaconda3\envs\android_world\Lib\site-packages\android_env-1.2.2-py3.11.egg\android_env\components\adb_controller.py", line 72, in init_server
File "C:\Users\anuthakur\AppData\Local\anaconda3\envs\android_world\Lib\site-packages\android_env-1.2.2-py3.11.egg\android_env\components\adb_controller.py", line 122, in execute_command
File "C:\Users\anuthakur\AppData\Local\anaconda3\envs\android_world\Lib\subprocess.py", line 466, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\anuthakur\AppData\Local\anaconda3\envs\android_world\Lib\subprocess.py", line 548, in run
with Popen(*popenargs, **kwargs) as process:
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\anuthakur\AppData\Local\anaconda3\envs\android_world\Lib\subprocess.py", line 1026, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\Users\anuthakur\AppData\Local\anaconda3\envs\android_world\Lib\subprocess.py", line 1538, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
PermissionError: [WinError 5] Access is denied
(android_world) PS C:\Users\anuthakur\Documents\android_world\android_world>

@NingLi670
Copy link
Contributor Author

@anunay1
Can you first run command adb -P 5037 devices in your Windows cmd or PowerShell? The output should be

List of devices attached
emulator-5554   device

If it works whell, you can use where adb to find your adb location. Then add --adb_path=<your-adb-path> when running minimal_task_runner.py and disable _find_adb_directory function, or add your adb path into _find_adb_directory function.

@anunay1
Copy link

anunay1 commented Mar 6, 2025

My bad, messed up with adb path. Thanks its working now.

@Charles-Donne
Copy link

How to solve the "source" part of the source code is a Linux module instead of a windows module, how to modify this part, thank you!
import resource
ModuleNotFoundError: No module named 'resource'

@crawles
Copy link
Collaborator

crawles commented Mar 21, 2025

Can you share more of the error please?

@NingLi670 NingLi670 mentioned this pull request Mar 22, 2025
@NingLi670
Copy link
Contributor Author

@Charles-Donne See PR #247

@Charles-Donne
Copy link

I would like to ask how to set the url and key of the large model in the window environment, thank you

@Charles-Donne
Copy link

I would like to ask how to set the url and key of the large model in the window environment, thank you

It's settled, thank you. But I want to ask why it fails to call the api. Is there any requirement

@Charles-Donne
Copy link

I would like to ask how to set the url and key of the large model in the window environment, thank you

It's settled, thank you. But I want to ask why it fails to call the api. Is there any requirement

Are there any restrictions on which large models can be called?

response = requests.post(
'https://api.gptsapi.net/v1',
headers=headers,
json=payload,
)

Can I use it?

How do you use the large language model api?
File "d:\project\Androidagent\Androidworld\android_world\minimal_task_runner.py", line 112, in _main
response = agent.step(task.goal)
^^^^^^^^^^^^^^^^^^^^^
File "d:\project\Androidagent\Androidworld\android_world\android_world\agents\t3a.py", line 348, in step
raise RuntimeError('Error calling LLM in action selection phase.')
RuntimeError: Error calling LLM in action selection phase.
PS D:\project\Androidagent\Androidworld>

I don't know what the problem is, please help answer, thank you!

gefo10 pushed a commit to gefo10/android_world that referenced this pull request Aug 11, 2025
akashgokul pushed a commit to KKallidromitis/android_world that referenced this pull request Oct 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants