diff --git a/target/product/generic/Android.bp b/target/product/generic/Android.bp index a4a20b49f4..09c92bd823 100644 --- a/target/product/generic/Android.bp +++ b/target/product/generic/Android.bp @@ -346,6 +346,77 @@ phony { ], } +android_filesystem_defaults { + name: "system_ext_image_defaults", + deps: [ + /////////////////////////////////////////// + // base_system_ext + /////////////////////////////////////////// + "build_flag_system_ext", + "fs_config_dirs_system_ext", + "fs_config_files_system_ext", + "group_system_ext", + "passwd_system_ext", + "SatelliteClient", + "selinux_policy_system_ext", + "system_ext_manifest.xml", + "system_ext-build.prop", + // Base modules when shipping api level is less than or equal to 34 + "hwservicemanager", + "android.hidl.allocator@1.0-service", + + /////////////////////////////////////////// + // window_extensions_base + /////////////////////////////////////////// + "androidx.window.extensions", + "androidx.window.sidecar", + + /////////////////////////////////////////// + // base_system + /////////////////////////////////////////// + "charger", + ] + select(release_flag("RELEASE_APPFUNCTION_SIDECAR"), { + true: [ + "com.android.extensions.appfunctions", + "appfunctions.extension.xml", + ], + default: [], + }), +} + +android_filesystem_defaults { + name: "product_image_defaults", + deps: [ + /////////////////////////////////////////// + // media_product + /////////////////////////////////////////// + "webview", + + /////////////////////////////////////////// + // base_product + /////////////////////////////////////////// + + // Base modules and settings for the product partition. + "build_flag_product", + "fs_config_dirs_product", + "fs_config_files_product", + "group_product", + "ModuleMetadata", + "passwd_product", + "product_compatibility_matrix.xml", + "product_manifest.xml", + "selinux_policy_product", + "product-build.prop", + + // AUDIO + "frameworks_sounds", + ] + select(product_variable("debuggable"), { + // Packages included only for eng or userdebug builds, previously debug tagged + true: ["adb_keys"], + default: [], + }), +} + android_filesystem_defaults { name: "system_image_defaults", partition_name: "system", diff --git a/target/product/gsi/Android.bp b/target/product/gsi/Android.bp index 9e8946d6e8..c6fc021480 100644 --- a/target/product/gsi/Android.bp +++ b/target/product/gsi/Android.bp @@ -83,7 +83,11 @@ gsi_symlinks = [ android_system_image { name: "android_gsi", - defaults: ["system_image_defaults"], + defaults: [ + "system_image_defaults", + "system_ext_image_defaults", + "product_image_defaults", + ], symlinks: gsi_symlinks, dirs: ["cache"], deps: [ @@ -106,28 +110,6 @@ android_system_image { // This option is only meant to be set by compliance GSI targets. "system_ext_userdebug_plat_sepolicy.cil", - /////////////////////////////////////////// - // base_system_ext - /////////////////////////////////////////// - "build_flag_system_ext", - "fs_config_dirs_system_ext", - "fs_config_files_system_ext", - "group_system_ext", - "passwd_system_ext", - "SatelliteClient", - "selinux_policy_system_ext", - "system_ext_manifest.xml", - "system_ext-build.prop", - // Base modules when shipping api level is less than or equal to 34 - "hwservicemanager", - "android.hidl.allocator@1.0-service", - - /////////////////////////////////////////// - // window_extensions_base - /////////////////////////////////////////// - "androidx.window.extensions", - "androidx.window.sidecar", - /////////////////////////////////////////// // gsi_release /////////////////////////////////////////// @@ -161,40 +143,7 @@ android_system_image { "Dialer", "LatinIME", "apns-full-conf.xml", - - /////////////////////////////////////////// - // media_product - /////////////////////////////////////////// - "webview", - - /////////////////////////////////////////// - // base_product - /////////////////////////////////////////// - - // Base modules and settings for the product partition. - "build_flag_product", - "fs_config_dirs_product", - "fs_config_files_product", - "group_product", - "ModuleMetadata", - "passwd_product", - "product_compatibility_matrix.xml", - "product_manifest.xml", - "selinux_policy_product", - "product-build.prop", - - // AUDIO - "frameworks_sounds", - - /////////////////////////////////////////// - // base_system - /////////////////////////////////////////// - "charger", - ] + select(product_variable("debuggable"), { - // Packages included only for eng or userdebug builds, previously debug tagged - true: ["adb_keys"], - default: [], - }), + ], multilib: { both: { // PRODUCT_PACKAGES_SHIPPING_API_LEVEL_34