2025년 3월 27일부터 AOSP를 빌드하고 기여하려면 aosp-main
대신 android-latest-release
를 사용하는 것이 좋습니다. 자세한 내용은 AOSP 변경사항을 참고하세요.
Android Emulator 가상 기기 사용
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
Android Emulator를 사용하여 나만의 맞춤 Android 시스템 이미지를 실행하는 Android 기기의 에뮬레이션을 만들 수 있습니다. 또한 Android Emulator 에뮬레이션에 다중 디스플레이 지원을 추가할 수 있습니다.
Android Emulator 아키텍처
Android Emulator는 Android Virtual Device (AVD)라는 가상 머신에서 Android 운영체제를 실행합니다. 각 AVD는 전체 Android 소프트웨어 스택을 포함하며 마치 실제 기기에 있는 것처럼 실행됩니다. 그림 1은 Android Emulator의 상위 수준 아키텍처를 보여줍니다. 에뮬레이터에 관한 자세한 내용은 Android Emulator에서 앱 실행을 참조하세요.
그림 1. Android Emulator 아키텍처
AVD 이미지 빌드
각 AVD에는 해당 AVD에서 실행되는 Android 시스템 이미지가 있습니다. AVD Manager에는 일부 시스템 이미지가 포함되어 있습니다. 소스 코드에서 맞춤 AVD 시스템 이미지를 만들고 기기 에뮬레이션을 생성하여 실행할 수 있습니다.
AVD 시스템 이미지를 빌드하고 실행하려면 다음을 수행하세요.
Android 소스 다운로드:
mkdir aosp-android-latest-release; cd aosp-android-latest-release
repo init -u
repo sync -j24
다른 Android 버전을 빌드하려면 공개 Android 저장소에서 브랜치 이름을 찾아 보세요.
Android 코드명, 태그 및 빌드 번호에 매핑됩니다.
AVD 시스템 이미지를 빌드합니다. 이는 Android 기기 시스템 이미지를 빌드하는 과정과 동일합니다. 예를 들어 x86 64비트 AVD를 빌드하려면 다음을 실행합니다.
source ./build/envsetup.sh
lunch sdk_phone_x86_64
make -j32
Android Emulator에서 AVD 시스템 이미지를 실행합니다.
emulator
에뮬레이터 실행에 관한 자세한 내용은 명령줄 시작 옵션을 참고하세요. 그림 2는 AVD를 실행하는 Android Emulator의 예를 보여줍니다.
그림 2. AVD를 실행하는 Android Emulator
Android 스튜디오에서 다른 사용자가 사용할 수 있도록 AVD 시스템 이미지 공유
AVD 시스템 이미지를 다른 사용자와 공유하려면 다음 안내를 따르세요. Android 스튜디오에서 AVD 시스템 이미지를 사용하여 앱을 개발하고 테스트할 수 있습니다.
추가 sdk
및 sdk_repo
패키지를 생성합니다.
Android 13 이상의 경우 emu_img_zip
명령어를 사용합니다.
$ make emu_img_zip
이렇게 하면 sdk-repo-linux-system-images-eng.[username]].zip
파일이 생성됩니다.
Android 12 이하의 경우 sdk_repo
명령어를 사용합니다.
$ make -j32 sdk sdk_repo
make sdk sdk_repo
명령어는 aosp-android-latest-release/out/host/linux-x86/sdk/sdk_phone_x86
아래에 파일 두 개를 만듭니다.
sdk-repo-linux-system-images-eng.[username].zip
repo-sys-img.xml
사용자가 액세스할 수 있는 위치에서 sdk-repo-linux-system-images-eng.[username].zip
파일을 호스팅하고 AVD 시스템 이미지 URL로 사용할 URL을 가져옵니다.
Android 12 이하의 경우 적절하게 repo-sys-img.xml
을 수정합니다.
<sdk:url>
을 AVD 시스템 이미지 URL로 업데이트합니다.
- 파일의 다른 업데이트에 관해 알아보려면 sdk-sys-img-03.xsd를 참고하세요.
- 사용자가 액세스할 수 있는 위치에서
repo-sys-img.xml
을 호스팅하고 맞춤 업데이트 사이트 URL로 사용할 URL을 가져옵니다.
맞춤 AVD 이미지를 사용하려면 SDK Manager에서 다음을 실행합니다.
맞춤 업데이트 사이트 URL을 SDK 업데이트 사이트로 추가합니다.
이렇게 하면 맞춤 AVD 시스템 이미지가 시스템 이미지 페이지에 추가됩니다.
맞춤 AVD 시스템 이미지를 다운로드하고 선택하여 AVD를 생성합니다.
다중 디스플레이 지원 추가
Android 10은 자동 및 데스크톱 모드와 같은 더 많은 사용 사례를 더 효과적으로 지원하기 위해 다중 디스플레이를 개선합니다. Android Emulator는 다중 디스플레이 에뮬레이션도 지원합니다. 따라서 실제 하드웨어를 설정하지 않고도 특정 다중 디스플레이 환경을 만들 수 있습니다.
다음과 같이 변경하거나 이 CL에서 선별하여 AVD에 다중 디스플레이 지원을 추가할 수 있습니다.
다음 소스에서 최신 에뮬레이터 기능 및 출시 정보를 찾을 수 있습니다.
이 페이지에 나와 있는 콘텐츠와 코드 샘플에는 콘텐츠 라이선스에서 설명하는 라이선스가 적용됩니다. 자바 및 OpenJDK는 Oracle 및 Oracle 계열사의 상표 또는 등록 상표입니다.
최종 업데이트: 2025-07-27(UTC)
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["필요한 정보가 없음","missingTheInformationINeed","thumb-down"],["너무 복잡함/단계 수가 너무 많음","tooComplicatedTooManySteps","thumb-down"],["오래됨","outOfDate","thumb-down"],["번역 문제","translationIssue","thumb-down"],["샘플/코드 문제","samplesCodeIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-07-27(UTC)"],[],[],null,["# Use Android Emulator virtual devices\n\nYou can use Android Emulator to create emulations of Android devices\nthat run your own custom Android system images. In\naddition, you can add multi-display support to Android Emulator\nemulations.\n\nAndroid Emulator architecture\n-----------------------------\n\nAndroid Emulator runs the Android operating\nsystem in a virtual machine called an Android Virtual Device (AVD). Each AVD\ncontains the full\n[Android software stack](/docs/core/architecture), and it runs as if it\nwere on a physical device. Figure 1 illustrates Android Emulator's\nhigh-level architecture. For more information about the emulator, see\n[Run apps on the Android Emulator](https://developer.android.com/studio/run/emulator).\n\n**Figure 1.** Android Emulator architecture.\n\nBuild AVD images\n----------------\n\nEach AVD includes an Android system image, which runs in\nthat AVD. The AVD Manager includes some system images. And you can build custom\nAVD system images from your source code and create device emulations to run\nthem.\n| **Note:** You need to [establish a build environment](/docs/setup/start/initializing) before building AVD system images.\n\nTo build and run an AVD system image:\n\n1. Download the Android source:\n\n mkdir aosp-android-latest-release; cd aosp-android-latest-release\n repo init -u\n repo sync -j24\n\nIf you want to build other Android versions, you can find their branch names in\nthe [public Android repository](https://android.googlesource.com/platform/manifest/+refs).\nThey map to\n[Android Codenames, Tags, and Build Numbers](/docs/setup/reference/build-numbers#source-code-tags-and-builds).\n\n1. Build an AVD system image. This is the same process as [building an\n Android](/docs/setup/build/building) device system\n image. For example, to build a x86 64-bit AVD:\n\n source ./build/envsetup.sh\n lunch sdk_phone_x86_64\n make -j32\n\n2. Run the AVD system image in the Android Emulator:\n\n emulator\n\nSee\n[Command-line startup options](https://developer.android.com/studio/run/emulator-commandline#startup-options)\nfor more details about running the emulator. Figure 2 shows an example of the\nAndroid Emulator running an AVD:\n\n**Figure 2.** Android Emulator running an AVD.\n\nShare AVD system images for others to use with Android Studio\n-------------------------------------------------------------\n\nFollow these instructions to share your AVD system images with others. They can\nuse your AVD system images with [Android\nStudio](https://developer.android.com/studio) to develop and test apps.\n\n1. Make additional `sdk` and `sdk_repo` packages:\n\n For Android 13 and higher, use the `emu_img_zip`\n command: \n\n $ make emu_img_zip\n\n This generates an `sdk-repo-linux-system-images-eng.[username]].zip` file.\n\n For Android 12 and lower, use the `sdk_repo`\n command: \n\n $ make -j32 sdk sdk_repo\n\n The `make sdk sdk_repo` command creates two files under\n `aosp-android-latest-release/out/host/linux-x86/sdk/sdk_phone_x86`:\n - `sdk-repo-linux-system-images-eng.[username].zip`\n - `repo-sys-img.xml`\n2. Host the file `sdk-repo-linux-system-images-eng.[username].zip`\n somewhere accessible to your users, and get its URL to use as the **AVD\n System Image URL**.\n\n3. For Android 12 and lower, edit `repo-sys-img.xml` accordingly:\n\n - Update `\u003csdk:url\u003e` to your **AVD System Image URL**.\n - See [sdk-sys-img-03.xsd](https://android.googlesource.com/platform/prebuilts/devtools/+/refs/heads/android16-release/repository/sdk-sys-img-03.xsd) to learn about other updates to the file.\n - Host `repo-sys-img.xml` somewhere accessible to your users, and get its URL to use as the **Custom Update Site URL**.\n\nTo use a custom AVD image, do the following in the SDK Manager:\n\n1. Add the **Custom Update Site URL** as an\n [SDK Update Site](https://developer.android.com/studio/intro/update#adding-sites).\n\n This adds your custom AVD system image to the System Images page.\n2. [Create an AVD](https://developer.android.com/studio/run/managing-avds#createavd)\n by downloading and selecting the custom AVD system image.\n\nAdd multi-display support\n-------------------------\n\nAndroid 10\n[enhances multi-display](/docs/core/display/multi_display)\nto better support more use cases, such as auto and desktop mode. Android\nEmulator also supports multi-display emulation. So you can create a specific\nmulti-display environment without setting up the real hardware.\n\nYou can add multi-display support to an AVD by making the following changes, or\nby cherry picking from\n[these CLs](https://android-review.googlesource.com/q/topic:%22AVD+Multi-display%22+(status:open%20OR%20status:merged)).\n\n- Add the multi-display provider to the build by adding these lines to file\n `build/target/product/sdk_phone_x86.mk`:\n\n PRODUCT_ARTIFACT_PATH_REQUIREMENT_WHITELIST := \\\n system/lib/libemulator_multidisplay_jni.so \\\n system/lib64/libemulator_multidisplay_jni.so \\\n system/priv-app/MultiDisplayProvider/MultiDisplayProvider.apk \\\n PRODUCT_PACKAGES += MultiDisplayProvider\n\n- Enable the Multi-Display feature flag by adding this line to file\n `device/generic/goldfish/data/etc/advancedFeatures.ini`:\n\n MultiDisplay = on\n\nYou can find the latest emulator features and release information from\nthe following sources:\n\n- [Run apps on Android Emulator](https://developer.android.com/studio/run/emulator)\n- [Android Emulator release notes](https://developer.android.com/studio/releases/emulator)"]]