Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Hình ảnh hệ thống chung (GSI) là hoạt động triển khai Android thuần tuý với Dự án nguồn mở Android chưa sửa đổi (AOSP), có thể chạy được trên nhiều thiết bị Android.
Nhà phát triển ứng dụng có thể cài đặt và chạy GSI mới nhất của Android để kiểm thử ứng dụng trên nhiều thiết bị Android hiện có và sử dụng GSI ở nhiều giai đoạn phát hành hệ điều hành Android, bao gồm cả Bản dùng thử cho nhà phát triển và bản dựng Beta. Việc thêm GSI vào quy trình xác minh và kiểm thử có thể mang lại thêm cho bạn một số lợi ích:
Phạm vi kiểm thử rộng hơn trên nhiều thiết bị thực hơn
Thêm thời gian để khắc phục các vấn đề về khả năng tương thích của ứng dụng
Thêm cơ hội để khắc phục các vấn đề về khả năng tương thích trong Android theo báo cáo của nhà phát triển ứng dụng
Dự án GSI là nguồn mở và giúp cải thiện hệ sinh thái Android bằng cách mang lại thêm nhiều phương thức khác để cải thiện chất lượng của ứng dụng và hệ điều hành trước mỗi bản phát hành Android.
Hình 1: GSI có thể được cài đặt trên nhiều thiết bị và đôi khi dành cho cả những phiên bản Android mà nhà sản xuất thiết bị không cung cấp hình ảnh hệ thống của riêng họ.
GSI bao gồm các chức năng hệ thống cốt lõi giống nhau trên mọi thiết bị cài đặt GSI. Nói cách khác, GSI không bao gồm các mục tuỳ chỉnh của nhà sản xuất thiết bị. Do đó, bạn có thể gặp sự khác biệt về hành vi trong những tình huống sau:
Các hoạt động tương tác liên quan đến giao diện người dùng
Quy trình công việc yêu cầu các tính năng phần cứng mới hơn
Kiểm tra tính tuân thủ của thiết bị
GSI chỉ có thể hoạt động trên những thiết bị có các đặc điểm sau đây:
Trình tải khởi động đã mở khoá.
Hoàn toàn tuân thủ với Treble.
Khởi chạy bằng Android 9 (API cấp 28) trở lên. Các thiết bị được nâng cấp lên Android 9 từ phiên bản cũ có thể hỗ trợ hoặc không hỗ trợ GSI.
Để xác định xem thiết bị của bạn có thể dùng GSI hay không và bạn nên cài đặt phiên bản hệ điều hành GSI nào, hãy làm như sau:
Kiểm tra tính năng hỗ trợ Treble bằng cách chạy lệnh sau:
adb shell getprop ro.treble.enabled
Nếu phản hồi là false, tức là thiết bị của bạn không tương thích với GSI và bạn không nên tiếp tục. Nếu phản hồi là true, hãy chuyển sang bước tiếp theo.
Bạn có thể kiểm khả năng hỗ trợ giữa các phiên bản bằng cách chạy lệnh sau:
adb shell cat /system/etc/ld.config.version_identifier.txt \
| grep -A 20 "\[vendor\]"
Trong dữ liệu đầu ra, hãy tìm namespace.default.isolated trong phần [vendor].
Nếu giá trị của thuộc tính đó là true, thì thiết bị sẽ hỗ trợ đầy đủ Bộ công cụ phát triển gốc dành cho nhà cung cấp (VNDK) và có thể sử dụng bất kỳ phiên bản hệ điều hành (OS) GSI nào mới hơn phiên bản hệ điều hành trên thiết bị. Bất cứ khi nào có thể, hãy dùng phiên bản hệ điều hành GSI mới nhất hiện có.
Nếu giá trị của thuộc tính này là false, tức là thiết bị chưa hoàn toàn tuân thủ VNDK và thiết bị này chỉ có thể sử dụng GSI dành cho phiên bản hệ điều hành của thiết bị. Ví dụ: thiết bị Android 10 (API phiên bản 29) không tuân thủ VNDK chỉ có thể tải hình ảnh GSI của Android 10.
Loại kiến trúc CPU của GSI phải khớp với kiến trúc CPU của thiết bị. Để tìm kiến trúc CPU phù hợp cho hình ảnh GSI, hãy chạy lệnh sau:
adb shell getprop ro.product.cpu.abi
Sử dụng dữ liệu đầu ra để xác định cần sử dụng hình ảnh GSI nào khi cài đặt ROM thiết bị của bạn. Ví dụ: trên Pixel 5, dữ liệu đầu ra sẽ cho biết rằng kiến trúc CPU là arm64-v8a, vì vậy, bạn sẽ sử dụng loại arm64 của GSI.
Tải GSI xuống
Có một số cách để tải GSI, tuỳ thuộc vào nhu cầu phát triển của bạn:
Đối với GSI bản xem trước và GSI của Android có GMS, hãy tải hình ảnh xuống từ trang phát hành GSI.
Đối với hình ảnh GSI dựng sẵn không có ứng dụng GMS, hãy tải hình ảnh xuống từ trang web AOSP CI:
Để xây dựng GSI của Android không có GMS, hãy tải mã nguồn xuống từ AOSP và tạo GSI của bạn.
Cài đặt GSI
Việc cài đặt GSI phụ thuộc vào thiết bị. Hãy tham khảo nhà sản xuất thiết bị của bạn để biết các công cụ và quy trình chính xác. Đối với các thiết bị Google Pixel như Pixel 3 trở lên, có một số cách cài đặt như sau:
Sử dụng Bản cập nhật hệ thống động (DSU) cho các thiết bị đã chạy Android 10 trở lên: xem trang Bản cập nhật hệ thống động
Gửi ý kiến phản hồi
GSI được xây dựng để giúp bạn xác thực các ứng dụng trên Android. Chúng tôi trân trọng cảm ơn ý kiến phản hồi của bạn về hình ảnh, công cụ và quy trình sử dụng GSI trên các thiết bị của bạn.
Nội dung và mã mẫu trên trang này phải tuân thủ các giấy phép như mô tả trong phần Giấy phép nội dung. Java và OpenJDK là nhãn hiệu hoặc nhãn hiệu đã đăng ký của Oracle và/hoặc đơn vị liên kết của Oracle.
Cập nhật lần gần đây nhất: 2025-08-25 UTC.
[[["Dễ hiểu","easyToUnderstand","thumb-up"],["Giúp tôi giải quyết được vấn đề","solvedMyProblem","thumb-up"],["Khác","otherUp","thumb-up"]],[["Thiếu thông tin tôi cần","missingTheInformationINeed","thumb-down"],["Quá phức tạp/quá nhiều bước","tooComplicatedTooManySteps","thumb-down"],["Đã lỗi thời","outOfDate","thumb-down"],["Vấn đề về bản dịch","translationIssue","thumb-down"],["Vấn đề về mẫu/mã","samplesCodeIssue","thumb-down"],["Khác","otherDown","thumb-down"]],["Cập nhật lần gần đây nhất: 2025-08-25 UTC."],[],[],null,["# Generic System Images (GSIs)\n\nA Generic System Image ([GSI](https://source.android.com/setup/build/gsi)) is a\n*pure Android* implementation with unmodified Android Open Source Project (AOSP)\ncode, runnable on a variety of Android devices.\n\nApp developers can install and run the latest Android GSIs to perform app\ntesting on a variety of existing Android devices and using GSIs from different\nAndroid OS release stages, including Developer Preview and Beta builds. Adding\nGSIs to your verification and testing processes can provide you with some extra\nbenefits:\n\n- Broader test coverage on a greater set of real devices\n- More time to fix app compatibility issues\n- More opportunities to fix compatibility issues in Android that are reported by app developers\n\nThe GSI project is [open\nsource](https://android.googlesource.com/platform/manifest/+/refs/heads/pie-gsi#)\nand helps improve the Android ecosystem by providing more ways to improve app\nand OS quality before each release of Android.\n**Figure 1**: GSIs can be installed across a broad range of devices, and sometimes even for versions of Android that a device manufacturer doesn't provide their own system image for.\n\nGSIs include the same core system functionalities for all devices that they're\ninstalled on. In other words, a GSI does not include device manufacturer's\ncustomizations. Because of this, you might encounter behavioral differences in\nthe following situations:\n\n- Interactions that involve the UI\n- Workflows that request newer hardware features\n\nCheck device compliance\n-----------------------\n\nGSIs can only function on devices with the following characteristics:\n\n- Bootloader is unlocked.\n- Fully Treble-compliant.\n- Launched with Android 9 (API level 28) or higher. Devices upgraded to Android 9 from an earlier version might or might not support GSIs.\n\n| **Warning:** Attempting to flash a GSI to a non-compliant device could result in your device becoming non-bootable. Always confirm that your device is compliant before flashing, and follow the installation steps provided by your device's manufacturer. GSIs don't support rollback, so you will need a recovery method and original system ROM to revert to the original system.\n\nTo determine whether your device can use a GSI and which GSI OS version you\nshould install, do the following:\n\n1. Check for Treble support by running the following command:\n\n ```\n adb shell getprop ro.treble.enabled\n ```\n\n If the response is `false`, the device isn't compatible with GSIs and you\n shouldn't continue. If the response is `true`, continue to the next step.\n2. Check for cross-version support by running the following command:\n\n ```\n adb shell cat /system/etc/ld.config.version_identifier.txt \\\n | grep -A 20 \"\\[vendor\\]\"\n ```\n | **Note:** Depending on your platform, the configuration file in the preceding command may or may not have a version identifier in it.\n\n In the output, look in the `[vendor]` section for\n `namespace.default.isolated`.\n\n If the value for that attribute is `true`, then the device fully supports\n [Vendor Native Development Kit\n (VNDK)](https://source.android.com/devices/architecture/vndk) and can use\n any GSI operating system (OS) version that is newer than the on-device OS\n version. Whenever possible, use the latest GSI OS version that is available.\n\n If the value for the attribute is `false`, then the device isn't fully\n VNDK-compliant, and the device can use only a GSI for the same on-device OS\n version. For example, an Android 10 (API version 29) device that isn't\n VNDK-compliant can load only an Android 10 GSI image.\n3. The GSI CPU architecture type must match the device's CPU architecture. To\n find the right CPU architecture for the GSI image, run the following\n command:\n\n ```\n adb shell getprop ro.product.cpu.abi\n ```\n\n Use the output to determine which GSI image to use when flashing your\n device. For example, on a Pixel 5, the output would indicate that the CPU\n architecture is `arm64-v8a`, so you would use the `arm64` type of GSI.\n\nDownload GSIs\n-------------\n\nThere are a few ways to get GSIs, depending on your development needs:\n\n- For Android Preview GSIs and Android GSIs with GMS, download the images from the [GSI release page](/topic/generic-system-image/releases).\n- For pre-built GSI images without GMS applications, download the images from\n the AOSP CI site:\n\n - [Android 10 (API level\n 29)](https://ci.android.com/builds/branches/aosp-android10-gsi/grid?)\n - [Android 11 (API level\n 30)](https://ci.android.com/builds/branches/aosp-android11-gsi/grid?)\n - [Android 12 (API level\n 31)](https://ci.android.com/builds/branches/aosp-android12-gsi/grid?)\n - [Android 13 (API level\n 33)](https://ci.android.com/builds/branches/aosp-android13-gsi/grid?)\n- To build Android GSIs without GMS, download source code from\n [AOSP](https://source.android.com/setup/build/gsi#building-gsis) and build\n your GSIs.\n\n| **Important:** Device manufacturers shouldn't use these versions of GSIs to run and submit compliance tests. Instead, device manufacturers should continue to refer to their existing communication channels, such as their Technical Account Managers for compliance-test-related activities.\n\nInstall a GSI\n-------------\n\n| **Note:** If your device has adopted [Android Verified\n| Boot](https://source.android.com/security/verifiedboot/avb) (AVB), download and flash the following image to disable AVB before flashing a GSI: [vbmeta.img](https://dl.google.com/developers/android/qt/images/gsi/vbmeta.img)\n\nInstalling a GSI is device-dependent. Refer to your device's manufacturer for\nthe exact tools and procedures. For Google Pixel devices such as the Pixel 3 and\nnewer, there are several ways to install:\n\n- Manually flashing GSI images: see [Requirements for flashing GSIs](https://source.android.com/setup/build/gsi#flashing-gsis)\n- Using Dynamic System Update (DSU) for devices that already run Android 10 or higher: see the [Dynamic System Updates](/topic/dsu) page\n\nGive feedback\n-------------\n\nGSIs are intended to help you validate your apps on Android. We appreciate your\nfeedback on the images, the tools, and the process for using GSIs on your\ndevices.\n\nTo notify us of bugs or feature requests, use the [dedicated issue tracker\ncomponent](https://issuetracker.google.com/issues/new?component=470386&template=1147338)\nfor GSIs.\n\nAdditional resources\n--------------------\n\n- [Understand the impact of Generic System Images (GSI) (Android Dev Summit\n '18)](https://www.youtube.com/watch?v=Y-HmCIHD63w)"]]