1// Copyright 2020 Google Inc. All rights reserved. 2// 3// Licensed under the Apache License, Version 2.0 (the "License"); 4// you may not use this file except in compliance with the License. 5// You may obtain a copy of the License at 6// 7// http://www.apache.org/licenses/LICENSE-2.0 8// 9// Unless required by applicable law or agreed to in writing, software 10// distributed under the License is distributed on an "AS IS" BASIS, 11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12// See the License for the specific language governing permissions and 13// limitations under the License. 14 15package { 16 // See: http://go/android-license-faq 17 default_applicable_licenses: ["Android-Apache-2.0"], 18} 19 20filegroup { 21 name: "vndk_lib_lists", 22 srcs: [ 23 "*.txt", 24 ], 25} 26 27prebuilt_etc { 28 name: "gsi_skip_mount.cfg", 29 filename: "skip_mount.cfg", 30 src: "gsi_skip_mount.cfg", 31 32 system_ext_specific: true, 33 relative_install_path: "init/config", 34 35 required: ["gsi_skip_mount_compat_symlink"], 36} 37 38// Adds a symlink under /system/etc/init/config pointing to /system/system_ext/etc/init/config 39// because first-stage init in Android 10.0 will read the skip_mount.cfg from /system/etc/* after 40// chroot /system. 41// TODO: remove this symlink when no need to support new GSI on Android 10. 42// The actual file needs to be under /system/system_ext because it's GSI-specific and does not 43// belong to core CSI. 44install_symlink { 45 name: "gsi_skip_mount_compat_symlink", 46 installed_location: "etc/init/config", 47 symlink_target: "/system/system_ext/etc/init/config", 48} 49 50// init.gsi.rc, GSI-specific init script. 51prebuilt_etc { 52 name: "init.gsi.rc", 53 src: "init.gsi.rc", 54 system_ext_specific: true, 55 relative_install_path: "init", 56} 57 58prebuilt_etc { 59 name: "init.vndk-nodef.rc", 60 src: "init.vndk-nodef.rc", 61 system_ext_specific: true, 62 relative_install_path: "gsi", 63} 64 65gsi_symlinks = [ 66 { 67 target: "/system/system_ext", 68 name: "system_ext", 69 }, 70 { 71 target: "/system/product", 72 name: "product", 73 }, 74 { 75 target: "/odm/odm_dlkm/etc", 76 name: "odm_dlkm/etc", 77 }, 78 { 79 target: "/vendor/vendor_dlkm/etc", 80 name: "vendor_dlkm/etc", 81 }, 82] 83 84android_system_image { 85 name: "android_gsi", 86 defaults: ["system_image_defaults"], 87 symlinks: gsi_symlinks, 88 dirs: ["cache"], 89 deps: [ 90 /////////////////////////////////////////// 91 // gsi_system_ext 92 /////////////////////////////////////////// 93 94 // handheld packages 95 "Launcher3QuickStep", 96 "Provision", 97 "Settings", 98 "StorageManager", 99 "SystemUI", 100 101 // telephony packages 102 "CarrierConfig", 103 104 // Install a copy of the debug policy to the system_ext partition, and allow 105 // init-second-stage to load debug policy from system_ext. 106 // This option is only meant to be set by compliance GSI targets. 107 "system_ext_userdebug_plat_sepolicy.cil", 108 109 /////////////////////////////////////////// 110 // base_system_ext 111 /////////////////////////////////////////// 112 "build_flag_system_ext", 113 "fs_config_dirs_system_ext", 114 "fs_config_files_system_ext", 115 "group_system_ext", 116 "passwd_system_ext", 117 "SatelliteClient", 118 "selinux_policy_system_ext", 119 "system_ext_manifest.xml", 120 "system_ext-build.prop", 121 // Base modules when shipping api level is less than or equal to 34 122 "hwservicemanager", 123 "[email protected]", 124 125 /////////////////////////////////////////// 126 // window_extensions_base 127 /////////////////////////////////////////// 128 "androidx.window.extensions", 129 "androidx.window.sidecar", 130 131 /////////////////////////////////////////// 132 // gsi_release 133 /////////////////////////////////////////// 134 "gsi_skip_mount.cfg", 135 "init.gsi.rc", 136 "init.vndk-nodef.rc", 137 // Overlay the GSI specific setting for framework and SystemUI 138 "gsi_overlay_framework", 139 "gsi_overlay_systemui", 140 141 /////////////////////////////////////////// 142 // VNDK 143 /////////////////////////////////////////// 144 "com.android.vndk.v30", 145 "com.android.vndk.v31", 146 "com.android.vndk.v32", 147 "com.android.vndk.v33", 148 "com.android.vndk.v34", 149 150 /////////////////////////////////////////// 151 // AVF 152 /////////////////////////////////////////// 153 "com.android.compos", 154 "features_com.android.virt.xml", 155 156 /////////////////////////////////////////// 157 // gsi_product 158 /////////////////////////////////////////// 159 "Browser2", 160 "Camera2", 161 "Dialer", 162 "LatinIME", 163 "apns-full-conf.xml", 164 165 /////////////////////////////////////////// 166 // media_product 167 /////////////////////////////////////////// 168 "webview", 169 170 /////////////////////////////////////////// 171 // base_product 172 /////////////////////////////////////////// 173 174 // Base modules and settings for the product partition. 175 "build_flag_product", 176 "fs_config_dirs_product", 177 "fs_config_files_product", 178 "group_product", 179 "ModuleMetadata", 180 "passwd_product", 181 "product_compatibility_matrix.xml", 182 "product_manifest.xml", 183 "selinux_policy_product", 184 "product-build.prop", 185 186 // AUDIO 187 "frameworks_sounds", 188 189 /////////////////////////////////////////// 190 // base_system 191 /////////////////////////////////////////// 192 "charger", 193 ] + select(product_variable("debuggable"), { 194 // Packages included only for eng or userdebug builds, previously debug tagged 195 true: ["adb_keys"], 196 default: [], 197 }), 198 multilib: { 199 both: { 200 // PRODUCT_PACKAGES_SHIPPING_API_LEVEL_34 201 deps: ["[email protected]"], 202 }, 203 }, 204 enabled: select(soong_config_variable("ANDROID", "PRODUCT_INSTALL_DEBUG_POLICY_TO_SYSTEM_EXT"), { 205 "true": true, 206 default: false, 207 }), 208 type: "ext4", 209} 210