Make change and version bump to AP4A.240913.001
Snap for 12361654 from 905172ddc7 to 24Q4-release
Change-Id: I192cc574a989ef364663496a02f64c42825dee9a
This commit is contained in:
@@ -6462,8 +6462,11 @@ $(BUILT_TARGET_FILES_DIR): \
|
||||
$(INSTALLED_RAMDISK_TARGET) \
|
||||
$(INSTALLED_DTBIMAGE_TARGET) \
|
||||
$(INSTALLED_2NDBOOTLOADER_TARGET) \
|
||||
$(INSTALLED_VENDOR_KERNEL_RAMDISK_TARGET) \
|
||||
$(BUILT_RAMDISK_16K_TARGET) \
|
||||
$(BUILT_KERNEL_16K_TARGET) \
|
||||
$(BUILT_BOOTIMAGE_16K_TARGET) \
|
||||
$(INSTALLED_DTBOIMAGE_16KB_TARGET) \
|
||||
$(BOARD_PREBUILT_DTBOIMAGE) \
|
||||
$(BOARD_PREBUILT_RECOVERY_DTBOIMAGE) \
|
||||
$(BOARD_RECOVERY_ACPIO) \
|
||||
|
||||
@@ -47,6 +47,8 @@ $(call soong_config_set_bool,ANDROID,GCOV_COVERAGE,$(NATIVE_COVERAGE))
|
||||
$(call soong_config_set_bool,ANDROID,CLANG_COVERAGE,$(CLANG_COVERAGE))
|
||||
$(call soong_config_set,ANDROID,SCUDO_ALLOCATION_RING_BUFFER_SIZE,$(PRODUCT_SCUDO_ALLOCATION_RING_BUFFER_SIZE))
|
||||
|
||||
$(call soong_config_set_bool,ANDROID,EMMA_INSTRUMENT,$(if $(filter true,$(EMMA_INSTRUMENT)),true,false))
|
||||
|
||||
# PRODUCT_PRECOMPILED_SEPOLICY defaults to true. Explicitly check if it's "false" or not.
|
||||
$(call soong_config_set_bool,ANDROID,PRODUCT_PRECOMPILED_SEPOLICY,$(if $(filter false,$(PRODUCT_PRECOMPILED_SEPOLICY)),false,true))
|
||||
|
||||
|
||||
@@ -18,4 +18,4 @@
|
||||
# (like "CRB01"). It must be a single word, and is
|
||||
# capitalized by convention.
|
||||
|
||||
BUILD_ID=AP4A.240912.001
|
||||
BUILD_ID=AP4A.240913.001
|
||||
|
||||
@@ -289,6 +289,9 @@ subdir_makefiles_total := $(words int $(subdir_makefiles) post finish)
|
||||
|
||||
$(foreach mk,$(subdir_makefiles),$(info [$(call inc_and_print,subdir_makefiles_inc)/$(subdir_makefiles_total)] including $(mk) ...)$(eval include $(mk)))
|
||||
|
||||
# Build bootloader.img/radio.img, and unpack the partitions.
|
||||
include $(BUILD_SYSTEM)/tasks/tools/update_bootloader_radio_image.mk
|
||||
|
||||
# For an unbundled image, we can skip blueprint_tools because unbundled image
|
||||
# aims to remove a large number framework projects from the manifest, the
|
||||
# sources or dependencies for these tools may be missing from the tree.
|
||||
@@ -297,6 +300,9 @@ droid_targets : blueprint_tools
|
||||
checkbuild: blueprint_tests
|
||||
endif
|
||||
|
||||
# Create necessary directories and symlinks in the root filesystem
|
||||
include system/core/rootdir/create_root_structure.mk
|
||||
|
||||
endif # dont_bother
|
||||
|
||||
ifndef subdir_makefiles_total
|
||||
@@ -305,9 +311,6 @@ endif
|
||||
|
||||
$(info [$(call inc_and_print,subdir_makefiles_inc)/$(subdir_makefiles_total)] finishing legacy Make module parsing ...)
|
||||
|
||||
# Create necessary directories and symlinks in the root filesystem
|
||||
include system/core/rootdir/create_root_structure.mk
|
||||
|
||||
# -------------------------------------------------------------------
|
||||
# All module makefiles have been included at this point.
|
||||
# -------------------------------------------------------------------
|
||||
|
||||
@@ -236,6 +236,12 @@ $(call add_json_list, ProductPrivateSepolicyDirs, $(PRODUCT_PRIVATE_SEPOL
|
||||
|
||||
$(call add_json_list, TargetFSConfigGen, $(TARGET_FS_CONFIG_GEN))
|
||||
|
||||
# Although USE_SOONG_DEFINED_SYSTEM_IMAGE determines whether to use the system image specified by
|
||||
# PRODUCT_SOONG_DEFINED_SYSTEM_IMAGE, PRODUCT_SOONG_DEFINED_SYSTEM_IMAGE is still used to compare
|
||||
# installed files between make and soong, regardless of the USE_SOONG_DEFINED_SYSTEM_IMAGE setting.
|
||||
$(call add_json_bool, UseSoongSystemImage, $(filter true,$(USE_SOONG_DEFINED_SYSTEM_IMAGE)))
|
||||
$(call add_json_str, ProductSoongDefinedSystemImage, $(PRODUCT_SOONG_DEFINED_SYSTEM_IMAGE))
|
||||
|
||||
$(call add_json_map, VendorVars)
|
||||
$(foreach namespace,$(sort $(SOONG_CONFIG_NAMESPACES)),\
|
||||
$(call add_json_map, $(namespace))\
|
||||
|
||||
@@ -28,8 +28,7 @@ $(sts_sdk_zip): $(MERGE_ZIPS) $(ZIP2ZIP) $(compatibility_zip) $(sts_sdk_plugin_s
|
||||
rm -f $@ $(STS_SDK_ZIP)_filtered
|
||||
$(ZIP2ZIP) -i $(STS_SDK_ZIP) -o $(STS_SDK_ZIP)_filtered \
|
||||
-x android-sts-sdk/tools/sts-tradefed-tests.jar \
|
||||
'android-sts-sdk/tools/*:plugin/src/main/resources/sts-tradefed-tools/' \
|
||||
'android-sts-sdk/jdk/**/*:plugin/src/main/resources/jdk/'
|
||||
'android-sts-sdk/tools/*:sts-sdk/src/main/resources/sts-tradefed-tools/'
|
||||
$(MERGE_ZIPS) $@ $(STS_SDK_ZIP)_filtered $(STS_SDK_PLUGIN_SKEL)
|
||||
rm -f $(STS_SDK_ZIP)_filtered
|
||||
|
||||
|
||||
17
core/tasks/tools/update_bootloader_radio_image.mk
Normal file
17
core/tasks/tools/update_bootloader_radio_image.mk
Normal file
@@ -0,0 +1,17 @@
|
||||
# Copyright (C) 2024 The Android Open Source Project
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http:#www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
ifeq ($(USES_DEVICE_GOOGLE_ZUMA),true)
|
||||
-include vendor/google_devices/zuma/prebuilts/misc_bins/update_bootloader_radio_image.mk
|
||||
endif
|
||||
@@ -745,10 +745,8 @@ mod tests {
|
||||
boolean val;
|
||||
try {
|
||||
val = reader.getBooleanFlagValue(1);
|
||||
if (val == disabledRw) {
|
||||
Log.i(TAG, String.format(SUCCESS_LOG, "disabledRw"));
|
||||
} else {
|
||||
Log.i(TAG, String.format(MISMATCH_LOG, "disabledRw", val, disabledRw));
|
||||
if (val != disabledRw) {
|
||||
Log.w(TAG, String.format(MISMATCH_LOG, "disabledRw", val, disabledRw));
|
||||
}
|
||||
|
||||
if (useNewStorageValueAndDiscardOld) {
|
||||
@@ -756,10 +754,8 @@ mod tests {
|
||||
}
|
||||
|
||||
val = reader.getBooleanFlagValue(2);
|
||||
if (val == disabledRwExported) {
|
||||
Log.i(TAG, String.format(SUCCESS_LOG, "disabledRwExported"));
|
||||
} else {
|
||||
Log.i(TAG, String.format(MISMATCH_LOG, "disabledRwExported", val, disabledRwExported));
|
||||
if (val != disabledRwExported) {
|
||||
Log.w(TAG, String.format(MISMATCH_LOG, "disabledRwExported", val, disabledRwExported));
|
||||
}
|
||||
|
||||
if (useNewStorageValueAndDiscardOld) {
|
||||
@@ -767,10 +763,8 @@ mod tests {
|
||||
}
|
||||
|
||||
val = reader.getBooleanFlagValue(8);
|
||||
if (val == enabledRw) {
|
||||
Log.i(TAG, String.format(SUCCESS_LOG, "enabledRw"));
|
||||
} else {
|
||||
Log.i(TAG, String.format(MISMATCH_LOG, "enabledRw", val, enabledRw));
|
||||
if (val != enabledRw) {
|
||||
Log.w(TAG, String.format(MISMATCH_LOG, "enabledRw", val, enabledRw));
|
||||
}
|
||||
|
||||
if (useNewStorageValueAndDiscardOld) {
|
||||
@@ -804,10 +798,8 @@ mod tests {
|
||||
boolean val;
|
||||
try {
|
||||
val = reader.getBooleanFlagValue(3);
|
||||
if (val == disabledRwInOtherNamespace) {
|
||||
Log.i(TAG, String.format(SUCCESS_LOG, "disabledRwInOtherNamespace"));
|
||||
} else {
|
||||
Log.i(TAG, String.format(MISMATCH_LOG, "disabledRwInOtherNamespace", val, disabledRwInOtherNamespace));
|
||||
if (val != disabledRwInOtherNamespace) {
|
||||
Log.w(TAG, String.format(MISMATCH_LOG, "disabledRwInOtherNamespace", val, disabledRwInOtherNamespace));
|
||||
}
|
||||
|
||||
if (useNewStorageValueAndDiscardOld) {
|
||||
|
||||
@@ -90,10 +90,8 @@ public final class FeatureFlagsImpl implements FeatureFlags \{
|
||||
{{ -if flag.is_read_write }}
|
||||
|
||||
val = reader.getBooleanFlagValue({flag.flag_offset});
|
||||
if (val == {flag.method_name}) \{
|
||||
Log.i(TAG, String.format(SUCCESS_LOG, "{flag.method_name}"));
|
||||
} else \{
|
||||
Log.i(TAG, String.format(MISMATCH_LOG, "{flag.method_name}", val, {flag.method_name}));
|
||||
if (val != {flag.method_name}) \{
|
||||
Log.w(TAG, String.format(MISMATCH_LOG, "{flag.method_name}", val, {flag.method_name}));
|
||||
}
|
||||
|
||||
if (useNewStorageValueAndDiscardOld) \{
|
||||
|
||||
46
tools/aconfig/aconfig_flags/Android.bp
Normal file
46
tools/aconfig/aconfig_flags/Android.bp
Normal file
@@ -0,0 +1,46 @@
|
||||
/*
|
||||
* Copyright (C) 2024 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
rust_library {
|
||||
name: "libaconfig_flags",
|
||||
crate_name: "aconfig_flags",
|
||||
srcs: [
|
||||
"src/lib.rs",
|
||||
],
|
||||
rustlibs: [
|
||||
"libaconfig_flags_rust",
|
||||
],
|
||||
host_supported: true,
|
||||
}
|
||||
|
||||
aconfig_declarations {
|
||||
name: "aconfig_flags",
|
||||
package: "com.android.aconfig.flags",
|
||||
container: "system",
|
||||
srcs: ["flags.aconfig"],
|
||||
}
|
||||
|
||||
rust_aconfig_library {
|
||||
name: "libaconfig_flags_rust",
|
||||
crate_name: "aconfig_flags_rust",
|
||||
aconfig_declarations: "aconfig_flags",
|
||||
host_supported: true,
|
||||
}
|
||||
|
||||
cc_aconfig_library {
|
||||
name: "libaconfig_flags_cc",
|
||||
aconfig_declarations: "aconfig_flags",
|
||||
}
|
||||
10
tools/aconfig/aconfig_flags/Cargo.toml
Normal file
10
tools/aconfig/aconfig_flags/Cargo.toml
Normal file
@@ -0,0 +1,10 @@
|
||||
[package]
|
||||
name = "aconfig_flags"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
[features]
|
||||
default = ["cargo"]
|
||||
cargo = []
|
||||
|
||||
[dependencies]
|
||||
9
tools/aconfig/aconfig_flags/flags.aconfig
Normal file
9
tools/aconfig/aconfig_flags/flags.aconfig
Normal file
@@ -0,0 +1,9 @@
|
||||
package: "com.android.aconfig.flags"
|
||||
container: "system"
|
||||
|
||||
flag {
|
||||
name: "enable_only_new_storage"
|
||||
namespace: "core_experiments_team_internal"
|
||||
bug: "312235596"
|
||||
description: "When enabled, aconfig flags are read from the new aconfig storage only."
|
||||
}
|
||||
47
tools/aconfig/aconfig_flags/src/lib.rs
Normal file
47
tools/aconfig/aconfig_flags/src/lib.rs
Normal file
@@ -0,0 +1,47 @@
|
||||
/*
|
||||
* Copyright (C) 2024 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
//! `aconfig_flags` is a crate for reading aconfig flags from Rust
|
||||
// When building with the Android tool-chain
|
||||
//
|
||||
// - the flag functions will read from aconfig_flags_inner
|
||||
// - the feature "cargo" will be disabled
|
||||
//
|
||||
// When building with cargo
|
||||
//
|
||||
// - the flag functions will all return some trivial value, like true
|
||||
// - the feature "cargo" will be enabled
|
||||
//
|
||||
// This module hides these differences from the rest of aconfig.
|
||||
|
||||
/// Module used when building with the Android tool-chain
|
||||
#[cfg(not(feature = "cargo"))]
|
||||
pub mod auto_generated {
|
||||
/// Returns the value for the enable_only_new_storage flag.
|
||||
pub fn enable_only_new_storage() -> bool {
|
||||
aconfig_flags_rust::enable_only_new_storage()
|
||||
}
|
||||
}
|
||||
|
||||
/// Module used when building with cargo
|
||||
#[cfg(feature = "cargo")]
|
||||
pub mod auto_generated {
|
||||
/// Returns a placeholder value for the enable_only_new_storage flag.
|
||||
pub fn enable_only_new_storage() -> bool {
|
||||
// Used only to enable typechecking and testing with cargo
|
||||
true
|
||||
}
|
||||
}
|
||||
@@ -10,6 +10,7 @@ rust_defaults {
|
||||
srcs: ["src/main.rs"],
|
||||
rustlibs: [
|
||||
"libaconfig_device_paths",
|
||||
"libaconfig_flags",
|
||||
"libaconfig_protos",
|
||||
"libaconfigd_protos",
|
||||
"libaconfig_storage_read_api",
|
||||
@@ -24,6 +25,7 @@ rust_defaults {
|
||||
|
||||
rust_binary {
|
||||
name: "aflags",
|
||||
host_supported: true,
|
||||
defaults: ["aflags.defaults"],
|
||||
}
|
||||
|
||||
|
||||
@@ -15,3 +15,4 @@ 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" }
|
||||
@@ -164,10 +164,6 @@ struct Cli {
|
||||
enum Command {
|
||||
/// List all aconfig flags on this device.
|
||||
List {
|
||||
/// Read from the new flag storage.
|
||||
#[clap(long)]
|
||||
use_new_storage: bool,
|
||||
|
||||
/// Optionally filter by container name.
|
||||
#[clap(short = 'c', long = "container")]
|
||||
container: Option<String>,
|
||||
@@ -184,6 +180,9 @@ enum Command {
|
||||
/// <package>.<flag_name>
|
||||
qualified_name: String,
|
||||
},
|
||||
|
||||
/// Display which flag storage backs aconfig flags.
|
||||
WhichBacking,
|
||||
}
|
||||
|
||||
struct PaddingInfo {
|
||||
@@ -282,21 +281,31 @@ fn list(source_type: FlagSourceType, container: Option<String>) -> Result<String
|
||||
Ok(result)
|
||||
}
|
||||
|
||||
fn display_which_backing() -> String {
|
||||
if aconfig_flags::auto_generated::enable_only_new_storage() {
|
||||
"aconfig_storage".to_string()
|
||||
} else {
|
||||
"device_config".to_string()
|
||||
}
|
||||
}
|
||||
|
||||
fn main() -> Result<()> {
|
||||
ensure!(nix::unistd::Uid::current().is_root(), "must be root");
|
||||
|
||||
let cli = Cli::parse();
|
||||
let output = match cli.command {
|
||||
Command::List { use_new_storage: true, container } => {
|
||||
list(FlagSourceType::AconfigStorage, container)
|
||||
.map_err(|err| anyhow!("storage may not be enabled: {err}"))
|
||||
.map(Some)
|
||||
}
|
||||
Command::List { use_new_storage: false, container } => {
|
||||
list(FlagSourceType::DeviceConfig, container).map(Some)
|
||||
Command::List { container } => {
|
||||
if aconfig_flags::auto_generated::enable_only_new_storage() {
|
||||
list(FlagSourceType::AconfigStorage, container)
|
||||
.map_err(|err| anyhow!("storage may not be enabled: {err}"))
|
||||
.map(Some)
|
||||
} else {
|
||||
list(FlagSourceType::DeviceConfig, container).map(Some)
|
||||
}
|
||||
}
|
||||
Command::Enable { qualified_name } => set_flag(&qualified_name, "true").map(|_| None),
|
||||
Command::Disable { qualified_name } => set_flag(&qualified_name, "false").map(|_| None),
|
||||
Command::WhichBacking => Ok(Some(display_which_backing())),
|
||||
};
|
||||
match output {
|
||||
Ok(Some(text)) => println!("{text}"),
|
||||
|
||||
@@ -5,6 +5,10 @@ public final class Log {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public static int w(String tag, String msg) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public static int e(String tag, String msg) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -582,6 +582,24 @@ def IsBuildPropFile(filename):
|
||||
filename.endswith("/prop.default")
|
||||
|
||||
|
||||
def GetOtaSigningArgs():
|
||||
args = []
|
||||
if OPTIONS.package_key:
|
||||
args.extend(["--package_key", OPTIONS.package_key])
|
||||
if OPTIONS.payload_signer:
|
||||
args.extend(["--payload_signer=" + OPTIONS.payload_signer])
|
||||
if OPTIONS.payload_signer_args:
|
||||
args.extend(["--payload_signer_args=" + OPTIONS.payload_signer_args])
|
||||
if OPTIONS.search_path:
|
||||
args.extend(["--search_path", OPTIONS.search_path])
|
||||
if OPTIONS.payload_signer_maximum_signature_size:
|
||||
args.extend(["--payload_signer_maximum_signature_size",
|
||||
OPTIONS.payload_signer_maximum_signature_size])
|
||||
if OPTIONS.private_key_suffix:
|
||||
args.extend(["--private_key_suffix", OPTIONS.private_key_suffix])
|
||||
return args
|
||||
|
||||
|
||||
def RegenerateKernelPartitions(input_tf_zip: zipfile.ZipFile, output_tf_zip: zipfile.ZipFile, misc_info):
|
||||
"""Re-generate boot and dtbo partitions using new signing configuration"""
|
||||
files_to_unzip = [
|
||||
@@ -648,9 +666,9 @@ def RegenerateBootOTA(input_tf_zip: zipfile.ZipFile, filename, input_ota):
|
||||
if os.path.exists(signed_16k_dtbo_image):
|
||||
signed_dtbo_image += ":" + signed_16k_dtbo_image
|
||||
|
||||
|
||||
args = ["ota_from_raw_img", "--package_key", OPTIONS.package_key,
|
||||
args = ["ota_from_raw_img",
|
||||
"--max_timestamp", timestamp, "--output", input_ota.name]
|
||||
args.extend(GetOtaSigningArgs())
|
||||
if "dtbo" in partitions:
|
||||
args.extend(["--partition_name", "boot,dtbo",
|
||||
signed_boot_image, signed_dtbo_image])
|
||||
|
||||
Reference in New Issue
Block a user