Merge "Remove module llndk_in_system in build/make/target/product/gsi/Android.mk and add the required modules to auto-included-modules directly." into main
diff --git a/core/soong_config.mk b/core/soong_config.mk
index aaeb70f..8c57ce6 100644
--- a/core/soong_config.mk
+++ b/core/soong_config.mk
@@ -316,6 +316,8 @@
 
 $(call add_json_str,  ProductManufacturer, $(PRODUCT_MANUFACTURER))
 $(call add_json_str,  ProductBrand,        $(PRODUCT_BRAND))
+$(call add_json_str,  ProductDevice,       $(PRODUCT_DEVICE))
+$(call add_json_str,  ProductModel,        $(PRODUCT_MODEL))
 
 $(call add_json_str, ReleaseVersion,    $(_RELEASE_VERSION))
 $(call add_json_list, ReleaseAconfigValueSets,    $(RELEASE_ACONFIG_VALUE_SETS))
diff --git a/core/tasks/tools/update_bootloader_radio_image.mk b/core/tasks/tools/update_bootloader_radio_image.mk
index 0ebf247..adb86ea 100644
--- a/core/tasks/tools/update_bootloader_radio_image.mk
+++ b/core/tasks/tools/update_bootloader_radio_image.mk
@@ -15,3 +15,12 @@
 ifeq ($(USES_DEVICE_GOOGLE_ZUMA),true)
     -include vendor/google_devices/zuma/prebuilts/misc_bins/update_bootloader_radio_image.mk
 endif
+ifeq ($(USES_DEVICE_GOOGLE_ZUMAPRO),true)
+    -include vendor/google_devices/zumapro/prebuilts/misc_bins/update_bootloader_radio_image.mk
+endif
+ifeq ($(USES_DEVICE_GOOGLE_LAGUNA),true)
+    -include vendor/google_devices/laguna/prebuilts/misc_bins/update_bootloader_radio_image.mk
+endif
+ifeq ($(USES_DEVICE_GOOGLE_MALIBU),true)
+    -include vendor/google_devices/malibu/prebuilts/misc_bins/update_bootloader_radio_image.mk
+endif
diff --git a/target/product/base_vendor.mk b/target/product/base_vendor.mk
index a80e0b3..3f85941 100644
--- a/target/product/base_vendor.mk
+++ b/target/product/base_vendor.mk
@@ -17,7 +17,6 @@
 # Base modules and settings for recovery.
 PRODUCT_PACKAGES += \
     adbd.recovery \
-    android.hardware.health@2.0-impl-default.recovery \
     build_flag_vendor \
     cgroups.recovery.json \
     charger.recovery \
diff --git a/tools/aconfig/aconfig/src/codegen/rust.rs b/tools/aconfig/aconfig/src/codegen/rust.rs
index 7bc34d6..d318b96 100644
--- a/tools/aconfig/aconfig/src/codegen/rust.rs
+++ b/tools/aconfig/aconfig/src/codegen/rust.rs
@@ -295,7 +295,10 @@
                                 get_boolean_flag_value(&flag_val_map, offset + 1)
                                     .map_err(|err| format!("failed to get flag: {err}"))
                             },
-                            None => Err("no context found for package 'com.android.aconfig.test'".to_string())
+                            None => {
+                                log!(Level::Error, "no context found for package com.android.aconfig.test");
+                                Ok(false)
+                            }
                         }
                     })
                 });
@@ -339,7 +342,10 @@
                                 get_boolean_flag_value(&flag_val_map, offset + 2)
                                     .map_err(|err| format!("failed to get flag: {err}"))
                             },
-                            None => Err("no context found for package 'com.android.aconfig.test'".to_string())
+                            None => {
+                                log!(Level::Error, "no context found for package com.android.aconfig.test");
+                                Ok(false)
+                            }
                         }
                     })
                 });
@@ -383,7 +389,10 @@
                                 get_boolean_flag_value(&flag_val_map, offset + 3)
                                     .map_err(|err| format!("failed to get flag: {err}"))
                             },
-                            None => Err("no context found for package 'com.android.aconfig.test'".to_string())
+                            None => {
+                                log!(Level::Error, "no context found for package com.android.aconfig.test");
+                                Ok(false)
+                            }
                         }
                     })
                 });
@@ -428,7 +437,10 @@
                                 get_boolean_flag_value(&flag_val_map, offset + 8)
                                     .map_err(|err| format!("failed to get flag: {err}"))
                             },
-                            None => Err("no context found for package 'com.android.aconfig.test'".to_string())
+                            None => {
+                                log!(Level::Error, "no context found for package com.android.aconfig.test");
+                                Ok(true)
+                            }
                         }
                     })
                 });
diff --git a/tools/aconfig/aconfig/templates/cpp_source_file.template b/tools/aconfig/aconfig/templates/cpp_source_file.template
index 852b905..eaaf86f 100644
--- a/tools/aconfig/aconfig/templates/cpp_source_file.template
+++ b/tools/aconfig/aconfig/templates/cpp_source_file.template
@@ -76,7 +76,8 @@
             : boolean_start_index_()
             {{ -endif }}
             , flag_value_file_(nullptr)
-            , read_from_new_storage_(false) \{
+            , read_from_new_storage_(false)
+            , package_exists_in_storage_(true) \{
 
             if (access("/metadata/aconfig/boot/enable_only_new_storage", F_OK) == 0) \{
                read_from_new_storage_ = true;
@@ -99,6 +100,11 @@
                 ALOGE("error: failed to get package read context: %s", context.error().c_str());
             }
 
+            if (!(context->package_exists)) \{
+               package_exists_in_storage_ = false;
+               return;
+            }
+
             // cache package boolean flag start index
             boolean_start_index_ = context->boolean_start_index;
 
@@ -126,6 +132,10 @@
             if (cache_[{item.readwrite_idx}] == -1) \{
             {{ if allow_instrumentation- }}
                 if (read_from_new_storage_) \{
+                    if (!package_exists_in_storage_) \{
+                       return {item.default_value};
+                    }
+
                     auto value = aconfig_storage::get_boolean_flag_value(
                         *flag_value_file_,
                         boolean_start_index_ + {item.flag_offset});
@@ -168,6 +178,8 @@
         std::unique_ptr<aconfig_storage::MappedStorageFile> flag_value_file_;
 
         bool read_from_new_storage_;
+
+        bool package_exists_in_storage_;
     {{ -endif }}
     {{ -endif }}
 
diff --git a/tools/aconfig/aconfig/templates/rust.template b/tools/aconfig/aconfig/templates/rust.template
index c2f162f..6456360 100644
--- a/tools/aconfig/aconfig/templates/rust.template
+++ b/tools/aconfig/aconfig/templates/rust.template
@@ -51,7 +51,10 @@
                                 get_boolean_flag_value(&flag_val_map, offset + {flag.flag_offset})
                                     .map_err(|err| format!("failed to get flag: \{err}"))
                             },
-                            None => Err("no context found for package '{package}'".to_string())
+                            None => \{
+                                 log!(Level::Error, "no context found for package {package}");
+                                 Ok({flag.default_value})
+                            }
                         }
                     })
                 });
diff --git a/tools/aconfig/aflags/Cargo.toml b/tools/aconfig/aflags/Cargo.toml
index 7efce6d..d31e232 100644
--- a/tools/aconfig/aflags/Cargo.toml
+++ b/tools/aconfig/aflags/Cargo.toml
@@ -9,10 +9,10 @@
 protobuf = "3.2.0"
 regex = "1.10.3"
 aconfig_protos = { path = "../aconfig_protos" }
-aconfigd_protos = { version = "0.1.0", path = "../../../../../system/server_configurable_flags/aconfigd"}
+aconfigd_protos = { version = "0.1.0", path = "../../../../../packages/modules/ConfigInfrastructure/aconfigd/proto"}
 nix = { version = "0.28.0", features = ["user"] }
 aconfig_storage_file = { version = "0.1.0", path = "../aconfig_storage_file" }
 aconfig_storage_read_api = { version = "0.1.0", path = "../aconfig_storage_read_api" }
 clap = {version = "4.5.2" }
 aconfig_device_paths = { version = "0.1.0", path = "../aconfig_device_paths" }
-aconfig_flags = { version = "0.1.0", path = "../aconfig_flags" }
\ No newline at end of file
+aconfig_flags = { version = "0.1.0", path = "../aconfig_flags" }