diff options
Diffstat (limited to 'en/setup/build/gsi.html')
-rw-r--r-- | en/setup/build/gsi.html | 99 |
1 files changed, 48 insertions, 51 deletions
diff --git a/en/setup/build/gsi.html b/en/setup/build/gsi.html index a80be991..c7e32c3a 100644 --- a/en/setup/build/gsi.html +++ b/en/setup/build/gsi.html @@ -26,26 +26,38 @@ A generic system image (GSI) is a system image with adjusted configurations for Android devices. It is considered a "pure Android" implementation with unmodified Android Open Source Project (AOSP) code that any Android device - should be able to run successfully. + running Android 8.1 or higher can run successfully. </p> <p> - The content in a GSI does not depend on the vendor image. To verify GSI - independence, the system image of an Android device is replaced with a GSI - then tested thoroughly with the <a href="/compatibility/vts/">Vendor Test + GSI compliance is part of the <a href="/compatibility/overview">Android + Compatibility program</a>. The system image of an Android device is replaced + with a GSI then tested with the <a href="/compatibility/vts/">Vendor Test Suite (VTS)</a> and the <a href="/compatibility/cts/">Compatibility Test Suite - (CTS)</a>. Similarly, you can use a GSI in place of your own system image - to verify your Android device implements vendor interfaces correctly. + (CTS)</a> to ensure the device implements vendor inferfaces correctly with the + latest version of Android. </p> -<h2 id="gsi-configuration-and-variances">GSI configuration and variances</h2> +<aside class="note"><strong>Note:</strong> + This article describes GSI topics for Android OEM and ROM developers; Android + application developers should refer to + <a href="https://developer.android.com/topic/generic-system-image/">developer.android.com</a> + for developer-focused GSI details. +</aside> <p> - The goal of a GSI is to offer a specific, universal configuration for all - Android devices while allowing for variances between different vendor devices. - The current GSI is based on Android {{ androidPVersionNumber }}. + To get started with GSIs, review the following sections for details on + <a href="#gsi-configuration-and-variances">GSI configurations</a> (and allowed + variances), <a href="#gsi-types">types</a> (Android GSI and Legacy GSI), and + <a href="#vendor-binaries-and-vndk-dependencies">vendor binaries and VNDK + dependencies</a>. When you are ready to use a GSI, + <a href="#building-gsis">download and build the GSI</a> for your device + target then <a href="#flashing-gsis">flash the GSI</a> to an Android + device. </p> +<h2 id="gsi-configuration-and-variances">GSI configuration and variances</h2> + <p> The current GSI has the following configuration: </p> @@ -88,8 +100,9 @@ <h2 id="gsi-types">GSI types</h2> <p> - The GSI type is determined by the Android version the device launches with. - Android {{ androidPVersionNumber }} supports the following GSIs: + The GSI used for compliance testing is determined by the Android version the + device launches with. Android {{ androidPVersionNumber }} supports the + following GSIs: </p> <table> @@ -110,29 +123,16 @@ </tr> </table> -<aside class="note"> - <strong>Note:</strong> To determine the appropriate GSI for a device, connect - the device to a workstation and run - <code>adb shell getprop ro.product.first_api_level</code>. If the API level is 28, - use the Android GSI; if the API level is 27, use the Legacy GSI. If there is no - system property then it may not be supported. -</aside> - <p> - All GSIs are built from the Android {{ androidPVersionNumber }} codebase. As - Legacy GSI support depends on the vendor interface implementation of the - device, not all devices launching with Android 8.0 or Android 8.1 can use the - Legacy GSI. For details, see - <a href="#vendor-binaries-and-vndk-dependencies">Vendor binaries and VNDK - dependencies</a>. + All GSIs are built from the Android {{ androidPVersionNumber }} codebase. </p> <h3 id="changes-in-p-gsis">Android {{ androidPVersionNumber }} GSI changes</h3> <p> Devices launching with Android {{ androidPVersionNumber }} must use Android - {{ androidPVersionNumber }} GSIs, which include the following major changes - from earlier GSIs: + {{ androidPVersionNumber }} GSIs for compliance testing, which includes the + following major changes from earlier GSIs: </p> <ul> @@ -168,8 +168,8 @@ changes</h3> <p> Devices upgrading to Android {{ androidPVersionNumber }} can use Legacy GSI product named with suffix <code>_ab</code> or <code>_a</code> (e.g. - <code>aosp_arm64_ab</code>, <code>aosp_x86_a</code> ). This GSI supports the - following upgrade use cases: + <code>aosp_arm64_ab</code>, <code>aosp_x86_a</code>) for compliance testing. + This GSI supports the following upgrade use cases: </p> <ul> @@ -244,10 +244,10 @@ dependencies</h2> <table> <tr> <th>Use case</th> - <th>Vendor binaries version</th> + <th>Vendor<br>binaries<br>version</th> <th><code>BOARD_VNDK_VERSION</code></th> <th><code>BOARD_VNDK_RUNTIME_DISABLE</code></th> - <th>Legacy GSI system binaries version</th> + <th>Legacy GSI<br>system binaries version</th> <th>Legacy GSI support</th> </tr> <tr> @@ -315,12 +315,8 @@ dependencies</h2> <code>BOARD_VNDK_RUNTIME_DISABLE</code> (i.e. runtime enforcement WAS disabled). These devices are not supported because their vendor binaries depend on Android 8.1 non-VNDK shared libraries, which are not included in - Legacy GSIs. -</p> - -<p> - To make these devices compatible with the Legacy GSI, vendors must do one of - the following: + Legacy GSIs. To make these devices compatible with the Legacy GSI, vendors + must do one of the following: </p> <ul> @@ -339,7 +335,7 @@ dependencies</h2> <code>pie-gsi</code> is the GSI branch on Android {{ androidPVersionNumber }}). GSI branches include the content of Android with all <a href="/security/bulletin/">security patches</a> and - <a href="#contributing-to-a-gsi">GSI patches</a> applied. + <a href="#contributing-to-gsis">GSI patches</a> applied. </p> <p> @@ -356,8 +352,9 @@ dependencies</h2> <p> <p> - Example: The following commands build the Legacy GSI build target - <code>aosp_arm64_ab-userdebug</code> on GSI branch <code>pie-gsi</code>: + For example, to build the Legacy GSI build target + <code>aosp_arm64_ab-userdebug</code> on GSI branch <code>pie-gsi</code>, run + the following commands: </p> <pre class="prettyprint"> @@ -522,16 +519,17 @@ GSI build targets</h3> <em>** Could be added by request</em> <aside class="aside"> - <strong>Note: </strong>These build targets will likely be removed in a + <strong>Note:</strong> These build targets will likely be removed in a future version of Android. </aside> -<h2 id="flashing-gsis">Flashing GSIs</h2> +<h2 id="flashing-gsis">Flashing GSIs Requirements</h2> <p> Android devices can have different designs, so no single command or set of - instructions for flashing a GSI to a specific device is possible. Use the - following general steps as guidelines: + instructions for flashing a GSI to a specific device is possible. You can + check with the manufacturer of the Android device for explicit flashing + instructions or use the following general steps as guidelines: </p> <ol> @@ -543,10 +541,9 @@ GSI build targets</h3> <li>A method for disabling verify boot (e.g. <a href="/security/verifiedboot/">vboot 1.0</a>, <a href="/security/verifiedboot/avb">AVB</a>, etc.).</li> - <li>Unlock the device to make it flashable via <code>fastboot</code>.</li> - <aside class="note"> - <strong>Note:</strong> Ensure you have the latest version of - <code>fastboot</code> by building it from Android source tree.</aside> + <li>Unlock the device to make it flashable via <code>fastboot</code>. (To + ensure you have the latest version of <code>fastboot</code>, build it + from Android source tree.)</li> </ul> </li> <li>Disable verify boot.</li> @@ -558,7 +555,7 @@ GSI build targets</h3> </ol> <p> - For example, to flash a GSI to a Pixel 2 device: + For example, to flash a GSI to any Pixel device: </p> <ol> @@ -570,7 +567,7 @@ GSI build targets</h3> <pre class="prettyprint">$ fastboot flash vbmeta vbmeta.img</pre></li> <li>Erase and flash the GSI to system partition: <pre class="prettyprint"> -$ fastboot erase system +$ fastboot erase system $ fastboot flash system system.img </pre></li> <li>Wipe userdata and clear other necessary partitions: |