# AppSim-Bench: Bridging Real-world Apps and Reproducible Evaluation for Mobile GUI Agents
中文 | English
## Contents - [Project Overview](#project-overview) - [Environment Setup](#environment-setup) - [AVD Emulator](#avd-emulator) - [Windows & MacOS](#windows--macos) - [Linux Server](#linux-server) - [Evaluation Setup](#evaluation-setup) - [Preparation](#preparation) - [Install App APKs](#install-app-apks) - [Usage](#usage) - [1. Basic Usage](#1-basic-usage) - [2. Parameters](#2-parameters) - [3. Batch Evaluation Scripts](#3-batch-evaluation-scripts) - [4. Notes](#4-notes) - [5. Extending Agent Types](#5-extending-agent-types) - [FAQ](#faq) - [Citation](#citation) --- ## Project Overview AppSim is an automated evaluation framework for GUI agents on mobile apps. ## Environment Setup ### AVD Emulator #### Windows & MacOS TODO: install through Android Studio. #### Linux Server ##### Install JDK ```bash wget https://download.java.net/java/GA/jdk17.0.2/dfd4a8d0985749f896bed50d7138ee7f/8/GPL/openjdk-17.0.2_linux-x64_bin.tar.gz ./ tar -zxvf openjdk-17.0.2_linux-x64_bin.tar.gz -C /opt export JAVA_HOME="/opt/jdk-17.0.2" export PATH="$PATH:$JAVA_HOME/bin" export CLASSPATH=$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar ``` ##### Install SDKManager ```bash wget https://dl.google.com/android/repository/commandlinetools-linux-8092744_latest.zip unzip commandlinetools-linux-8092744_latest.zip -d /opt/ export PATH="$PATH:/opt/cmdline-tools/bin" ``` ##### Configure Environment Variables ```bash export ANDROID_SDK_ROOT=/opt/android-sdk sdkmanager --sdk_root=$ANDROID_SDK_ROOT --install "platform-tools" "emulator" "build-tools;33.0.0" "platforms;android-33" "system-images;android-33;default;x86_64" export PATH="$PATH:$ANDROID_SDK_ROOT/emulator:$ANDROID_SDK_ROOT/platform-tools" ``` ##### Create Emulator ```bash avdmanager --verbose create avd --force --name "testavd" --package "system-images;android-33;default;x86_64" ``` ##### Start Emulator ```bash emulator @testavd -no-boot-anim -netdelay none -accel on -no-snapshot -wipe-data -no-window -port 5554 ``` If `ANDROID_SDK_ROOT` is checked in the wrong location, update `image.sysdir.1` in `~/.android/avd/testavd.avd/config.ini` to an absolute path or a path relative to `$ANDROID_SDK_ROOT`. ##### View the Emulator Screen with scrcpy (optional) If you want to view the AVD screen from a local machine, use `scrcpy`. 1. Remote machine setup ```bash adb tcpip 5555 ufw allow 5555/tcp ``` 2. Local machine connection ```bash adb connect server_ip:5555 scrcpy ``` ## Evaluation Setup ### Preparation #### Install App APKs Before running evaluations, install the 17 AppSim APKs on the test phone or emulator. You can also fork the source repos below and build the APKs yourself for evaluation. | Chinese Name | English Name | GitHub Repo | |---|---|---| | 哔哩哔哩 | BiliBili | https://github.com/Acrab-Agentic-Labs/AppSim-BiliBili | | 饿了么 | Eleme | https://github.com/Acrab-Agentic-Labs/AppSim-Eleme | | 高德地图 | Amap | https://github.com/Acrab-Agentic-Labs/AppSim-Amap | | 京东 | JD | https://github.com/Acrab-Agentic-Labs/AppSim-JD | | 腾讯会议 | Tencent Meeting | https://github.com/Acrab-Agentic-Labs/AppSim-TencentMeeting | | 网易云音乐 | NetEase Cloud Music | https://github.com/Acrab-Agentic-Labs/AppSim-NetEaseCloudMusic | | 微信 | WeChat | https://github.com/Acrab-Agentic-Labs/AppSim-Wechat-V2 | | 小红书 | RedNote | https://github.com/Acrab-Agentic-Labs/AppSim-RedNote | | 携程 | Ctrip | https://github.com/Acrab-Agentic-Labs/AppSim-Ctrip | | | Amazon | https://github.com/Acrab-Agentic-Labs/AppSim-Amazon | | | Booking | https://github.com/Acrab-Agentic-Labs/AppSim-Booking | | | Instagram | https://github.com/Acrab-Agentic-Labs/AppSim-Instagram | | | Spotify | https://github.com/Acrab-Agentic-Labs/GUIAgent-Spotify | | | Uber Eats | https://github.com/Acrab-Agentic-Labs/AppSim-UberEats | | | WhatsApp | https://github.com/Acrab-Agentic-Labs/AppSim-WhatsApp | | | YouTube | https://github.com/Acrab-Agentic-Labs/AppSim-Youtube | | | Zoom | https://github.com/Acrab-Agentic-Labs/AppSim-Zoom | ```bash uv venv --python=3.11 pip install -r requirements.txt pip install -e . ``` ### Usage #### 1. Basic Usage Single app evaluation: ```bash python scripts/eval_appsim.py \ --agent-name AgentCPM-GUI \ --task BILIBILI \ --device-id emulator-5554 \ --output-dir results/AgentCPM-GUI/ ``` #### 2. Parameters ##### Command-line arguments - `--agent-name`: Agent name. Examples: - `GPT-5` - `AgentCPM-GUI` See [`scripts/agent_factory/agent_factory.py`](scripts/agent_factory/agent_factory.py) for the complete list. - `--task`: App task to evaluate. Available values: - `BILIBILI` - BiliBili - `CTRIP` - Ctrip - `ELEME` - Eleme - `GAODE` - Amap - `MYJD` - JD - `MUSIC` - NetEase Cloud Music - `RED_NOTE` - RedNote - `TENCENT_MEETING` - Tencent Meeting - `UBEREATS` - Uber Eats - `WECHAT` - WeChat - `YOUTUBE` - YouTube - `AMAZON` - Amazon - `WHATSAPP` - WhatsApp - `BOOKING` - Booking.com - `ZOOM` - Zoom - `SPOTIFY` - Spotify - `INSTAGRAM` - Instagram - `--device-id`: Device ID (adb address), for example: - `emulator-5554` - emulator - `122.228.230.212:10246` - remote device - `--output-dir`: Output directory (default: `./output/`) - `--start-index`: Start task index (default: `0`) - `--end-index`: End task index (default: `None`). When not `None`, the script follows Python slicing semantics for `task_items[start_index:end_index]`. - `--verbose`: Show detailed log output (equivalent to `logging.DEBUG`) ##### Environment variables When running `scripts/eval_appsim.py` directly, you can configure the OpenAI-compatible API with common environment variables: ```bash export API_BASE='https://your-api-endpoint.com/api/v3' export API_KEY='your-api-key-here' export MODEL_NAME='your-model-name' ``` For tasks with `evaluation_type="answer"` or `evaluation_type="hybrid"`, the evaluation script also calls an answer extractor to structure the agent's `final_message` into `result["extracted_answer"]`. By default, the extractor reuses `API_BASE`, `API_KEY`, and `MODEL_NAME` above. If you want the extractor to use a separate model, configure it explicitly: ```bash export ANSWER_EXTRACTOR_API_BASE='https://your-extractor-endpoint.com/api/v3' export ANSWER_EXTRACTOR_API_KEY='your-extractor-api-key' export ANSWER_EXTRACTOR_MODEL_NAME='your-extractor-model-name' ``` New `answer` and `hybrid` tasks prefer `result["extracted_answer"]` for validation, instead of relying on the legacy `final_message` text format constraint such as `