You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Android 14下如何构建支持多屏与Concurrent multi-user的AAOS模拟器镜像

构建支持多屏与多用户的Android 14 AAOS模拟器镜像

环境准备

  • 同步Android 14(U版本)的AAOS完整源码,确保构建环境变量(如ANDROID_BUILD_TOP)配置正常

多屏与多用户核心配置调整

  • 修改设备清单文件device/manifest.xml,添加额外显示屏声明示例:
    <display
        android:name="cluster"
        android:physicalId="1"
        android:logicalId="1"
        android:orientation="landscape"
        android:width="720"
        android:height="1280" />
    <display
        android:name="passenger"
        android:physicalId="2"
        android:logicalId="2"
        android:orientation="landscape"
        android:width="1920"
        android:height="1080" />
    
  • 编辑frameworks/base/core/res/res/values/config.xml,启用并发多用户支持:
    <bool name="config_enableConcurrentMultiUser">true</bool>
    <integer name="config_maxConcurrentUsers">3</integer> <!-- 可按需调整最大并发用户数 -->
    

模拟器AVD配置修改

  • 找到目标AVD的config.ini文件(通常路径为~/.android/avd/[AVD_NAME].avd/),添加多屏参数:
    hw.display.count=3
    hw.display.width=1920
    hw.display.height=1080
    hw.display.1.width=720
    hw.display.1.height=1280
    hw.display.1.density=320
    hw.display.2.width=1920
    hw.display.2.height=1080
    hw.display.2.density=240
    hw.multiscreen=yes
    

编译与功能验证

  • 执行编译命令:
    source build/envsetup.sh
    lunch aosp_car_x86_64-userdebug
    make -j$(nproc)
    
  • 启动模拟器后验证:
    • 执行adb shell dumpsys display,确认输出包含多个显示屏的识别信息
    • 执行adb shell am start-user --user-id 1创建新用户,验证多用户并发切换功能正常

注:Android 14 AAOS对多屏、多用户的配置逻辑相比Android R有更新,旧版本的配置项(如多用户开关)已调整,这是此前方法失效的核心原因。

内容的提问来源于stack exchange,提问作者93537231

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.04 01:43:33