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_filesystem_defaults { 85 name: "android_gsi_defaults", 86 defaults: [ 87 "system_image_defaults", 88 "system_ext_image_defaults", 89 "product_image_defaults", 90 ], 91 symlinks: gsi_symlinks, 92 dirs: ["cache"], 93 deps: [ 94 /////////////////////////////////////////// 95 // gsi_system_ext 96 /////////////////////////////////////////// 97 98 // handheld packages 99 "Launcher3QuickStep", 100 "Provision", 101 "Settings", 102 "StorageManager", 103 "SystemUI", 104 105 // telephony packages 106 "CarrierConfig", 107 108 /////////////////////////////////////////// 109 // gsi_release 110 /////////////////////////////////////////// 111 "gsi_skip_mount.cfg", 112 "init.gsi.rc", 113 "init.vndk-nodef.rc", 114 // Overlay the GSI specific setting for framework and SystemUI 115 "gsi_overlay_framework", 116 "gsi_overlay_systemui", 117 118 /////////////////////////////////////////// 119 // VNDK 120 /////////////////////////////////////////// 121 "com.android.vndk.v30", 122 "com.android.vndk.v31", 123 "com.android.vndk.v32", 124 "com.android.vndk.v33", 125 "com.android.vndk.v34", 126 127 /////////////////////////////////////////// 128 // gsi_product 129 /////////////////////////////////////////// 130 "Browser2", 131 "Camera2", 132 "Dialer", 133 "LatinIME", 134 "apns-full-conf.xml", 135 "frameworks-base-overlays", 136 ], 137 multilib: { 138 lib64: { 139 deps: [ 140 /////////////////////////////////////////// 141 // AVF 142 /////////////////////////////////////////// 143 "com.android.compos", 144 "features_com.android.virt.xml", 145 ], 146 }, 147 both: { 148 // PRODUCT_PACKAGES_SHIPPING_API_LEVEL_34 149 deps: ["android.hidl.memory@1.0-impl"], 150 }, 151 }, 152 type: "ext4", 153} 154 155// system.img for gsi_{arch} targets 156android_system_image { 157 name: "android_gsi", 158 defaults: ["android_gsi_defaults"], 159 enabled: select(soong_config_variable("ANDROID", "PRODUCT_INSTALL_DEBUG_POLICY_TO_SYSTEM_EXT"), { 160 "true": true, 161 default: false, 162 }), 163 deps: [ 164 // Install a copy of the debug policy to the system_ext partition, and allow 165 // init-second-stage to load debug policy from system_ext. 166 // This option is only meant to be set by compliance GSI targets. 167 "system_ext_userdebug_plat_sepolicy.cil", 168 ], 169} 170 171// system.img for aosp_{arch} targets 172android_system_image { 173 name: "aosp_system_image", 174 defaults: ["android_gsi_defaults"], 175 deps: [ 176 // handheld_system_ext 177 "AccessibilityMenu", 178 "WallpaperCropper", 179 180 // telephony_system_ext 181 "EmergencyInfo", 182 183 // handheld_product 184 "Calendar", 185 "Contacts", 186 "DeskClock", 187 "Gallery2", 188 "Music", 189 "preinstalled-packages-platform-handheld-product.xml", 190 "QuickSearchBox", 191 "SettingsIntelligence", 192 "frameworks-base-overlays", 193 194 // telephony_product 195 "ImsServiceEntitlement", 196 "preinstalled-packages-platform-telephony-product.xml", 197 198 // more AOSP packages 199 "initial-package-stopped-states-aosp.xml", 200 "messaging", 201 "PhotoTable", 202 "preinstalled-packages-platform-aosp-product.xml", 203 "ThemePicker", 204 ] + select(product_variable("debuggable"), { 205 true: ["frameworks-base-overlays-debug"], 206 default: [], 207 }), 208 enabled: select(soong_config_variable("gsi", "building_gsi"), { 209 true: true, 210 default: false, 211 }), 212 multilib: { 213 common: { 214 deps: select(release_flag("RELEASE_AVATAR_PICKER_APP"), { 215 true: [ 216 "AvatarPicker", // handheld_system_ext (RELEASE_AVATAR_PICKER_APP) 217 ], 218 default: [], 219 }), 220 }, 221 }, 222} 223