Full Code of android/platform_build for AI

main 045a3d6a3e35 cached
1380 files
7.0 MB
1.9M tokens
4622 symbols
1 requests
Download .txt
Showing preview only (7,622K chars total). Download the full file or copy to clipboard to get everything.
Repository: android/platform_build
Branch: main
Commit: 045a3d6a3e35
Files: 1380
Total size: 7.0 MB

Directory structure:
gitextract_4wb4gfr7/

├── .gitignore
├── Android.bp
├── Changes.md
├── CleanSpec.mk
├── Deprecation.md
├── OWNERS
├── PREUPLOAD.cfg
├── README.md
├── Usage.txt
├── backported_fixes/
│   ├── Android.bp
│   ├── OWNERS
│   ├── applied_fixes/
│   │   └── ki350037023.txtpb
│   ├── backported_fixes.proto
│   ├── src/
│   │   └── java/
│   │       └── com/
│   │           └── android/
│   │               └── build/
│   │                   └── backportedfixes/
│   │                       ├── CombineBackportedFixes.java
│   │                       ├── WriteBackportedFixesPropFile.java
│   │                       └── common/
│   │                           └── Parser.java
│   └── tests/
│       └── java/
│           └── com/
│               └── android/
│                   └── build/
│                       └── backportedfixes/
│                           ├── CombineBackportedFixesTest.java
│                           ├── WriteBackportedFixesPropFileTest.java
│                           └── common/
│                               └── ParserTest.java
├── banchanHelp.sh
├── buildspec.mk.default
├── ci/
│   ├── Android.bp
│   ├── AndroidTest.xml.template
│   ├── build_context.py
│   ├── build_device_and_tests
│   ├── build_metadata
│   ├── build_test_suites
│   ├── build_test_suites.py
│   ├── build_test_suites_local_test.py
│   ├── build_test_suites_test.py
│   ├── buildbot.py
│   ├── ci_test_lib.py
│   ├── dump_product_config
│   ├── metrics_agent.py
│   ├── optimized_targets.py
│   ├── optimized_targets_test.py
│   ├── test_discovery_agent.py
│   └── test_mapping_module_retriever.py
├── common/
│   ├── core.mk
│   ├── json.mk
│   ├── math.mk
│   └── strings.mk
├── core/
│   ├── LINUX_KERNEL_COPYING
│   ├── Makefile
│   ├── OWNERS
│   ├── WINPTHREADS_COPYING
│   ├── aapt2.mk
│   ├── aapt_flags.mk
│   ├── allowed_ndk_types.mk
│   ├── android_manifest.mk
│   ├── android_soong_config_vars.mk
│   ├── app_certificate_validate.mk
│   ├── app_prebuilt_internal.mk
│   ├── art_config.mk
│   ├── artifact_path_requirements.mk
│   ├── autogen_test_config.mk
│   ├── base_rules.mk
│   ├── binary.mk
│   ├── board_config.mk
│   ├── board_config_wifi.mk
│   ├── board_config_wpa_supplicant.mk
│   ├── build-system.html
│   ├── build_id.mk
│   ├── build_rro_package.mk
│   ├── cc_prebuilt_internal.mk
│   ├── ccache.mk
│   ├── check_elf_file.mk
│   ├── checktree
│   ├── clang/
│   │   ├── HOST_x86.mk
│   │   ├── HOST_x86_64.mk
│   │   ├── TARGET_arm.mk
│   │   ├── TARGET_arm64.mk
│   │   ├── TARGET_riscv64.mk
│   │   ├── TARGET_x86.mk
│   │   ├── TARGET_x86_64.mk
│   │   ├── config.mk
│   │   └── tidy.mk
│   ├── cleanbuild.mk
│   ├── cleanspec.mk
│   ├── clear_vars.mk
│   ├── combo/
│   │   ├── HOST_darwin.mk
│   │   ├── HOST_linux.mk
│   │   ├── TARGET_linux-arm.mk
│   │   ├── TARGET_linux-arm64.mk
│   │   ├── TARGET_linux-riscv64.mk
│   │   ├── TARGET_linux-x86.mk
│   │   ├── TARGET_linux-x86_64.mk
│   │   ├── javac.mk
│   │   └── select.mk
│   ├── config.mk
│   ├── config_sanitizers.mk
│   ├── configure_module_stem.mk
│   ├── copy_headers.mk
│   ├── cxx_stl_setup.mk
│   ├── definitions.mk
│   ├── deprecation.mk
│   ├── dex_preopt.mk
│   ├── dex_preopt_config.mk
│   ├── dex_preopt_config_merger.py
│   ├── dex_preopt_odex_install.mk
│   ├── distdir.mk
│   ├── dumpconfig.mk
│   ├── dumpvar.mk
│   ├── dupcheck.sh
│   ├── dynamic_binary.mk
│   ├── empty_test_config.xml
│   ├── envsetup.mk
│   ├── executable.mk
│   ├── executable_internal.mk
│   ├── executable_prefer_symlink.mk
│   ├── filter_symbols.sh
│   ├── force_aapt2.mk
│   ├── fuzz_test.mk
│   ├── generate_enforce_rro.mk
│   ├── header_library.mk
│   ├── header_library_internal.mk
│   ├── host_executable.mk
│   ├── host_executable_internal.mk
│   ├── host_java_library.mk
│   ├── host_java_library_common.mk
│   ├── host_prebuilt.mk
│   ├── host_shared_library.mk
│   ├── host_shared_library_internal.mk
│   ├── host_static_library.mk
│   ├── host_static_library_internal.mk
│   ├── install_jni_libs.mk
│   ├── install_jni_libs_internal.mk
│   ├── instrumentation_test_config_template.xml
│   ├── jacoco.mk
│   ├── java.mk
│   ├── java_common.mk
│   ├── java_host_test_config_template.xml
│   ├── java_host_unit_test_config_template.xml
│   ├── java_library.mk
│   ├── java_prebuilt_internal.mk
│   ├── java_renderscript.mk
│   ├── java_test_config_template.xml
│   ├── layoutlib_data.mk
│   ├── link_type.mk
│   ├── local_current_sdk.mk
│   ├── local_systemsdk.mk
│   ├── local_vendor_product.mk
│   ├── main.mk
│   ├── misc_prebuilt_internal.mk
│   ├── module_arch_supported.mk
│   ├── multi_prebuilt.mk
│   ├── multilib.mk
│   ├── native_benchmark_test_config_template.xml
│   ├── native_host_test_config_template.xml
│   ├── native_test.mk
│   ├── native_test_config_template.xml
│   ├── ninja_config.mk
│   ├── node_fns.mk
│   ├── notice_files.mk
│   ├── os_licensing.mk
│   ├── pack_dyn_relocs_setup.mk
│   ├── package.mk
│   ├── package_internal.mk
│   ├── packaging/
│   │   └── flags.mk
│   ├── pathmap.mk
│   ├── phony_package.mk
│   ├── prebuilt.mk
│   ├── prebuilt_internal.mk
│   ├── process_wrapper.sh
│   ├── process_wrapper_gdb.cmds
│   ├── process_wrapper_gdb.sh
│   ├── product-graph.mk
│   ├── product.mk
│   ├── product_config.mk
│   ├── product_config.rbc
│   ├── product_validation_checks.mk
│   ├── proguard/
│   │   ├── checknotnull.flags
│   │   └── kotlin.flags
│   ├── proguard.flags
│   ├── proguard.jacoco.flags
│   ├── proguard_basic_keeps.flags
│   ├── project_definitions.mk
│   ├── python_binary_host_mobly_test_config_template.xml
│   ├── python_binary_host_test_config_template.xml
│   ├── ravenwood_test_config_template.xml
│   ├── rbe.mk
│   ├── release_config.mk
│   ├── release_config.scl
│   ├── robolectric_test_config_template.xml
│   ├── root.mk
│   ├── rust_device_benchmark_config_template.xml
│   ├── rust_device_test_config_template.xml
│   ├── rust_host_benchmark_config_template.xml
│   ├── rust_host_test_config_template.xml
│   ├── sbom.mk
│   ├── sdk_check.mk
│   ├── shared_library.mk
│   ├── shared_library_internal.mk
│   ├── shell_test_config_template.xml
│   ├── soong_android_app_set.mk
│   ├── soong_app_prebuilt.mk
│   ├── soong_cc_rust_prebuilt.mk
│   ├── soong_config.mk
│   ├── soong_droiddoc_prebuilt.mk
│   ├── soong_extra_config.mk
│   ├── soong_java_prebuilt.mk
│   ├── static_java_library.mk
│   ├── static_library.mk
│   ├── static_library_internal.mk
│   ├── suite_host_config.mk
│   ├── support_libraries.mk
│   ├── sysprop.mk
│   ├── sysprop_config.mk
│   ├── target_test_internal.mk
│   ├── tasks/
│   │   ├── README.dex_preopt_check.md
│   │   ├── art-host-tests.mk
│   │   ├── art.mk
│   │   ├── automotive-general-tests.mk
│   │   ├── automotive-sdv-tests.mk
│   │   ├── automotive-tests.mk
│   │   ├── autorepro.mk
│   │   ├── berberis_test.mk
│   │   ├── build_custom_images.mk
│   │   ├── catbox.mk
│   │   ├── check-abi-dump-list.mk
│   │   ├── csuite.mk
│   │   ├── cts.mk
│   │   ├── cts_root.mk
│   │   ├── device-platinum-tests.mk
│   │   ├── device-tests.mk
│   │   ├── dex_preopt_check.mk
│   │   ├── dts.mk
│   │   ├── find-shareduid-violation.mk
│   │   ├── fontchain_lint.mk
│   │   ├── general-tests.mk
│   │   ├── host-unit-tests.mk
│   │   ├── host_init_verifier.mk
│   │   ├── mcts.mk
│   │   ├── meta-lic.mk
│   │   ├── module-info.mk
│   │   ├── mts.mk
│   │   ├── multitree.mk
│   │   ├── oem_image.mk
│   │   ├── offline-sdk-docs.mk
│   │   ├── owners.mk
│   │   ├── performance-tests.mk
│   │   ├── platform_availability_check.mk
│   │   ├── prebuilt_tradefed.mk
│   │   ├── sdk-addon.mk
│   │   ├── sts.mk
│   │   ├── tools/
│   │   │   ├── build_custom_image.mk
│   │   │   ├── compatibility.mk
│   │   │   └── package-modules.mk
│   │   ├── tradefed-tests-list.mk
│   │   ├── vendor_module_check.mk
│   │   ├── vts-core-tests.mk
│   │   ├── with-license.mk
│   │   └── wvts.mk
│   ├── use_lld_setup.mk
│   └── version_util.mk
├── envsetup.sh
├── help.sh
├── navbar.md
├── packaging/
│   ├── distdir.mk
│   ├── main.mk
│   └── main_soong_only.mk
├── rbesetup.sh
├── shell_utils.sh
├── tapasHelp.sh
├── target/
│   ├── board/
│   │   ├── BoardConfigGsiCommon.mk
│   │   ├── BoardConfigMainlineCommon.mk
│   │   ├── BoardConfigPixelCommon.mk
│   │   ├── android-info.mk
│   │   ├── generic/
│   │   │   ├── AndroidBoard.mk
│   │   │   ├── BoardConfig.mk
│   │   │   ├── README.txt
│   │   │   ├── device.mk
│   │   │   └── system_ext.prop
│   │   ├── generic_64bitonly_x86_64/
│   │   │   ├── BoardConfig.mk
│   │   │   ├── README.txt
│   │   │   ├── device.mk
│   │   │   └── system.prop
│   │   ├── generic_arm64/
│   │   │   ├── BoardConfig.mk
│   │   │   ├── README.txt
│   │   │   ├── device.mk
│   │   │   ├── sepolicy/
│   │   │   │   ├── OWNERS
│   │   │   │   ├── file.te
│   │   │   │   └── file_contexts
│   │   │   └── system_ext.prop
│   │   ├── generic_arm64_plus_armv7/
│   │   │   ├── BoardConfig.mk
│   │   │   ├── README.txt
│   │   │   └── device.mk
│   │   ├── generic_riscv64/
│   │   │   ├── BoardConfig.mk
│   │   │   ├── README.txt
│   │   │   ├── device.mk
│   │   │   └── system_ext.prop
│   │   ├── generic_x86/
│   │   │   ├── BoardConfig.mk
│   │   │   ├── README.txt
│   │   │   ├── device.mk
│   │   │   └── system_ext.prop
│   │   ├── generic_x86_64/
│   │   │   ├── BoardConfig.mk
│   │   │   ├── README.txt
│   │   │   ├── device.mk
│   │   │   └── system_ext.prop
│   │   ├── generic_x86_64_arm64/
│   │   │   ├── BoardConfig.mk
│   │   │   ├── README.txt
│   │   │   ├── device.mk
│   │   │   └── system_ext.prop
│   │   ├── generic_x86_arm/
│   │   │   ├── BoardConfig.mk
│   │   │   ├── README.txt
│   │   │   ├── device.mk
│   │   │   └── system_ext.prop
│   │   ├── go_defaults.prop
│   │   ├── go_defaults_512.prop
│   │   ├── go_defaults_common.prop
│   │   ├── gsi_arm64/
│   │   │   └── BoardConfig.mk
│   │   ├── gsi_system_ext.prop
│   │   ├── gsi_system_ext_user.prop
│   │   ├── linux_bionic/
│   │   │   ├── BoardConfig.mk
│   │   │   └── README.md
│   │   ├── mainline_arm64/
│   │   │   ├── BoardConfig.mk
│   │   │   ├── bluetooth/
│   │   │   │   └── bdroid_buildcfg.h
│   │   │   └── sepolicy/
│   │   │       ├── OWNERS
│   │   │       ├── file.te
│   │   │       └── file_contexts
│   │   ├── mainline_sdk/
│   │   │   ├── BoardConfig.mk
│   │   │   └── README.md
│   │   ├── mainline_x86/
│   │   │   └── BoardConfig.mk
│   │   ├── mainline_x86_64/
│   │   │   └── BoardConfig.mk
│   │   ├── mainline_x86_arm/
│   │   │   └── BoardConfig.mk
│   │   ├── module_arm/
│   │   │   ├── BoardConfig.mk
│   │   │   └── README.md
│   │   ├── module_arm64/
│   │   │   ├── BoardConfig.mk
│   │   │   └── README.md
│   │   ├── module_arm64only/
│   │   │   ├── BoardConfig.mk
│   │   │   └── README.md
│   │   ├── module_riscv64/
│   │   │   ├── BoardConfig.mk
│   │   │   └── README.md
│   │   ├── module_x86/
│   │   │   ├── BoardConfig.mk
│   │   │   └── README.md
│   │   ├── module_x86_64/
│   │   │   ├── BoardConfig.mk
│   │   │   └── README.md
│   │   ├── module_x86_64only/
│   │   │   ├── BoardConfig.mk
│   │   │   └── README.md
│   │   └── ndk/
│   │       ├── BoardConfig.mk
│   │       └── README.md
│   └── product/
│       ├── AndroidProducts.mk
│       ├── OWNERS
│       ├── angle_default.mk
│       ├── aosp_64bitonly_x86_64.mk
│       ├── aosp_arm.mk
│       ├── aosp_arm64.mk
│       ├── aosp_arm64_fullmte.mk
│       ├── aosp_arm64_plus_armv7.mk
│       ├── aosp_base.mk
│       ├── aosp_base_telephony.mk
│       ├── aosp_product.mk
│       ├── aosp_riscv64.mk
│       ├── aosp_x86.mk
│       ├── aosp_x86_64.mk
│       ├── aosp_x86_arm.mk
│       ├── app_function_extensions.mk
│       ├── base.mk
│       ├── base_product.mk
│       ├── base_system.mk
│       ├── base_system_ext.mk
│       ├── base_vendor.mk
│       ├── build_variables.mk
│       ├── cfi-common.mk
│       ├── core_64_bit.mk
│       ├── core_64_bit_only.mk
│       ├── core_minimal.mk
│       ├── core_no_zygote.mk
│       ├── default_art_config.mk
│       ├── developer_gsi_keys.mk
│       ├── empty-preloaded-classes
│       ├── empty-profile
│       ├── emulated_storage.mk
│       ├── full.manifest.xml
│       ├── full.mk
│       ├── full_base.mk
│       ├── full_base_telephony.mk
│       ├── full_x86.mk
│       ├── fullmte.mk
│       ├── generic/
│       │   ├── Android.bp
│       │   ├── OWNERS
│       │   └── erofs_compress_hints.txt
│       ├── generic.mk
│       ├── generic_no_telephony.mk
│       ├── generic_ramdisk.mk
│       ├── generic_system.mk
│       ├── generic_system_arm64.mk
│       ├── generic_system_x86.mk
│       ├── generic_system_x86_64.mk
│       ├── generic_system_x86_arm.mk
│       ├── generic_x86.mk
│       ├── go_defaults.mk
│       ├── go_defaults_512.mk
│       ├── go_defaults_common.mk
│       ├── gsi/
│       │   ├── 28.txt
│       │   ├── 29.txt
│       │   ├── 30.txt
│       │   ├── 31.txt
│       │   ├── 32.txt
│       │   ├── 33.txt
│       │   ├── 34.txt
│       │   ├── Android.bp
│       │   ├── OWNERS
│       │   ├── current.txt
│       │   ├── gsi_skip_mount.cfg
│       │   ├── init.gsi.rc
│       │   ├── init.vndk-nodef.rc
│       │   └── testkey_rsa2048.pem
│       ├── gsi_release.mk
│       ├── handheld_product.mk
│       ├── handheld_system.mk
│       ├── handheld_system_ext.mk
│       ├── handheld_vendor.mk
│       ├── hsum_common.mk
│       ├── languages_default.mk
│       ├── languages_full.mk
│       ├── large_screen_common.mk
│       ├── linux_bionic.mk
│       ├── mainline_sdk.mk
│       ├── mainline_system_arm64.mk
│       ├── mainline_system_x86.mk
│       ├── mainline_system_x86_64.mk
│       ├── mainline_system_x86_arm.mk
│       ├── media_product.mk
│       ├── media_system.mk
│       ├── media_system_ext.mk
│       ├── media_vendor.mk
│       ├── memtag-common.mk
│       ├── module_arm.mk
│       ├── module_arm64.mk
│       ├── module_arm64only.mk
│       ├── module_common.mk
│       ├── module_riscv64.mk
│       ├── module_x86.mk
│       ├── module_x86_64.mk
│       ├── module_x86_64only.mk
│       ├── ndk.mk
│       ├── non_ab_device.mk
│       ├── product_launched_with_k.mk
│       ├── product_launched_with_l.mk
│       ├── product_launched_with_l_mr1.mk
│       ├── product_launched_with_m.mk
│       ├── product_launched_with_n.mk
│       ├── product_launched_with_n_mr1.mk
│       ├── product_launched_with_o.mk
│       ├── product_launched_with_o_mr1.mk
│       ├── product_launched_with_p.mk
│       ├── profile_boot_common.mk
│       ├── ramdisk_stub.mk
│       ├── runtime_libart.mk
│       ├── sdk.mk
│       ├── sdk_with_runtime_apis.mk
│       ├── security/
│       │   ├── Android.bp
│       │   ├── README
│       │   ├── bluetooth.pk8
│       │   ├── bluetooth.x509.pem
│       │   ├── cts_uicc_2021.pk8
│       │   ├── cts_uicc_2021.x509.pem
│       │   ├── fsverity-release.x509.der
│       │   ├── media.pk8
│       │   ├── media.x509.pem
│       │   ├── networkstack.pk8
│       │   ├── networkstack.x509.pem
│       │   ├── nfc.pk8
│       │   ├── nfc.x509.pem
│       │   ├── platform.pk8
│       │   ├── platform.x509.pem
│       │   ├── sdk_sandbox.pk8
│       │   ├── sdk_sandbox.x509.pem
│       │   ├── shared.pk8
│       │   ├── shared.x509.pem
│       │   ├── testkey.pk8
│       │   └── testkey.x509.pem
│       ├── sysconfig/
│       │   ├── Android.bp
│       │   ├── initial-package-stopped-states-aosp.xml
│       │   ├── preinstalled-packages-platform-aosp-product.xml
│       │   ├── preinstalled-packages-platform-full-base.xml
│       │   ├── preinstalled-packages-platform-generic-system.xml
│       │   ├── preinstalled-packages-platform-handheld-product.xml
│       │   ├── preinstalled-packages-platform-handheld-system.xml
│       │   └── preinstalled-packages-platform-telephony-product.xml
│       ├── telephony.mk
│       ├── telephony_product.mk
│       ├── telephony_system.mk
│       ├── telephony_system_ext.mk
│       ├── telephony_vendor.mk
│       ├── updatable_apex.mk
│       ├── userspace_reboot.mk
│       ├── virtual_ab_ota/
│       │   ├── OWNERS
│       │   ├── README.md
│       │   ├── android_t_baseline.mk
│       │   ├── compression.mk
│       │   ├── compression_retrofit.mk
│       │   ├── compression_with_xor.mk
│       │   ├── launch.mk
│       │   ├── launch_with_vendor_ramdisk.mk
│       │   ├── plus_non_ab.mk
│       │   ├── retrofit.mk
│       │   └── vabc_features.mk
│       ├── window_extensions.mk
│       └── window_extensions_base.mk
├── teams/
│   ├── Android.bp
│   └── OWNERS
├── tests/
│   ├── artifact_path_requirements/
│   │   ├── inherit1.rbc
│   │   ├── inherit2.rbc
│   │   ├── inherit3.rbc
│   │   ├── inherit4.rbc
│   │   ├── product.rbc
│   │   └── test.rbc
│   ├── b_tests.sh
│   ├── board.rbc
│   ├── board_input_vars.rbc
│   ├── conversion_error.rbc
│   ├── envsetup_tests.sh
│   ├── include1.rbc
│   ├── inherits_in_regular_variables/
│   │   ├── inherit1.rbc
│   │   ├── product.rbc
│   │   └── test.rbc
│   ├── input_variables.rbc
│   ├── lunch_tests.sh
│   ├── part1.rbc
│   ├── prefixed_sort_order/
│   │   ├── base-secondary.rbc
│   │   ├── base.rbc
│   │   ├── product.rbc
│   │   └── test.rbc
│   ├── product.rbc
│   ├── roboleaf_tests.sh
│   ├── run.rbc
│   ├── single_value_inheritance/
│   │   ├── inherit1.rbc
│   │   ├── inherit2.rbc
│   │   ├── product.rbc
│   │   └── test.rbc
│   ├── single_value_inheritance_2/
│   │   ├── a.rbc
│   │   ├── b.rbc
│   │   ├── c.rbc
│   │   ├── d.rbc
│   │   ├── product.rbc
│   │   └── test.rbc
│   └── version_defaults.rbc
└── tools/
    ├── Android.bp
    ├── aconfig/
    │   ├── .editorconfig
    │   ├── .gitignore
    │   ├── Cargo.toml
    │   ├── MODULE_LICENSE_APACHE2
    │   ├── OWNERS
    │   ├── PREUPLOAD.cfg
    │   ├── TEST_MAPPING
    │   ├── aconfig/
    │   │   ├── Android.bp
    │   │   ├── Cargo.toml
    │   │   ├── build.rs
    │   │   ├── src/
    │   │   │   ├── codegen/
    │   │   │   │   ├── cpp.rs
    │   │   │   │   ├── java.rs
    │   │   │   │   ├── mod.rs
    │   │   │   │   └── rust.rs
    │   │   │   ├── commands.rs
    │   │   │   ├── dump.rs
    │   │   │   ├── main.rs
    │   │   │   ├── storage/
    │   │   │   │   ├── flag_info.rs
    │   │   │   │   ├── flag_table.rs
    │   │   │   │   ├── flag_value.rs
    │   │   │   │   ├── mod.rs
    │   │   │   │   └── package_table.rs
    │   │   │   └── test.rs
    │   │   ├── templates/
    │   │   │   ├── CustomFeatureFlags.java.template
    │   │   │   ├── ExportedFlags.java.template
    │   │   │   ├── FakeFeatureFlagsImpl.java.template
    │   │   │   ├── FeatureFlags.java.template
    │   │   │   ├── FeatureFlagsImpl.deviceConfig.java.template
    │   │   │   ├── FeatureFlagsImpl.exported.java.template
    │   │   │   ├── FeatureFlagsImpl.new_storage.java.template
    │   │   │   ├── FeatureFlagsImpl.test_mode.java.template
    │   │   │   ├── Flags.java.template
    │   │   │   ├── cpp_exported_header.template
    │   │   │   ├── cpp_source_file.template
    │   │   │   ├── rust.template
    │   │   │   └── rust_test.template
    │   │   └── tests/
    │   │       ├── AconfigHostTest.java
    │   │       ├── AconfigTest.java
    │   │       ├── AndroidManifest.xml
    │   │       ├── aconfig_exported_mode_test.cpp
    │   │       ├── aconfig_exported_mode_test.rs
    │   │       ├── aconfig_force_read_only_mode_test.cpp
    │   │       ├── aconfig_force_read_only_mode_test.rs
    │   │       ├── aconfig_prod_mode_test.rs
    │   │       ├── aconfig_test.cpp
    │   │       ├── aconfig_test_mode_test.rs
    │   │       ├── aconfig_test_test_variant.cpp
    │   │       ├── first.values
    │   │       ├── read_only_test.aconfig
    │   │       ├── read_only_test.values
    │   │       ├── second.values
    │   │       ├── storage_test_1.aconfig
    │   │       ├── storage_test_1.values
    │   │       ├── storage_test_2.aconfig
    │   │       ├── storage_test_2.values
    │   │       ├── storage_test_4.aconfig
    │   │       ├── storage_test_4.values
    │   │       ├── test.aconfig
    │   │       ├── test_exported.aconfig
    │   │       ├── test_force_read_only.aconfig
    │   │       ├── test_second_package.aconfig
    │   │       └── third.values
    │   ├── aconfig_device_paths/
    │   │   ├── Android.bp
    │   │   ├── Cargo.toml
    │   │   ├── mainline_aconfig_flags_paths.txt
    │   │   ├── partition_aconfig_flags_paths.txt
    │   │   ├── src/
    │   │   │   ├── DeviceProtosTemplate.java
    │   │   │   ├── DeviceProtosTestUtilTemplate.java
    │   │   │   ├── HostDeviceProtosTemplate.java
    │   │   │   └── lib.rs
    │   │   └── test/
    │   │       ├── Android.bp
    │   │       ├── AndroidManifest.xml
    │   │       └── src/
    │   │           └── DeviceProtosTestUtilTest.java
    │   ├── aconfig_flags/
    │   │   ├── Android.bp
    │   │   ├── Cargo.toml
    │   │   ├── flags.aconfig
    │   │   └── src/
    │   │       └── lib.rs
    │   ├── aconfig_protos/
    │   │   ├── Android.bp
    │   │   ├── Cargo.toml
    │   │   ├── build.rs
    │   │   ├── jarjar-nano-rules.txt
    │   │   ├── protos/
    │   │   │   ├── aconfig.proto
    │   │   │   └── aconfig_internal.proto
    │   │   └── src/
    │   │       └── lib.rs
    │   ├── aconfig_storage_file/
    │   │   ├── Android.bp
    │   │   ├── Cargo.toml
    │   │   ├── aconfig_storage_file.cpp
    │   │   ├── build.rs
    │   │   ├── include/
    │   │   │   └── aconfig_storage/
    │   │   │       └── aconfig_storage_file.hpp
    │   │   ├── protos/
    │   │   │   └── aconfig_storage_metadata.proto
    │   │   ├── src/
    │   │   │   ├── flag_info.rs
    │   │   │   ├── flag_table.rs
    │   │   │   ├── flag_value.rs
    │   │   │   ├── lib.rs
    │   │   │   ├── main.rs
    │   │   │   ├── package_table.rs
    │   │   │   ├── protos.rs
    │   │   │   ├── sip_hasher13.rs
    │   │   │   └── test_utils.rs
    │   │   ├── srcs/
    │   │   │   └── android/
    │   │   │       └── aconfig/
    │   │   │           └── storage/
    │   │   │               ├── AconfigStorageException.java
    │   │   │               ├── ByteBufferReader.java
    │   │   │               ├── FileType.java
    │   │   │               ├── FlagTable.java
    │   │   │               ├── FlagType.java
    │   │   │               ├── FlagValueList.java
    │   │   │               ├── PackageTable.java
    │   │   │               ├── SipHasher13.java
    │   │   │               ├── StorageFileProvider.java
    │   │   │               └── TableUtils.java
    │   │   └── tests/
    │   │       ├── Android.bp
    │   │       ├── AndroidManifest.xml
    │   │       ├── AndroidStorageJaveTest.xml
    │   │       ├── data/
    │   │       │   ├── v1/
    │   │       │   │   ├── flag_v1.info
    │   │       │   │   └── flag_v1.val
    │   │       │   └── v2/
    │   │       │       ├── flag_v2.info
    │   │       │       └── flag_v2.val
    │   │       ├── jarjar.txt
    │   │       ├── srcs/
    │   │       │   ├── ByteBufferReaderTest.java
    │   │       │   ├── FlagTableTest.java
    │   │       │   ├── FlagValueListTest.java
    │   │       │   ├── PackageTableTest.java
    │   │       │   ├── SipHasher13Test.java
    │   │       │   ├── StorageFileProviderTest.java
    │   │       │   └── TestDataUtils.java
    │   │       └── storage_file_test.cpp
    │   ├── aconfig_storage_read_api/
    │   │   ├── Android.bp
    │   │   ├── Cargo.toml
    │   │   ├── aconfig_storage_read_api.cpp
    │   │   ├── build.rs
    │   │   ├── include/
    │   │   │   └── aconfig_storage/
    │   │   │       └── aconfig_storage_read_api.hpp
    │   │   ├── src/
    │   │   │   ├── flag_info_query.rs
    │   │   │   ├── flag_table_query.rs
    │   │   │   ├── flag_value_query.rs
    │   │   │   ├── lib.rs
    │   │   │   ├── mapped_file.rs
    │   │   │   └── package_table_query.rs
    │   │   ├── srcs/
    │   │   │   ├── android/
    │   │   │   │   ├── aconfig/
    │   │   │   │   │   └── storage/
    │   │   │   │   │       ├── AconfigStorageReadAPI.java
    │   │   │   │   │       ├── FlagReadContext.java
    │   │   │   │   │       └── PackageReadContext.java
    │   │   │   │   └── os/
    │   │   │   │       └── flagging/
    │   │   │   │           ├── PlatformAconfigPackage.java
    │   │   │   │           └── PlatformAconfigPackageInternal.java
    │   │   │   └── lib.rs
    │   │   └── tests/
    │   │       ├── AconfigStorageReadFunctionalTest.xml
    │   │       ├── Android.bp
    │   │       ├── AndroidManifest.xml
    │   │       ├── data/
    │   │       │   ├── v1/
    │   │       │   │   ├── flag_v1.info
    │   │       │   │   └── flag_v1.val
    │   │       │   └── v2/
    │   │       │       ├── flag_v2.info
    │   │       │       └── flag_v2.val
    │   │       ├── functional/
    │   │       │   └── srcs/
    │   │       │       ├── AconfigStorageReadAPITest.java
    │   │       │       ├── PlatformAconfigPackageInternalTest.java
    │   │       │       └── PlatformAconfigPackageTest.java
    │   │       ├── storage_read_api_test.cpp
    │   │       └── storage_read_api_test.rs
    │   ├── aconfig_storage_write_api/
    │   │   ├── Android.bp
    │   │   ├── Cargo.toml
    │   │   ├── aconfig_storage_write_api.cpp
    │   │   ├── build.rs
    │   │   ├── include/
    │   │   │   └── aconfig_storage/
    │   │   │       └── aconfig_storage_write_api.hpp
    │   │   ├── src/
    │   │   │   ├── flag_info_update.rs
    │   │   │   ├── flag_value_update.rs
    │   │   │   ├── lib.rs
    │   │   │   ├── mapped_file.rs
    │   │   │   └── test_utils.rs
    │   │   └── tests/
    │   │       ├── Android.bp
    │   │       ├── flag.info
    │   │       ├── flag.val
    │   │       ├── storage_write_api_test.cpp
    │   │       └── storage_write_api_test.rs
    │   ├── aflags/
    │   │   ├── Android.bp
    │   │   ├── Cargo.toml
    │   │   └── src/
    │   │       ├── aconfig_storage_source.rs
    │   │       ├── device_config_source.rs
    │   │       ├── load_protos.rs
    │   │       └── main.rs
    │   ├── convert_finalized_flags/
    │   │   ├── Android.bp
    │   │   ├── Cargo.toml
    │   │   ├── extended_flags_list_35.txt
    │   │   └── src/
    │   │       ├── lib.rs
    │   │       └── main.rs
    │   ├── exported_flag_check/
    │   │   ├── Android.bp
    │   │   ├── Cargo.toml
    │   │   ├── allow_flag_list.txt
    │   │   ├── allow_package_list.txt
    │   │   ├── src/
    │   │   │   ├── main.rs
    │   │   │   └── utils.rs
    │   │   └── tests/
    │   │       ├── api-signature-file.txt
    │   │       ├── finalized-flags.txt
    │   │       ├── flags.declarations
    │   │       ├── flags.protobuf
    │   │       ├── flags.values
    │   │       └── generate-flags-protobuf.sh
    │   ├── fake_device_config/
    │   │   ├── Android.bp
    │   │   └── src/
    │   │       └── android/
    │   │           ├── os/
    │   │           │   ├── Build.java
    │   │           │   └── flagging/
    │   │           │       ├── AconfigPackage.java
    │   │           │       ├── AconfigPackageInternal.java
    │   │           │       ├── PlatformAconfigPackage.java
    │   │           │       └── PlatformAconfigPackageInternal.java
    │   │           └── util/
    │   │               └── Log.java
    │   └── overrideflags/
    │       └── overrideflags.py
    ├── acp/
    │   ├── Android.bp
    │   ├── README
    │   └── acp.c
    ├── apicheck/
    │   ├── Android.bp
    │   └── etc/
    │       └── apicheck
    ├── atree/
    │   ├── Android.bp
    │   ├── atree.cpp
    │   ├── files.cpp
    │   ├── files.h
    │   ├── fs.cpp
    │   ├── fs.h
    │   └── options.h
    ├── auto_gen_test_config.py
    ├── auto_gen_test_config_test.py
    ├── brillo-clang-format
    ├── build-runfiles.cc
    ├── canoninja/
    │   ├── README.md
    │   ├── canoninja.go
    │   ├── canoninja_test.go
    │   ├── cmd/
    │   │   └── canoninja.go
    │   └── go.mod
    ├── characteristics_rro_generator.py
    ├── check-flagged-apis/
    │   ├── Android.bp
    │   ├── OWNERS
    │   ├── check-flagged-apis.sh
    │   └── src/
    │       └── com/
    │           └── android/
    │               └── checkflaggedapis/
    │                   ├── CheckFlaggedApisTest.kt
    │                   └── Main.kt
    ├── check_elf_file.py
    ├── check_identical_lib.sh
    ├── check_radio_versions.py
    ├── compare_builds.py
    ├── compliance/
    │   ├── Android.bp
    │   ├── README.md
    │   ├── cmd/
    │   │   ├── checkmetadata/
    │   │   │   ├── checkmetadata.go
    │   │   │   └── checkmetadata_test.go
    │   │   ├── checkshare/
    │   │   │   ├── checkshare.go
    │   │   │   └── checkshare_test.go
    │   │   ├── dumpgraph/
    │   │   │   ├── dumpgraph.go
    │   │   │   └── dumpgraph_test.go
    │   │   ├── dumpresolutions/
    │   │   │   ├── dumpresolutions.go
    │   │   │   └── dumpresolutions_test.go
    │   │   ├── htmlnotice/
    │   │   │   ├── htmlnotice.go
    │   │   │   └── htmlnotice_test.go
    │   │   ├── listshare/
    │   │   │   ├── listshare.go
    │   │   │   └── listshare_test.go
    │   │   ├── rtrace/
    │   │   │   ├── rtrace.go
    │   │   │   └── rtrace_test.go
    │   │   ├── shippedlibs/
    │   │   │   ├── shippedlibs.go
    │   │   │   └── shippedlibs_test.go
    │   │   ├── testdata/
    │   │   │   ├── README.md
    │   │   │   ├── firstparty/
    │   │   │   │   ├── FIRST_PARTY_LICENSE
    │   │   │   │   ├── METADATA
    │   │   │   │   ├── application.meta_lic
    │   │   │   │   ├── bin/
    │   │   │   │   │   ├── bin1.meta_lic
    │   │   │   │   │   ├── bin2.meta_lic
    │   │   │   │   │   └── bin3.meta_lic
    │   │   │   │   ├── container.zip.meta_lic
    │   │   │   │   ├── highest.apex.meta_lic
    │   │   │   │   └── lib/
    │   │   │   │       ├── liba.so.meta_lic
    │   │   │   │       ├── libb.so.meta_lic
    │   │   │   │       ├── libc.a.meta_lic
    │   │   │   │       └── libd.so.meta_lic
    │   │   │   ├── notice/
    │   │   │   │   ├── METADATA
    │   │   │   │   ├── NOTICE_LICENSE
    │   │   │   │   ├── application.meta_lic
    │   │   │   │   ├── bin/
    │   │   │   │   │   ├── bin1.meta_lic
    │   │   │   │   │   ├── bin2.meta_lic
    │   │   │   │   │   └── bin3.meta_lic
    │   │   │   │   ├── container.zip.meta_lic
    │   │   │   │   ├── highest.apex.meta_lic
    │   │   │   │   └── lib/
    │   │   │   │       ├── liba.so.meta_lic
    │   │   │   │       ├── libb.so.meta_lic
    │   │   │   │       ├── libc.a.meta_lic
    │   │   │   │       └── libd.so.meta_lic
    │   │   │   ├── proprietary/
    │   │   │   │   ├── METADATA
    │   │   │   │   ├── PROPRIETARY_LICENSE
    │   │   │   │   ├── application.meta_lic
    │   │   │   │   ├── bin/
    │   │   │   │   │   ├── bin1.meta_lic
    │   │   │   │   │   ├── bin2.meta_lic
    │   │   │   │   │   └── bin3.meta_lic
    │   │   │   │   ├── container.zip.meta_lic
    │   │   │   │   ├── highest.apex.meta_lic
    │   │   │   │   └── lib/
    │   │   │   │       ├── liba.so.meta_lic
    │   │   │   │       ├── libb.so.meta_lic
    │   │   │   │       ├── libc.a.meta_lic
    │   │   │   │       └── libd.so.meta_lic
    │   │   │   ├── reciprocal/
    │   │   │   │   ├── METADATA
    │   │   │   │   ├── RECIPROCAL_LICENSE
    │   │   │   │   ├── application.meta_lic
    │   │   │   │   ├── bin/
    │   │   │   │   │   ├── bin1.meta_lic
    │   │   │   │   │   ├── bin2.meta_lic
    │   │   │   │   │   └── bin3.meta_lic
    │   │   │   │   ├── container.zip.meta_lic
    │   │   │   │   ├── highest.apex.meta_lic
    │   │   │   │   └── lib/
    │   │   │   │       ├── liba.so.meta_lic
    │   │   │   │       ├── libb.so.meta_lic
    │   │   │   │       ├── libc.a.meta_lic
    │   │   │   │       └── libd.so.meta_lic
    │   │   │   ├── regressconcur/
    │   │   │   │   ├── README.md
    │   │   │   │   ├── bin/
    │   │   │   │   │   ├── bin1.meta_lic
    │   │   │   │   │   ├── bin2.meta_lic
    │   │   │   │   │   ├── bin3.meta_lic
    │   │   │   │   │   ├── bin4.meta_lic
    │   │   │   │   │   ├── bin5.meta_lic
    │   │   │   │   │   ├── bin6.meta_lic
    │   │   │   │   │   ├── bin7.meta_lic
    │   │   │   │   │   ├── bin8.meta_lic
    │   │   │   │   │   └── bin9.meta_lic
    │   │   │   │   ├── container.zip.meta_lic
    │   │   │   │   └── lib/
    │   │   │   │       ├── lib1.a.meta_lic
    │   │   │   │       ├── lib2.a.meta_lic
    │   │   │   │       ├── lib3.a.meta_lic
    │   │   │   │       ├── lib4.a.meta_lic
    │   │   │   │       ├── lib5.a.meta_lic
    │   │   │   │       ├── lib6.a.meta_lic
    │   │   │   │       ├── lib7.a.meta_lic
    │   │   │   │       ├── lib8.a.meta_lic
    │   │   │   │       └── lib9.a.meta_lic
    │   │   │   ├── regressgpl1/
    │   │   │   │   ├── README.md
    │   │   │   │   ├── bin/
    │   │   │   │   │   ├── bin1.meta_lic
    │   │   │   │   │   ├── bin2.meta_lic
    │   │   │   │   │   └── bin3.meta_lic
    │   │   │   │   ├── container.zip.meta_lic
    │   │   │   │   └── lib/
    │   │   │   │       ├── libapache.so.meta_lic
    │   │   │   │       ├── libc++.so.meta_lic
    │   │   │   │       └── libgpl.so.meta_lic
    │   │   │   ├── regressgpl2/
    │   │   │   │   ├── README.md
    │   │   │   │   ├── bin/
    │   │   │   │   │   ├── bin1.meta_lic
    │   │   │   │   │   ├── bin2.meta_lic
    │   │   │   │   │   └── bin3.meta_lic
    │   │   │   │   ├── container.zip.meta_lic
    │   │   │   │   └── lib/
    │   │   │   │       ├── libapache.so.meta_lic
    │   │   │   │       ├── libc++.so.meta_lic
    │   │   │   │       └── libgpl.so.meta_lic
    │   │   │   └── restricted/
    │   │   │       ├── METADATA
    │   │   │       ├── METADATA.android
    │   │   │       ├── RESTRICTED_LICENSE
    │   │   │       ├── application.meta_lic
    │   │   │       ├── bin/
    │   │   │       │   ├── bin1.meta_lic
    │   │   │       │   ├── bin2.meta_lic
    │   │   │       │   └── bin3.meta_lic
    │   │   │       ├── container.zip.meta_lic
    │   │   │       ├── highest.apex.meta_lic
    │   │   │       └── lib/
    │   │   │           ├── liba.so.meta_lic
    │   │   │           ├── libb.so.meta_lic
    │   │   │           ├── libc.a.meta_lic
    │   │   │           └── libd.so.meta_lic
    │   │   ├── textnotice/
    │   │   │   ├── textnotice.go
    │   │   │   └── textnotice_test.go
    │   │   └── xmlnotice/
    │   │       ├── xmlnotice.go
    │   │       └── xmlnotice_test.go
    │   ├── condition.go
    │   ├── condition_test.go
    │   ├── conditionset.go
    │   ├── conditionset_test.go
    │   ├── doc.go
    │   ├── go.mod
    │   ├── go.work
    │   ├── graph.go
    │   ├── noticeindex.go
    │   ├── policy_policy.go
    │   ├── policy_policy_test.go
    │   ├── policy_resolve.go
    │   ├── policy_resolve_test.go
    │   ├── policy_resolvenotices.go
    │   ├── policy_resolvenotices_test.go
    │   ├── policy_resolveprivacy.go
    │   ├── policy_resolveprivacy_test.go
    │   ├── policy_resolveshare.go
    │   ├── policy_resolveshare_test.go
    │   ├── policy_shareprivacyconflicts.go
    │   ├── policy_shareprivacyconflicts_test.go
    │   ├── policy_shipped.go
    │   ├── policy_shipped_test.go
    │   ├── policy_walk.go
    │   ├── policy_walk_test.go
    │   ├── projectmetadata/
    │   │   ├── Android.bp
    │   │   ├── projectmetadata.go
    │   │   └── projectmetadata_test.go
    │   ├── readgraph.go
    │   ├── readgraph_test.go
    │   ├── resolution.go
    │   ├── resolutionset.go
    │   ├── resolutionset_test.go
    │   ├── test_util.go
    │   └── testfs/
    │       ├── Android.bp
    │       └── testfs.go
    ├── dependency_mapper/
    │   ├── Android.bp
    │   ├── OWNERS
    │   ├── README.md
    │   ├── proto/
    │   │   └── dependency.proto
    │   ├── src/
    │   │   └── com/
    │   │       └── android/
    │   │           └── dependencymapper/
    │   │               ├── ClassDependenciesVisitor.java
    │   │               ├── ClassDependencyAnalyzer.java
    │   │               ├── ClassDependencyData.java
    │   │               ├── ClassRelevancyFilter.java
    │   │               ├── DependencyMapper.java
    │   │               ├── JavaSourceAnalyzer.java
    │   │               ├── JavaSourceData.java
    │   │               ├── Main.java
    │   │               └── Utils.java
    │   └── tests/
    │       ├── res/
    │       │   ├── testdata/
    │       │   │   ├── annotation/
    │       │   │   │   ├── AnnotationUsage.java
    │       │   │   │   ├── RuntimeAnnotation.java
    │       │   │   │   └── SourceAnnotation.java
    │       │   │   ├── constants/
    │       │   │   │   ├── ConstantDefinition.java
    │       │   │   │   └── ConstantUsage.java
    │       │   │   ├── inheritance/
    │       │   │   │   ├── BaseClass.java
    │       │   │   │   ├── BaseImpl.java
    │       │   │   │   └── InheritanceUsage.java
    │       │   │   └── methods/
    │       │   │       ├── FieldUsage.java
    │       │   │       ├── MethodUsage.java
    │       │   │       ├── ReferenceClass1.java
    │       │   │       └── ReferenceClass2.java
    │       │   └── testfiles/
    │       │       ├── dependency-mapper-test-data.jar
    │       │       └── sources.rsp
    │       └── src/
    │           └── com/
    │               └── android/
    │                   └── dependencymapper/
    │                       ├── ClassDependencyAnalyzerTest.java
    │                       ├── ClassRelevancyFilterTest.java
    │                       ├── DependencyMapperTest.java
    │                       ├── JavaSourceAnalyzerTest.java
    │                       └── UtilsTest.java
    ├── docker/
    │   ├── .gitignore
    │   ├── Dockerfile
    │   └── README.md
    ├── droiddoc/
    │   ├── Android.bp
    │   ├── LICENSE
    │   ├── README
    │   ├── templates-pdk/
    │   │   ├── assets/
    │   │   │   ├── android-developer-core.css
    │   │   │   ├── android-developer-docs-devguide.css
    │   │   │   ├── android-developer-docs.css
    │   │   │   ├── android-developer-docs.js
    │   │   │   ├── android-developer-reference.js
    │   │   │   ├── android-developer-resource-browser.css
    │   │   │   ├── android-developer-resource-browser.js
    │   │   │   ├── carousel.js
    │   │   │   ├── customizations.js
    │   │   │   ├── design/
    │   │   │   │   ├── default.css
    │   │   │   │   └── default.js
    │   │   │   ├── jquery-history.js
    │   │   │   ├── microtemplate.js
    │   │   │   ├── prettify.js
    │   │   │   ├── search_autocomplete.js
    │   │   │   ├── style.css
    │   │   │   └── yui-3.3.0-reset-min.css
    │   │   ├── components/
    │   │   │   └── masthead.cs
    │   │   ├── customizations.cs
    │   │   ├── data.hdf
    │   │   ├── docpage.cs
    │   │   ├── footer.cs
    │   │   ├── head_tag.cs
    │   │   ├── header_tabs.cs
    │   │   ├── jd_lists_unified.cs
    │   │   ├── sampleindex.cs
    │   │   ├── sdkpage.cs
    │   │   └── trailer.cs
    │   └── test/
    │       ├── generics/
    │       │   └── src/
    │       │       └── com/
    │       │           └── android/
    │       │               └── generics/
    │       │                   ├── AbsListView.java
    │       │                   ├── Adapter.java
    │       │                   ├── AdapterView.java
    │       │                   ├── Bar.java
    │       │                   ├── Foo.java
    │       │                   ├── FooBar.java
    │       │                   ├── Iface.java
    │       │                   ├── ListAdapter.java
    │       │                   ├── TestComparable.java
    │       │                   └── TestEnum.java
    │       └── stubs/
    │           ├── expected/
    │           │   └── com/
    │           │       └── android/
    │           │           └── stubs/
    │           │               ├── Annot.java
    │           │               ├── InterfaceEnum.java
    │           │               ├── Parent.java
    │           │               ├── SomeEnum.java
    │           │               ├── Types.java
    │           │               ├── a/
    │           │               │   ├── A.java
    │           │               │   └── SomeInterface.java
    │           │               └── b/
    │           │                   └── B.java
    │           ├── func.sh
    │           ├── run.sh
    │           └── src/
    │               └── com/
    │                   └── android/
    │                       └── stubs/
    │                           ├── Annot.java
    │                           ├── InterfaceEnum.java
    │                           ├── Parent.java
    │                           ├── SomeEnum.java
    │                           ├── Types.java
    │                           ├── a/
    │                           │   ├── A.java
    │                           │   └── SomeInterface.java
    │                           ├── b/
    │                           │   └── B.java
    │                           └── hidden/
    │                               ├── Hidden.java
    │                               ├── HiddenOuter.java
    │                               └── PackagePrivate.java
    ├── edit_monitor/
    │   ├── Android.bp
    │   ├── OWNERS
    │   ├── daemon_manager.py
    │   ├── daemon_manager_test.py
    │   ├── edit_monitor.py
    │   ├── edit_monitor_integration_test.py
    │   ├── edit_monitor_test.py
    │   ├── main.py
    │   ├── proto/
    │   │   └── edit_event.proto
    │   ├── utils.py
    │   └── utils_test.py
    ├── envsetup/
    │   ├── run_envsetup_tests
    │   └── spam_for_lunch
    ├── event_log_tags.py
    ├── exercise_compare_builds
    ├── extract_kernel.py
    ├── fat16copy.py
    ├── filelistdiff/
    │   ├── Android.bp
    │   ├── OWNERS
    │   ├── allowlist
    │   ├── allowlist_next
    │   └── file_list_diff.py
    ├── fileslist_util.py
    ├── finalization/
    │   ├── OWNERS
    │   ├── README.md
    │   ├── build-step-0-and-m.sh
    │   ├── build-step-0.sh
    │   ├── build-step-1-and-2.sh
    │   ├── build-step-1-and-m.sh
    │   ├── build-step-1.sh
    │   ├── build_soong_java_droidstubs.go.apply_hack.diff
    │   ├── build_soong_java_droidstubs.go.revert_hack.diff
    │   ├── cleanup.sh
    │   ├── command-line-options.sh
    │   ├── dryrun-cleanup.sh
    │   ├── dryrun-step-1-and-2.sh
    │   ├── dryrun-step-1.sh
    │   ├── environment.sh
    │   ├── finalize-sdk-rel.sh
    │   ├── finalize-sdk-resources.sh
    │   ├── finalize-vintf-resources.sh
    │   ├── frameworks_base.apply_hack.diff
    │   ├── frameworks_base.revert_hack.diff
    │   ├── localonly-steps.sh
    │   ├── step-0.sh
    │   ├── step-1.sh
    │   └── step-2.sh
    ├── find_static_candidates.py
    ├── findleaves.py
    ├── fixlinebreaks.sh
    ├── fs_config/
    │   ├── Android.bp
    │   ├── OWNERS
    │   ├── README.md
    │   ├── end_to_end_test/
    │   │   ├── config.fs
    │   │   ├── product_fs_config_dirs
    │   │   ├── product_fs_config_files
    │   │   ├── run_test.sh
    │   │   ├── system_fs_config_dirs
    │   │   ├── system_fs_config_files
    │   │   ├── vendor_fs_config_dirs
    │   │   └── vendor_fs_config_files
    │   ├── fs_config.c
    │   ├── fs_config.go
    │   ├── fs_config_generator.py
    │   ├── pylintrc
    │   └── test_fs_config_generator.py
    ├── generate-enforce-rro-android-manifest.py
    ├── generate-notice-files.py
    ├── generate-self-extracting-archive.py
    ├── generate_gts_shared_report.py
    ├── ide_query/
    │   ├── OWNERS
    │   ├── cc_analyzer/
    │   │   ├── Android.bp
    │   │   ├── README.md
    │   │   ├── analyzer.cc
    │   │   ├── analyzer.h
    │   │   ├── builtin_headers.cc
    │   │   ├── builtin_headers.h
    │   │   ├── include_scanner.cc
    │   │   ├── include_scanner.h
    │   │   └── main.cc
    │   ├── cc_analyzer_proto/
    │   │   ├── Android.bp
    │   │   ├── cc_analyzer.pb.go
    │   │   ├── cc_analyzer.proto
    │   │   └── regen.sh
    │   ├── go.mod
    │   ├── go.work
    │   ├── go.work.sum
    │   ├── ide_query.go
    │   ├── ide_query.sh
    │   ├── ide_query_proto/
    │   │   ├── ide_query.pb.go
    │   │   ├── ide_query.proto
    │   │   └── regen.sh
    │   └── prober_scripts/
    │       ├── cpp/
    │       │   ├── Android.bp
    │       │   ├── foo.proto
    │       │   └── general.cc
    │       ├── cpp_suite.textpb
    │       ├── ide_query.out
    │       ├── jvm/
    │       │   ├── Android.bp
    │       │   ├── Bar.java
    │       │   ├── Foo.java
    │       │   ├── ide_query.out
    │       │   ├── other/
    │       │   │   └── Other.java
    │       │   └── suite.textpb
    │       └── regen.sh
    ├── java-event-log-tags.py
    ├── libhost/
    │   ├── Android.bp
    │   ├── CopyFile.c
    │   └── include/
    │       └── host/
    │           └── CopyFile.h
    ├── list_files.py
    ├── lunchable
    ├── merge-event-log-tags.py
    ├── missing_soong_module_info.py
    ├── mk2bp_catalog.py
    ├── mk2bp_partition.py
    ├── normalize_path.py
    ├── otatools_package/
    │   └── Android.bp
    ├── perf/
    │   ├── benchmarks
    │   ├── format_benchmarks
    │   ├── pretty.py
    │   └── utils.py
    ├── post_process_props.py
    ├── post_process_props_unittest.xml
    ├── print_module_licenses.sh
    ├── product_config/
    │   ├── Android.bp
    │   ├── MANIFEST.MF
    │   ├── TEST_MANIFEST.MF
    │   ├── inherit_tree.py
    │   ├── src/
    │   │   └── com/
    │   │       └── android/
    │   │           └── build/
    │   │               └── config/
    │   │                   ├── CommandException.java
    │   │                   ├── ConfigBase.java
    │   │                   ├── ConvertMakeToGenericConfig.java
    │   │                   ├── CsvParser.java
    │   │                   ├── DumpConfigParser.java
    │   │                   ├── ErrorReporter.java
    │   │                   ├── Errors.java
    │   │                   ├── FlatConfig.java
    │   │                   ├── FlattenConfig.java
    │   │                   ├── GenericConfig.java
    │   │                   ├── Kati.java
    │   │                   ├── KatiCommand.java
    │   │                   ├── KatiCommandImpl.java
    │   │                   ├── KatiImpl.java
    │   │                   ├── Main.java
    │   │                   ├── MakeConfig.java
    │   │                   ├── MakeWriter.java
    │   │                   ├── Options.java
    │   │                   ├── OutputChecker.java
    │   │                   ├── Position.java
    │   │                   ├── RegexSet.java
    │   │                   ├── Str.java
    │   │                   ├── Value.java
    │   │                   └── VarType.java
    │   ├── test/
    │   │   └── com/
    │   │       └── android/
    │   │           └── build/
    │   │               └── config/
    │   │                   ├── CsvParserTest.java
    │   │                   ├── ErrorReporterTest.java
    │   │                   ├── OptionsTest.java
    │   │                   ├── PositionTest.java
    │   │                   ├── TestErrors.java
    │   │                   └── TestRunner.java
    │   └── test.sh
    ├── protos/
    │   ├── Android.bp
    │   └── metadata_file.proto
    ├── rbcrun/
    │   ├── Android.bp
    │   ├── README.md
    │   ├── go.mod
    │   ├── go.sum
    │   ├── host.go
    │   ├── host_test.go
    │   ├── rbcrun/
    │   │   └── rbcrun.go
    │   └── testdata/
    │       ├── bzl_loads_scl.bzl
    │       ├── bzl_loads_scl_2.bzl
    │       ├── file_ops.star
    │       ├── load.star
    │       ├── module1.star
    │       ├── module2.star
    │       ├── scl_incorrectly_loads_bzl.scl
    │       ├── shell.star
    │       └── test_scl.scl
    ├── record-finalized-flags/
    │   ├── .gitignore
    │   ├── Android.bp
    │   ├── Cargo.toml
    │   ├── OWNERS
    │   ├── src/
    │   │   ├── api_signature_files.rs
    │   │   ├── finalized_flags.rs
    │   │   ├── flag_values.rs
    │   │   └── main.rs
    │   └── tests/
    │       ├── api-signature-file.txt
    │       ├── finalized-flags.txt
    │       ├── flags.declarations
    │       ├── flags.protobuf
    │       ├── flags.values
    │       └── generate-flags-protobuf.sh
    ├── releasetools/
    │   ├── Android.bp
    │   ├── OWNERS
    │   ├── add_img_to_target_files.py
    │   ├── apex_utils.py
    │   ├── blockimgdiff.py
    │   ├── build_image.py
    │   ├── build_super_image.py
    │   ├── care_map_pb2.py
    │   ├── check_ota_package_signature.py
    │   ├── check_partition_sizes.py
    │   ├── check_target_files_signatures.py
    │   ├── check_target_files_vintf.py
    │   ├── common.py
    │   ├── create_brick_ota.py
    │   ├── edify_generator.py
    │   ├── find_shareduid_violation.py
    │   ├── fsverity_metadata_generator.py
    │   ├── images.py
    │   ├── img_from_target_files.py
    │   ├── jarjar-rules.txt
    │   ├── make_recovery_patch.py
    │   ├── merge/
    │   │   ├── Android.bp
    │   │   ├── OWNERS
    │   │   ├── merge_builds.py
    │   │   ├── merge_compatibility_checks.py
    │   │   ├── merge_dexopt.py
    │   │   ├── merge_meta.py
    │   │   ├── merge_target_files.py
    │   │   ├── merge_utils.py
    │   │   ├── test_merge_compatibility_checks.py
    │   │   ├── test_merge_meta.py
    │   │   └── test_merge_utils.py
    │   ├── merge_ota.py
    │   ├── non_ab_ota.py
    │   ├── ota_from_raw_img.py
    │   ├── ota_from_target_files.py
    │   ├── ota_metadata.proto
    │   ├── ota_metadata_pb2.py
    │   ├── ota_package_parser.py
    │   ├── ota_signing_utils.py
    │   ├── ota_utils.py
    │   ├── payload_signer.py
    │   ├── pylintrc
    │   ├── rangelib.py
    │   ├── sign_apex.py
    │   ├── sign_target_files_apks.py
    │   ├── sparse_img.py
    │   ├── target_files_diff.py
    │   ├── test_add_img_to_target_files.py
    │   ├── test_apex_utils.py
    │   ├── test_blockimgdiff.py
    │   ├── test_build_image.py
    │   ├── test_check_partition_sizes.py
    │   ├── test_check_target_files_vintf.py
    │   ├── test_common.py
    │   ├── test_merge_ota.py
    │   ├── test_non_ab_ota.py
    │   ├── test_ota_from_target_files.py
    │   ├── test_ota_utils.py
    │   ├── test_rangelib.py
    │   ├── test_sign_apex.py
    │   ├── test_sign_target_files_apks.py
    │   ├── test_utils.py
    │   ├── test_validate_target_files.py
    │   ├── test_verity_utils.py
    │   ├── testdata/
    │   │   ├── TestApp.apk
    │   │   ├── apexkeys_framework.txt
    │   │   ├── apexkeys_framework_conflict.txt
    │   │   ├── apexkeys_merge.txt
    │   │   ├── apexkeys_vendor.txt
    │   │   ├── apkcerts_framework.txt
    │   │   ├── apkcerts_merge.txt
    │   │   ├── apkcerts_vendor.txt
    │   │   ├── foo.apex
    │   │   ├── has_apk.apex
    │   │   ├── media.x509.pem
    │   │   ├── merge_config_framework_item_list
    │   │   ├── payload_signer.sh
    │   │   ├── platform.x509.pem
    │   │   ├── signing_helper.sh
    │   │   ├── testkey.key
    │   │   ├── testkey.pk8
    │   │   ├── testkey.pubkey.pem
    │   │   ├── testkey.x509.pem
    │   │   ├── testkey_EC.key
    │   │   ├── testkey_RSA4096.key
    │   │   ├── testkey_mincrypt
    │   │   ├── testkey_with_passwd.key
    │   │   ├── testkey_with_passwd.pk8
    │   │   ├── testkey_with_passwd.x509.pem
    │   │   ├── verity.x509.pem
    │   │   ├── verity_mincrypt
    │   │   └── vintf/
    │   │       ├── kernel/
    │   │       │   └── SYSTEM/
    │   │       │       └── etc/
    │   │       │           └── vintf/
    │   │       │               └── compatibility_matrix.1.xml
    │   │       ├── matrix_incompat/
    │   │       │   └── SYSTEM/
    │   │       │       └── etc/
    │   │       │           └── vintf/
    │   │       │               └── compatibility_matrix.1.xml
    │   │       ├── sku_compat/
    │   │       │   ├── ODM/
    │   │       │   │   └── etc/
    │   │       │   │       └── vintf/
    │   │       │   │           └── manifest_sku.xml
    │   │       │   └── SYSTEM/
    │   │       │       └── etc/
    │   │       │           └── vintf/
    │   │       │               └── compatibility_matrix.1.xml
    │   │       └── sku_incompat/
    │   │           ├── ODM/
    │   │           │   └── etc/
    │   │           │       └── vintf/
    │   │           │           └── manifest_sku.xml
    │   │           └── SYSTEM/
    │   │               └── etc/
    │   │                   └── vintf/
    │   │                       └── compatibility_matrix.1.xml
    │   ├── validate_target_files.py
    │   └── verity_utils.py
    ├── sbom/
    │   ├── Android.bp
    │   ├── compliance_metadata.py
    │   ├── gen_notice_xml.py
    │   ├── gen_sbom.py
    │   ├── generate-sbom-framework_res.py
    │   ├── generate-sbom.py
    │   ├── sbom_data.py
    │   ├── sbom_data_test.py
    │   ├── sbom_writers.py
    │   ├── sbom_writers_test.py
    │   └── testdata/
    │       ├── expected_json_sbom.spdx.json
    │       ├── expected_tagvalue_sbom.spdx
    │       ├── expected_tagvalue_sbom_doc_describes_file.spdx
    │       └── expected_tagvalue_sbom_unbundled.spdx
    ├── signapk/
    │   ├── Android.bp
    │   ├── OWNERS
    │   ├── SignApk.mf
    │   ├── src/
    │   │   └── com/
    │   │       └── android/
    │   │           └── signapk/
    │   │               ├── CountingOutputStream.java
    │   │               └── SignApk.java
    │   └── test/
    │       └── run
    ├── signtos/
    │   ├── Android.bp
    │   ├── SignTos.java
    │   └── SignTos.mf
    ├── soong_to_convert.py
    ├── stub_diff_analyzer.py
    ├── test_extract_kernel.py
    ├── test_post_process_props.py
    ├── tool_event_logger/
    │   ├── Android.bp
    │   ├── OWNERS
    │   ├── proto/
    │   │   └── tool_event.proto
    │   ├── tool_event_logger.py
    │   └── tool_event_logger_test.py
    ├── warn/
    │   ├── .pylintrc
    │   ├── OWNERS
    │   ├── __init__.py
    │   ├── android_project_list.py
    │   ├── chrome_project_list.py
    │   ├── cpp_warn_patterns.py
    │   ├── html_writer.py
    │   ├── java_warn_patterns.py
    │   ├── make_warn_patterns.py
    │   ├── other_warn_patterns.py
    │   ├── severity.py
    │   ├── tidy_warn_patterns.py
    │   ├── warn.py
    │   └── warn_common.py
    ├── warn.py
    ├── whichgit
    ├── zipalign/
    │   ├── Android.bp
    │   ├── OWNERS
    │   ├── README.txt
    │   ├── ZipAlign.cpp
    │   ├── ZipAlignMain.cpp
    │   ├── ZipEntry.cpp
    │   ├── ZipEntry.h
    │   ├── ZipFile.cpp
    │   ├── ZipFile.h
    │   ├── include/
    │   │   └── ZipAlign.h
    │   └── tests/
    │       └── src/
    │           └── align_test.cpp
    └── ziptime/
        ├── Android.bp
        ├── README.txt
        ├── ZipEntry.cpp
        ├── ZipEntry.h
        ├── ZipFile.cpp
        ├── ZipFile.h
        └── ZipTime.cpp

================================================
FILE CONTENTS
================================================

================================================
FILE: .gitignore
================================================
*.iml
*.pyc
*.swp
blueprint/
kati/
soong/


================================================
FILE: Android.bp
================================================
// Copyright 2024 Google Inc. All rights reserved.
//
// 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.

package {
    default_applicable_licenses: ["Android-Apache-2.0"],
}

// Package the minimal files required to run envsetup.sh in the test
// environment.
genrule {
    name: "envsetup_minimum.zip",
    visibility: [
        "//build/make/tests:__subpackages__",
    ],
    tools: [
        "soong_zip",
    ],
    srcs: [
        "envsetup.sh",
        "shell_utils.sh",
        "core/envsetup.mk",
    ],
    out: ["envsetup.zip"],
    cmd: "$(location soong_zip) -o $(out) -D build/make",
}


================================================
FILE: Changes.md
================================================
# Build System Changes for Android.mk/Android.bp Writers

## Soong genrules are now sandboxed

Previously, soong genrules could access any files in the source tree, without specifying them as
inputs. This makes them incorrect in incremental builds, and incompatible with RBE and Bazel.

Now, genrules are sandboxed so they can only access their listed srcs. Modules denylisted in
genrule/allowlists.go are exempt from this. You can also set `BUILD_BROKEN_GENRULE_SANDBOXING`
in board config to disable this behavior.

## Partitions are no longer affected by previous builds

Partition builds used to include everything in their staging directories, and building an
individual module will install it to the staging directory. Thus, previously, `m mymodule` followed
by `m` would cause `mymodule` to be presinstalled on the device, even if it wasn't listed in
`PRODUCT_PACKAGES`.

This behavior has been changed, and now the partition images only include what they'd have if you
did a clean build. This behavior can be disabled by setting the
`BUILD_BROKEN_INCORRECT_PARTITION_IMAGES` environment variable or board config variable.

Manually adding make rules that build to the staging directories without going through the make
module system will not be compatible with this change. This includes many usages of
`LOCAL_POST_INSTALL_CMD`.

## Perform validation of Soong plugins

Each Soong plugin will require manual work to migrate to Bazel. In order to
minimize the manual work outside of build/soong, we are restricting plugins to
those that exist today and those in vendor or hardware directories.

If you need to extend the build system via a plugin, please reach out to the
build team via email android-building@googlegroups.com (external) for any
questions, or see [go/soong](http://go/soong) (internal).

To omit the validation, `BUILD_BROKEN_PLUGIN_VALIDATION` expects a
space-separated list of plugins to omit from the validation. This must be set
within a product configuration .mk file, board config .mk file, or buildspec.mk.

## Python 2 to 3 migration

Python 2 has been completely removed from the build. Please migrate any remaining usages to
Python 3, and remove any version-specific properties from bp files.

## Stop referencing sysprop_library directly from cc modules

For the migration to Bazel, we are no longer mapping sysprop_library targets
to their generated `cc_library` counterparts when dependning on them from a
cc module. Instead, directly depend on the generated module by prefixing the
module name with `lib`. For example, depending on the following module:

```
sysprop_library {
    name: "foo",
    srcs: ["foo.sysprop"],
}
```

from a module named `bar` can be done like so:

```
cc_library {
    name: "bar",
    srcs: ["bar.cc"],
    deps: ["libfoo"],
}
```

Failure to do this will result in an error about a missing variant.

## Gensrcs starts disallowing depfile property

To migrate all gensrcs to Bazel, we are restricting the use of depfile property
because Bazel requires specifying the dependencies directly.

To fix existing uses, remove depfile and directly specify all the dependencies
in .bp files. For example:

```
gensrcs {
    name: "framework-cppstream-protos",
    tools: [
        "aprotoc",
        "protoc-gen-cppstream",
    ],
    cmd: "mkdir -p $(genDir)/$(in) " +
        "&& $(location aprotoc) " +
        "  --plugin=$(location protoc-gen-cppstream) " +
        "  -I . " +
        "  $(in) ",
    srcs: [
        "bar.proto",
    ],
    output_extension: "srcjar",
}
```
where `bar.proto` imports `external.proto` would become

```
gensrcs {
    name: "framework-cppstream-protos",
    tools: [
        "aprotoc",
        "protoc-gen-cpptream",
    ],
    tool_files: [
        "external.proto",
    ],
    cmd: "mkdir -p $(genDir)/$(in) " +
        "&& $(location aprotoc) " +
        "  --plugin=$(location protoc-gen-cppstream) " +
        "  $(in) ",
    srcs: [
        "bar.proto",
    ],
    output_extension: "srcjar",
}
```
as in https://android-review.googlesource.com/c/platform/frameworks/base/+/2125692/.

`BUILD_BROKEN_DEPFILE` can be used to allowlist usage of depfile in `gensrcs`.

If `depfile` is needed for generating javastream proto, `java_library` with `proto.type`
set `stream` is the alternative solution. Sees
https://android-review.googlesource.com/c/platform/packages/modules/Permission/+/2118004/
for an example.

## Genrule starts disallowing directory inputs

To better specify the inputs to the build, we are restricting use of directories
as inputs to genrules.

To fix existing uses, change inputs to specify the inputs and update the command
accordingly. For example:

```
genrule: {
    name: "foo",
    srcs: ["bar"],
    cmd: "cp $(location bar)/*.xml $(gendir)",
    ...
}
```

would become

```
genrule: {
    name: "foo",
    srcs: ["bar/*.xml"],
    cmd: "cp $(in) $(gendir)",
    ...
}
```

`BUILD_BROKEN_INPUT_DIR_MODULES` can be used to allowlist specific directories
with genrules that have input directories.

## Dexpreopt starts enforcing `<uses-library>` checks (for Java modules)

In order to construct correct class loader context for dexpreopt, build system
needs to know about the shared library dependencies of Java modules listed in
the `<uses-library>` tags in the manifest. Since the build system does not have
access to the manifest contents, that information must be present in the build
files. In simple cases Soong is able to infer it from its knowledge of Java SDK
libraries and the `libs` property in Android.bp, but in more complex cases it is
necessary to add the missing information in Android.bp/Android.mk manually.

To specify a list of libraries for a given modules, use:

* Android.bp properties: `uses_libs`, `optional_uses_libs`
* Android.mk variables: `LOCAL_USES_LIBRARIES`, `LOCAL_OPTIONAL_USES_LIBRARIES`

If a library is in `libs`, it usually should *not* be added to the above
properties, and Soong should be able to infer the `<uses-library>` tag. But
sometimes a library also needs additional information in its
Android.bp/Android.mk file (e.g. when it is a `java_library` rather than a
`java_sdk_library`, or when the library name is different from its module name,
or when the module is defined in Android.mk rather than Android.bp). In such
cases it is possible to tell the build system that the library provides a
`<uses-library>` with a given name (however, this is discouraged and will be
deprecated in the future, and it is recommended to fix the underlying problem):

* Android.bp property: `provides_uses_lib`
* Android.mk variable: `LOCAL_PROVIDES_USES_LIBRARY`

It is possible to disable the check on a per-module basis. When doing that it is
also recommended to disable dexpreopt, as disabling a failed check will result
in incorrect class loader context recorded in the .odex file, which will cause
class loader context mismatch and dexopt at first boot.

* Android.bp property: `enforce_uses_lib`
* Android.mk variable: `LOCAL_ENFORCE_USES_LIBRARIES`

Finally, it is possible to globally disable the check:

* For a given product: `PRODUCT_BROKEN_VERIFY_USES_LIBRARIES := true`
* On the command line: `RELAX_USES_LIBRARY_CHECK=true`

The environment variable overrides the product variable, so it is possible to
disable the check for a product, but quickly re-enable it for a local build.

## `LOCAL_REQUIRED_MODULES` requires listed modules to exist {#BUILD_BROKEN_MISSING_REQUIRED_MODULES}

Modules listed in `LOCAL_REQUIRED_MODULES`, `LOCAL_HOST_REQUIRED_MODULES` and
`LOCAL_TARGET_REQUIRED_MODULES` need to exist unless `ALLOW_MISSING_DEPENDENCIES`
is set.

To temporarily relax missing required modules check, use:

`BUILD_BROKEN_MISSING_REQUIRED_MODULES := true`

## Changes in system properties settings

### Product variables

System properties for each of the partition is supposed to be set via following
product config variables.

For system partition,

* `PRODUCT_SYSTEM_PROPERTIES`
* `PRODUCT_SYSTEM_DEFAULT_PROPERTIES` is highly discouraged. Will be deprecated.

For vendor partition,

* `PRODUCT_VENDOR_PROPERTIES`
* `PRODUCT_PROPERTY_OVERRIDES` is highly discouraged. Will be deprecated.
* `PRODUCT_DEFAULT_PROPERTY_OVERRIDES` is also discouraged. Will be deprecated.

For odm partition,

* `PRODUCT_ODM_PROPERTIES`

For system_ext partition,

* `PRODUCT_SYSTEM_EXT_PROPERTIES`

For product partition,

* `PRODUCT_PRODUCT_PROPERTIES`

### Duplication is not allowed within a partition

For each partition, having multiple sysprop assignments for the same name is
prohibited. For example, the following will now trigger an error:

`PRODUCT_VENDOR_PROPERTIES += foo=true foo=false`

Having duplication across partitions are still allowed. So, the following is
not an error:

`PRODUCT_VENDOR_PROPERTIES += foo=true`
`PRODUCT_SYSTEM_PROPERTIES += foo=false`

In that case, the final value is determined at runtime. The precedence is

* product
* odm
* vendor
* system_ext
* system

So, `foo` becomes `true` because vendor has higher priority than system.

To temporarily turn the build-time restriction off, use

`BUILD_BROKEN_DUP_SYSPROP := true`

### Optional assignments

System properties can now be set as optional using the new syntax:

`name ?= value`

Then the system property named `name` gets the value `value` only when there
is no other non-optional assignments having the same name. For example, the
following is allowed and `foo` gets `true`

`PRODUCT_VENDOR_PROPERTIES += foo=true foo?=false`

Note that the order between the optional and the non-optional assignments
doesn't matter. The following gives the same result as above.

`PRODUCT_VENDOR_PROPERTIES += foo?=false foo=true`

Optional assignments can be duplicated and in that case their order matters.
Specifically, the last one eclipses others.

`PRODUCT_VENDOR_PROPERTIES += foo?=apple foo?=banana foo?=mango`

With above, `foo` becomes `mango` since its the last one.

Note that this behavior is different from the previous behavior of preferring
the first one. To go back to the original behavior for compatability reason,
use:

`BUILD_BROKEN_DUP_SYSPROP := true`

## ELF prebuilts in `PRODUCT_COPY_FILES` {#BUILD_BROKEN_ELF_PREBUILT_PRODUCT_COPY_FILES}

ELF prebuilts in `PRODUCT_COPY_FILES` that are installed into these paths are an
error:

* `<partition>/bin/*`
* `<partition>/lib/*`
* `<partition>/lib64/*`

Define prebuilt modules and add them to `PRODUCT_PACKAGES` instead.
To temporarily relax this check and restore the behavior prior to this change,
set `BUILD_BROKEN_ELF_PREBUILT_PRODUCT_COPY_FILES := true` in `BoardConfig.mk`.

## COPY_HEADERS usage now produces warnings {#copy_headers}

We've considered `BUILD_COPY_HEADERS`/`LOCAL_COPY_HEADERS` to be deprecated for
a long time, and the places where it's been able to be used have shrinked over
the last several releases. Equivalent functionality is not available in Soong.

See the [build/soong/docs/best_practices.md#headers] for more information about
how best to handle headers in Android.

## `m4` is not available on `$PATH`

There is a prebuilt of it available in prebuilts/build-tools, and a make
variable `M4` that contains the path.

Beyond the direct usage, whenever you use bison or flex directly, they call m4
behind the scene, so you must set the M4 environment variable (and depend upon
it for incremental build correctness):

```
$(intermediates)/foo.c: .KATI_IMPLICIT_OUTPUTS := $(intermediates)/foo.h
$(intermediates)/foo.c: $(LOCAL_PATH)/foo.y $(M4) $(BISON) $(BISON_DATA)
	M4=$(M4) $(BISON) ...
```

## Rules executed within limited environment

With `ALLOW_NINJA_ENV=false` (soon to be the default), ninja, and all the
rules/actions executed within it will only have access to a limited number of
environment variables. Ninja does not track when environment variables change
in order to trigger rebuilds, so changing behavior based on arbitrary variables
is not safe with incremental builds.

Kati and Soong can safely use environment variables, so the expectation is that
you'd embed any environment variables that you need to use within the command
line generated by those tools. See the [export section](#export_keyword) below
for examples.

For a temporary workaround, you can set `ALLOW_NINJA_ENV=true` in your
environment to restore the previous behavior, or set
`BUILD_BROKEN_NINJA_USES_ENV_VAR := <var> <var2> ...` in your `BoardConfig.mk`
to allow specific variables to be passed through until you've fixed the rules.

## LOCAL_C_INCLUDES outside the source/output trees are an error {#BUILD_BROKEN_OUTSIDE_INCLUDE_DIRS}

Include directories are expected to be within the source tree (or in the output
directory, generated during the build). This has been checked in some form
since Oreo, but now has better checks.

There's now a `BUILD_BROKEN_OUTSIDE_INCLUDE_DIRS` variable, that when set, will
turn these errors into warnings temporarily. I don't expect this to last more
than a release, since they're fairly easy to clean up.

Neither of these cases are supported by Soong, and will produce errors when
converting your module.

### Absolute paths

This has been checked since Oreo. The common reason to hit this is because a
makefile is calculating a path, and ran abspath/realpath/etc. This is a problem
because it makes your build non-reproducible. It's very unlikely that your
source path is the same on every machine.

### Using `../` to leave the source/output directories

This is the new check that has been added. In every case I've found, this has
been a mistake in the Android.mk -- assuming that `LOCAL_C_INCLUDES` (which is
relative to the top of the source tree) acts like `LOCAL_SRC_FILES` (which is
relative to `LOCAL_PATH`).

Since this usually isn't a valid path, you can almost always just remove the
offending line.


## `BOARD_HAL_STATIC_LIBRARIES` and `LOCAL_HAL_STATIC_LIBRARIES` are obsolete {#BOARD_HAL_STATIC_LIBRARIES}

Define proper HIDL / Stable AIDL HAL instead.

* For libhealthd, use health HAL. See instructions for implementing
  health HAL:

  * [hardware/interfaces/health/2.1/README.md] for health 2.1 HAL (recommended)
  * [hardware/interfaces/health/1.0/README.md] for health 1.0 HAL

* For libdumpstate, use at least Dumpstate HAL 1.0.

## PRODUCT_STATIC_BOOT_CONTROL_HAL is obsolete {#PRODUCT_STATIC_BOOT_CONTROL_HAL}

`PRODUCT_STATIC_BOOT_CONTROL_HAL` was the workaround to allow sideloading with
statically linked boot control HAL, before shared library HALs were supported
under recovery. Android Q has added such support (HALs will be loaded in
passthrough mode), and the workarounds are being removed. Targets should build
and install the recovery variant of boot control HAL modules into recovery
image, similar to the ones installed for normal boot. See the change to
crosshatch for example of this:

* [device/google/crosshatch/bootctrl/Android.bp] for `bootctrl.sdm845` building
  rules
* [device/google/crosshatch/device.mk] for installing `bootctrl.sdm845.recovery`
  and `android.hardware.boot@1.0-impl.recovery` into recovery image

[device/google/crosshatch/bootctrl/Android.bp]: https://android.googlesource.com/device/google/crosshatch/+/master/bootctrl/Android.bp
[device/google/crosshatch/device.mk]: https://android.googlesource.com/device/google/crosshatch/+/master/device.mk

## Deprecation of `BUILD_*` module types

See [build/make/Deprecation.md](Deprecation.md) for the current status.

## `PRODUCT_HOST_PACKAGES` split from `PRODUCT_PACKAGES` {#PRODUCT_HOST_PACKAGES}

Previously, adding a module to `PRODUCT_PACKAGES` that supported both the host
and the target (`host_supported` in Android.bp; two modules with the same name
in Android.mk) would cause both to be built and installed. In many cases you
only want either the host or target versions to be built/installed by default,
and would be over-building with both. So `PRODUCT_PACKAGES` will be changing to
just affect target modules, while `PRODUCT_HOST_PACKAGES` is being added for
host modules.

Functional differences between `PRODUCT_PACKAGES` and `PRODUCT_HOST_PACKAGES`:

* `PRODUCT_HOST_PACKAGES` does not have `_ENG`/`_DEBUG` variants, as that's a
  property of the target, not the host.
* `PRODUCT_HOST_PACKAGES` does not support `LOCAL_MODULE_OVERRIDES`.
* `PRODUCT_HOST_PACKAGES` requires listed modules to exist, and be host
  modules. (Unless `ALLOW_MISSING_DEPENDENCIES` is set)

This is still an active migration, so currently it still uses
`PRODUCT_PACKAGES` to make installation decisions, but verifies that if we used
`PRODUCT_HOST_PACKAGES`, it would trigger installation for all of the same host
packages. This check ignores shared libraries, as those are not normally
necessary in `PRODUCT_*PACKAGES`, and tended to be over-built (especially the
32-bit variants).

Future changes will switch installation decisions to `PRODUCT_HOST_PACKAGES`
for host modules, error when there's a host-only module in `PRODUCT_PACKAGES`,
and do some further cleanup where `LOCAL_REQUIRED_MODULES` are still merged
between host and target modules with the same name.

## `*.c.arm` / `*.cpp.arm` deprecation  {#file_arm}

In Android.mk files, you used to be able to change LOCAL_ARM_MODE for each
source file by appending `.arm` to the end of the filename in
`LOCAL_SRC_FILES`.

Soong does not support this uncommonly used behavior, instead expecting those
files to be split out into a separate static library that chooses `arm` over
`thumb` for the entire library. This must now also be done in Android.mk files.

## Windows cross-compiles no longer supported in Android.mk

Modules that build for Windows (our only `HOST_CROSS` OS currently) must now be
defined in `Android.bp` files.

## `LOCAL_MODULE_TAGS := eng debug` are obsolete {#LOCAL_MODULE_TAGS}

`LOCAL_MODULE_TAGS` value `eng` and `debug` are now obsolete. They allowed
modules to specify that they should always be installed on `-eng`, or `-eng`
and `-userdebug` builds. This conflicted with the ability for products to
specify which modules should be installed, effectively making it impossible to
build a stripped down product configuration that did not include those modules.

For the equivalent functionality, specify the modules in `PRODUCT_PACKAGES_ENG`
or `PRODUCT_PACKAGES_DEBUG` in the appropriate product makefiles.

Core android packages like `su` got added to the list in
`build/make/target/product/base_system.mk`, but for device-specific modules
there are often better base product makefiles to use instead.

## `USER` deprecation  {#USER}

`USER` will soon be `nobody` in many cases due to the addition of a sandbox
around the Android build. Most of the time you shouldn't need to know the
identity of the user running the build, but if you do, it's available in the
make variable `BUILD_USERNAME` for now.

Similarly, the `hostname` tool will also be returning a more consistent value
of `android-build`. The real value is available as `BUILD_HOSTNAME`.

## `BUILD_NUMBER` removal from Android.mk  {#BUILD_NUMBER}

`BUILD_NUMBER` should not be used directly in Android.mk files, as it would
trigger them to be re-read every time the `BUILD_NUMBER` changes (which it does
on every build server build). If possible, just remove the use so that your
builds are more reproducible. If you do need it, use `BUILD_NUMBER_FROM_FILE`:

``` make
$(LOCAL_BUILT_MODULE):
	mytool --build_number $(BUILD_NUMBER_FROM_FILE) -o $@
```

That will expand out to a subshell that will read the current `BUILD_NUMBER`
whenever it's run. It will not re-run your command if the build number has
changed, so incremental builds will have the build number from the last time
the particular output was rebuilt.

## `DIST_DIR`, `dist_goal`, and `dist-for-goals`  {#dist}

`DIST_DIR` and `dist_goal` are no longer available when reading Android.mk
files (or other build tasks). Always use `dist-for-goals` instead, which takes
a PHONY goal, and a list of files to copy to `$DIST_DIR`. Whenever `dist` is
specified, and the goal would be built (either explicitly on the command line,
or as a dependency of something on the command line), that file will be copied
into `$DIST_DIR`. For example,

``` make
$(call dist-for-goals,foo,bar/baz)
```

will copy `bar/baz` into `$DIST_DIR/baz` when `m foo dist` is run.

#### FILE_NAME_TAG  {#FILE_NAME_TAG}

To embed the `BUILD_NUMBER` (or for local builds, `eng.${USER}`), include
`FILE_NAME_TAG_PLACEHOLDER` in the destination:

``` make
# you can use dist-for-goals-with-filenametag function
$(call dist-for-goals-with-filenametag,foo,bar.zip)
# or use FILE_NAME_TAG_PLACEHOLDER manually
$(call dist-for-goals,foo,bar.zip:baz-FILE_NAME_TAG_PLACEHOLDER.zip)
```

Which will produce `$DIST_DIR/baz-1234567.zip` on build servers which set
`BUILD_NUMBER=1234567`, or `$DIST_DIR/baz-eng.builder.zip` for local builds.

If you just want to append `BUILD_NUMBER` at the end of basename, use
`dist-for-goals-with-filenametag` instead of `dist-for-goals`.

#### Renames during copy

Instead of specifying just a file, a destination name can be specified,
including subdirectories:

``` make
$(call dist-for-goals,foo,bar/baz:logs/foo.log)
```

will copy `bar/baz` into `$DIST_DIR/logs/foo.log` when `m foo dist` is run.

## `.PHONY` rule enforcement  {#phony_targets}

There are several new warnings/errors meant to ensure the proper use of
`.PHONY` targets in order to improve the speed and reliability of incremental
builds.

`.PHONY`-marked targets are often used as shortcuts to provide "friendly" names
for real files to be built, but any target marked with `.PHONY` is also always
considered dirty, needing to be rebuilt every build. This isn't a problem for
aliases or one-off user-requested operations, but if real builds steps depend
on a `.PHONY` target, it can get quite expensive for what should be a tiny
build.

``` make
...mk:42: warning: PHONY target "out/.../foo" looks like a real file (contains a "/")
```

Between this warning and the next, we're requiring that `.PHONY` targets do not
have "/" in them, and real file targets do have a "/". This makes it more
obvious when reading makefiles what is happening, and will help the build
system differentiate these in the future too.

``` make
...mk:42: warning: writing to readonly directory: "kernel-modules"
```

This warning will show up for one of two reasons:

1. The target isn't intended to be a real file, and should be marked with
   `.PHONY`. This would be the case for this example.
2. The target is a real file, but it's outside the output directories. All
   outputs from the build system should be within the output directory,
   otherwise `m clean` is unable to clean the build, and future builds may not
   work properly.

``` make
...mk:42: warning: real file "out/.../foo" depends on PHONY target "buildbins"
```

If the first target isn't intended to be a real file, then it should be marked
with `.PHONY`, which will satisfy this warning. This isn't the case for this
example, as we require `.PHONY` targets not to have '/' in them.

If the second (PHONY) target is a real file, it may unnecessarily be marked
with `.PHONY`.

### `.PHONY` and calling other build systems

One common pattern (mostly outside AOSP) that we've seen hit these warning is
when building with external build systems (firmware, bootloader, kernel, etc).
Those are often marked as `.PHONY` because the Android build system doesn't
have enough dependencies to know when to run the other build system again
during an incremental build.

We recommend to build these outside of Android, and deliver prebuilts into the
Android tree instead of decreasing the speed and reliability of the incremental
Android build.

In cases where that's not desired, to preserve the speed of Android
incrementals, over-specifying dependencies is likely a better option than
marking it with `.PHONY`:

``` make
out/target/.../zImage: $(sort $(shell find -L $(KERNEL_SRCDIR)))
	...
```

For reliability, many of these other build systems do not guarantee the same
level of incremental build assurances as the Android Build is attempting to do
-- without custom checks, Make doesn't rebuild objects when CFLAGS change, etc.
In order to fix this, our recommendation is to do clean builds for each of
these external build systems every time anything they rely on changes. For
relatively smaller builds (like the kernel), this may be reasonable as long as
you're not trying to actively debug the kernel.

## `export` and `unexport` deprecation  {#export_keyword}

The `export` and `unexport` keywords are obsolete, and will throw errors when
used.

Device specific configuration should not be able to affect common core build
steps -- we're looking at triggering build steps to be invalidated if the set
of environment variables they can access changes. If device specific
configuration is allowed to change those, switching devices with the same
output directory could become significantly more expensive than it already can
be.

If used during Android.mk files, and later tasks, it is increasingly likely
that they are being used incorrectly. Attempting to change the environment for
a single build step, and instead setting it for hundreds of thousands.

It is not recommended to just move the environment variable setting outside of
the build (in vendorsetup.sh, or some other configuration script or wrapper).
We expect to limit the environment variables that the build respects in the
future, others will be cleared. (There will be methods to get custom variables
into the build, just not to every build step)

Instead, write the export commands into the rule command lines themselves:

``` make
$(intermediates)/generated_output.img:
	rm -rf $@
	export MY_ENV_A="$(MY_A)"; make ...
```

If you want to set many environment variables, and/or use them many times,
write them out to a script and source the script:

``` make
envsh := $(intermediates)/env.sh
$(envsh):
	rm -rf $@
	echo 'export MY_ENV_A="$(MY_A)"' >$@
	echo 'export MY_ENV_B="$(MY_B)"' >>$@

$(intermediates)/generated_output.img: PRIVATE_ENV := $(envsh)
$(intermediates)/generated_output.img: $(envsh) a/b/c/package.sh
	rm -rf $@
	source $(PRIVATE_ENV); make ...
	source $(PRIVATE_ENV); a/b/c/package.sh ...
```

## Implicit make rules are obsolete {#implicit_rules}

Implicit rules look something like the following:

``` make
$(TARGET_OUT_SHARED_LIBRARIES)/%_vendor.so: $(TARGET_OUT_SHARED_LIBRARIES)/%.so
	...

%.o : %.foo
	...
```

These can have wide ranging effects across unrelated modules, so they're now obsolete. Instead, use static pattern rules, which are similar, but explicitly match the specified outputs:

``` make
libs := $(foreach lib,libfoo libbar,$(TARGET_OUT_SHARED_LIBRARIES)/$(lib)_vendor.so)
$(libs): %_vendor.so: %.so
	...

files := $(wildcard $(LOCAL_PATH)/*.foo)
gen := $(patsubst $(LOCAL_PATH)/%.foo,$(intermediates)/%.o,$(files))
$(gen): %.o : %.foo
	...
```

## Removing '/' from Valid Module Names {#name_slash}

The build system uses module names in path names in many places. Having an
extra '/' or '../' being inserted can cause problems -- and not just build
breaks, but stranger invalid behavior.

In every case we've seen, the fix is relatively simple: move the directory into
`LOCAL_MODULE_RELATIVE_PATH` (or `LOCAL_MODULE_PATH` if you're still using it).
If this causes multiple modules to be named the same, use unique module names
and `LOCAL_MODULE_STEM` to change the installed file name:

``` make
include $(CLEAR_VARS)
LOCAL_MODULE := ver1/code.bin
LOCAL_MODULE_PATH := $(TARGET_OUT_ETC)/firmware
...
include $(BUILD_PREBUILT)

include $(CLEAR_VARS)
LOCAL_MODULE := ver2/code.bin
LOCAL_MODULE_PATH := $(TARGET_OUT_ETC)/firmware
...
include $(BUILD_PREBUILT)
```

Can be rewritten as:

```
include $(CLEAR_VARS)
LOCAL_MODULE := ver1_code.bin
LOCAL_MODULE_STEM := code.bin
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/firmware/ver1
...
include $(BUILD_PREBUILT)

include $(CLEAR_VARS)
LOCAL_MODULE := ver2_code.bin
LOCAL_MODULE_STEM := code.bin
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/firmware/ver2
...
include $(BUILD_PREBUILT)
```

You just need to make sure that any other references (`PRODUCT_PACKAGES`,
`LOCAL_REQUIRED_MODULES`, etc) are converted to the new names.

## Valid Module Names {#name}

We've adopted lexical requirements very similar to [Bazel's
requirements](https://docs.bazel.build/versions/master/build-ref.html#name) for
target names. Valid characters are `a-z`, `A-Z`, `0-9`, and the special
characters `_.+-=,@~`. This currently applies to `LOCAL_PACKAGE_NAME`,
`LOCAL_MODULE`, and `LOCAL_MODULE_SUFFIX`, and `LOCAL_MODULE_STEM*`.

Many other characters already caused problems if you used them, so we don't
expect this to have a large effect.

## PATH Tools {#PATH_Tools}

The build has started restricting the external host tools usable inside the
build. This will help ensure that build results are reproducible across
different machines, and catch mistakes before they become larger issues.

To start with, this includes replacing the $PATH with our own directory of
tools, mirroring that of the host PATH.  The only difference so far is the
removal of the host GCC tools. Anything that is not explicitly in the
configuration as allowed will continue functioning, but will generate a log
message. This is expected to become more restrictive over time.

The configuration is located in build/soong/ui/build/paths/config.go, and
contains all the common tools in use in many builds. Anything not in that list
will currently print a warning in the `$OUT_DIR/soong.log` file, including the
command and arguments used, and the process tree in order to help locate the
usage.

In order to fix any issues brought up by these checks, the best way to fix them
is to use tools checked into the tree -- either as prebuilts, or building them
as host tools during the build.

As a temporary measure, you can set `TEMPORARY_DISABLE_PATH_RESTRICTIONS=true`
in your environment to temporarily turn off the error checks and allow any tool
to be used (with logging). Beware that GCC didn't work well with the interposer
used for logging, so this may not help in all cases.

## Deprecating / obsoleting envsetup.sh variables in Makefiles

It is not required to source envsetup.sh before running a build. Many scripts,
including a majority of our automated build systems, do not do so. Make will
transparently make every environment variable available as a make variable.
This means that relying on environment variables only set up in envsetup.sh will
produce different output for local users and scripted users.

Many of these variables also include absolute path names, which we'd like to
keep out of the generated files, so that you don't need to do a full rebuild if
you move the source tree.

To fix this, we're marking the variables that are set in envsetup.sh as
deprecated in the makefiles. This will trigger a warning every time one is read
(or written) inside Kati. Once all the warnings have been removed for a
particular variable, we'll switch it to obsolete, and any references will become
errors.

### envsetup.sh variables with make equivalents

| instead of                                                   | use                  |
|--------------------------------------------------------------|----------------------|
| OUT {#OUT}                                                   | PRODUCT_OUT          |
| ANDROID_HOST_OUT {#ANDROID_HOST_OUT}                         | HOST_OUT             |
| ANDROID_PRODUCT_OUT {#ANDROID_PRODUCT_OUT}                   | PRODUCT_OUT          |
| ANDROID_HOST_OUT_TESTCASES {#ANDROID_HOST_OUT_TESTCASES}     | HOST_OUT_TESTCASES   |
| ANDROID_TARGET_OUT_TESTCASES {#ANDROID_TARGET_OUT_TESTCASES} | TARGET_OUT_TESTCASES |

All of the make variables may be relative paths from the current directory, or
absolute paths if the output directory was specified as an absolute path. If you
need an absolute variable, convert it to absolute during a rule, so that it's
not expanded into the generated ninja file:

``` make
$(PRODUCT_OUT)/gen.img: my/src/path/gen.sh
	export PRODUCT_OUT=$$(cd $(PRODUCT_OUT); pwd); cd my/src/path; ./gen.sh -o $${PRODUCT_OUT}/gen.img
```

### ANDROID_BUILD_TOP  {#ANDROID_BUILD_TOP}

In Android.mk files, you can always assume that the current directory is the
root of the source tree, so this can just be replaced with '.' (which is what
$TOP is hardcoded to), or removed entirely. If you need an absolute path, see
the instructions above.

### Stop using PATH directly  {#PATH}

This isn't only set by envsetup.sh, but it is modified by it. Due to that it's
rather easy for this to change between different shells, and it's not ideal to
reread the makefiles every time this changes.

In most cases, you shouldn't need to touch PATH at all. When you need to have a
rule reference a particular binary that's part of the source tree or outputs,
it's preferrable to just use the path to the file itself (since you should
already be adding that as a dependency).

Depending on the rule, passing the file path itself may not be feasible due to
layers of unchangable scripts/binaries. In that case, be sure to add the
dependency, but modify the PATH within the rule itself:

``` make
$(TARGET): myscript my/path/binary
	PATH=my/path:$$PATH myscript -o $@
```

### Stop using PYTHONPATH directly  {#PYTHONPATH}

Like PATH, this isn't only set by envsetup.sh, but it is modified by it. Due to
that it's rather easy for this to change between different shells, and it's not
ideal to reread the makefiles every time.

The best solution here is to start switching to Soong's python building support,
which packages the python interpreter, libraries, and script all into one file
that no longer needs PYTHONPATH. See fontchain_lint for examples of this:

* [external/fonttools/Lib/fontTools/Android.bp] for python_library_host
* [frameworks/base/Android.bp] for python_binary_host
* [frameworks/base/data/fonts/Android.mk] to execute the python binary

If you still need to use PYTHONPATH, do so within the rule itself, just like
path:

``` make
$(TARGET): myscript.py $(sort $(shell find my/python/lib -name '*.py'))
	PYTHONPATH=my/python/lib:$$PYTHONPATH myscript.py -o $@
```
### Stop using PRODUCT_COMPATIBILITY_MATRIX_LEVEL_OVERRIDE directly {#PRODUCT_COMPATIBILITY_MATRIX_LEVEL_OVERRIDE}

Specify Framework Compatibility Matrix Version in device manifest by adding a `target-level`
attribute to the root element `<manifest>`. If `PRODUCT_COMPATIBILITY_MATRIX_LEVEL_OVERRIDE`
is 26 or 27, you can add `"target-level"="1"` to your device manifest instead.

### Stop using USE_CLANG_PLATFORM_BUILD {#USE_CLANG_PLATFORM_BUILD}

Clang is the default and only supported Android compiler, so there is no reason
for this option to exist.

### Stop using clang property

The clang property has been deleted from Soong. To fix any build errors, remove the clang
property from affected Android.bp files using bpmodify.


``` make
go run bpmodify.go -w -m=module_name -remove-property=true -property=clang filepath
```

`BUILD_BROKEN_CLANG_PROPERTY` can be used as temporarily workaround


### Stop using clang_cflags and clang_asflags

clang_cflags and clang_asflags are deprecated.
To fix any build errors, use bpmodify to either
    - move the contents of clang_asflags/clang_cflags into asflags/cflags or
    - delete clang_cflags/as_flags as necessary

To Move the contents:
``` make
go run bpmodify.go -w -m=module_name -move-property=true -property=clang_cflags -new-location=cflags filepath
```

To Delete:
``` make
go run bpmodify.go -w -m=module_name -remove-property=true -property=clang_cflags filepath
```

`BUILD_BROKEN_CLANG_ASFLAGS` and `BUILD_BROKEN_CLANG_CFLAGS` can be used as temporarily workarounds

### Other envsetup.sh variables  {#other_envsetup_variables}

* ANDROID_TOOLCHAIN
* ANDROID_TOOLCHAIN_2ND_ARCH
* ANDROID_DEV_SCRIPTS
* ANDROID_EMULATOR_PREBUILTS
* ANDROID_PRE_BUILD_PATHS

These are all exported from envsetup.sh, but don't have clear equivalents within
the makefile system. If you need one of them, you'll have to set up your own
version.

## Soong config variables

### Soong config string variables must list all values they can be set to

In order to facilitate the transition to bazel, all soong_config_string_variables
must only be set to a value listed in their `values` property, or an empty string.
It is a build error otherwise.

Example Android.bp:
```
soong_config_string_variable {
    name: "my_string_variable",
    values: [
        "foo",
        "bar",
    ],
}

soong_config_module_type {
    name: "my_cc_defaults",
    module_type: "cc_defaults",
    config_namespace: "my_namespace",
    variables: ["my_string_variable"],
    properties: [
        "shared_libs",
        "static_libs",
    ],
}
```
Product config:
```
$(call soong_config_set,my_namespace,my_string_variable,baz) # Will be an error as baz is not listed in my_string_variable's values.
```

[build/soong/Changes.md]: https://android.googlesource.com/platform/build/soong/+/master/Changes.md
[build/soong/docs/best_practices.md#headers]: https://android.googlesource.com/platform/build/soong/+/master/docs/best_practices.md#headers
[external/fonttools/Lib/fontTools/Android.bp]: https://android.googlesource.com/platform/external/fonttools/+/master/Lib/fontTools/Android.bp
[frameworks/base/Android.bp]: https://android.googlesource.com/platform/frameworks/base/+/master/Android.bp
[frameworks/base/data/fonts/Android.mk]: https://android.googlesource.com/platform/frameworks/base/+/master/data/fonts/Android.mk
[hardware/interfaces/health/1.0/README.md]: https://android.googlesource.com/platform/hardware/interfaces/+/master/health/1.0/README.md
[hardware/interfaces/health/2.1/README.md]: https://android.googlesource.com/platform/hardware/interfaces/+/master/health/2.1/README.md


================================================
FILE: CleanSpec.mk
================================================
# Copyright (C) 2007 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.
#

# If you don't need to do a full clean build but would like to touch
# a file or delete some intermediate files, add a clean step to the end
# of the list.  These steps will only be run once, if they haven't been
# run before.
#
# E.g.:
#     $(call add-clean-step, touch -c external/sqlite/sqlite3.h)
#     $(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/STATIC_LIBRARIES/libz_intermediates)
#
# Always use "touch -c" and "rm -f" or "rm -rf" to gracefully deal with
# files that are missing or have been moved.
#
# Use $(PRODUCT_OUT) to get to the "out/target/product/blah/" directory.
# Use $(OUT_DIR) to refer to the "out" directory.
#
# If you need to re-do something that's already mentioned, just copy
# the command and add it to the bottom of the list.  E.g., if a change
# that you made last week required touching a file and a change you
# made today requires touching the same file, just copy the old
# touch step and add it to the end of the list.
#
# ************************************************
# NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST
# ************************************************

# For example:
#$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/APPS/AndroidTests_intermediates)
#$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/core_intermediates)
#$(call add-clean-step, find $(OUT_DIR) -type f -name "IGTalkSession*" -print0 | xargs -0 rm -f)
#$(call add-clean-step, rm -rf $(PRODUCT_OUT)/data/*)

$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/APPS)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/APPS)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system)

$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/SHARED_LIBRARIES/libmediaplayerservice_intermediates)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/SHARED_LIBRARIES/libmedia_jni_intermediates)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/SHARED_LIBRARIES/libstagefright_omx_intermediates)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/build.prop)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/root/default.prop)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/recovery/root/default.prop)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/vendor)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/android-info.txt)
$(call add-clean-step, find $(PRODUCT_OUT) -name "*.apk" | xargs rm)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/APPS/*)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/app/*)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/data/app/*)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/build.prop)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/APPS/*)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/build.prop)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/SHARED_LIBRARIES/*/LINKED)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/build.prop)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/APPS/*)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/build.prop)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/app/*)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/APPS/*)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/build.prop)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/app/*)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/lib/*.so)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib/*.so)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/symbols/system/lib/*.so)
$(call add-clean-step, rm -rf $(HOST_OUT_EXECUTABLES)/iself)
$(call add-clean-step, rm -rf $(HOST_OUT_EXECUTABLES)/lsd)
$(call add-clean-step, rm -rf $(HOST_OUT_EXECUTABLES)/apriori)
$(call add-clean-step, rm -rf $(HOST_OUT_EXECUTABLES)/isprelinked)
$(call add-clean-step, rm -rf $(HOST_OUT_EXECUTABLES)/soslim)

$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/lib/*.so)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib/*.so)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/symbols/system/lib/*.so)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/app/*)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/APPS/*)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/build.prop)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/app/YouTube*)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/app/*)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/APPS/*)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/build.prop)

$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/SHARED_LIBRARIES/libstagefright_intermediates)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/SHARED_LIBRARIES/libstagefright_omx_intermediates)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/SHARED_LIBRARIES/librtp_jni_intermediates)

$(call add-clean-step, rm -rf $(PRODUCT_OUT)/android-info.txt)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/APPS/*)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/app/*)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/data/app/*)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/build.prop)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/JAVA_LIBRARIES/*)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/framework/*)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/build.prop)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/app/*)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/APPS/*)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/build.prop)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/SHARED_LIBRARIES/libbcinfo_intermediates)

# ICS MR2!!!!!!!!!!!!
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/app/*)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/APPS/*)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/build.prop)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/SHARED_LIBRARIES/libbcinfo_intermediates)

# WAIT, I MEAN JELLY BEAN!!!!!!!!!!!!
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/app/*)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/APPS/*)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/build.prop)

# Changing where ro.carrier value is instantiated for system/build.prop
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/build.prop)

$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/APPS/*)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/app/*)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/data/app/*)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/build.prop)

# Now we switched to build against Mac OS X SDK 10.6
$(call add-clean-step, rm -rf $(OUT_DIR)/host/darwin-x86/obj)

$(call add-clean-step, rm -f $(OUT_DIR)/versions_checked.mk)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/app/*)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/APPS/*)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/build.prop)

$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/STATIC_LIBRARIES)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/SHARED_LIBRARIES)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/EXECUTABLES)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/lib/*.o)

$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/STATIC_LIBRARIES)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/SHARED_LIBRARIES)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/EXECUTABLES)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/lib/*.o)

# JB MR2!!!!!!!  AND *NO*, THIS WILL NOT BE K-WHATEVER.
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/build.prop)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/app/*)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/APPS/*)

$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/build.prop)

# Start of "K" development!
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/build.prop)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/app/*)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/APPS/*)

# GCC 4.7
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/STATIC_LIBRARIES)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/SHARED_LIBRARIES)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/EXECUTABLES)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/lib/*.o)

# Wait, back to some JB development!
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/build.prop)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/app/*)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/APPS/*)

# And on to KLP...
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/build.prop)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/app/*)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/APPS/*)

# KLP now based off API 18.
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/build.prop)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/app/*)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/APPS/*)

# Clean up around the /system/app -> /system/priv-app migration
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/app/*)

# Clean up old location of generated Java files from aidl
$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/framework_intermediates/src)

# Clean up ApplicationsProvider which is being removed.
$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/APPS/ApplicationsProvider_intermediates)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/priv-app/ApplicationsProvider.apk)

# Clean up Moto OMA DM client which isn't ready yet.
$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/com.android.omadm.plugin.dev_intermediates)
$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/com.android.omadm.plugin.diagmon_intermediates)
$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/com.android.omadm.pluginhelper_intermediates)
$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/com.android.omadm.plugin_intermediates)
$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/com.android.omadm.service.api_intermediates)
$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/APPS/DMService_intermediates)
$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/APPS/SprintDM_intermediates)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/priv-app/DMService.apk)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/app/SprintDM.apk)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/etc/omadm)

# GCC 4.8
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/STATIC_LIBRARIES)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/SHARED_LIBRARIES)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/EXECUTABLES)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/lib/*.o)

# KLP I mean KitKat now API 19.
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/build.prop)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/app/*)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/APPS/*)

# 4.4.1
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/build.prop)

# 4.4.2
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/build.prop)

# "L" and beyond.
# Make libart the default runtime
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/build.prop)

# Rename persist.sys.dalvik.vm.lib to allow new default
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/build.prop)

# KKWT development
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/build.prop)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/app/*)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/APPS/*)

# L development
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/build.prop)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/app/*)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/APPS/*)

# L development
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/build.prop)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/app/*)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/APPS/*)

# Add ro.product.cpu.abilist{32,64} to build.prop.
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/build.prop)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/build.prop)

# Unset TARGET_PREFER_32_BIT_APPS for 64 bit targets.
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/build.prop)

# Adding dalvik.vm.dex2oat-flags to eng builds
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/build.prop)

# Unset TARGET_PREFER_32_BIT_APPS for 64 bit targets.
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/build.prop)

# Switching the x86 emulator over to a 64 bit primary zygote.
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/build.prop)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/root/default.prop)

# Rename persist.sys.dalvik.vm.lib.1 to allow new default
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/build.prop)

# Switching PRODUCT_RUNTIMES default for some devices
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/build.prop)

# Switching to 32-bit-by-default host multilib build
$(call add-clean-step, rm -rf $(HOST_OUT_INTERMEDIATES))

# KKWT has become API 20
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/build.prop)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/app/*)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/APPS/*)

# ims-common.jar added to BOOTCLASSPATH
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/ETC/init.environ.rc_intermediates)

# Change ro.zygote for core_64_bit.mk from zygote32_64 to zygote64_32
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/root/default.prop)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/recovery/root/default.prop)

# Adding dalvik.vm.dex2oat-Xms, dalvik.vm.dex2oat-Xmx
# dalvik.vm.image-dex2oat-Xms, and dalvik.vm.image-dex2oat-Xmx
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/root/default.prop)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/recovery/root/default.prop)

$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system)

# Switch host builds to Clang by default
$(call add-clean-step, rm -rf $(OUT_DIR)/host)

# Adding dalvik.vm.dex2oat-filter
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/build.prop)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/root/default.prop)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/recovery/root/default.prop)

# API 21?
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/build.prop)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/app/*)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/APPS/*)

# API 21!
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/build.prop)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/app/*)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/APPS/*)

# API 22!
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/build.prop)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/app/*)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/APPS/*)

# Move to libc++ as the default STL.
$(call add-clean-step, rm -rf $(OUT_DIR))

# dex2oat instruction-set changes
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/build.prop)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/root/default.prop)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/recovery/root/default.prop)

# Make GNU++11 the default standard version. This requires a cleanspec because
# char16_t/char32_t will be real types now instead of typedefs, which means
# an ABI change since the names will mangle differently.
$(call add-clean-step, rm -rf $(OUT_DIR))

# 5.1!
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/build.prop)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/app/*)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/APPS/*)

# Remove ro.product.locale.language/country and add ro.product.locale
# instead.
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/build.prop)

# On to MNC
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/build.prop)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/app/*)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/APPS/*)

# Adding dalvik.vm.usejit
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/build.prop)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/root/default.prop)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/recovery/root/default.prop)

# Rename dalvik.vm.usejit to debug.dalvik.vm.usejit
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/build.prop)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/root/default.prop)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/recovery/root/default.prop)

# Revert rename dalvik.vm.usejit to debug.dalvik.vm.usejit
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/build.prop)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/root/default.prop)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/recovery/root/default.prop)

# Change from interpret-only to verify-at-runtime.
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/build.prop)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/root/default.prop)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/recovery/root/default.prop)

# New York, New York!
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/build.prop)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/app/*)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/APPS/*)

# 23 is becoming alive!!!
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/build.prop)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/app/*)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/APPS/*)

$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/build.prop)

# Change PLATFORM_VERSION from NYC to N
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/build.prop)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/app/*)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/APPS/*)

# $(PRODUCT_OUT)/recovery/root/sdcard goes from symlink to folder.
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/recovery/root/sdcard)

# Add BOARD_USES_SYSTEM_OTHER_ODEX
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/app/*)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/priv-app/*)

$(call add-clean-step, rm -rf $(TARGET_OUT_COMMON_INTERMEDIATES)/APPS/previous_overlays.txt)
$(call add-clean-step, rm -rf $(TARGET_OUT_COMMON_INTERMEDIATES)/APPS/current_packages.txt)

$(call add-clean-step, rm -rf $(HOST_OUT_INTERMEDIATES)/include)

$(call add-clean-step, rm -rf $(HOST_OUT_COMMON_INTERMEDIATES)/APPS/*_intermediates/src)
$(call add-clean-step, rm -rf $(HOST_OUT_COMMON_INTERMEDIATES)/JAVA_LIBRARIES/*_intermediates/src)
$(call add-clean-step, rm -rf $(TARGET_OUT_COMMON_INTERMEDIATES)/APPS/*_intermediates/src)
$(call add-clean-step, rm -rf $(TARGET_OUT_COMMON_INTERMEDIATES)/JAVA_LIBRARIES/*_intermediates/src)
$(call add-clean-step, rm -rf $(TARGET_OUT_COMMON_INTERMEDIATES)/previous_gen_java_config.mk)
$(call add-clean-step, rm -rf $(TARGET_OUT_COMMON_INTERMEDIATES)/current_gen_java_config.mk)

$(call add-clean-step, rm -rf $(TARGET_OUT_COMMON_INTERMEDIATES)/JAVA_LIBRARIES/*/package-res.apk)
$(call add-clean-step, rm -rf $(TARGET_OUT_INTERMEDIATES)/APPS/*/package-res.apk)
$(call add-clean-step, rm -rf $(TARGET_OUT_COMMON_INTERMEDIATES)/APPS/*_intermediates/src)
$(call add-clean-step, rm -rf $(TARGET_OUT_COMMON_INTERMEDIATES)/JAVA_LIBRARIES/*_intermediates/src)

$(call add-clean-step, rm -rf $(HOST_OUT_TESTCASES))
$(call add-clean-step, rm -rf $(TARGET_OUT_TESTCASES))

$(call add-clean-step, rm -rf $(TARGET_OUT_ETC)/init)

# Libraries are moved from {system|vendor}/lib to ./lib/framework, ./lib/vndk, etc.
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib*)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor/lib*)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/vendor/lib*)

# Revert that move
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib*)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor/lib*)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/vendor/lib*)

# Sanitized libraries now live in a different location.
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/data/lib*)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/data/vendor/lib*)

# Soong module variant change, remove obsolete intermediates
$(call add-clean-step, rm -rf $(OUT_DIR)/soong/.intermediates)

# Version checking moving to Soong
$(call add-clean-step, rm -rf $(OUT_DIR)/versions_checked.mk)

# Vendor tests were being installed into /vendor/bin accidentally
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/vendor/nativetest*)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor/nativetest*)

# Jack is no longer the default compiler, remove the intermediates
$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/*/*/classes*.jack)
$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/*/*/jack*)

# Move adbd from $(PRODUCT_OUT)/root/sbin to $(PRODUCT_OUT)/system/bin
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/root/sbin/adbd)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/symbols/sbin/adbd)

# Soong linux -> linux_glibc rename
$(call add-clean-step, find $(SOONG_OUT_DIR)/.intermediates -name 'linux_x86*' | xargs rm -rf)
$(call add-clean-step, find $(SOONG_OUT_DIR)/.intermediates -name 'linux_common*' | xargs rm -rf)

# Remove old aidl/logtags files that may be in the generated source directory
$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/*/*_intermediates/src)
$(call add-clean-step, rm -f $(OUT_DIR)/target/common/obj/*/*_intermediates/java-source-list)
$(call add-clean-step, rm -rf $(OUT_DIR)/host/common/obj/*/*_intermediates/src)
$(call add-clean-step, rm -f $(OUT_DIR)/host/common/obj/*/*_intermediates/java-source-list)

$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/APPS/*/flat-res)

# Remove old VNDK directories without version
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib/vndk)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib/vndk-sp)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib64/vndk)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib64/vndk-sp)

# Remove old dex output directories
$(call add-clean-step, rm -rf $(TARGET_OUT_COMMON_INTERMEDIATES)/*/*_intermediates/with-local/)
$(call add-clean-step, rm -rf $(TARGET_OUT_COMMON_INTERMEDIATES)/*/*_intermediates/no-local/)
$(call add-clean-step, rm -rf $(HOST_OUT_COMMON_INTERMEDIATES)/*/*_intermediates/with-local/)
$(call add-clean-step, rm -rf $(HOST_OUT_COMMON_INTERMEDIATES)/*/*_intermediates/no-local/)

# Remove legacy VINTF metadata files
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/manifest.xml)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/vendor/manifest.xml)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor/manifest.xml)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/vendor/compatibility_matrix.xml)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor/compatibility_matrix.xml)

# Remove DisplayCutoutEmulation overlays
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor/overlay/DisplayCutoutEmulationWide)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor/overlay/DisplayCutoutEmulationNarrow)

# Remove obsolete intermedates src files
$(call add-clean-step, rm -rf $(TARGET_OUT_COMMON_INTERMEDIATES)/*/*_intermediates/src/RenderScript.stamp*)
$(call add-clean-step, rm -rf $(TARGET_OUT_COMMON_INTERMEDIATES)/APPS/*_intermediates/src)
$(call add-clean-step, rm -rf $(TARGET_OUT_COMMON_INTERMEDIATES)/JAVA_LIBRARIES/*_intermediates/src)
$(call add-clean-step, rm -rf $(TARGET_OUT_COMMON_INTERMEDIATES)/APPS/*_intermediates/java-source-list)
$(call add-clean-step, rm -rf $(TARGET_OUT_COMMON_INTERMEDIATES)/JAVA_LIBRARIES/*_intermediates/java-source-list)
$(call add-clean-step, rm -rf $(OUT_DOCS)/*-timestamp)

$(call add-clean-step, rm -rf $(TARGET_COMMON_OUT_ROOT)/obj_asan/APPS/*_intermediates/src)
$(call add-clean-step, rm -rf $(TARGET_COMMON_OUT_ROOT)/obj_asan/JAVA_LIBRARIES/*_intermediates/src)
$(call add-clean-step, rm -rf $(TARGET_COMMON_OUT_ROOT)/obj_asan/APPS/*_intermediates/java-source-list)
$(call add-clean-step, rm -rf $(TARGET_COMMON_OUT_ROOT)/obj_asan/JAVA_LIBRARIES/*_intermediates/java-source-list)

# Remove stale init.noenforce.rc
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/etc/init/gsi/init.noenforce.rc)

# Clean up Launcher3 which has been replaced with Launcher3QuickStep
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/app/Launcher3)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/priv-app/Launcher3)
$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/APPS/Launcher3_intermediates)

# Remove old merged AndroidManifest.xml location
$(call add-clean-step, rm -rf $(TARGET_OUT_COMMON_INTERMEDIATES)/APPS/*_intermediates/AndroidManifest.xml)

$(call add-clean-step, find $(PRODUCT_OUT) -type f -name "vr_hwc*" -print0 | xargs -0 rm -f)

$(call add-clean-step, rm -rf $(SOONG_OUT_DIR)/.intermediates/system/vold)

# Remove product-services related files / images
$(call add-clean-step, find $(PRODUCT_OUT) -type f -name "*product-services*" -print0 | xargs -0 rm -rf)
$(call add-clean-step, find $(PRODUCT_OUT) -type d -name "*product-services*" -print0 | xargs -0 rm -rf)
$(call add-clean-step, find $(PRODUCT_OUT) -type l -name "*product-services*" -print0 | xargs -0 rm -rf)

# Remove obsolete recovery etc files
$(call add-clean-step, rm -rf $(TARGET_RECOVERY_ROOT_OUT)/etc)

# Remove *_OUT_INTERMEDIATE_LIBRARIES
$(call add-clean-step, rm -rf $(addsuffix /lib,\
$(HOST_OUT_INTERMEDIATES) $(2ND_HOST_OUT_INTERMEDIATES) \
$(HOST_CROSS_OUT_INTERMEDIATES) $(2ND_HOST_CROSS_OUT_INTERMEDIATES) \
$(TARGET_OUT_INTERMEDIATES) $(2ND_TARGET_OUT_INTERMEDIATES)))

# Remove strip.sh intermediates to save space
$(call add-clean-step, find $(OUT_DIR) \( -name "*.so.debug" -o -name "*.so.dynsyms" -o -name "*.so.funcsyms" -o -name "*.so.keep_symbols" -o -name "*.so.mini_debuginfo.xz" \) -print0 | xargs -0 rm -f)

# Clean up old ninja files
$(call add-clean-step, rm -f $(OUT_DIR)/build-*-dist*.ninja)

$(call add-clean-step, rm -f $(HOST_OUT)/*ts/host-libprotobuf-java-*.jar)

$(call add-clean-step, find $(OUT_DIR)/target/product/mainline_arm64/system -type f -name "*.*dex" -print0 | xargs -0 rm -f)

# Clean up aidegen
$(call add-clean-step, rm -f $(HOST_OUT)/bin/aidegen)

# Remove perfprofd
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/bin/perfprofd)

# Remove incorrectly created directories in the source tree
$(call add-clean-step, find system/app system/priv-app system/framework system_other -depth -type d -print0 | xargs -0 rmdir)
$(call add-clean-step, rm -f .d)

# Remove obsolete apps
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/app/*)

# Remove corrupt generated rule due to using toybox's sed
$(call add-clean-step, rm -rf $(SOONG_OUT_DIR)/.intermediates/system/core/init/generated_stub_builtin_function_map)

# Clean up core JNI libraries moved to runtime apex
$(call add-clean-step, rm -f $(PRODUCT_OUT)/system/lib*/libjavacore.so)
$(call add-clean-step, rm -f $(PRODUCT_OUT)/system/lib*/libopenjdk.so)
$(call add-clean-step, rm -f $(PRODUCT_OUT)/system/lib*/libexpat.so)

# Merge product_services into product
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/product_services)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/product_services)

# Clean up old location of hiddenapi files
$(call add-clean-step, rm -f $(TARGET_OUT_COMMON_INTERMEDIATES)/PACKAGING/hiddenapi*)

# Clean up previous default location of RROs
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor/overlay)

# Remove ART artifacts installed only by modules `art-runtime` and
# `art-tools` in /system on target.
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/bin/dalvikvm)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/bin/dalvikvm32)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/bin/dalvikvm64)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/bin/dex2oat)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/bin/dex2oatd)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/bin/dexdiag)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/bin/dexdump)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/bin/dexlist)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/bin/dexoptanalyzer)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/bin/dexoptanalyzerd)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/bin/oatdump)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/bin/profman)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/bin/profmand)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib*/libadbconnection.so)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib*/libadbconnectiond.so)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib*/libart-compiler.so)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib*/libartd-compiler.so)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib*/libart-dexlayout.so)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib*/libartd-dexlayout.so)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib*/libart-disassembler.so)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib*/libart.so)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib*/libartd.so)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib*/libartbase.so)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib*/libartbased.so)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib*/libdexfile.so)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib*/libdexfiled.so)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib*/libdexfile_external.so)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib*/libdexfile_support.so)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib*/libdt_fd_forward.so)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib*/libdt_socket.so)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib*/libjdwp.so)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib*/libnpt.so)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib*/libopenjdkd.so)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib*/libopenjdkjvm.so)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib*/libopenjdkjvmd.so)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib*/libopenjdkjvmti.so)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib*/libopenjdkjvmtid.so)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib*/libprofile.so)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib*/libprofiled.so)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib*/libtombstoned_client.so)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib*/libvixl.so)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib*/libvixld.so)

# Clean up old location of dexpreopted boot jars
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/dex_bootjars)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/dex_bootjars_input)

$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib*/libnpt.so)

$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib*)

# Clean up old testcase files
$(call add-clean-step, rm -rf $(TARGET_OUT_TESTCASES)/*)
$(call add-clean-step, rm -rf $(HOST_OUT_TESTCASES)/*)
$(call add-clean-step, rm -rf $(HOST_CROSS_OUT_TESTCASES)/*)
$(call add-clean-step, rm -rf $(TARGET_OUT_DATA)/*)
$(call add-clean-step, rm -rf $(HOST_OUT)/vts/*)
$(call add-clean-step, rm -rf $(HOST_OUT)/framework/vts-tradefed.jar)

# Clean up old location of system_other.avbpubkey
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/etc/security/avb/)

# Clean up bufferhub files
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/bin/hw/android.frameworks.bufferhub@1.0-service)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/etc/init/android.frameworks.bufferhub@1.0-service.rc)

$(call add-clean-step, rm -rf $(PRODUCT_OUT)/super.img)

$(call add-clean-step, find $(PRODUCT_OUT) -type f -name "generated_*_image_info.txt" -print0 | xargs -0 rm -f)

# Clean up libicuuc.so and libicui18n.so
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib*/libicu*)

$(call add-clean-step, rm -rf $(PRODUCT_OUT)/target/common/obj/framework.aidl)

# Clean up adb_debug.propr
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/etc/adb_debug.prop)

$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib*/libjavacrypto.so)

# Clean up old verity tools.
$(call add-clean-step, rm -rf $(HOST_OUT_JAVA_LIBRARIES)/BootSignature.jar)
$(call add-clean-step, rm -rf $(HOST_OUT_JAVA_LIBRARIES)/VeritySigner.jar)
$(call add-clean-step, rm -rf $(HOST_OUT_EXECUTABLES)/build_verity_metadata.py)

$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib*/libc_malloc*)

# Clean up old location of soft OMX plugins
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib*/libstagefright_soft*)

# Move odm build.prop to /odm/etc/.
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/odm/build.prop)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor/odm/build.prop)

$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/apex)

# Remove libcameraservice and libcamera_client from base_system
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib*/libcameraservice.so)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib*/libcamera_client.so)

# Move product and system_ext to root for emulators
$(call add-clean-step, rm -rf $(OUT_DIR)/target/product/generic*/*/product)
$(call add-clean-step, rm -rf $(OUT_DIR)/target/product/generic*/*/system_ext)

# link_type and jni_link_type files are no longer needed
$(call add-clean-step, find $(OUT_DIR) -type f -name "*link_type" -print0 | xargs -0 rm -f)

# import_includes and export_includes files are no longer needed
$(call add-clean-step, find $(OUT_DIR) -type f -name "import_includes" -o -name "export_includes" -print0 | xargs -0 rm -f)

# Recreate product and system_ext partitions for emulator
$(call add-clean-step, rm -rf $(OUT_DIR)/target/product/generic*/*product*)
$(call add-clean-step, rm -rf $(OUT_DIR)/target/product/generic*/*system_ext*)
$(call add-clean-step, rm -rf $(OUT_DIR)/target/product/generic*/*/product)
$(call add-clean-step, rm -rf $(OUT_DIR)/target/product/generic*/*/system_ext)

# Move GSI-specific files from /system to /system/system_ext
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/etc/init/init.gsi.rc)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/etc/init/config/)

# Move fuzz targets from /data/fuzz/* to /data/fuzz/<arch>/* for device, and
# /fuzz/* to /fuzz/<arch>/* on host.
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/data/fuzz/*)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/symbols/data/fuzz/*)
$(call add-clean-step, rm -rf $(HOST_OUT)/fuzz/*)
$(call add-clean-step, rm -rf $(SOONG_OUT_DIR)/host/*/fuzz/*)

# Change file layout of system_other
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system_other)

$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/apex)

# Migrate preopt files to system_other for some devices
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/*/*app/*/oat)

# Migrate preopt files from system_other for some devices
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system_other)

# Remove Android Core Library artifacts from the system partition, now
# that they live in the ART APEX (b/142944799).
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/framework/*.jar)

# Remove symlinks for VNDK apexes
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib*/vndk-*)

# Switch to symlinks for VNDK libs
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib*/vndk-*)

# Remove Android Core Library artifacts from the system partition
# again, as the original change removing them was reverted.
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/framework/*.jar)

# Remove cas@1.1 from the vendor partition
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor/bin/hw/android.hardware.cas@1.1*)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor/etc/init/android.hardware.cas@1.1*)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor/etc/vintf/manifest/android.hardware.cas@1.1*)

# Remove com.android.cellbroadcast apex for Go devices
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/apex/com.android.cellbroadcast.apex)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/apex/com.android.cellbroadcast)

# Remove CellBroadcastLegacyApp for Go devices
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/priv-app/CellBroadcastLegacyApp)

# Remove MediaProvider after moving into APEX
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/priv-app/MediaProvider)

# The core image variant has been renamed to ""
$(call add-clean-step, find $(SOONG_OUT_DIR)/.intermediates -type d -name "android_*_core*" -print0 | xargs -0 rm -rf)

# Remove 'media' command
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/bin/media)

# Remove CtsShim apks from system partition, since the have been moved inside
# the cts shim apex. Also remove the cts shim apex prebuilt since it has been
# removed in flattened apexs configurations.
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/priv-app/CtsShimPrivPrebuilt)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/app/CtsShimPrebuilt)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/apex/com.android.apex.cts.shim.apex)

# Remove vendor and recovery variants, the directory name has changed.
$(call add-clean-step, find $(SOONG_OUT_DIR)/.intermediates -type d -name "android_*_recovery*" -print0 | xargs -0 rm -rf)
$(call add-clean-step, find $(SOONG_OUT_DIR)/.intermediates -type d -name "android_*_vendor*" -print0 | xargs -0 rm -rf)

# Remove PermissionController after moving into APEX
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/priv-app/*PermissionController)

# Clean up VTS-Core and VTS10 related artifacts.
$(call add-clean-step, rm -rf $(HOST_OUT)/vts-core/*)
$(call add-clean-step, rm -rf $(HOST_OUT)/framework/vts-core-tradefed.jar)
$(call add-clean-step, rm -rf $(HOST_OUT)/vts10/*)
$(call add-clean-step, rm -rf $(HOST_OUT)/framework/vts10-tradefed.jar)
# Clean up VTS again as VTS-Core will be renamed to VTS 
$(call add-clean-step, rm -rf $(HOST_OUT)/vts/*)
$(call add-clean-step, rm -rf $(HOST_OUT)/framework/vts-tradefed.jar)

$(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor/default.prop)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/etc/prop.default)

# Workaround for Soong not being able to rebuild the host binary if its
# JNI dependencies change: b/170389375
$(call add-clean-step, rm -rf $(OUT_DIR)/soong/host/*/lib*/libconscrypt_openjdk_jni.so)
# vendor-ramdisk renamed to vendor_ramdisk
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor-ramdisk)

# Common R directory has been removed.
$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/R)

# Most of SOONG_HOST_OUT_EXECUTABLES has been moved to HOST_OUT_EXECUTABLES
$(call add-clean-step, rm -rf $(SOONG_HOST_OUT))

# More of SOONG_HOST_OUT_EXECUTABLES has been moved to HOST_OUT_EXECUTABLES
$(call add-clean-step, rm -rf $(SOONG_HOST_OUT))

# More of SOONG_HOST_OUT_EXECUTABLES has been moved to HOST_OUT_EXECUTABLES
$(call add-clean-step, rm -rf $(SOONG_HOST_OUT))

# Last of SOONG_HOST_OUT_EXECUTABLES has been moved to HOST_OUT_EXECUTABLES
# Don't use SOONG_HOST_OUT, it is now an alias for HOST_OUT.
$(call add-clean-step, rm -rf $(OUT_DIR)/soong/host)

# Clear out tools/metalava Bazel output dir
$(call add-clean-step, rm -rf $(OUT_DIR)/bazel/output/execroot/__main__/bazel-out/mixed_builds_product-*/bin/tools/metalava)

# Clear out rustc compiler intermediates after reverting rust compiler/linker split.
$(call add-clean-step, find $(OUT_DIR) -name "*.rsp.whole.a" -print0 | xargs -0 /bin/bash -c 'rm -f $$$${@}; rm -f $$$${@/.rsp.whole.a/.rsp.a}; rm -f $$$${@/.rsp.whole.a/.rsp}')

# Remove obsolete java compilation artifacts
$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/)
$(call add-clean-step, find $(OUT_DIR) -type f -name "*.jar" -print0 | xargs -0 rm -f)

# Remove obsolete java compilation artifacts
$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/)
$(call add-clean-step, find $(OUT_DIR) -type f -name "*.jar" -print0 | xargs -0 rm -f)

# Remove obsolete dexpreopt_config artifacts
$(call add-clean-step, rm -f $(PRODUCT_OUT)/dexpreopt_config/dexpreopt.config)
$(call add-clean-step, rm -f $(PRODUCT_OUT)/dexpreopt_config/dexpreopt_soong.config)

# Clear out Soong .intermediates directory regarding removal of hashed subdir
$(call add-clean-step, rm -rf $(OUT_DIR)/soong/.intermediates)

# ************************************************
# NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST
# ************************************************


================================================
FILE: Deprecation.md
================================================
# Deprecation of Make

We've made significant progress converting AOSP from Make to Soong (Android.mk
to Android.bp), and we're ready to start turning off pieces of Make. If you
have any problems converting, please contact us via:

* The [android-building@googlegroups.com] group.
* Our [public bug tracker](https://issuetracker.google.com/issues/new?component=381517).
* Or privately through your existing contacts at Google.

## Status

[build/make/core/deprecation.mk] is the source of truth, but for easy browsing:

| Module type                      | State     |
| -------------------------------- | --------- |
| `BUILD_AUX_EXECUTABLE`           | Obsolete  |
| `BUILD_AUX_STATIC_LIBRARY`       | Obsolete  |
| `BUILD_COPY_HEADERS`             | Error     |
| `BUILD_HOST_EXECUTABLE`          | Error     |
| `BUILD_HOST_FUZZ_TEST`           | Obsolete  |
| `BUILD_HOST_NATIVE_TEST`         | Obsolete  |
| `BUILD_HOST_SHARED_LIBRARY`      | Error     |
| `BUILD_HOST_SHARED_TEST_LIBRARY` | Obsolete  |
| `BUILD_HOST_STATIC_LIBRARY`      | Error     |
| `BUILD_HOST_STATIC_TEST_LIBRARY` | Obsolete  |
| `BUILD_HOST_TEST_CONFIG`         | Obsolete  |
| `BUILD_NATIVE_BENCHMARK`         | Obsolete  |
| `BUILD_SHARED_TEST_LIBRARY`      | Obsolete  |
| `BUILD_STATIC_TEST_LIBRARY`      | Obsolete  |
| `BUILD_TARGET_TEST_CONFIG`       | Obsolete  |
| `BUILD_*`                        | Available |

## Module Type Deprecation Process

We'll be turning off `BUILD_*` module types as all of the users are removed
from AOSP (and Google's internal trees). The process will go something like
this, using `BUILD_PACKAGE` as an example:

* Prerequisite: all common users of `BUILD_PACKAGE` have been removed (some
  device-specific ones may remain).
* `BUILD_PACKAGE` will be moved from `AVAILABLE_BUILD_MODULE_TYPES` to
  `DEFAULT_WARNING_BUILD_MODULE_TYPES` in [build/make/core/deprecation.mk]. This
  will make referring to `BUILD_PACKAGE` a warning.
* Any devices that still have warnings will have
  `BUILD_BROKEN_USES_BUILD_PACKAGE := true` added to their `BoardConfig.mk`.
* `BUILD_PACKAGE` will be switched from `DEFAULT_WARNING_BUILD_MODULE_TYPES` to
  `DEFAULT_ERROR_BUILD_MODULE_TYPES`, which will turn referring to
  `BUILD_PACKAGE` into an error unless the device has overridden it.
* At some later point, after all devices in AOSP no longer set
  `BUILD_BROKEN_USES_BUILD_PACKAGE`, `BUILD_PACKAGE` will be moved from
  `DEFAULT_ERROR_BUILD_MODULE_TYPES` to `OBSOLETE_BUILD_MODULE_TYPES` and the
  code will be removed. It will no longer be possible to use `BUILD_PACKAGE`.

In most cases, we expect module types to stay in the default warning state for
about two weeks before becoming an error by default. Then it will spend some
amount of time in the default error state before moving to obsolete -- we'll
try and keep that around for a while, but other development may cause those to
break, and the fix may to be to obsolete them. There is no expectation that the
`BUILD_BROKEN_USES_BUILD_*` workarounds will work in a future release, it's a
short-term workaround.

Just to be clear, the above process will happen on the AOSP master branch. So
if you're following Android releases, none of the deprecation steps will be in
Android Q, and the 2020 release will have jumped directly to the end for many
module types.

[android-building@googlegroups.com]: https://groups.google.com/forum/#!forum/android-building
[build/make/core/deprecation.mk]: /core/deprecation.mk


================================================
FILE: OWNERS
================================================
include platform/build/soong:/OWNERS

# Since this file affects all Android developers, lock it down. There is still
# round the world timzeone coverage.
per-file envsetup.sh = joeo@google.com, jingwen@google.com
per-file shell_utils.sh = joeo@google.com, jingwen@google.com



================================================
FILE: PREUPLOAD.cfg
================================================
[Hook Scripts]
do_not_use_DO_NOT_MERGE = ${REPO_ROOT}/build/soong/scripts/check_do_not_merge.sh ${PREUPLOAD_COMMIT}

[Builtin Hooks]
ktfmt = true


================================================
FILE: README.md
================================================
# Android Make Build System

This is the Makefile-based portion of the Android Build System.

For documentation on how to run a build, see [Usage.txt](Usage.txt)

For a list of behavioral changes useful for Android.mk writers see
[Changes.md](Changes.md)

For an outdated reference on Android.mk files, see
[build-system.html](/core/build-system.html). Our Android.mk files look similar,
but are entirely different from the Android.mk files used by the NDK build
system. When searching for documentation elsewhere, ensure that it is for the
platform build system -- most are not.

This Makefile-based system is in the process of being replaced with [Soong], a
new build system written in Go. During the transition, all of these makefiles
are read by [Kati], and generate a ninja file instead of being executed
directly. That's combined with a ninja file read by Soong so that the build
graph of the two systems can be combined and run as one.

[Kati]: https://github.com/google/kati
[Soong]: https://android.googlesource.com/platform/build/soong/+/master


================================================
FILE: Usage.txt
================================================
Android build system usage:

m [-j] [<targets>] [<variable>=<value>...]


Ways to specify what to build:
  The common way to specify what to build is to set that information in the
  environment via:

    # Set up the shell environment.
    source build/envsetup.sh # Run "hmm" after sourcing for more info
    # Select the device and variant to target. If no argument is given, it
    # will list choices and prompt.
    lunch [<product>-<variant>] # Selects the device and variant to target.
    # Invoke the configured build.
    m [<options>] [<targets>] [<variable>=<value>...]

      <product> is the device that the created image is intended to be run on.
        This is saved in the shell environment as $TARGET_PRODUCT by `lunch`.
      <variant> is one of "user", "userdebug", or "eng", and controls the
        amount of debugging to be added into the generated image.
        This gets saved in the shell environment as $TARGET_BUILD_VARIANT by
          `lunch`.

    Each of <options>, <targets>, and <variable>=<value> is optional.
      If no targets are specified, the build system will build the images
      for the configured product and variant.

  A target may be a file path. For example, out/host/linux-x86/bin/adb .
    Note that when giving a relative file path as a target, that path is
    interpreted relative to the root of the source tree (rather than relative
    to the current working directory).

  A target may also be any other target defined within a Makefile. Run
    `m help` to view the names of some common targets.

  To view the modules and targets defined in a particular directory, look for:
    files named *.mk (most commonly Android.mk)
      these files are defined in Make syntax
    files named Android.bp
      these files are defined in Blueprint syntax

  During a build, a few log files are generated in ${OUT} (or ${DIST_DIR}/logs
    for dist builds):

    verbose.log.gz
      every command run, along with its outputs. This is similar to the
      previous `m showcommands` option.
    error.log
      list of actions that failed during the build, and their outputs.
    soong.log
      verbose debug information from soong_ui

  For now, the full (extremely large) compiled list of targets can be found
    (after running the build once), split among these two files:

    ${OUT}/build-<product>*.ninja
    ${OUT}/soong/build.ninja

    If you find yourself interacting with these files, you are encouraged to
    provide a more convenient tool for browsing targets, and to mention the
    tool here.

Targets that adjust an existing build:
  dist                      Copy into ${DIST_DIR} the portion of the build
                            that must be distributed

Flags
  -j <N>                    Run <N> processes at once
  -j                        Autodetect the number of processes to run at once,
                            and run that many

Variables
  Variables can either be set in the surrounding shell environment or can be
    passed as command-line arguments. For example:
      export I_AM_A_SHELL_VAR=1
      I_AM_ANOTHER_SHELL_VAR=2 m droid I_AM_A_MAKE_VAR=3
  Here are some common variables and their meanings:
    TARGET_PRODUCT          The <product> to build # as described above
    TARGET_BUILD_VARIANT    The <variant> to build # as described above
    DIST_DIR                The directory in which to place the distribution
                            artifacts.
    OUT_DIR                 The directory in which to place non-distribution
                            artifacts.

  There is not yet known a convenient method by which to discover the full
  list of supported variables. Please mention it here when there is.



================================================
FILE: backported_fixes/Android.bp
================================================
// Copyright 2024 Google Inc. All rights reserved.
//
// 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.

package {
    default_applicable_licenses: ["Android-Apache-2.0"],
    default_team: "trendy_team_android_media_reliability",
}

genrule {
    name: "applied_backported_fixes",
    tools: ["applied_backported_fixes_property_writer"],
    srcs: [":applied_backported_fix_binpbs"],
    out: ["applied_backported_fixes.prop"],
    cmd: "$(location applied_backported_fixes_property_writer)" +
        " -p $(location applied_backported_fixes.prop)" +
        " $(in)",
}

filegroup {
    name: "backported_fixes_proto_file",
    srcs: [
        "backported_fixes.proto",
    ],
}

java_library {
    name: "backported_fixes_proto",
    srcs: ["backported_fixes.proto"],
    host_supported: true,
    sdk_version: "current",
}

java_library {
    name: "backported_fixes_common",
    srcs: ["src/java/com/android/build/backportedfixes/common/*.java"],
    static_libs: [
        "backported_fixes_proto",
        "guava",
    ],
    host_supported: true,
}

java_test_host {
    name: "backported_fixes_common_test",
    srcs: ["tests/java/com/android/build/backportedfixes/common/*.java"],
    static_libs: [
        "backported_fixes_common",
        "backported_fixes_proto",
        "junit",
        "truth",
        "truth-liteproto-extension",
        "truth-proto-extension",
    ],
    test_options: {
        unit_test: true,
    },
    test_suites: ["general-tests"],
}

java_library {
    name: "backported_fixes_main_lib",
    srcs: ["src/java/com/android/build/backportedfixes/*.java"],
    static_libs: [
        "backported_fixes_common",
        "backported_fixes_proto",
        "jcommander",
        "guava",
    ],
    host_supported: true,
}

java_binary_host {
    name: "applied_backported_fixes_property_writer",
    main_class: "com.android.build.backportedfixes.WriteBackportedFixesPropFile",
    static_libs: [
        "backported_fixes_main_lib",
    ],
}

java_binary_host {
    name: "backported_fixes_combiner",
    main_class: "com.android.build.backportedfixes.CombineBackportedFixes",
    static_libs: [
        "backported_fixes_main_lib",
    ],
}

// Combines BackportedFix binary proto files into a single BackportedFixes binary proto file.
genrule_defaults {
    name: "default_backported_fixes_combiner",
    tools: ["backported_fixes_combiner"],
    cmd: "$(location backported_fixes_combiner)" +
        " -o $(out)" +
        " $(in)",
}

java_test_host {
    name: "backported_fixes_main_lib_test",
    srcs: ["tests/java/com/android/build/backportedfixes/*.java"],
    static_libs: [
        "backported_fixes_main_lib",
        "backported_fixes_proto",
        "junit",
        "truth",
    ],
    test_options: {
        unit_test: true,
    },
    test_suites: ["general-tests"],
}

// Converts BackprotedFix text protos to binary protos
genrule_defaults {
    name: "default_backported_fix_binpbs",
    tools: ["aprotoc"],
    tool_files: [
        ":backported_fixes_proto_file",
    ],
    cmd: "$(location aprotoc)  " +
        " --encode=com.android.build.backportedfixes.BackportedFix" +
        "  $(location :backported_fixes_proto_file)" +
        " < $(in)" +
        " > $(out); echo $(out)",
}

gensrcs {
    name: "applied_backported_fix_binpbs",
    defaults: ["default_backported_fix_binpbs"],
    output_extension: "binpb",
    srcs: [
        "applied_fixes/*.txtpb",
    ],
}


================================================
FILE: backported_fixes/OWNERS
================================================
essick@google.com
nchalko@google.com
portmannc@google.com


================================================
FILE: backported_fixes/applied_fixes/ki350037023.txtpb
================================================
# 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.
#
# proto-file: ../backported_fixes.proto
# proto-message: BackportedFix

known_issue: 350037023
alias: 1


================================================
FILE: backported_fixes/backported_fixes.proto
================================================
// 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.

syntax = "proto2";

package com.android.build.backportedfixes;

option java_multiple_files = true;

// A list of backported fixes.
message BackportedFixes {
  repeated BackportedFix fixes = 1;
}

// A known issue approved for reporting Build.getBackportedFixStatus
message BackportedFix {

  // The issue id from the public bug tracker
  // https://issuetracker.google.com/issues/{known_issue}
  optional int64 known_issue = 1;
  // The alias for the known issue.
  // 1 - 1023 are valid aliases
  // Must be unique across all backported fixes.
  optional int32 alias = 2;
}



================================================
FILE: backported_fixes/src/java/com/android/build/backportedfixes/CombineBackportedFixes.java
================================================

/*
 * 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.
 */
package com.android.build.backportedfixes;

import com.android.build.backportedfixes.common.Parser;

import com.beust.jcommander.JCommander;
import com.beust.jcommander.Parameter;
import com.beust.jcommander.converters.FileConverter;

import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.util.List;


/** Creates a BackportedFixes binary proto file from a list of BackportedFix proto binary files. */
public final class CombineBackportedFixes {

    @Parameter(description = "BackportedFix proto binary files",
            converter = FileConverter.class,
            required = true)
    List<File> fixFiles;
    @Parameter(description = "Write the BackportedFixes proto binary to this file",
            names = {"--out","-o"},
            converter = FileConverter.class,
            required = true)
    File outFile;

    public static void main(String... argv) throws Exception {
        CombineBackportedFixes main = new CombineBackportedFixes();
        JCommander.newBuilder().addObject(main).build().parse(argv);
        main.run();
    }

    CombineBackportedFixes() {
    }

    private void run() throws Exception {
        try (var out = new FileOutputStream(outFile)) {
            var fixes = Parser.parseBackportedFixFiles(fixFiles);
            writeBackportedFixes(fixes, out);
        }
    }

    static void writeBackportedFixes(BackportedFixes fixes, OutputStream out)
            throws IOException {
        fixes.writeTo(out);
    }
}


================================================
FILE: backported_fixes/src/java/com/android/build/backportedfixes/WriteBackportedFixesPropFile.java
================================================

/*
 * 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.
 */
package com.android.build.backportedfixes;

import static java.nio.charset.StandardCharsets.UTF_8;

import com.android.build.backportedfixes.common.Parser;

import com.beust.jcommander.JCommander;
import com.beust.jcommander.Parameter;
import com.beust.jcommander.converters.FileConverter;
import com.google.common.io.Files;

import java.io.File;
import java.io.PrintWriter;
import java.io.Writer;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;


/**
 * Creates backported fix properties file.
 *
 * <p>Writes BitSet of backported fix aliases from a list of BackportedFix proto binary files and
 * writes the property {@value PROPERTY_NAME} to a file.
 */
public final class WriteBackportedFixesPropFile {

    private static final String PROPERTY_NAME = "ro.build.backported_fixes.alias_bitset.long_list";
    @Parameter(description = "BackportedFix proto binary files",
            converter = FileConverter.class,
            required = true)
    List<File> fixFiles;
    @Parameter(description = "The file to write the property value to.",
            names = {"--property_file", "-p"},
            converter = FileConverter.class,
            required = true)
    File propertyFile;

    public static void main(String... argv) throws Exception {
        WriteBackportedFixesPropFile main = new WriteBackportedFixesPropFile();
        JCommander.newBuilder().addObject(main).build().parse(argv);
        main.run();
    }

    WriteBackportedFixesPropFile() {
    }

    private void run() throws Exception {
        try (var out = Files.newWriter(propertyFile, UTF_8)) {
            var fixes = Parser.parseBackportedFixFiles(fixFiles);
            writeFixesAsAliasBitSet(fixes, out);
        }
    }

    static void writeFixesAsAliasBitSet(BackportedFixes fixes, Writer out) {
        PrintWriter printWriter = new PrintWriter(out);
        printWriter.println("# The following backported fixes have been applied");
        for (var f : fixes.getFixesList()) {
            printWriter.printf("# https://issuetracker.google.com/issues/%d with alias %d",
                    f.getKnownIssue(), f.getAlias());
            printWriter.println();
        }
        var bsArray = Parser.getBitSetArray(
                fixes.getFixesList().stream().mapToInt(BackportedFix::getAlias).toArray());
        String bsString = Arrays.stream(bsArray).mapToObj(Long::toString).collect(
                Collectors.joining(","));
        printWriter.printf("%s=%s", PROPERTY_NAME, bsString);
        printWriter.println();
        if (printWriter.checkError()) {
            throw new RuntimeException("There was an error writing to " + out.toString());
        }
    }
}


================================================
FILE: backported_fixes/src/java/com/android/build/backportedfixes/common/Parser.java
================================================
/*
 * 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.
 */
package com.android.build.backportedfixes.common;

import static com.google.common.base.Preconditions.checkNotNull;

import com.android.build.backportedfixes.BackportedFix;
import com.android.build.backportedfixes.BackportedFixes;

import com.google.common.base.Throwables;
import com.google.common.collect.ImmutableList;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.util.BitSet;
import java.util.Comparator;
import java.util.List;
import java.util.stream.Collector;
import java.util.stream.Collectors;


/** Static utilities for working with {@link BackportedFixes}. */
public final class Parser {

    /** Creates list of FileInputStreams for a list of files. */
    public static ImmutableList<FileInputStream> getFileInputStreams(List<File> fixFiles) throws
            FileNotFoundException {
        var streams = ImmutableList.<FileInputStream>builder();
        for (var f : fixFiles) {
            streams.add(new FileInputStream(f));
        }
        return streams.build();
    }

    /** Converts a list of backported fix aliases into a long array representing a {@link BitSet} */
    public static long[] getBitSetArray(int[] aliases) {
        BitSet bs = new BitSet();
        for (int a : aliases) {
            bs.set(a);
        }
        return bs.toLongArray();
    }

    /**
     * Creates a {@link BackportedFixes} from a list of {@link BackportedFix} binary proto streams.
     */
    public static BackportedFixes parseBackportedFixFiles(List<File> fixFiles)
            throws IOException {
        try {
            return fixFiles.stream().map(Parser::tunelFileInputStream)
                    .map(Parser::tunnelParse)
                    .sorted(Comparator.comparing(BackportedFix::getKnownIssue))
                    .collect(fixCollector());

        } catch (TunnelException e) {
            throw e.rethrow(FileNotFoundException.class, IOException.class);
        }
    }


    private static Collector<BackportedFix, ?, BackportedFixes> fixCollector() {
        return Collectors.collectingAndThen(Collectors.toList(), fixList -> {
            var result = BackportedFixes.newBuilder();
            result.addAllFixes(fixList);
            return result.build();
        });
    }

    private static FileInputStream tunelFileInputStream(File file) throws TunnelException {
        try {
            return new FileInputStream(file);
        } catch (FileNotFoundException e) {
            throw new TunnelException(e);
        }
    }

    private static BackportedFix tunnelParse(InputStream s) throws TunnelException {
        try {
            var fix = BackportedFix.parseFrom(s);
            s.close();
            return fix;
        } catch (IOException e) {
            throw new TunnelException(e);
        }
    }

    private static class TunnelException extends RuntimeException {
        TunnelException(Exception cause) {
            super("If you see this TunnelException something went wrong.  It should always be rethrown as the cause.", cause);
        }

        <X extends Exception> RuntimeException rethrow(Class<X> exceptionClazz) throws X {
            checkNotNull(exceptionClazz);
            Throwables.throwIfInstanceOf(getCause(), exceptionClazz);
            throw exception(
                    getCause(),
                    "rethrow(%s) doesn't match underlying exception", exceptionClazz);
        }

        public <X1 extends Exception, X2 extends Exception> RuntimeException rethrow(
                Class<X1> exceptionClazz1, Class<X2> exceptionClazz2) throws X1, X2 {
            checkNotNull(exceptionClazz1);
            checkNotNull(exceptionClazz2);
            Throwables.throwIfInstanceOf(getCause(), exceptionClazz1);
            Throwables.throwIfInstanceOf(getCause(), exceptionClazz2);
            throw exception(
                    getCause(),
                    "rethrow(%s, %s) doesn't match underlying exception",
                    exceptionClazz1,
                    exceptionClazz2);
        }

        private static ClassCastException exception(
                Throwable cause, String message, Object... formatArgs) {
            ClassCastException result = new ClassCastException(String.format(message, formatArgs));
            result.initCause(cause);
            return result;
        }

    }

    private Parser() {
    }
}


================================================
FILE: backported_fixes/tests/java/com/android/build/backportedfixes/CombineBackportedFixesTest.java
================================================

/*
 * 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.
 */
package com.android.build.backportedfixes;

import com.google.common.truth.Truth;

import org.junit.Test;

import java.io.ByteArrayOutputStream;
import java.io.IOException;

/** Tests for {@link CombineBackportedFixes}. */
public class CombineBackportedFixesTest {


    @Test
    public void writeBackportedFixes_default() throws IOException {
        // Not much of a test, but there is not much to test.
        BackportedFixes fixes = BackportedFixes.newBuilder()
                .addFixes(BackportedFix.newBuilder().setKnownIssue(123).build())
                .build();
        var result = new ByteArrayOutputStream();
        CombineBackportedFixes.writeBackportedFixes(fixes, result);
        Truth.assertThat(BackportedFixes.parseFrom(result.toByteArray()))
                .isEqualTo(fixes);
    }
}


================================================
FILE: backported_fixes/tests/java/com/android/build/backportedfixes/WriteBackportedFixesPropFileTest.java
================================================

/*
 * 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.
 */
package com.android.build.backportedfixes;

import com.google.common.truth.Truth;

import org.junit.Test;

import java.io.PrintWriter;
import java.io.StringWriter;

/** Tests for {@link WriteBackportedFixesPropFile}. */
public class WriteBackportedFixesPropFileTest {


    @Test
    public void writeFixesAsAliasBitSet_default() {
        BackportedFixes fixes = BackportedFixes.newBuilder().build();
        var result = new StringWriter();

        WriteBackportedFixesPropFile.writeFixesAsAliasBitSet(fixes, new PrintWriter(result));

        Truth.assertThat(result.toString())
                .isEqualTo("""
                        # The following backported fixes have been applied
                        ro.build.backported_fixes.alias_bitset.long_list=
                        """);
    }

    @Test
    public void writeFixesAsAliasBitSet_some() {
        BackportedFixes fixes = BackportedFixes.newBuilder()
                .addFixes(BackportedFix.newBuilder().setKnownIssue(1234L).setAlias(1))
                .addFixes(BackportedFix.newBuilder().setKnownIssue(3L).setAlias(65))
                .addFixes(BackportedFix.newBuilder().setKnownIssue(4L).setAlias(67))
                .build();
        var result = new StringWriter();

        WriteBackportedFixesPropFile.writeFixesAsAliasBitSet(fixes, new PrintWriter(result));

        Truth.assertThat(result.toString())
                .isEqualTo("""
                        # The following backported fixes have been applied
                        # https://issuetracker.google.com/issues/1234 with alias 1
                        # https://issuetracker.google.com/issues/3 with alias 65
                        # https://issuetracker.google.com/issues/4 with alias 67
                        ro.build.backported_fixes.alias_bitset.long_list=2,10
                        """);
    }
}


================================================
FILE: backported_fixes/tests/java/com/android/build/backportedfixes/common/ParserTest.java
================================================
/*
 * 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.
 */
package com.android.build.backportedfixes.common;

import static com.google.common.truth.Truth.assertThat;
import static com.google.common.truth.extensions.proto.ProtoTruth.assertThat;

import com.android.build.backportedfixes.BackportedFix;
import com.android.build.backportedfixes.BackportedFixes;

import com.google.common.collect.ImmutableList;

import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;

import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.nio.file.Files;

/** Tests for {@link Parser}.*/
public class ParserTest {

    @Rule
    public TemporaryFolder mTempFolder = new TemporaryFolder();

    @Test
    public void getFileInputStreams() throws IOException {
        var results = Parser.getFileInputStreams(
                ImmutableList.of(Files.createTempFile("test", null).toFile()));
        assertThat(results).isNotEmpty();
    }


    @Test
    public void getBitSetArray_empty() {
        var results = Parser.getBitSetArray(new int[]{});
        assertThat(results).isEmpty();
    }

    @Test
    public void getBitSetArray_2_3_64() {
        var results = Parser.getBitSetArray(new int[]{2,3,64});
        assertThat(results).asList().containsExactly(12L,1L).inOrder();
    }

    @Test
    public void parseBackportedFixFiles_empty() throws IOException {
        var result = Parser.parseBackportedFixFiles(ImmutableList.of());
        assertThat(result).isEqualTo(BackportedFixes.getDefaultInstance());
    }


    @Test
    public void parseBackportedFixFiles_oneBlank() throws IOException {
        var result = Parser.parseBackportedFixFiles(ImmutableList.of(mTempFolder.newFile()));

        assertThat(result).isEqualTo(
                BackportedFixes.newBuilder()
                        .addFixes(BackportedFix.getDefaultInstance())
                        .build());
    }

    @Test
    public void parseBackportedFixFiles_two() throws IOException {
        BackportedFix ki123 = BackportedFix.newBuilder()
                .setKnownIssue(123)
                .setAlias(1)
                .build();
        BackportedFix ki456 = BackportedFix.newBuilder()
                .setKnownIssue(456)
                .setAlias(2)
                .build();
        var result = Parser.parseBackportedFixFiles(
                ImmutableList.of(tempFile(ki456), tempFile(ki123)));
        assertThat(result).isEqualTo(
                BackportedFixes.newBuilder()
                        .addFixes(ki123)
                        .addFixes(ki456)
                        .build());
    }

    private File tempFile(BackportedFix fix) throws IOException {
        File f = mTempFolder.newFile();
        try (FileOutputStream out = new FileOutputStream(f)) {
            fix.writeTo(out);
            return f;
        }
    }
}


================================================
FILE: banchanHelp.sh
================================================
#!/bin/bash

# locate some directories
cd "$(dirname $0)"
SCRIPT_DIR="${PWD}"
cd ../..
TOP="${PWD}"

message='usage: banchan <module> ... [<product>|arm|x86|arm64|x86_64] [eng|userdebug|user]

banchan selects individual APEX modules to be built by the Android build system.
Like "tapas", "banchan" does not request the building of images for a device but
instead configures it for an unbundled build of the given modules, suitable for
installing on any api-compatible device.

The difference from "tapas" is that "banchan" sets the appropriate products etc
for building APEX modules rather than apps (APKs).

The module names should match apex{} modules in Android.bp files, typically
starting with "com.android.".

The product argument should be a product name ending in "_<arch>", where <arch>
is one of arm, x86, arm64, x86_64. It can also be just an arch, in which case
the standard product for building modules with that architecture is used, i.e.
module_<arch>.

The usage of the other arguments matches that of the rest of the platform
build system and can be found by running `m help`'

echo "$message"


================================================
FILE: buildspec.mk.default
================================================
#
# Copyright (C) 2007 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.
#

######################################################################
# This is a do-nothing template file.  To use it, copy it to a file
# named "buildspec.mk" in the root directory, and uncomment or change
# the variables necessary for your desired configuration.  The file
# "buildspec.mk" should never be checked in to source control.
######################################################################

# Choose a product to build for.  Look in the products directory for ones
# that work.
ifndef TARGET_PRODUCT
#TARGET_PRODUCT:=generic
endif

# Choose a variant to build.  If you don't pick one, the default is eng.
# User is what we ship.  Userdebug is that, with a few flags turned on
# for debugging.  Eng has lots of extra tools for development.
ifndef TARGET_BUILD_VARIANT
#TARGET_BUILD_VARIANT:=user
#TARGET_BUILD_VARIANT:=userdebug
#TARGET_BUILD_VARIANT:=eng
endif

# Choose a targeted release.  If you don't pick one, the default is the
# soonest future release.
ifndef TARGET_PLATFORM_RELEASE
#TARGET_PLATFORM_RELEASE:=OPR1
endif

# Choose additional targets to always install, even when building
# minimal targets like "make droid".  This takes simple target names
# like "Browser" or "MyApp", the names used by LOCAL_MODULE or
# LOCAL_PACKAGE_NAME.  Modules listed here will always be installed in
# /system, even if they'd usually go in /data.
ifndef CUSTOM_MODULES
#CUSTOM_MODULES:=
endif

# Set this to debug or release if you care.  Otherwise, it defaults to release.
ifndef TARGET_BUILD_TYPE
#TARGET_BUILD_TYPE:=release
endif

# Uncomment this if you want the host tools built in debug mode.  Otherwise
# it defaults to release.
ifndef HOST_BUILD_TYPE
#HOST_BUILD_TYPE:=debug
endif

# Turn on debugging for selected modules.  If DEBUG_MODULE_<module-name> is set
# to a non-empty value, the appropriate HOST_/TARGET_CUSTOM_DEBUG_CFLAGS
# will be added to LOCAL_CFLAGS when building the module.
#DEBUG_MODULE_ModuleName:=true

# Specify the extra CFLAGS to use when building a module whose
# DEBUG_MODULE_ variable is set.  Host and device flags are handled
# separately.
#HOST_CUSTOM_DEBUG_CFLAGS:=
#TARGET_CUSTOM_DEBUG_CFLAGS:=

# Choose additional locales, like "en_US" or "it_IT", to add to any
# built product.  Any locales that appear in CUSTOM_LOCALES but not in
# the locale list for the selected product will be added to the end
# of PRODUCT_LOCALES.
ifndef CUSTOM_LOCALES
#CUSTOM_LOCALES:=
endif

# If you have a special place to put your ouput files, set this, otherwise
# it goes to <build-root>/out
#OUT_DIR:=/tmp/stuff

# If you want to always set certain system properties, add them to this list.
# E.g., "ADDITIONAL_BUILD_PROPERTIES += ro.prop1=5 prop2=value"
# This mechanism does not currently support values containing spaces.
#ADDITIONAL_BUILD_PROPERTIES +=

# If you want to reduce the system.img size by several meg, and are willing to
# lose access to CJK (and other) character sets, define NO_FALLBACK_FONT:=true
ifndef NO_FALLBACK_FONT
#NO_FALLBACK_FONT:=true
endif

# OVERRIDE_RUNTIMES allows you to locally override PRODUCT_RUNTIMES.
#
# To only build ART, use "runtime_libart_default"
# To use Dalvik but also include ART, use "runtime_libdvm_default runtime_libart"
# To use ART but also include Dalvik, use "runtime_libart_default runtime_libdvm"
ifndef OVERRIDE_RUNTIMES
#OVERRIDE_RUNTIMES:=runtime_libart_default
#OVERRIDE_RUNTIMES:=runtime_libdvm_default runtime_libart
#OVERRIDE_RUNTIMES:=runtime_libart_default runtime_libdvm
endif

# when the build system changes such that this file must be updated, this
# variable will be changed.  After you have modified this file with the new
# changes (see buildspec.mk.default), update this to the new value from
# buildspec.mk.default.
BUILD_ENV_SEQUENCE_NUMBER := 13


================================================
FILE: ci/Android.bp
================================================
// Copyright 2024 Google Inc. All rights reserved.
//
// 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.

package {
    default_applicable_licenses: ["Android-Apache-2.0"],
    default_team: "trendy_team_adte",
}

python_test_host {
    name: "build_test_suites_test",
    main: "build_test_suites_test.py",
    pkg_path: "testdata",
    srcs: [
        "build_test_suites_test.py",
    ],
    libs: [
        "build_test_suites_lib",
        "pyfakefs",
        "ci_test_lib",
    ],
    test_options: {
        unit_test: true,
    },
    data: [
        ":py3-cmd",
    ],
}

// This test is only intended to be run locally since it's slow, not hermetic,
// and requires a lot of system state. It is therefore not marked as `unit_test`
// and is not part of any test suite. Note that we also don't want to run this
// test with Bazel since that would require disabling sandboxing and explicitly
// passing in all the env vars we depend on via the command-line. The test
// target could be configured to do so but it's not worth doing seeing that
// we're moving away from Bazel.
python_test_host {
    name: "build_test_suites_local_test",
    main: "build_test_suites_local_test.py",
    srcs: [
        "build_test_suites_local_test.py",
    ],
    libs: [
        "build_test_suites_lib",
        "pyfakefs",
        "ci_test_lib",
    ],
    test_config_template: "AndroidTest.xml.template",
    test_options: {
        unit_test: false,
    },
}

python_test_host {
    name: "optimized_targets_test",
    main: "optimized_targets_test.py",
    pkg_path: "testdata",
    srcs: [
        "optimized_targets_test.py",
    ],
    libs: [
        "build_test_suites_lib",
        "pyfakefs",
    ],
    test_options: {
        unit_test: true,
    },
    data: [
        ":py3-cmd",
    ],
}

python_binary_host {
    name: "build_test_suites",
    srcs: [
        "build_test_suites.py",
        "optimized_targets.py",
        "test_mapping_module_retriever.py",
        "build_context.py",
        "test_discovery_agent.py",
        "metrics_agent.py",
        "buildbot.py",
    ],
    main: "build_test_suites.py",
    libs: [
        "soong-metrics-proto-py",
    ],
}

python_library_host {
    name: "build_test_suites_lib",
    srcs: [
        "build_test_suites.py",
        "optimized_targets.py",
        "test_mapping_module_retriever.py",
        "build_context.py",
        "test_discovery_agent.py",
        "metrics_agent.py",
        "buildbot.py",
    ],
    libs: [
        "soong-metrics-proto-py",
    ],
}

python_library_host {
    name: "ci_test_lib",
    srcs: [
        "ci_test_lib.py",
    ],
}


================================================
FILE: ci/AndroidTest.xml.template
================================================
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2020 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.
-->
<configuration>
  <test class="com.android.tradefed.testtype.python.PythonBinaryHostTest">
    <option name="par-file-name" value="{MODULE}"/>
    <option name="use-test-output-file" value="false"/>
    <option name="test-timeout" value="5m"/>
  </test>
</configuration>


================================================
FILE: ci/build_context.py
================================================
# Copyright 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.

"""Container class for build context with utility functions."""

import re


class BuildContext:

  def __init__(self, build_context_dict: dict[str, any]):
    self.enabled_build_features = set()
    for opt in build_context_dict.get('enabledBuildFeatures', []):
      self.enabled_build_features.add(opt.get('name'))
    self.test_infos = set()
    for test_info_dict in build_context_dict.get('testContext', dict()).get(
        'testInfos', []
    ):
      self.test_infos.add(self.TestInfo(test_info_dict))

  def build_target_used(self, target: str) -> bool:
    return any(test.build_target_used(target) for test in self.test_infos)

  class TestInfo:

    _DOWNLOAD_OPTS = {
        'test-config-only-zip',
        'test-zip-file-filter',
        'extra-host-shared-lib-zip',
        'sandbox-tests-zips',
        'additional-files-filter',
        'cts-package-name',
    }

    def __init__(self, test_info_dict: dict[str, any]):
      self.is_test_mapping = False
      self.test_mapping_test_groups = set()
      self.file_download_options = set()
      self.name = test_info_dict.get('name')
      self.command = test_info_dict.get('command')
      self.extra_options = test_info_dict.get('extraOptions')
      for opt in test_info_dict.get('extraOptions', []):
        key = opt.get('key')
        if key == 'test-mapping-test-group':
          self.is_test_mapping = True
          self.test_mapping_test_groups.update(opt.get('values', set()))

        if key in self._DOWNLOAD_OPTS:
          self.file_download_options.update(opt.get('values', set()))

    def build_target_used(self, target: str) -> bool:
      # For all of a targets' outputs, check if any of the regexes used by tests
      # to download artifacts would match it. If any of them do then this target
      # is necessary.
      regex = r'\b(%s)\b' % re.escape(target)
      return any(re.search(regex, opt) for opt in self.file_download_options)


================================================
FILE: ci/build_device_and_tests
================================================
#!/usr/bin/env bash
#
# Copyright 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.
set -euo pipefail

build/soong/soong_ui.bash --make-mode build_test_suites
$(build/soong/soong_ui.bash --dumpvar-mode HOST_OUT)/bin/build_test_suites --device-build $@


================================================
FILE: ci/build_metadata
================================================
#/bin/bash

# Copyright 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.

set -x

source build/make/shell_utils.sh

export TARGET_PRODUCT=aosp_arm64
export TARGET_RELEASE=trunk_staging
export TARGET_BUILD_VARIANT=eng

import_build_vars \
        OUT_DIR \
        DIST_DIR \
        HOST_OUT_EXECUTABLES \
    || exit $?

TARGETS=(
    all_teams
    source_tree_size
    release_config_metadata
)

# Build modules
build/soong/bin/m dist ${TARGETS[@]} || exit $?

# List all source files in the tree
( \
    $HOST_OUT_EXECUTABLES/source_tree_size -o $DIST_DIR/all_source_tree_files.pb \
        && gzip -fn $DIST_DIR/all_source_tree_files.pb \
) || exit $?


================================================
FILE: ci/build_test_suites
================================================
#!/usr/bin/env bash
#
# Copyright 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.
set -euo pipefail

build/soong/soong_ui.bash --make-mode build_test_suites
$(build/soong/soong_ui.bash --dumpvar-mode HOST_OUT)/bin/build_test_suites $@


================================================
FILE: ci/build_test_suites.py
================================================
# Copyright 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.

"""Build script for the CI `test_suites` target."""

import argparse
from dataclasses import dataclass
import json
import logging
import os
import pathlib
import re
import subprocess
import sys
from typing import Callable
from build_context import BuildContext
import optimized_targets
import metrics_agent
import test_discovery_agent


REQUIRED_ENV_VARS = frozenset(['TARGET_PRODUCT', 'TARGET_RELEASE', 'TOP', 'DIST_DIR'])
SOONG_UI_EXE_REL_PATH = 'build/soong/soong_ui.bash'
LOG_PATH = 'logs/build_test_suites.log'
# Currently, this prevents the removal of those tags when they exist. In the future we likely
# want the script to supply 'dist directly
REQUIRED_BUILD_TARGETS = frozenset(['dist', 'droid', 'checkbuild'])


class Error(Exception):

  def __init__(self, message):
    super().__init__(message)


class BuildFailureError(Error):

  def __init__(self, return_code):
    super().__init__(f'Build command failed with return code: f{return_code}')
    self.return_code = return_code


class BuildPlanner:
  """Class in charge of determining how to optimize build targets.

  Given the build context and targets to build it will determine a final list of
  targets to build along with getting a set of packaging functions to package up
  any output zip files needed by the build.
  """

  def __init__(
      self,
      build_context: BuildContext,
      args: argparse.Namespace,
      target_optimizations: dict[str, optimized_targets.OptimizedBuildTarget],
  ):
    self.build_context = build_context
    self.args = args
    self.target_optimizations = target_optimizations

  def create_build_plan(self):

    if 'optimized_build' not in self.build_context.enabled_build_features:
      return BuildPlan(set(self.args.extra_targets), set())

    if not self.build_context.test_infos:
      logging.warning('Build context has no test infos, skipping optimizations.')
      for target in self.args.extra_targets:
        get_metrics_agent().report_unoptimized_target(target, 'BUILD_CONTEXT has no test infos.')
      return BuildPlan(set(self.args.extra_targets), set())

    build_targets = set()
    packaging_commands_getters = []
    # In order to roll optimizations out differently between test suites and
    # device builds, we have separate flags.
    enable_discovery = (('test_suites_zip_test_discovery'
        in self.build_context.enabled_build_features
        and not self.args.device_build
    ) or (
        'device_zip_test_discovery'
        in self.build_context.enabled_build_features
        and self.args.device_build
    )) and not self.args.test_discovery_info_mode
    logging.info(f'Discovery mode is enabled= {enable_discovery}')
    preliminary_build_targets = self._collect_preliminary_build_targets(enable_discovery)

    for target in preliminary_build_targets:
      target_optimizer_getter = self.target_optimizations.get(target, None)
      if not target_optimizer_getter:
        build_targets.add(target)
        continue

      target_optimizer = target_optimizer_getter(
          target, self.build_context, self.args
      )
      build_targets.update(target_optimizer.get_build_targets())
      packaging_commands_getters.append(
          target_optimizer.get_package_outputs_commands
      )

    return BuildPlan(build_targets, packaging_commands_getters)

  def _collect_preliminary_build_targets(self, enable_discovery: bool):
    build_targets = set()
    try:
      test_discovery_zip_regexes = self._get_test_discovery_zip_regexes()
      logging.info(f'Discovered test discovery regexes: {test_discovery_zip_regexes}')
    except test_discovery_agent.TestDiscoveryError as e:
      optimization_rationale = e.message
      logging.warning(f'Unable to perform test discovery: {optimization_rationale}')

      for target in self.args.extra_targets:
        get_metrics_agent().report_unoptimized_target(target, optimization_rationale)
      return self._legacy_collect_preliminary_build_targets()

    for target in self.args.extra_targets:
      if target in REQUIRED_BUILD_TARGETS:
        build_targets.add(target)
        get_metrics_agent().report_unoptimized_target(target, 'Required build target.')
        continue
      # If nothing is discovered without error, that means nothing is needed.
      if not test_discovery_zip_regexes:
        get_metrics_agent().report_optimized_target(target)
        continue

      regex = r'\b(%s.*)\b' % re.escape(target)
      for opt in test_discovery_zip_regexes:
        try:
          if re.search(regex, opt):
            get_metrics_agent().report_unoptimized_target(target, 'Test artifact used.')
            build_targets.add(target)
            # proceed to next target evaluation
            break
          get_metrics_agent().report_optimized_target(target)
        except Exception as e:
          # In case of exception report as unoptimized
          build_targets.add(target)
          get_metrics_agent().report_unoptimized_target(target, f'Error in parsing test discovery output for {target}: {repr(e)}')
          logging.error(f'unable to parse test discovery output: {repr(e)}')
          break
    # If discovery is not enabled, return the original list
    if not enable_discovery:
      return self._legacy_collect_preliminary_build_targets()

    return build_targets

  def _legacy_collect_preliminary_build_targets(self):
    build_targets = set()
    for target in self.args.extra_targets:
      if self._unused_target_exclusion_enabled(
          target
      ) and not self.build_context.build_target_used(target):
        continue

      build_targets.add(target)
    return build_targets

  def _unused_target_exclusion_enabled(self, target: str) -> bool:
    return (
        f'{target}_unused_exclusion'
        in self.build_context.enabled_build_features
    )

  def _get_test_discovery_zip_regexes(self) -> set[str]:
    build_target_regexes = set()
    for test_info in self.build_context.test_infos:
      tf_command = self._build_tf_command(test_info)
      discovery_agent = test_discovery_agent.TestDiscoveryAgent(tradefed_args=tf_command)
      for regex in discovery_agent.discover_test_zip_regexes():
        build_target_regexes.add(regex)
    return build_target_regexes


  def _build_tf_command(self, test_info) -> list[str]:
    command = [test_info.command]
    for extra_option in test_info.extra_options:
      if not extra_option.get('key'):
        continue
      arg_key = '--' + extra_option.get('key')
      if arg_key == '--build-id':
        command.append(arg_key)
        command.append(os.environ.get('BUILD_NUMBER'))
        continue
      if extra_option.get('values'):
        for value in extra_option.get('values'):
          command.append(arg_key)
          command.append(value)
      else:
        command.append(arg_key)

    return command

@dataclass(frozen=True)
class BuildPlan:
  build_targets: set[str]
  packaging_commands_getters: list[Callable[[], list[list[str]]]]


def build_test_suites(argv: list[str]) -> int:
  """Builds all test suites passed in, optimizing based on the build_context content.

  Args:
    argv: The command line arguments passed in.

  Returns:
    The exit code of the build.
  """
  get_metrics_agent().analysis_start()
  try:
    args = parse_args(argv)
    check_required_env()
    build_context = BuildContext(load_build_context())
    build_planner = BuildPlanner(
        build_context, args, optimized_targets.OPTIMIZED_BUILD_TARGETS
    )
    build_plan = build_planner.create_build_plan()
  except:
    raise
  finally:
    get_metrics_agent().analysis_end()

  try:
    execute_build_plan(build_plan)
  except BuildFailureError as e:
    logging.error('Build command failed! Check build_log for details.')
    return e.return_code
  finally:
    get_metrics_agent().end_reporting()

  return 0


def parse_args(argv: list[str]) -> argparse.Namespace:
  argparser = argparse.ArgumentParser()

  argparser.add_argument(
      'extra_targets', nargs='*', help='Extra test suites to build.'
  )
  argparser.add_argument(
      '--device-build',
      action='store_true',
      help='Flag to indicate running a device build.',
  )
  argparser.add_argument(
      '--test_discovery_info_mode',
      action='store_true',
      help='Flag to enable running test discovery in info only mode.',
  )

  return argparser.parse_args(argv)


def check_required_env():
  """Check for required env vars.

  Raises:
    RuntimeError: If any required env vars are not found.
  """
  missing_env_vars = sorted(v for v in REQUIRED_ENV_VARS if v not in os.environ)

  if not missing_env_vars:
    return

  t = ','.join(missing_env_vars)
  raise Error(f'Missing required environment variables: {t}')


def load_build_context():
  build_context_path = pathlib.Path(os.environ.get('BUILD_CONTEXT', ''))
  if build_context_path.is_file():
    try:
      with open(build_context_path, 'r') as f:
        return json.load(f)
    except json.decoder.JSONDecodeError as e:
      raise Error(f'Failed to load JSON file: {build_context_path}')

  logging.info('No BUILD_CONTEXT found, skipping optimizations.')
  return empty_build_context()


def empty_build_context():
  return {'enabledBuildFeatures': []}


def execute_build_plan(build_plan: BuildPlan):
  build_command = []
  build_command.append(get_top().joinpath(SOONG_UI_EXE_REL_PATH))
  build_command.append('--make-mode')
  build_command.extend(build_plan.build_targets)
  logging.info(f'Running build command: {build_command}')
  try:
    run_command(build_command)
  except subprocess.CalledProcessError as e:
    raise BuildFailureError(e.returncode) from e

  get_metrics_agent().packaging_start()
  try:
    for packaging_commands_getter in build_plan.packaging_commands_getters:
      for packaging_command in packaging_commands_getter():
        run_command(packaging_command)
  except subprocess.CalledProcessError as e:
    raise BuildFailureError(e.returncode) from e
  finally:
    get_metrics_agent().packaging_end()


def get_top() -> pathlib.Path:
  return pathlib.Path(os.environ['TOP'])


def run_command(args: list[str], stdout=None):
  subprocess.run(args=args, check=True, stdout=stdout)


def get_metrics_agent():
  return metrics_agent.MetricsAgent.instance()


def main(argv):
  dist_dir = os.environ.get('DIST_DIR')
  if dist_dir:
    log_file = pathlib.Path(dist_dir) / LOG_PATH
    logging.basicConfig(
        level=logging.DEBUG,
        format='%(asctime)s %(levelname)s %(message)s',
        filename=log_file,
    )
  sys.exit(build_test_suites(argv))


if __name__ == '__main__':
  main(sys.argv[1:])


================================================
FILE: ci/build_test_suites_local_test.py
================================================
# Copyright 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.

"""Integration tests for build_test_suites that require a local build env."""

import os
import pathlib
import shutil
import signal
import subprocess
import tempfile
import time
import ci_test_lib


class BuildTestSuitesLocalTest(ci_test_lib.TestCase):

  def setUp(self):
    self.top_dir = pathlib.Path(os.environ['ANDROID_BUILD_TOP']).resolve()
    self.executable = self.top_dir.joinpath('build/make/ci/build_test_suites')
    self.process_session = ci_test_lib.TemporaryProcessSession(self)
    self.temp_dir = ci_test_lib.TestTemporaryDirectory.create(self)

  def build_subprocess_args(self, build_args: list[str]):
    env = os.environ.copy()
    env['TOP'] = str(self.top_dir)
    env['OUT_DIR'] = self.temp_dir

    args = ([self.executable] + build_args,)
    kwargs = {
        'cwd': self.top_dir,
        'env': env,
        'text': True,
    }

    return (args, kwargs)

  def run_build(self, build_args: list[str]) -> subprocess.CompletedProcess:
    args, kwargs = self.build_subprocess_args(build_args)

    return subprocess.run(
        *args,
        **kwargs,
        check=True,
        capture_output=True,
        timeout=5 * 60,
    )

  def assert_children_alive(self, children: list[int]):
    for c in children:
      self.assertTrue(ci_test_lib.process_alive(c))

  def assert_children_dead(self, children: list[int]):
    for c in children:
      self.assertFalse(ci_test_lib.process_alive(c))

  def test_fails_for_invalid_arg(self):
    invalid_arg = '--invalid-arg'

    with self.assertRaises(subprocess.CalledProcessError) as cm:
      self.run_build([invalid_arg])

    self.assertIn(invalid_arg, cm.exception.stderr)

  def test_builds_successfully(self):
    self.run_build(['nothing'])

  def test_can_interrupt_build(self):
    args, kwargs = self.build_subprocess_args(['general-tests'])
    p = self.process_session.create(args, kwargs)

    # TODO(lucafarsi): Replace this (and other instances) with a condition.
    time.sleep(5)  # Wait for the build to get going.
    self.assertIsNone(p.poll())  # Check that the process is still alive.
    children = query_child_pids(p.pid)
    self.assert_children_alive(children)

    p.send_signal(signal.SIGINT)
    p.wait()

    time.sleep(5)  # Wait for things to die out.
    self.assert_children_dead(children)

  def test_can_kill_build_process_group(self):
    args, kwargs = self.build_subprocess_args(['general-tests'])
    p = self.process_session.create(args, kwargs)

    time.sleep(5)  # Wait for the build to get going.
    self.assertIsNone(p.poll())  # Check that the process is still alive.
    children = query_child_pids(p.pid)
    self.assert_children_alive(children)

    os.killpg(os.getpgid(p.pid), signal.SIGKILL)
    p.wait()

    time.sleep(5)  # Wait for things to die out.
    self.assert_children_dead(children)


# TODO(hzalek): Replace this with `psutils` once available in the tree.
def query_child_pids(parent_pid: int) -> set[int]:
  p = subprocess.run(
      ['pgrep', '-P', str(parent_pid)],
      check=True,
      capture_output=True,
      text=True,
  )
  return {int(pid) for pid in p.stdout.splitlines()}


if __name__ == '__main__':
  ci_test_lib.main()


================================================
FILE: ci/build_test_suites_test.py
================================================
# Copyright 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.

"""Tests for build_test_suites.py"""

import argparse
import functools
from importlib import resources
import json
import multiprocessing
import os
import pathlib
import shutil
import signal
import stat
import subprocess
import sys
import tempfile
import textwrap
import time
from typing import Callable
import unittest
from unittest import mock
from build_context import BuildContext
import build_test_suites
import ci_test_lib
import optimized_targets
from pyfakefs import fake_filesystem_unittest
import metrics_agent
import test_discovery_agent


class BuildTestSuitesTest(fake_filesystem_unittest.TestCase):

  def setUp(self):
    self.setUpPyfakefs()

    os_environ_patcher = mock.patch.dict('os.environ', {})
    self.addCleanup(os_environ_patcher.stop)
    self.mock_os_environ = os_environ_patcher.start()

    subprocess_run_patcher = mock.patch('subprocess.run')
    self.addCleanup(subprocess_run_patcher.stop)
    self.mock_subprocess_run = subprocess_run_patcher.start()

    metrics_agent_finalize_patcher = mock.patch('metrics_agent.MetricsAgent.end_reporting')
    self.addCleanup(metrics_agent_finalize_patcher.stop)
    self.mock_metrics_agent_end = metrics_agent_finalize_patcher.start()

    self._setup_working_build_env()

  def test_missing_target_release_env_var_raises(self):
    del os.environ['TARGET_RELEASE']

    with self.assert_raises_word(build_test_suites.Error, 'TARGET_RELEASE'):
      build_test_suites.main([])

  def test_missing_target_product_env_var_raises(self):
    del os.environ['TARGET_PRODUCT']

    with self.assert_raises_word(build_test_suites.Error, 'TARGET_PRODUCT'):
      build_test_suites.main([])

  def test_missing_top_env_var_raises(self):
    del os.environ['TOP']

    with self.assert_raises_word(build_test_suites.Error, 'TOP'):
      build_test_suites.main([])

  def test_missing_dist_dir_env_var_raises(self):
    del os.environ['DIST_DIR']

    with self.assert_raises_word(build_test_suites.Error, 'DIST_DIR'):
      build_test_suites.main([])

  def test_invalid_arg_raises(self):
    invalid_args = ['--invalid_arg']

    with self.assertRaisesRegex(SystemExit, '2'):
      build_test_suites.main(invalid_args)

  def test_build_failure_returns(self):
    self.mock_subprocess_run.side_effect = subprocess.CalledProcessError(
        42, None
    )

    with self.assertRaisesRegex(SystemExit, '42'):
      build_test_suites.main([])

  def test_incorrectly_formatted_build_context_raises(self):
    build_context = self.fake_top.joinpath('build_context')
    build_context.touch()
    os.environ['BUILD_CONTEXT'] = str(build_context)

    with self.assert_raises_word(build_test_suites.Error, 'JSON'):
      build_test_suites.main([])

  def test_build_success_returns(self):
    with self.assertRaisesRegex(SystemExit, '0'):
      build_test_suites.main([])

  def assert_raises_word(self, cls, word):
    return self.assertRaisesRegex(cls, rf'\b{word}\b')

  def _setup_working_build_env(self):
    self.fake_top = pathlib.Path('/fake/top')
    self.fake_top.mkdir(parents=True)

    self.soong_ui_dir = self.fake_top.joinpath('build/soong')
    self.soong_ui_dir.mkdir(parents=True, exist_ok=True)

    self.logs_dir = self.fake_top.joinpath('dist/logs')
    self.logs_dir.mkdir(parents=True, exist_ok=True)

    self.soong_ui = self.soong_ui_dir.joinpath('soong_ui.bash')
    self.soong_ui.touch()

    self.mock_os_environ.update({
        'TARGET_RELEASE': 'release',
        'TARGET_PRODUCT': 'product',
        'TOP': str(self.fake_top),
        'DIST_DIR': str(self.fake_top.joinpath('dist')),
    })

    self.mock_subprocess_run.return_value = 0


class RunCommandIntegrationTest(ci_test_lib.TestCase):

  def setUp(self):
    self.temp_dir = ci_test_lib.TestTemporaryDirectory.create(self)

    # Copy the Python executable from 'non-code' resources and make it
    # executable for use by tests that launch a subprocess. Note that we don't
    # use Python's native `sys.executable` property since that is not set when
    # running via the embedded launcher.
    base_name = 'py3-cmd'
    dest_file = self.temp_dir.joinpath(base_name)
    with resources.as_file(
        resources.files('testdata').joinpath(base_name)
    ) as p:
      shutil.copy(p, dest_file)
    dest_file.chmod(dest_file.stat().st_mode | stat.S_IEXEC)
    self.python_executable = dest_file

    self._managed_processes = []

  def tearDown(self):
    self._terminate_managed_processes()

  def test_raises_on_nonzero_exit(self):
    with self.assertRaises(Exception):
      build_test_suites.run_command([
          self.python_executable,
          '-c',
          textwrap.dedent(f"""\
              import sys
              sys.exit(1)
              """),
      ])

  def test_streams_stdout(self):

    def run_slow_command(stdout_file, marker):
      with open(stdout_file, 'w') as f:
        build_test_suites.run_command(
            [
                self.python_executable,
                '-c',
                textwrap.dedent(f"""\
                  import time

                  print('{marker}', end='', flush=True)

                  # Keep process alive until we check stdout.
                  time.sleep(10)
                  """),
            ],
            stdout=f,
        )

    marker = 'Spinach'
    stdout_file = self.temp_dir.joinpath('stdout.txt')

    p = self.start_process(target=run_slow_command, args=[stdout_file, marker])

    self.assert_file_eventually_contains(stdout_file, marker)

  def test_propagates_interruptions(self):

    def run(pid_file):
      build_test_suites.run_command([
          self.python_executable,
          '-c',
          textwrap.dedent(f"""\
              import os
              import pathlib
              import time

              pathlib.Path('{pid_file}').write_text(str(os.getpid()))

              # Keep the process alive for us to explicitly interrupt it.
              time.sleep(10)
              """),
      ])

    pid_file = self.temp_dir.joinpath('pid.txt')
    p = self.start_process(target=run, args=[pid_file])
    subprocess_pid = int(read_eventual_file_contents(pid_file))

    os.kill(p.pid, signal.SIGINT)
    p.join()

    self.assert_process_eventually_dies(p.pid)
    self.assert_process_eventually_dies(subprocess_pid)

  def start_process(self, *args, **kwargs) -> multiprocessing.Process:
    p = multiprocessing.Process(*args, **kwargs)
    self._managed_processes.append(p)
    p.start()
    return p

  def assert_process_eventually_dies(self, pid: int):
    try:
      wait_until(lambda: not ci_test_lib.process_alive(pid))
    except TimeoutError as e:
      self.fail(f'Process {pid} did not die after a while: {e}')

  def assert_file_eventually_contains(self, file: pathlib.Path, substring: str):
    wait_until(lambda: file.is_file() and file.stat().st_size > 0)
    self.assertIn(substring, read_file_contents(file))

  def _terminate_managed_processes(self):
    for p in self._managed_processes:
      if not p.is_alive():
        continue

      # We terminate the process with `SIGINT` since using `terminate` or
      # `SIGKILL` doesn't kill any grandchild processes and we don't have
      # `psutil` available to easily query all children.
      os.kill(p.pid, signal.SIGINT)


class BuildPlannerTest(unittest.TestCase):

  class TestOptimizedBuildTarget(optimized_targets.OptimizedBuildTarget):

    def __init__(
        self, target, build_context, args, output_targets, packaging_commands
    ):
      super().__init__(target, build_context, args)
      self.output_targets = output_targets
      self.packaging_commands = packaging_commands

    def get_build_targets_impl(self):
      return self.output_targets

    def get_package_outputs_commands_impl(self):
      return self.packaging_commands

    def get_enabled_flag(self):
      return f'{self.target}_enabled'

  def setUp(self):
    test_discovery_agent_patcher = mock.patch('test_discovery_agent.TestDiscoveryAgent.discover_test_zip_regexes')
    self.addCleanup(test_discovery_agent_patcher.stop)
    self.mock_test_discovery_agent_end = test_discovery_agent_patcher.start()


  def test_build_optimization_off_builds_everything(self):
    build_targets = {'target_1', 'target_2'}
    build_planner = self.create_build_planner(
        build_context=self.create_build_context(optimized_build_enabled=False),
        build_targets=build_targets,
    )

    build_plan = build_planner.create_build_plan()

    self.assertSetEqual(build_targets, build_plan.build_targets)

  def test_build_optimization_off_doesnt_package(self):
    build_targets = {'target_1', 'target_2'}
    build_planner = self.create_build_planner(
        build_context=self.create_build_context(optimized_build_enabled=False),
        build_targets=build_targets,
    )

    build_plan = build_planner.create_build_plan()

    for packaging_command in self.run_packaging_commands(build_plan):
      self.assertEqual(len(packaging_command), 0)

  def test_build_optimization_on_optimizes_target(self):
    build_targets = {'target_1', 'target_2'}
    build_planner = self.create_build_planner(
        build_targets=build_targets,
        build_context=self.create_build_context(
            enabled_build_features=[{'name': self.get_target_flag('target_1')}],
            test_context=self.get_test_context('target_1'),
        ),
    )

    build_plan = build_planner.create_build_plan()

    expected_targets = {self.get_optimized_target_name('target_1'), 'target_2'}
    self.assertSetEqual(expected_targets, build_plan.build_targets)

  def test_build_optimization_on_packages_target(self):
    build_targets = {'target_1', 'target_2'}
    optimized_target_name = self.get_optimized_target_name('target_1')
    packaging_commands = [[f'packaging {optimized_target_name}']]
    build_planner = self.create_build_planner(
        build_targets=build_targets,
        build_context=self.create_build_context(
            enabled_build_features=[{'name': self.get_target_flag('target_1')}],
            test_context=self.get_test_context('target_1'),
        ),
        packaging_commands=packaging_commands,
    )

    build_plan = build_planner.create_build_plan()

    self.assertIn(packaging_commands, self.run_packaging_commands(build_plan))

  def test_individual_build_optimization_off_doesnt_optimize(self):
    build_targets = {'target_1', 'target_2'}
    build_planner = self.create_build_planner(
        build_targets=build_targets,
    )

    build_plan = build_planner.create_build_plan()

    self.assertSetEqual(build_targets, build_plan.build_targets)

  def test_individual_build_optimization_off_doesnt_package(self):
    build_targets = {'target_1', 'target_2'}
    packaging_commands = [['packaging command']]
    build_planner = self.create_build_planner(
        build_targets=build_targets,
        packaging_commands=packaging_commands,
    )

    build_plan = build_planner.create_build_plan()

    for packaging_command in self.run_packaging_commands(build_plan):
      self.assertEqual(len(packaging_command), 0)

  def test_target_output_used_target_built(self):
    build_target = 'test_target'
    build_planner = self.create_build_planner(
        build_targets={build_target},
        build_context=self.create_build_context(
            test_context=self.get_test_context(build_target),
            enabled_build_features=[{'name': 'test_target_unused_exclusion'}],
        ),
    )

    build_plan = build_planner.create_build_plan()

    self.assertSetEqual(build_plan.build_targets, {build_target})

  def test_target_regex_used_target_built(self):
    build_target = 'test_target'
    test_context = self.get_test_context(build_target)
    test_context['testInfos'][0]['extraOptions'] = [{
        'key': 'additional-files-filter',
        'values': [f'.*{build_target}.*\.zip'],
    }]
    build_planner = self.create_build_planner(
        build_targets={build_target},
        build_context=self.create_build_context(
            test_context=test_context,
            enabled_build_features=[{'name': 'test_target_unused_exclusion'}],
        ),
    )

    build_plan = build_planner.create_build_plan()

    self.assertSetEqual(build_plan.build_targets, {build_target})

  def test_target_output_not_used_target_not_built(self):
    build_target = 'test_target'
    test_context = self.get_test_context(build_target)
    test_context['testInfos'][0]['extraOptions'] = []
    build_planner = self.create_build_planner(
        build_targets={build_target},
        build_context=self.create_build_context(
            test_context=test_context,
            enabled_build_features=[{'name': 'test_target_unused_exclusion'}],
        ),
    )

    build_plan = build_planner.create_build_plan()

    self.assertSetEqual(build_plan.build_targets, set())

  def test_target_regex_matching_not_too_broad(self):
    build_target = 'test_target'
    test_context = self.get_test_context(build_target)
    test_context['testInfos'][0]['extraOptions'] = [{
        'key': 'additional-files-filter',
        'values': [f'.*a{build_target}.*\.zip'],
    }]
    build_planner = self.create_build_planner(
        build_targets={build_target},
        build_context=self.create_build_context(
            test_context=test_context,
            enabled_build_features=[{'name': 'test_target_unused_exclusion'}],
        ),
    )

    build_plan = build_planner.create_build_plan()

    self.assertSetEqual(build_plan.build_targets, set())

  def create_build_planner(
      self,
      build_targets: set[str],
      build_context: BuildContext = None,
      args: argparse.Namespace = None,
      target_optimizations: dict[
          str, optimized_targets.OptimizedBuildTarget
      ] = None,
      packaging_commands: list[list[str]] = [],
  ) -> build_test_suites.BuildPlanner:
    if not build_context:
      build_context = self.create_build_context()
    if not args:
      args = self.create_args(extra_build_targets=build_targets)
    if not target_optimizations:
      target_optimizations = self.create_target_optimizations(
          build_context,
          build_targets,
          packaging_commands,
      )
    return build_test_suites.BuildPlanner(
        build_context, args, target_optimizations
    )

  def create_build_context(
      self,
      optimized_build_enabled: bool = True,
      enabled_build_features: list[dict[str, str]] = [],
      test_context: dict[str, any] = {},
  ) -> BuildContext:
    build_context_dict = {}
    build_context_dict['enabledBuildFeatures'] = enabled_build_features
    if optimized_build_enabled:
      build_context_dict['enabledBuildFeatures'].append(
          {'name': 'optimized_build'}
      )
    build_context_dict['testContext'] = test_context
    return BuildContext(build_context_dict)

  def create_args(
      self, extra_build_targets: set[str] = set()
  ) -> argparse.Namespace:
    parser = argparse.ArgumentParser()
    parser.add_argument('extra_targets', nargs='*')
    return parser.parse_args(extra_build_targets)

  def create_target_optimizations(
      self,
      build_context: BuildContext,
      build_targets: set[str],
      packaging_commands: list[list[str]] = [],
  ):
    target_optimizations = dict()
    for target in build_targets:
      target_optimizations[target] = functools.partial(
          self.TestOptimizedBuildTarget,
          output_targets={self.get_optimized_target_name(target)},
          packaging_commands=packaging_commands,
      )

    return target_optimizations

  def get_target_flag(self, target: str):
    return f'{target}_enabled'

  def get_optimized_target_name(self, target: str):
    return f'{target}_optimized'

  def get_test_context(self, target: str):
    return {
        'testInfos': [
            {
                'name': 'atp_test',
                'target': 'test_target',
                'branch': 'branch',
                'extraOptions': [{
                    'key': 'additional-files-filter',
                    'values': [f'{target}.zip'],
                }],
                'command': '/tf/command',
                'extraBuildTargets': [
                    'extra_build_target',
                ],
            },
        ],
    }

  def run_packaging_commands(self, build_plan: build_test_suites.BuildPlan):
    return [
        packaging_command_getter()
        for packaging_command_getter in build_plan.packaging_commands_getters
    ]


def wait_until(
    condition_function: Callable[[], bool],
    timeout_secs: float = 3.0,
    polling_interval_secs: float = 0.1,
):
  """Waits until a condition function returns True."""

  start_time_secs = time.time()

  while not condition_function():
    if time.time() - start_time_secs > timeout_secs:
      raise TimeoutError(
          f'Condition not met within timeout: {timeout_secs} seconds'
      )

    time.sleep(polling_interval_secs)


def read_file_contents(file: pathlib.Path) -> str:
  with open(file, 'r') as f:
    return f.read()


def read_eventual_file_contents(file: pathlib.Path) -> str:
  wait_until(lambda: file.is_file() and file.stat().st_size > 0)
  return read_file_contents(file)


if __name__ == '__main__':
  ci_test_lib.main()


================================================
FILE: ci/buildbot.py
================================================
# Copyright 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.

"""Utilities for interacting with buildbot, with a simulation in a local environment"""

import os
import sys

# Check that the script is running from the root of the tree. Prevents subtle
# errors later, and CI always runs from the root of the tree.
if not os.path.exists("build/make/ci/buildbot.py"):
    raise Exception("CI script must be run from the root of the tree instead of: "
                    + os.getcwd())

# Check that we are using the hermetic interpreter
if "prebuilts/build-tools/" not in sys.executable:
    raise Exception("CI script must be run using the hermetic interpreter from "
                    + "prebuilts/build-tools instead of: " + sys.executable)


def OutDir():
    "Get the out directory. Will create it if needed."
    result = os.environ.get("OUT_DIR", "out")
    os.makedirs(result, exist_ok=True)
    return result

def DistDir():
    "Get the dist directory. Will create it if needed."
    result = os.environ.get("DIST_DIR", os.path.join(OutDir(), "dist"))
    os.makedirs(result, exist_ok=True)
    return result



================================================
FILE: ci/ci_test_lib.py
================================================
# Copyright 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.

"""Testing utilities for tests in the CI package."""

import logging
import os
import unittest
import subprocess
import pathlib
import shutil
import tempfile


# Export the TestCase class to reduce the number of imports tests have to list.
TestCase = unittest.TestCase


def process_alive(pid):
  """Check For the existence of a pid."""

  try:
    os.kill(pid, 0)
  except OSError:
    return False

  return True


class TemporaryProcessSession:

  def __init__(self, test_case: TestCase):
    self._created_processes = []
    test_case.addCleanup(self.cleanup)

  def create(self, args, kwargs):
    p = subprocess.Popen(*args, **kwargs, start_new_session=True)
    self._created_processes.append(p)
    return p

  def cleanup(self):
    for p in self._created_processes:
      if not process_alive(p.pid):
        return
      os.killpg(os.getpgid(p.pid), signal.SIGKILL)


class TestTemporaryDirectory:

  def __init__(self, delete: bool, ):
    self._delete = delete

  @classmethod
  def create(cls, test_case: TestCase, delete: bool = True):
    temp_dir = TestTemporaryDirectory(delete)
    temp_dir._dir = pathlib.Path(tempfile.mkdtemp())
    test_case.addCleanup(temp_dir.cleanup)
    return temp_dir._dir

  def get_dir(self):
    return self._dir

  def cleanup(self):
    if not self._delete:
      return
    shutil.rmtree(self._dir, ignore_errors=True)


def main():

  # Disable logging since it breaks the TF Python test output parser.
  # TODO(hzalek): Use TF's `test-output-file` option to re-enable logging.
  logging.getLogger().disabled = True

  unittest.main()


================================================
FILE: ci/dump_product_config
================================================
#!prebuilts/build-tools/linux-x86/bin/py3-cmd -B

# Copyright 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.

"""Script to collect all of the make variables from all product config combos.

This script must be run from the root of the source tree.

See GetArgs() below or run dump_product_config for more information.
"""

import argparse
import asyncio
import contextlib
import csv
import dataclasses
import json
import multiprocessing
import os
import subprocess
import sys
import time
from typing import List, Dict, Tuple, Optional

import buildbot

# We have some BIG variables
csv.field_size_limit(sys.maxsize)


class DataclassJSONEncoder(json.JSONEncoder):
    """JSONEncoder for our custom types."""
    def default(self, o):
        if dataclasses.is_dataclass(o):
            return dataclasses.asdict(o)
        return super().default(o)


def GetProducts():
    """Get the all of the available TARGET_PRODUCT values."""
    try:
        stdout = subprocess.check_output(["build/soong/bin/list_products"], text=True)
    except subprocess.CalledProcessError:
        sys.exit(1)
    return [s.strip() for s in stdout.splitlines() if s.strip()]


def GetReleases(product):
    """For a given product, get the release configs available to it."""
    if True:
        # Hard code the list
        mainline_products = [
            "module_arm",
            "module_x86",
            "module_arm64",
            "module_riscv64",
            "module_x86_64",
            "module_arm64only",
            "module_x86_64only",
        ]
        if product in mainline_products:
            return ["trunk_staging", "trunk", "mainline"]
        else:
            return ["trunk_staging", "trunk", "next"]
    else:
        # Get it from the build system
        try:
            stdout = subprocess.check_output(["build/soong/bin/list_releases", product], text=True)
        except subprocess.CalledProcessError:
            sys.exit(1)
        return [s.strip() for s in stdout.splitlines() if s.strip()]


def GenerateAllLunchTargets():
    """Generate the full list of lunch targets."""
    for product in GetProducts():
        for release in GetReleases(product):
            for variant in ["user", "userdebug", "eng"]:
                yield (product, release, variant)


async def ParallelExec(parallelism, tasks):
    '''
    ParallelExec takes a parallelism number, and an iterator of tasks to run.
    Then it will run all the tasks, but a maximum of parallelism will be run at
    any given time. The tasks must be async functions that accept one argument,
    which will be an integer id of the worker that they're running on.
    '''
    tasks = iter(tasks)

    overall_start = time.monotonic()
    # lists so they can be modified from the inner function
    total_duration = [0]
    count = [0]
    async def dispatch(worker):
        while True:
            try:
                task = next(tasks)
                item_start = time.monotonic()
                await task(worker)
                now = time.monotonic()
                item_duration = now - item_start
                count[0] += 1
                total_duration[0] += item_duration
                sys.stderr.write(f"Timing: Items processed: {count[0]}, Wall time: {now-overall_start:0.1f} sec, Throughput: {(now-overall_start)/count[0]:0.3f} sec per item, Average duration: {total_duration[0]/count[0]:0.1f} sec\n")
            except StopIteration:
                return

    await asyncio.gather(*[dispatch(worker) for worker in range(parallelism)])


async def DumpProductConfigs(out, generator, out_dir):
    """Collects all of the product config data and store it in file."""
    # Write the outer json list by hand so we can stream it
    out.write("[")
    try:
        first_result = [True] # a list so it can be modified from the inner function
        def run(lunch):
            async def curried(worker):
                sys.stderr.write(f"running: {'-'.join(lunch)}\n")
                result = await DumpOneProductConfig(lunch, os.path.join(out_dir, f"lunchable_{worker}"))
                if first_result[0]:
                    out.write("\n")
                    first_result[0] = False
                else:
                    out.write(",\n")
                result.dumpToFile(out)
                sys.stderr.write(f"finished: {'-'.join(lunch)}\n")
            return curried

        await ParallelExec(multiprocessing.cpu_count(), (run(lunch) for lunch in generator))
    finally:
        # Close the json regardless of how we exit
        out.write("\n]\n")


@dataclasses.dataclass(frozen=True)
class Variable:
    """A variable name, value and where it was set."""
    name: str
    value: str
    location: str


@dataclasses.dataclass(frozen=True)
class ProductResult:
    product: str
    release: str
    variant: str
    board_includes: List[str]
    product_includes: Dict[str, List[str]]
    product_graph: List[Tuple[str, str]]
    board_vars: List[Variable]
    product_vars: List[Variable]

    def dumpToFile(self, f):
        json.dump(self, f, sort_keys=True, indent=2, cls=DataclassJSONEncoder)


@dataclasses.dataclass(frozen=True)
class ProductError:
    product: str
    release: str
    variant: str
    error: str

    def dumpToFile(self, f):
        json.dump(self, f, sort_keys=True, indent=2, cls=DataclassJSONEncoder)


def NormalizeInheritGraph(lists):
    """Flatten the inheritance graph to a simple list for easier querying."""
    result = set()
    for item in lists:
        for i in range(len(item)):
            result.add((item[i+1] if i < len(item)-1 else "", item[i]))
    return sorted(list(result))


def ParseDump(lunch, filename) -> ProductResult:
    """Parses the csv and returns a tuple of the data."""
    def diff(initial, final):
        return [after for after in final.values() if
                initial.get(after.name, Variable(after.name, "", "<unset>")).value != after.value]
    product_initial = {}
    product_final = {}
    board_initial = {}
    board_final = {}
    inherit_product = [] # The stack of inherit-product calls
    product_includes = {} # Other files included by each of the properly imported files
    board_includes = [] # Files included by boardconfig
    with open(filename) as f:
        phase = ""
        for line in csv.reader(f):
            if line[0] == "phase":
                phase = line[1]
            elif line[0] == "val":
                # TOOD: We should skip these somewhere else.
                if line[3].startswith("_ALL_RELEASE_FLAGS"):
                    continue
                if line[3].startswith("PRODUCTS."):
                    continue
                if phase == "PRODUCTS":
                    if line[2] == "initial":
                        product_initial[line[3]] = Variable(line[3], line[4], line[5])
                if phase == "PRODUCT-EXPAND":
                    if line[2] == "final":
                        product_final[line[3]] = Variable(line[3], line[4], line[5])
                if phase == "BOARD":
                    if line[2] == "initial":
                        board_initial[line[3]] = Variable(line[3], line[4], line[5])
                    if line[2] == "final":
                        board_final[line[3]] = Variable(line[3], line[4], line[5])
            elif line[0] == "imported":
                imports = [s.strip() for s in line[1].split()]
                if imports:
                    inherit_product.append(imports)
                    inc = [s.strip() for s in line[2].split()]
                    for f in inc:
                        product_includes.setdefault(imports[0], []).append(f)
            elif line[0] == "board_config_files":
                board_includes += [s.strip() for s in line[1].split()]
    return ProductResult(
        product = lunch[0],
        release = lunch[1],
        variant = lunch[2],
        product_vars = diff(product_initial, product_final),
        board_vars = diff(board_initial, board_final),
        product_graph = NormalizeInheritGraph(inherit_product),
        product_includes = product_includes,
        board_includes = board_includes
    )


async def DumpOneProductConfig(lunch, out_dir) -> ProductResult | ProductError:
    """Print a single config's lunch info to stdout."""
    product, release, variant = lunch

    dumpconfig_file = os.path.join(out_dir, f"{product}-{release}-{variant}.csv")

    # Run get_build_var to bootstrap soong_ui for this target
    env = dict(os.environ)
    env["TARGET_PRODUCT"] = product
    env["TARGET_RELEASE"] = release
    env["TARGET_BUILD_VARIANT"] = variant
    env["OUT_DIR"] = out_dir
    process = await asyncio.create_subprocess_exec(
        "build/soong/bin/get_build_var",
        "TARGET_PRODUCT",
        stdout=subprocess.PIPE,
        stderr=subprocess.STDOUT,
        env=env
    )
    stdout, _ = await process.communicate()
    stdout = stdout.decode()

    if process.returncode != 0:
        return ProductError(
            product = product,
            release = release,
            variant = variant,
            error = stdout
        )
    else:
        # Run kati to extract the data
        process = await asyncio.create_subprocess_exec(
            "prebuilts/build-tools/linux-x86/bin/ckati",
            "-f",
            "build/make/core/dumpconfig.mk",
            f"TARGET_PRODUCT={product}",
            f"TARGET_RELEASE={release}",
            f"TARGET_BUILD_VARIANT={variant}",
            f"DUMPCONFIG_FILE={dumpconfig_file}",
            stdout=subprocess.PIPE,
            stderr=subprocess.STDOUT,
            env=env
        )
        stdout, _ = await process.communicate()
        if process.returncode != 0:
            stdout = stdout.decode()
            return ProductError(
                product = product,
                release = release,
                variant = variant,
                error = stdout
            )
        else:
            # Parse and record the output
            return ParseDump(lunch, dumpconfig_file)


def GetArgs():
    """Parse command line arguments."""
    parser = argparse.ArgumentParser(
            description="Collect all of the make variables from product config.",
            epilog="NOTE: This script must be run from the root of the source tree.")
    parser.add_argument("--lunch", nargs="*")
    parser.add_argument("--dist", action="store_true")

    return parser.parse_args()


async def main():
    args = GetArgs()

    out_dir = buildbot.OutDir()

    if args.dist:
        cm = open(os.path.join(buildbot.DistDir(), "all_product_config.json"), "w")
    else:
        cm = contextlib.nullcontext(sys.stdout)


    with cm as out:
        if args.lunch:
            lunches = [lunch.split("-") for lunch in args.lunch]
            fail = False
            for i in range(len(lunches)):
                if len(lunches[i]) != 3:
                    sys.stderr.write(f"Malformed lunch targets: {args.lunch[i]}\n")
                    fail = True
            if fail:
                sys.exit(1)
            if len(lunches) == 1:
                result = await DumpOneProductConfig(lunches[0], out_dir)
                result.dumpToFile(out)
                out.write("\n")
            else:
                await DumpProductConfigs(out, lunches, out_dir)
        else:
            # All configs mode. This will exec single config mode in parallel
            # for each lunch combo. Write output to $DIST_DIR.
            await DumpProductConfigs(out, GenerateAllLunchTargets(), out_dir)


if __name__ == "__main__":
    asyncio.run(main())


# vim: set syntax=python ts=4 sw=4 sts=4:



================================================
FILE: ci/metrics_agent.py
================================================
# Copyright 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.

"""MetricsAgent is a singleton class that collects metrics for optimized build."""

from enum import Enum
import time
import metrics_pb2
import os
import logging


class MetricsAgent:
  _SOONG_METRICS_PATH = 'logs/soong_metrics'
  _DIST_DIR = 'DIST_DIR'
  _instance = None

  def __init__(self):
    raise RuntimeError(
        'MetricsAgent cannot be instantialized, use instance() instead'
    )

  @classmethod
  def instance(cls):
    if not cls._instance:
      cls._instance = cls.__new__(cls)
      cls._instance._proto = metrics_pb2.OptimizedBuildMetrics()
      cls._instance._init_proto()
      cls._instance._target_results = dict()

    return cls._instance

  def _init_proto(self):
    self._proto.analysis_perf.name = 'Optimized build analysis time.'
    self._proto.packaging_perf.name = 'Optimized build total packaging time.'

  def analysis_start(self):
    self._proto.analysis_perf.start_time = time.time_ns()

  def analysis_end(self):
    self._proto.analysis_perf.real_time = (
        time.time_ns() - self._proto.analysis_perf.start_time
    )

  def packaging_start(self):
    self._proto.packaging_perf.start_time = time.time_ns()

  def packaging_end(self):
    self._proto.packaging_perf.real_time = (
        time.time_ns() - self._proto.packaging_perf.start_time
    )

  def report_optimized_target(self, name: str):
    target_result = metrics_pb2.OptimizedBuildMetrics.TargetOptimizationResult()
    target_result.name = name
    target_result.optimized = True
    self._target_results[name] = target_result

  def report_unoptimized_target(self, name: str, optimization_rationale: str):
    target_result = metrics_pb2.OptimizedBuildMetrics.TargetOptimizationResult()
    target_result.name = name
    target_result.optimization_rationale = optimization_rationale
    target_result.optimized = False
    self._target_results[name] = target_result

  def target_packaging_start(self, name: str):
    target_result = self._target_results.get(name)
    target_result.packaging_perf.start_time = time.time_ns()
    self._target_results[name] = target_result

  def target_packaging_end(self, name: str):
    target_result = self._target_results.get(name)
    target_result.packaging_perf.real_time = (
        time.time_ns() - target_result.packaging_perf.start_time
    )

  def add_target_artifact(
      self,
      target_name: str,
      artifact_name: str,
      size: int,
      included_modules: set[str],
  ):
    target_result = self.target_results.get(target_name)
    artifact = (
        metrics_pb2.OptimizedBuildMetrics.TargetOptimizationResult.OutputArtifact()
    )
    artifact.name = artifact_name
    artifact.size = size
    for module in included_modules:
      artifact.included_modules.add(module)
    target_result.output_artifacts.add(artifact)

  def end_reporting(self):
    for target_result in self._target_results.values():
      self._proto.target_result.append(target_result)
    soong_metrics_proto = metrics_pb2.MetricsBase()
    # Read in existing metrics that should have been written out by the soong
    # build command so that we don't overwrite them.
    with open(os.path.join(os.environ[self._DIST_DIR], self._SOONG_METRICS_PATH), 'rb') as f:
      soong_metrics_proto.ParseFromString(f.read())
    soong_metrics_proto.optimized_build_metrics.CopyFrom(self._proto)
    logging.info(soong_metrics_proto)
    with open(os.path.join(os.environ[self._DIST_DIR], self._SOONG_METRICS_PATH), 'wb') as f:
      f.write(soong_metrics_proto.SerializeToString())


================================================
FILE: ci/optimized_targets.py
================================================
#
# Copyright 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.

from abc import ABC
import argparse
import functools
import json
import logging
import os
import pathlib
import subprocess

from build_context import BuildContext
import test_mapping_module_retriever


class OptimizedBuildTarget(ABC):
  """A representation of an optimized build target.

  This class will determine what targets to build given a given build_cotext and
  will have a packaging function to generate any necessary output zips for the
  build.
  """

  _SOONG_UI_BASH_PATH = 'build/soong/soong_ui.bash'
  _PREBUILT_SOONG_ZIP_PATH = 'prebuilts/build-tools/linux-x86/bin/soong_zip'

  def __init__(
      self,
      target: str,
      build_context: BuildContext,
      args: argparse.Namespace,
  ):
    self.target = target
    self.build_context = build_context
    self.args = args

  def get_build_targets(self) -> set[str]:
    features = self.build_context.enabled_build_features
    if self.get_enabled_flag() in features:
      self.modules_to_build = self.get_build_targets_impl()
      return self.modules_to_build

    self.modules_to_build = {self.target}
    return {self.target}

  def get_package_outputs_commands(self) -> list[list[str]]:
    features = self.build_context.enabled_build_features
    if self.get_enabled_flag() in features:
      return self.get_package_outputs_commands_impl()

    return []

  def get_package_outputs_commands_impl(self) -> list[list[str]]:
    raise NotImplementedError(
        'get_package_outputs_commands_impl not implemented in'
        f' {type(self).__name__}'
    )

  def get_enabled_flag(self):
    raise NotImplementedError(
        f'get_enabled_flag not implemented in {type(self).__name__}'
    )

  def get_build_targets_impl(self) -> set[str]:
    raise NotImplementedError(
        f'get_build_targets_impl not implemented in {type(self).__name__}'
    )

  def _generate_zip_options_for_items(
      self,
      prefix: str = '',
      relative_root: str = '',
      list_files: list[str] | None = None,
      files: list[str] | None = None,
      directories: list[str] | None = None,
  ) -> list[str]:
    if not list_files and not files and not directories:
      raise RuntimeError(
          f'No items specified to be added to zip! Prefix: {prefix}, Relative'
          f' root: {relative_root}'
      )
    command_segment = []
    # These are all soong_zip options so consult soong_zip --help for specifics.
    if prefix:
      command_segment.append('-P')
      command_segment.append(prefix)
    if relative_root:
      command_segment.append('-C')
      command_segment.append(relative_root)
    if list_files:
      for list_file in list_files:
        command_segment.append('-l')
        command_segment.append(list_file)
    if files:
      for file in files:
        command_segment.append('-f')
        command_segment.append(file)
    if directories:
      for directory in directories:
        command_segment.append('-D')
        command_segment.append(directory)

    return command_segment

  def _query_soong_vars(
      self, src_top: pathlib.Path, soong_vars: list[str]
  ) -> dict[str, str]:
    process_result = subprocess.run(
        args=[
            f'{src_top / self._SOONG_UI_BASH_PATH}',
            '--dumpvars-mode',
            f'--abs-vars={" ".join(soong_vars)}',
        ],
        env=os.environ,
        check=False,
        capture_output=True,
        text=True,
    )
    if not process_result.returncode == 0:
      logging.error('soong dumpvars command failed! stderr:')
      logging.error(process_result.stderr)
      raise RuntimeError('Soong dumpvars failed! See log for stderr.')

    if not process_result.stdout:
      raise RuntimeError(
          'Necessary soong variables ' + soong_vars + ' not found.'
      )

    try:
      return {
          line.split('=')[0]: line.split('=')[1].strip("'")
          for line in process_result.stdout.strip().split('\n')
      }
    except IndexError as e:
      raise RuntimeError(
          'Error parsing soong dumpvars output! See output here:'
          f' {process_result.stdout}',
          e,
      )

  def _base_zip_command(
      self, src_top: pathlib.Path, dist_dir: pathlib.Path, name: str
  ) -> list[str]:
    return [
        f'{src_top / self._PREBUILT_SOONG_ZIP_PATH }',
        '-d',
        '-o',
        f'{dist_dir / name}',
    ]


class NullOptimizer(OptimizedBuildTarget):
  """No-op target optimizer.

  This will simply build the same target it was given and do nothing for the
  packaging step.
  """

  def __init__(self, target):
    self.target = target

  def get_build_targets(self):
    return {self.target}

  def get_package_outputs_commands(self):
    return []


class ChangeInfo:

  def __init__(self, change_info_file_path):
    try:
      with open(change_info_file_path) as change_info_file:
        change_info_contents = json.load(change_info_file)
    except json.decoder.JSONDecodeError:
      logging.error(f'Failed to load CHANGE_INFO: {change_info_file_path}')
      raise

    self._change_info_contents = change_info_contents

  def find_changed_files(self) -> set[str]:
    changed_files = set()

    for change in self._change_info_contents['changes']:
      project_path = change.get('projectPath') + '/'

      for revision in change.get('revisions'):
        for file_info in revision.get('fileInfos'):
          changed_files.add(project_path + file_info.get('path'))

    return changed_files


class GeneralTestsOptimizer(OptimizedBuildTarget):
  """general-tests optimizer

  This optimizer reads in the list of changed files from the file located in
  env[CHANGE_INFO] and uses this list alongside the normal TEST MAPPING logic to
  determine what test mapping modules will run for the given changes. It then
  builds those modules and packages them in the same way general-tests.zip is
  normally built.
  """

  # List of modules that are built alongside general-tests as dependencies.
  _REQUIRED_MODULES = frozenset([
      'cts-tradefed',
      'vts-tradefed',
      'compatibility-host-util',
      'general-tests-shared-libs',
  ])

  def get_build_targets_impl(self) -> set[str]:
    change_info_file_path = os.environ.get('CHANGE_INFO')
    if not change_info_file_path:
      logging.info(
          'No CHANGE_INFO env var found, general-tests optimization disabled.'
      )
      return {'general-tests'}

    test_infos = self.build_context.test_infos
    test_mapping_test_groups = set()
    for test_info in test_infos:
      is_test_mapping = test_info.is_test_mapping
      current_test_mapping_test_groups = test_info.test_mapping_test_groups
      uses_general_tests = test_info.build_target_used('general-tests')

      if uses_general_tests and not is_test_mapping:
        logging.info(
            'Test uses general-tests.zip but is not test-mapping, general-tests'
            ' optimization disabled.'
        )
        return {'general-tests'}

      if is_test_mapping:
        test_mapping_test_groups.update(current_test_mapping_test_groups)

    change_info = ChangeInfo(change_info_file_path)
    changed_files = change_info.find_changed_files()

    test_mappings = test_mapping_module_retriever.GetTestMappings(
        changed_files, set()
    )

    modules_to_build = set(self._REQUIRED_MODULES)

    modules_to_build.update(
        test_mapping_module_retriever.FindAffectedModules(
            test_mappings, changed_files, test_mapping_test_groups
        )
    )

    return modules_to_build

  def get_package_outputs_commands_impl(self):
    src_top = pathlib.Path(os.environ.get('TOP', os.getcwd()))
    dist_dir = pathlib.Path(os.environ.get('DIST_DIR'))

    soong_vars = self._query_soong_vars(
        src_top,
        [
            'HOST_OUT_TESTCASES',
            'TARGET_OUT_TESTCASES',
            'PRODUCT_OUT',
            'SOONG_HOST_OUT',
            'HOST_OUT',
        ],
    )
    host_out_testcases = pathlib.Path(soong_vars.get('HOST_OUT_TESTCASES'))
    target_out_testcases = pathlib.Path(soong_vars.get('TARGET_OUT_TESTCASES'))
    product_out = pathlib.Path(soong_vars.get('PRODUCT_OUT'))
    soong_host_out = pathlib.Path(soong_vars.get('SOONG_HOST_OUT'))
    host_out = pathlib.Path(soong_vars.get('HOST_OUT'))

    host_paths = []
    target_paths = []
    host_config_files = []
    target_config_files = []
    for module in self.modules_to_build:
      # The required modules are handled separately, no need to package.
      if module in self._REQUIRED_MODULES:
        continue

      host_path = host_out_testcases / module
      if os.path.exists(host_path):
        host_paths.append(host_path)
        self._collect_config_files(src_top, host_path, host_config_files)

      target_path = target_out_testcases / module
      if os.path.exists(target_path):
        target_paths.append(target_path)
        self._collect_config_files(src_top, target_path, target_config_files)

      if not os.path.exists(host_path) and not os.path.exists(target_path):
        logging.info(f'No host or target build outputs found for {module}.')

    zip_commands = []

    zip_commands.extend(
        self._get_zip_test_configs_zips_commands(
            src_top,
            dist_dir,
            host_out,
            product_out,
            host_config_files,
            target_config_files,
        )
    )

    zip_command = self._base_zip_command(src_top, dist_dir, 'general-tests.zip')

    # Add host testcases.
    if host_paths:
      zip_command.extend(
          self._generate_zip_options_for_items(
              prefix='host',
              relative_root=f'{src_top / soong_host_out}',
              directories=host_paths,
          )
      )

    # Add target testcases.
    if target_paths:
      zip_command.extend(
          self._generate_zip_options_for_items(
              prefix='target',
              relative_root=f'{src_top / product_out}',
              directories=target_paths,
          )
      )

    # TODO(lucafarsi): Push this logic into a general-tests-minimal build command
    # Add necessary tools. These are also hardcoded in general-tests.mk.
    framework_path = soong_host_out / 'framework'

    zip_command.extend(
        self._generate_zip_options_for_items(
            prefix='host/tools',
            relative_root=str(framework_path),
            files=[
                f"{framework_path / 'cts-tradefed.jar'}",
                f"{framework_path / 'compatibility-host-util.jar'}",
                f"{framework_path / 'vts-tradefed.jar'}",
            ],
        )
    )

    zip_commands.append(zip_command)
    return zip_commands

  def _collect_config_files(
      self,
      src_top: pathlib.Path,
      root_dir: pathlib.Path,
      config_files: list[str],
  ):
    for root, dirs, files in os.walk(src_top / root_dir):
      for file in files:
        if file.endswith('.config'):
          config_files.append(root_dir / file)

  def _get_zip_test_configs_zips_commands(
      self,
      src_top: pathlib.Path,
      dist_dir: pathlib.Path,
      host_out: pathlib.Path,
      product_out: pathlib.Path,
      host_config_files: list[str],
      target_config_files: list[str],
  ) -> tuple[list[str], list[str]]:
    """Generate general-tests_configs.zip and general-tests_list.zip.

    general-tests_configs.zip contains all of the .config files that were
    built and general-tests_list.zip contains a text file which lists
    all of the .config files that are in general-tests_configs.zip.

    general-tests_configs.zip is organized as follows:
    /
      host/
        testcases/
          test_1.config
          test_2.config
          ...
      target/
        testcases/
          test_1.config
          test_2.config
          ...

    So the process is we write out the paths to all the host config files into
    one
    file and all the paths to the target config files in another. We also write
    the paths to all the config files into a third file to use for
    general-tests_list.zip.

    Args:
      dist_dir: dist directory.
      host_out: host out directory.
      product_out: product out directory.
      host_config_files: list of all host config files.
      target_config_files: list of all target config files.

    Returns:
      The commands to generate general-tests_configs.zip and
      general-tests_list.zip
    """
    with open(
        f"{host_out / 'host_general-tests_list'}", 'w'
    ) as host_list_file, open(
        f"{product_out / 'target_general-tests_list'}", 'w'
    ) as target_list_file, open(
        f"{host_out / 'general-tests_list'}", 'w'
    ) as list_file:

      for config_file in host_config_files:
        host_list_file.write(f'{config_file}' + '\n')
        list_file.write('host/' + os.path.relpath(config_file, host_out) + '\n')

      for config_file in target_config_files:
        target_list_file.write(f'{config_file}' + '\n')
        list_file.write(
            'target/' + os.path.relpath(config_file, product_out) + '\n'
        )

    zip_commands = []

    tests_config_zip_command = self._base_zip_command(
        src_top, dist_dir, 'general-tests_configs.zip'
    )
    tests_config_zip_command.extend(
        self._generate_zip_options_for_items(
            prefix='host',
            relative_root=str(host_out),
            list_files=[f"{host_out / 'host_general-tests_list'}"],
        )
    )

    tests_config_zip_command.extend(
        self._generate_zip_options_for_items(
            prefix='target',
            relative_root=str(product_out),
            list_files=[f"{product_out / 'target_general-tests_list'}"],
        ),
    )

    zip_commands.append(tests_config_zip_command)

    tests_list_zip_command = self._base_zip_command(
        src_top, dist_dir, 'general-tests_list.zip'
    )
    tests_list_zip_command.extend(
        self._generate_zip_options_for_items(
            relative_root=str(host_out),
            files=[f"{host_out / 'general-tests_list'}"],
        )
    )
    zip_commands.append(tests_list_zip_command)

    return zip_commands

  def get_enabled_flag(self):
    return 'general_tests_optimized'

  @classmethod
  def get_optimized_targets(cls) -> dict[str, OptimizedBuildTarget]:
    return {'general-tests': functools.partial(cls)}


OPTIMIZED_BUILD_TARGETS = {}
OPTIMIZED_BUILD_TARGETS.update(GeneralTestsOptimizer.get_optimized_targets())


================================================
FILE: ci/optimized_targets_test.py
================================================
# Copyright 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.

"""Tests for opt
Download .txt
gitextract_4wb4gfr7/

├── .gitignore
├── Android.bp
├── Changes.md
├── CleanSpec.mk
├── Deprecation.md
├── OWNERS
├── PREUPLOAD.cfg
├── README.md
├── Usage.txt
├── backported_fixes/
│   ├── Android.bp
│   ├── OWNERS
│   ├── applied_fixes/
│   │   └── ki350037023.txtpb
│   ├── backported_fixes.proto
│   ├── src/
│   │   └── java/
│   │       └── com/
│   │           └── android/
│   │               └── build/
│   │                   └── backportedfixes/
│   │                       ├── CombineBackportedFixes.java
│   │                       ├── WriteBackportedFixesPropFile.java
│   │                       └── common/
│   │                           └── Parser.java
│   └── tests/
│       └── java/
│           └── com/
│               └── android/
│                   └── build/
│                       └── backportedfixes/
│                           ├── CombineBackportedFixesTest.java
│                           ├── WriteBackportedFixesPropFileTest.java
│                           └── common/
│                               └── ParserTest.java
├── banchanHelp.sh
├── buildspec.mk.default
├── ci/
│   ├── Android.bp
│   ├── AndroidTest.xml.template
│   ├── build_context.py
│   ├── build_device_and_tests
│   ├── build_metadata
│   ├── build_test_suites
│   ├── build_test_suites.py
│   ├── build_test_suites_local_test.py
│   ├── build_test_suites_test.py
│   ├── buildbot.py
│   ├── ci_test_lib.py
│   ├── dump_product_config
│   ├── metrics_agent.py
│   ├── optimized_targets.py
│   ├── optimized_targets_test.py
│   ├── test_discovery_agent.py
│   └── test_mapping_module_retriever.py
├── common/
│   ├── core.mk
│   ├── json.mk
│   ├── math.mk
│   └── strings.mk
├── core/
│   ├── LINUX_KERNEL_COPYING
│   ├── Makefile
│   ├── OWNERS
│   ├── WINPTHREADS_COPYING
│   ├── aapt2.mk
│   ├── aapt_flags.mk
│   ├── allowed_ndk_types.mk
│   ├── android_manifest.mk
│   ├── android_soong_config_vars.mk
│   ├── app_certificate_validate.mk
│   ├── app_prebuilt_internal.mk
│   ├── art_config.mk
│   ├── artifact_path_requirements.mk
│   ├── autogen_test_config.mk
│   ├── base_rules.mk
│   ├── binary.mk
│   ├── board_config.mk
│   ├── board_config_wifi.mk
│   ├── board_config_wpa_supplicant.mk
│   ├── build-system.html
│   ├── build_id.mk
│   ├── build_rro_package.mk
│   ├── cc_prebuilt_internal.mk
│   ├── ccache.mk
│   ├── check_elf_file.mk
│   ├── checktree
│   ├── clang/
│   │   ├── HOST_x86.mk
│   │   ├── HOST_x86_64.mk
│   │   ├── TARGET_arm.mk
│   │   ├── TARGET_arm64.mk
│   │   ├── TARGET_riscv64.mk
│   │   ├── TARGET_x86.mk
│   │   ├── TARGET_x86_64.mk
│   │   ├── config.mk
│   │   └── tidy.mk
│   ├── cleanbuild.mk
│   ├── cleanspec.mk
│   ├── clear_vars.mk
│   ├── combo/
│   │   ├── HOST_darwin.mk
│   │   ├── HOST_linux.mk
│   │   ├── TARGET_linux-arm.mk
│   │   ├── TARGET_linux-arm64.mk
│   │   ├── TARGET_linux-riscv64.mk
│   │   ├── TARGET_linux-x86.mk
│   │   ├── TARGET_linux-x86_64.mk
│   │   ├── javac.mk
│   │   └── select.mk
│   ├── config.mk
│   ├── config_sanitizers.mk
│   ├── configure_module_stem.mk
│   ├── copy_headers.mk
│   ├── cxx_stl_setup.mk
│   ├── definitions.mk
│   ├── deprecation.mk
│   ├── dex_preopt.mk
│   ├── dex_preopt_config.mk
│   ├── dex_preopt_config_merger.py
│   ├── dex_preopt_odex_install.mk
│   ├── distdir.mk
│   ├── dumpconfig.mk
│   ├── dumpvar.mk
│   ├── dupcheck.sh
│   ├── dynamic_binary.mk
│   ├── empty_test_config.xml
│   ├── envsetup.mk
│   ├── executable.mk
│   ├── executable_internal.mk
│   ├── executable_prefer_symlink.mk
│   ├── filter_symbols.sh
│   ├── force_aapt2.mk
│   ├── fuzz_test.mk
│   ├── generate_enforce_rro.mk
│   ├── header_library.mk
│   ├── header_library_internal.mk
│   ├── host_executable.mk
│   ├── host_executable_internal.mk
│   ├── host_java_library.mk
│   ├── host_java_library_common.mk
│   ├── host_prebuilt.mk
│   ├── host_shared_library.mk
│   ├── host_shared_library_internal.mk
│   ├── host_static_library.mk
│   ├── host_static_library_internal.mk
│   ├── install_jni_libs.mk
│   ├── install_jni_libs_internal.mk
│   ├── instrumentation_test_config_template.xml
│   ├── jacoco.mk
│   ├── java.mk
│   ├── java_common.mk
│   ├── java_host_test_config_template.xml
│   ├── java_host_unit_test_config_template.xml
│   ├── java_library.mk
│   ├── java_prebuilt_internal.mk
│   ├── java_renderscript.mk
│   ├── java_test_config_template.xml
│   ├── layoutlib_data.mk
│   ├── link_type.mk
│   ├── local_current_sdk.mk
│   ├── local_systemsdk.mk
│   ├── local_vendor_product.mk
│   ├── main.mk
│   ├── misc_prebuilt_internal.mk
│   ├── module_arch_supported.mk
│   ├── multi_prebuilt.mk
│   ├── multilib.mk
│   ├── native_benchmark_test_config_template.xml
│   ├── native_host_test_config_template.xml
│   ├── native_test.mk
│   ├── native_test_config_template.xml
│   ├── ninja_config.mk
│   ├── node_fns.mk
│   ├── notice_files.mk
│   ├── os_licensing.mk
│   ├── pack_dyn_relocs_setup.mk
│   ├── package.mk
│   ├── package_internal.mk
│   ├── packaging/
│   │   └── flags.mk
│   ├── pathmap.mk
│   ├── phony_package.mk
│   ├── prebuilt.mk
│   ├── prebuilt_internal.mk
│   ├── process_wrapper.sh
│   ├── process_wrapper_gdb.cmds
│   ├── process_wrapper_gdb.sh
│   ├── product-graph.mk
│   ├── product.mk
│   ├── product_config.mk
│   ├── product_config.rbc
│   ├── product_validation_checks.mk
│   ├── proguard/
│   │   ├── checknotnull.flags
│   │   └── kotlin.flags
│   ├── proguard.flags
│   ├── proguard.jacoco.flags
│   ├── proguard_basic_keeps.flags
│   ├── project_definitions.mk
│   ├── python_binary_host_mobly_test_config_template.xml
│   ├── python_binary_host_test_config_template.xml
│   ├── ravenwood_test_config_template.xml
│   ├── rbe.mk
│   ├── release_config.mk
│   ├── release_config.scl
│   ├── robolectric_test_config_template.xml
│   ├── root.mk
│   ├── rust_device_benchmark_config_template.xml
│   ├── rust_device_test_config_template.xml
│   ├── rust_host_benchmark_config_template.xml
│   ├── rust_host_test_config_template.xml
│   ├── sbom.mk
│   ├── sdk_check.mk
│   ├── shared_library.mk
│   ├── shared_library_internal.mk
│   ├── shell_test_config_template.xml
│   ├── soong_android_app_set.mk
│   ├── soong_app_prebuilt.mk
│   ├── soong_cc_rust_prebuilt.mk
│   ├── soong_config.mk
│   ├── soong_droiddoc_prebuilt.mk
│   ├── soong_extra_config.mk
│   ├── soong_java_prebuilt.mk
│   ├── static_java_library.mk
│   ├── static_library.mk
│   ├── static_library_internal.mk
│   ├── suite_host_config.mk
│   ├── support_libraries.mk
│   ├── sysprop.mk
│   ├── sysprop_config.mk
│   ├── target_test_internal.mk
│   ├── tasks/
│   │   ├── README.dex_preopt_check.md
│   │   ├── art-host-tests.mk
│   │   ├── art.mk
│   │   ├── automotive-general-tests.mk
│   │   ├── automotive-sdv-tests.mk
│   │   ├── automotive-tests.mk
│   │   ├── autorepro.mk
│   │   ├── berberis_test.mk
│   │   ├── build_custom_images.mk
│   │   ├── catbox.mk
│   │   ├── check-abi-dump-list.mk
│   │   ├── csuite.mk
│   │   ├── cts.mk
│   │   ├── cts_root.mk
│   │   ├── device-platinum-tests.mk
│   │   ├── device-tests.mk
│   │   ├── dex_preopt_check.mk
│   │   ├── dts.mk
│   │   ├── find-shareduid-violation.mk
│   │   ├── fontchain_lint.mk
│   │   ├── general-tests.mk
│   │   ├── host-unit-tests.mk
│   │   ├── host_init_verifier.mk
│   │   ├── mcts.mk
│   │   ├── meta-lic.mk
│   │   ├── module-info.mk
│   │   ├── mts.mk
│   │   ├── multitree.mk
│   │   ├── oem_image.mk
│   │   ├── offline-sdk-docs.mk
│   │   ├── owners.mk
│   │   ├── performance-tests.mk
│   │   ├── platform_availability_check.mk
│   │   ├── prebuilt_tradefed.mk
│   │   ├── sdk-addon.mk
│   │   ├── sts.mk
│   │   ├── tools/
│   │   │   ├── build_custom_image.mk
│   │   │   ├── compatibility.mk
│   │   │   └── package-modules.mk
│   │   ├── tradefed-tests-list.mk
│   │   ├── vendor_module_check.mk
│   │   ├── vts-core-tests.mk
│   │   ├── with-license.mk
│   │   └── wvts.mk
│   ├── use_lld_setup.mk
│   └── version_util.mk
├── envsetup.sh
├── help.sh
├── navbar.md
├── packaging/
│   ├── distdir.mk
│   ├── main.mk
│   └── main_soong_only.mk
├── rbesetup.sh
├── shell_utils.sh
├── tapasHelp.sh
├── target/
│   ├── board/
│   │   ├── BoardConfigGsiCommon.mk
│   │   ├── BoardConfigMainlineCommon.mk
│   │   ├── BoardConfigPixelCommon.mk
│   │   ├── android-info.mk
│   │   ├── generic/
│   │   │   ├── AndroidBoard.mk
│   │   │   ├── BoardConfig.mk
│   │   │   ├── README.txt
│   │   │   ├── device.mk
│   │   │   └── system_ext.prop
│   │   ├── generic_64bitonly_x86_64/
│   │   │   ├── BoardConfig.mk
│   │   │   ├── README.txt
│   │   │   ├── device.mk
│   │   │   └── system.prop
│   │   ├── generic_arm64/
│   │   │   ├── BoardConfig.mk
│   │   │   ├── README.txt
│   │   │   ├── device.mk
│   │   │   ├── sepolicy/
│   │   │   │   ├── OWNERS
│   │   │   │   ├── file.te
│   │   │   │   └── file_contexts
│   │   │   └── system_ext.prop
│   │   ├── generic_arm64_plus_armv7/
│   │   │   ├── BoardConfig.mk
│   │   │   ├── README.txt
│   │   │   └── device.mk
│   │   ├── generic_riscv64/
│   │   │   ├── BoardConfig.mk
│   │   │   ├── README.txt
│   │   │   ├── device.mk
│   │   │   └── system_ext.prop
│   │   ├── generic_x86/
│   │   │   ├── BoardConfig.mk
│   │   │   ├── README.txt
│   │   │   ├── device.mk
│   │   │   └── system_ext.prop
│   │   ├── generic_x86_64/
│   │   │   ├── BoardConfig.mk
│   │   │   ├── README.txt
│   │   │   ├── device.mk
│   │   │   └── system_ext.prop
│   │   ├── generic_x86_64_arm64/
│   │   │   ├── BoardConfig.mk
│   │   │   ├── README.txt
│   │   │   ├── device.mk
│   │   │   └── system_ext.prop
│   │   ├── generic_x86_arm/
│   │   │   ├── BoardConfig.mk
│   │   │   ├── README.txt
│   │   │   ├── device.mk
│   │   │   └── system_ext.prop
│   │   ├── go_defaults.prop
│   │   ├── go_defaults_512.prop
│   │   ├── go_defaults_common.prop
│   │   ├── gsi_arm64/
│   │   │   └── BoardConfig.mk
│   │   ├── gsi_system_ext.prop
│   │   ├── gsi_system_ext_user.prop
│   │   ├── linux_bionic/
│   │   │   ├── BoardConfig.mk
│   │   │   └── README.md
│   │   ├── mainline_arm64/
│   │   │   ├── BoardConfig.mk
│   │   │   ├── bluetooth/
│   │   │   │   └── bdroid_buildcfg.h
│   │   │   └── sepolicy/
│   │   │       ├── OWNERS
│   │   │       ├── file.te
│   │   │       └── file_contexts
│   │   ├── mainline_sdk/
│   │   │   ├── BoardConfig.mk
│   │   │   └── README.md
│   │   ├── mainline_x86/
│   │   │   └── BoardConfig.mk
│   │   ├── mainline_x86_64/
│   │   │   └── BoardConfig.mk
│   │   ├── mainline_x86_arm/
│   │   │   └── BoardConfig.mk
│   │   ├── module_arm/
│   │   │   ├── BoardConfig.mk
│   │   │   └── README.md
│   │   ├── module_arm64/
│   │   │   ├── BoardConfig.mk
│   │   │   └── README.md
│   │   ├── module_arm64only/
│   │   │   ├── BoardConfig.mk
│   │   │   └── README.md
│   │   ├── module_riscv64/
│   │   │   ├── BoardConfig.mk
│   │   │   └── README.md
│   │   ├── module_x86/
│   │   │   ├── BoardConfig.mk
│   │   │   └── README.md
│   │   ├── module_x86_64/
│   │   │   ├── BoardConfig.mk
│   │   │   └── README.md
│   │   ├── module_x86_64only/
│   │   │   ├── BoardConfig.mk
│   │   │   └── README.md
│   │   └── ndk/
│   │       ├── BoardConfig.mk
│   │       └── README.md
│   └── product/
│       ├── AndroidProducts.mk
│       ├── OWNERS
│       ├── angle_default.mk
│       ├── aosp_64bitonly_x86_64.mk
│       ├── aosp_arm.mk
│       ├── aosp_arm64.mk
│       ├── aosp_arm64_fullmte.mk
│       ├── aosp_arm64_plus_armv7.mk
│       ├── aosp_base.mk
│       ├── aosp_base_telephony.mk
│       ├── aosp_product.mk
│       ├── aosp_riscv64.mk
│       ├── aosp_x86.mk
│       ├── aosp_x86_64.mk
│       ├── aosp_x86_arm.mk
│       ├── app_function_extensions.mk
│       ├── base.mk
│       ├── base_product.mk
│       ├── base_system.mk
│       ├── base_system_ext.mk
│       ├── base_vendor.mk
│       ├── build_variables.mk
│       ├── cfi-common.mk
│       ├── core_64_bit.mk
│       ├── core_64_bit_only.mk
│       ├── core_minimal.mk
│       ├── core_no_zygote.mk
│       ├── default_art_config.mk
│       ├── developer_gsi_keys.mk
│       ├── empty-preloaded-classes
│       ├── empty-profile
│       ├── emulated_storage.mk
│       ├── full.manifest.xml
│       ├── full.mk
│       ├── full_base.mk
│       ├── full_base_telephony.mk
│       ├── full_x86.mk
│       ├── fullmte.mk
│       ├── generic/
│       │   ├── Android.bp
│       │   ├── OWNERS
│       │   └── erofs_compress_hints.txt
│       ├── generic.mk
│       ├── generic_no_telephony.mk
│       ├── generic_ramdisk.mk
│       ├── generic_system.mk
│       ├── generic_system_arm64.mk
│       ├── generic_system_x86.mk
│       ├── generic_system_x86_64.mk
│       ├── generic_system_x86_arm.mk
│       ├── generic_x86.mk
│       ├── go_defaults.mk
│       ├── go_defaults_512.mk
│       ├── go_defaults_common.mk
│       ├── gsi/
│       │   ├── 28.txt
│       │   ├── 29.txt
│       │   ├── 30.txt
│       │   ├── 31.txt
│       │   ├── 32.txt
│       │   ├── 33.txt
│       │   ├── 34.txt
│       │   ├── Android.bp
│       │   ├── OWNERS
│       │   ├── current.txt
│       │   ├── gsi_skip_mount.cfg
│       │   ├── init.gsi.rc
│       │   ├── init.vndk-nodef.rc
│       │   └── testkey_rsa2048.pem
│       ├── gsi_release.mk
│       ├── handheld_product.mk
│       ├── handheld_system.mk
│       ├── handheld_system_ext.mk
│       ├── handheld_vendor.mk
│       ├── hsum_common.mk
│       ├── languages_default.mk
│       ├── languages_full.mk
│       ├── large_screen_common.mk
│       ├── linux_bionic.mk
│       ├── mainline_sdk.mk
│       ├── mainline_system_arm64.mk
│       ├── mainline_system_x86.mk
│       ├── mainline_system_x86_64.mk
│       ├── mainline_system_x86_arm.mk
│       ├── media_product.mk
│       ├── media_system.mk
│       ├── media_system_ext.mk
│       ├── media_vendor.mk
│       ├── memtag-common.mk
│       ├── module_arm.mk
│       ├── module_arm64.mk
│       ├── module_arm64only.mk
│       ├── module_common.mk
│       ├── module_riscv64.mk
│       ├── module_x86.mk
│       ├── module_x86_64.mk
│       ├── module_x86_64only.mk
│       ├── ndk.mk
│       ├── non_ab_device.mk
│       ├── product_launched_with_k.mk
│       ├── product_launched_with_l.mk
│       ├── product_launched_with_l_mr1.mk
│       ├── product_launched_with_m.mk
│       ├── product_launched_with_n.mk
│       ├── product_launched_with_n_mr1.mk
│       ├── product_launched_with_o.mk
│       ├── product_launched_with_o_mr1.mk
│       ├── product_launched_with_p.mk
│       ├── profile_boot_common.mk
│       ├── ramdisk_stub.mk
│       ├── runtime_libart.mk
│       ├── sdk.mk
│       ├── sdk_with_runtime_apis.mk
│       ├── security/
│       │   ├── Android.bp
│       │   ├── README
│       │   ├── bluetooth.pk8
│       │   ├── bluetooth.x509.pem
│       │   ├── cts_uicc_2021.pk8
│       │   ├── cts_uicc_2021.x509.pem
│       │   ├── fsverity-release.x509.der
│       │   ├── media.pk8
│       │   ├── media.x509.pem
│       │   ├── networkstack.pk8
│       │   ├── networkstack.x509.pem
│       │   ├── nfc.pk8
│       │   ├── nfc.x509.pem
│       │   ├── platform.pk8
│       │   ├── platform.x509.pem
│       │   ├── sdk_sandbox.pk8
│       │   ├── sdk_sandbox.x509.pem
│       │   ├── shared.pk8
│       │   ├── shared.x509.pem
│       │   ├── testkey.pk8
│       │   └── testkey.x509.pem
│       ├── sysconfig/
│       │   ├── Android.bp
│       │   ├── initial-package-stopped-states-aosp.xml
│       │   ├── preinstalled-packages-platform-aosp-product.xml
│       │   ├── preinstalled-packages-platform-full-base.xml
│       │   ├── preinstalled-packages-platform-generic-system.xml
│       │   ├── preinstalled-packages-platform-handheld-product.xml
│       │   ├── preinstalled-packages-platform-handheld-system.xml
│       │   └── preinstalled-packages-platform-telephony-product.xml
│       ├── telephony.mk
│       ├── telephony_product.mk
│       ├── telephony_system.mk
│       ├── telephony_system_ext.mk
│       ├── telephony_vendor.mk
│       ├── updatable_apex.mk
│       ├── userspace_reboot.mk
│       ├── virtual_ab_ota/
│       │   ├── OWNERS
│       │   ├── README.md
│       │   ├── android_t_baseline.mk
│       │   ├── compression.mk
│       │   ├── compression_retrofit.mk
│       │   ├── compression_with_xor.mk
│       │   ├── launch.mk
│       │   ├── launch_with_vendor_ramdisk.mk
│       │   ├── plus_non_ab.mk
│       │   ├── retrofit.mk
│       │   └── vabc_features.mk
│       ├── window_extensions.mk
│       └── window_extensions_base.mk
├── teams/
│   ├── Android.bp
│   └── OWNERS
├── tests/
│   ├── artifact_path_requirements/
│   │   ├── inherit1.rbc
│   │   ├── inherit2.rbc
│   │   ├── inherit3.rbc
│   │   ├── inherit4.rbc
│   │   ├── product.rbc
│   │   └── test.rbc
│   ├── b_tests.sh
│   ├── board.rbc
│   ├── board_input_vars.rbc
│   ├── conversion_error.rbc
│   ├── envsetup_tests.sh
│   ├── include1.rbc
│   ├── inherits_in_regular_variables/
│   │   ├── inherit1.rbc
│   │   ├── product.rbc
│   │   └── test.rbc
│   ├── input_variables.rbc
│   ├── lunch_tests.sh
│   ├── part1.rbc
│   ├── prefixed_sort_order/
│   │   ├── base-secondary.rbc
│   │   ├── base.rbc
│   │   ├── product.rbc
│   │   └── test.rbc
│   ├── product.rbc
│   ├── roboleaf_tests.sh
│   ├── run.rbc
│   ├── single_value_inheritance/
│   │   ├── inherit1.rbc
│   │   ├── inherit2.rbc
│   │   ├── product.rbc
│   │   └── test.rbc
│   ├── single_value_inheritance_2/
│   │   ├── a.rbc
│   │   ├── b.rbc
│   │   ├── c.rbc
│   │   ├── d.rbc
│   │   ├── product.rbc
│   │   └── test.rbc
│   └── version_defaults.rbc
└── tools/
    ├── Android.bp
    ├── aconfig/
    │   ├── .editorconfig
    │   ├── .gitignore
    │   ├── Cargo.toml
    │   ├── MODULE_LICENSE_APACHE2
    │   ├── OWNERS
    │   ├── PREUPLOAD.cfg
    │   ├── TEST_MAPPING
    │   ├── aconfig/
    │   │   ├── Android.bp
    │   │   ├── Cargo.toml
    │   │   ├── build.rs
    │   │   ├── src/
    │   │   │   ├── codegen/
    │   │   │   │   ├── cpp.rs
    │   │   │   │   ├── java.rs
    │   │   │   │   ├── mod.rs
    │   │   │   │   └── rust.rs
    │   │   │   ├── commands.rs
    │   │   │   ├── dump.rs
    │   │   │   ├── main.rs
    │   │   │   ├── storage/
    │   │   │   │   ├── flag_info.rs
    │   │   │   │   ├── flag_table.rs
    │   │   │   │   ├── flag_value.rs
    │   │   │   │   ├── mod.rs
    │   │   │   │   └── package_table.rs
    │   │   │   └── test.rs
    │   │   ├── templates/
    │   │   │   ├── CustomFeatureFlags.java.template
    │   │   │   ├── ExportedFlags.java.template
    │   │   │   ├── FakeFeatureFlagsImpl.java.template
    │   │   │   ├── FeatureFlags.java.template
    │   │   │   ├── FeatureFlagsImpl.deviceConfig.java.template
    │   │   │   ├── FeatureFlagsImpl.exported.java.template
    │   │   │   ├── FeatureFlagsImpl.new_storage.java.template
    │   │   │   ├── FeatureFlagsImpl.test_mode.java.template
    │   │   │   ├── Flags.java.template
    │   │   │   ├── cpp_exported_header.template
    │   │   │   ├── cpp_source_file.template
    │   │   │   ├── rust.template
    │   │   │   └── rust_test.template
    │   │   └── tests/
    │   │       ├── AconfigHostTest.java
    │   │       ├── AconfigTest.java
    │   │       ├── AndroidManifest.xml
    │   │       ├── aconfig_exported_mode_test.cpp
    │   │       ├── aconfig_exported_mode_test.rs
    │   │       ├── aconfig_force_read_only_mode_test.cpp
    │   │       ├── aconfig_force_read_only_mode_test.rs
    │   │       ├── aconfig_prod_mode_test.rs
    │   │       ├── aconfig_test.cpp
    │   │       ├── aconfig_test_mode_test.rs
    │   │       ├── aconfig_test_test_variant.cpp
    │   │       ├── first.values
    │   │       ├── read_only_test.aconfig
    │   │       ├── read_only_test.values
    │   │       ├── second.values
    │   │       ├── storage_test_1.aconfig
    │   │       ├── storage_test_1.values
    │   │       ├── storage_test_2.aconfig
    │   │       ├── storage_test_2.values
    │   │       ├── storage_test_4.aconfig
    │   │       ├── storage_test_4.values
    │   │       ├── test.aconfig
    │   │       ├── test_exported.aconfig
    │   │       ├── test_force_read_only.aconfig
    │   │       ├── test_second_package.aconfig
    │   │       └── third.values
    │   ├── aconfig_device_paths/
    │   │   ├── Android.bp
    │   │   ├── Cargo.toml
    │   │   ├── mainline_aconfig_flags_paths.txt
    │   │   ├── partition_aconfig_flags_paths.txt
    │   │   ├── src/
    │   │   │   ├── DeviceProtosTemplate.java
    │   │   │   ├── DeviceProtosTestUtilTemplate.java
    │   │   │   ├── HostDeviceProtosTemplate.java
    │   │   │   └── lib.rs
    │   │   └── test/
    │   │       ├── Android.bp
    │   │       ├── AndroidManifest.xml
    │   │       └── src/
    │   │           └── DeviceProtosTestUtilTest.java
    │   ├── aconfig_flags/
    │   │   ├── Android.bp
    │   │   ├── Cargo.toml
    │   │   ├── flags.aconfig
    │   │   └── src/
    │   │       └── lib.rs
    │   ├── aconfig_protos/
    │   │   ├── Android.bp
    │   │   ├── Cargo.toml
    │   │   ├── build.rs
    │   │   ├── jarjar-nano-rules.txt
    │   │   ├── protos/
    │   │   │   ├── aconfig.proto
    │   │   │   └── aconfig_internal.proto
    │   │   └── src/
    │   │       └── lib.rs
    │   ├── aconfig_storage_file/
    │   │   ├── Android.bp
    │   │   ├── Cargo.toml
    │   │   ├── aconfig_storage_file.cpp
    │   │   ├── build.rs
    │   │   ├── include/
    │   │   │   └── aconfig_storage/
    │   │   │       └── aconfig_storage_file.hpp
    │   │   ├── protos/
    │   │   │   └── aconfig_storage_metadata.proto
    │   │   ├── src/
    │   │   │   ├── flag_info.rs
    │   │   │   ├── flag_table.rs
    │   │   │   ├── flag_value.rs
    │   │   │   ├── lib.rs
    │   │   │   ├── main.rs
    │   │   │   ├── package_table.rs
    │   │   │   ├── protos.rs
    │   │   │   ├── sip_hasher13.rs
    │   │   │   └── test_utils.rs
    │   │   ├── srcs/
    │   │   │   └── android/
    │   │   │       └── aconfig/
    │   │   │           └── storage/
    │   │   │               ├── AconfigStorageException.java
    │   │   │               ├── ByteBufferReader.java
    │   │   │               ├── FileType.java
    │   │   │               ├── FlagTable.java
    │   │   │               ├── FlagType.java
    │   │   │               ├── FlagValueList.java
    │   │   │               ├── PackageTable.java
    │   │   │               ├── SipHasher13.java
    │   │   │               ├── StorageFileProvider.java
    │   │   │               └── TableUtils.java
    │   │   └── tests/
    │   │       ├── Android.bp
    │   │       ├── AndroidManifest.xml
    │   │       ├── AndroidStorageJaveTest.xml
    │   │       ├── data/
    │   │       │   ├── v1/
    │   │       │   │   ├── flag_v1.info
    │   │       │   │   └── flag_v1.val
    │   │       │   └── v2/
    │   │       │       ├── flag_v2.info
    │   │       │       └── flag_v2.val
    │   │       ├── jarjar.txt
    │   │       ├── srcs/
    │   │       │   ├── ByteBufferReaderTest.java
    │   │       │   ├── FlagTableTest.java
    │   │       │   ├── FlagValueListTest.java
    │   │       │   ├── PackageTableTest.java
    │   │       │   ├── SipHasher13Test.java
    │   │       │   ├── StorageFileProviderTest.java
    │   │       │   └── TestDataUtils.java
    │   │       └── storage_file_test.cpp
    │   ├── aconfig_storage_read_api/
    │   │   ├── Android.bp
    │   │   ├── Cargo.toml
    │   │   ├── aconfig_storage_read_api.cpp
    │   │   ├── build.rs
    │   │   ├── include/
    │   │   │   └── aconfig_storage/
    │   │   │       └── aconfig_storage_read_api.hpp
    │   │   ├── src/
    │   │   │   ├── flag_info_query.rs
    │   │   │   ├── flag_table_query.rs
    │   │   │   ├── flag_value_query.rs
    │   │   │   ├── lib.rs
    │   │   │   ├── mapped_file.rs
    │   │   │   └── package_table_query.rs
    │   │   ├── srcs/
    │   │   │   ├── android/
    │   │   │   │   ├── aconfig/
    │   │   │   │   │   └── storage/
    │   │   │   │   │       ├── AconfigStorageReadAPI.java
    │   │   │   │   │       ├── FlagReadContext.java
    │   │   │   │   │       └── PackageReadContext.java
    │   │   │   │   └── os/
    │   │   │   │       └── flagging/
    │   │   │   │           ├── PlatformAconfigPackage.java
    │   │   │   │           └── PlatformAconfigPackageInternal.java
    │   │   │   └── lib.rs
    │   │   └── tests/
    │   │       ├── AconfigStorageReadFunctionalTest.xml
    │   │       ├── Android.bp
    │   │       ├── AndroidManifest.xml
    │   │       ├── data/
    │   │       │   ├── v1/
    │   │       │   │   ├── flag_v1.info
    │   │       │   │   └── flag_v1.val
    │   │       │   └── v2/
    │   │       │       ├── flag_v2.info
    │   │       │       └── flag_v2.val
    │   │       ├── functional/
    │   │       │   └── srcs/
    │   │       │       ├── AconfigStorageReadAPITest.java
    │   │       │       ├── PlatformAconfigPackageInternalTest.java
    │   │       │       └── PlatformAconfigPackageTest.java
    │   │       ├── storage_read_api_test.cpp
    │   │       └── storage_read_api_test.rs
    │   ├── aconfig_storage_write_api/
    │   │   ├── Android.bp
    │   │   ├── Cargo.toml
    │   │   ├── aconfig_storage_write_api.cpp
    │   │   ├── build.rs
    │   │   ├── include/
    │   │   │   └── aconfig_storage/
    │   │   │       └── aconfig_storage_write_api.hpp
    │   │   ├── src/
    │   │   │   ├── flag_info_update.rs
    │   │   │   ├── flag_value_update.rs
    │   │   │   ├── lib.rs
    │   │   │   ├── mapped_file.rs
    │   │   │   └── test_utils.rs
    │   │   └── tests/
    │   │       ├── Android.bp
    │   │       ├── flag.info
    │   │       ├── flag.val
    │   │       ├── storage_write_api_test.cpp
    │   │       └── storage_write_api_test.rs
    │   ├── aflags/
    │   │   ├── Android.bp
    │   │   ├── Cargo.toml
    │   │   └── src/
    │   │       ├── aconfig_storage_source.rs
    │   │       ├── device_config_source.rs
    │   │       ├── load_protos.rs
    │   │       └── main.rs
    │   ├── convert_finalized_flags/
    │   │   ├── Android.bp
    │   │   ├── Cargo.toml
    │   │   ├── extended_flags_list_35.txt
    │   │   └── src/
    │   │       ├── lib.rs
    │   │       └── main.rs
    │   ├── exported_flag_check/
    │   │   ├── Android.bp
    │   │   ├── Cargo.toml
    │   │   ├── allow_flag_list.txt
    │   │   ├── allow_package_list.txt
    │   │   ├── src/
    │   │   │   ├── main.rs
    │   │   │   └── utils.rs
    │   │   └── tests/
    │   │       ├── api-signature-file.txt
    │   │       ├── finalized-flags.txt
    │   │       ├── flags.declarations
    │   │       ├── flags.protobuf
    │   │       ├── flags.values
    │   │       └── generate-flags-protobuf.sh
    │   ├── fake_device_config/
    │   │   ├── Android.bp
    │   │   └── src/
    │   │       └── android/
    │   │           ├── os/
    │   │           │   ├── Build.java
    │   │           │   └── flagging/
    │   │           │       ├── AconfigPackage.java
    │   │           │       ├── AconfigPackageInternal.java
    │   │           │       ├── PlatformAconfigPackage.java
    │   │           │       └── PlatformAconfigPackageInternal.java
    │   │           └── util/
    │   │               └── Log.java
    │   └── overrideflags/
    │       └── overrideflags.py
    ├── acp/
    │   ├── Android.bp
    │   ├── README
    │   └── acp.c
    ├── apicheck/
    │   ├── Android.bp
    │   └── etc/
    │       └── apicheck
    ├── atree/
    │   ├── Android.bp
    │   ├── atree.cpp
    │   ├── files.cpp
    │   ├── files.h
    │   ├── fs.cpp
    │   ├── fs.h
    │   └── options.h
    ├── auto_gen_test_config.py
    ├── auto_gen_test_config_test.py
    ├── brillo-clang-format
    ├── build-runfiles.cc
    ├── canoninja/
    │   ├── README.md
    │   ├── canoninja.go
    │   ├── canoninja_test.go
    │   ├── cmd/
    │   │   └── canoninja.go
    │   └── go.mod
    ├── characteristics_rro_generator.py
    ├── check-flagged-apis/
    │   ├── Android.bp
    │   ├── OWNERS
    │   ├── check-flagged-apis.sh
    │   └── src/
    │       └── com/
    │           └── android/
    │               └── checkflaggedapis/
    │                   ├── CheckFlaggedApisTest.kt
    │                   └── Main.kt
    ├── check_elf_file.py
    ├── check_identical_lib.sh
    ├── check_radio_versions.py
    ├── compare_builds.py
    ├── compliance/
    │   ├── Android.bp
    │   ├── README.md
    │   ├── cmd/
    │   │   ├── checkmetadata/
    │   │   │   ├── checkmetadata.go
    │   │   │   └── checkmetadata_test.go
    │   │   ├── checkshare/
    │   │   │   ├── checkshare.go
    │   │   │   └── checkshare_test.go
    │   │   ├── dumpgraph/
    │   │   │   ├── dumpgraph.go
    │   │   │   └── dumpgraph_test.go
    │   │   ├── dumpresolutions/
    │   │   │   ├── dumpresolutions.go
    │   │   │   └── dumpresolutions_test.go
    │   │   ├── htmlnotice/
    │   │   │   ├── htmlnotice.go
    │   │   │   └── htmlnotice_test.go
    │   │   ├── listshare/
    │   │   │   ├── listshare.go
    │   │   │   └── listshare_test.go
    │   │   ├── rtrace/
    │   │   │   ├── rtrace.go
    │   │   │   └── rtrace_test.go
    │   │   ├── shippedlibs/
    │   │   │   ├── shippedlibs.go
    │   │   │   └── shippedlibs_test.go
    │   │   ├── testdata/
    │   │   │   ├── README.md
    │   │   │   ├── firstparty/
    │   │   │   │   ├── FIRST_PARTY_LICENSE
    │   │   │   │   ├── METADATA
    │   │   │   │   ├── application.meta_lic
    │   │   │   │   ├── bin/
    │   │   │   │   │   ├── bin1.meta_lic
    │   │   │   │   │   ├── bin2.meta_lic
    │   │   │   │   │   └── bin3.meta_lic
    │   │   │   │   ├── container.zip.meta_lic
    │   │   │   │   ├── highest.apex.meta_lic
    │   │   │   │   └── lib/
    │   │   │   │       ├── liba.so.meta_lic
    │   │   │   │       ├── libb.so.meta_lic
    │   │   │   │       ├── libc.a.meta_lic
    │   │   │   │       └── libd.so.meta_lic
    │   │   │   ├── notice/
    │   │   │   │   ├── METADATA
    │   │   │   │   ├── NOTICE_LICENSE
    │   │   │   │   ├── application.meta_lic
    │   │   │   │   ├── bin/
    │   │   │   │   │   ├── bin1.meta_lic
    │   │   │   │   │   ├── bin2.meta_lic
    │   │   │   │   │   └── bin3.meta_lic
    │   │   │   │   ├── container.zip.meta_lic
    │   │   │   │   ├── highest.apex.meta_lic
    │   │   │   │   └── lib/
    │   │   │   │       ├── liba.so.meta_lic
    │   │   │   │       ├── libb.so.meta_lic
    │   │   │   │       ├── libc.a.meta_lic
    │   │   │   │       └── libd.so.meta_lic
    │   │   │   ├── proprietary/
    │   │   │   │   ├── METADATA
    │   │   │   │   ├── PROPRIETARY_LICENSE
    │   │   │   │   ├── application.meta_lic
    │   │   │   │   ├── bin/
    │   │   │   │   │   ├── bin1.meta_lic
    │   │   │   │   │   ├── bin2.meta_lic
    │   │   │   │   │   └── bin3.meta_lic
    │   │   │   │   ├── container.zip.meta_lic
    │   │   │   │   ├── highest.apex.meta_lic
    │   │   │   │   └── lib/
    │   │   │   │       ├── liba.so.meta_lic
    │   │   │   │       ├── libb.so.meta_lic
    │   │   │   │       ├── libc.a.meta_lic
    │   │   │   │       └── libd.so.meta_lic
    │   │   │   ├── reciprocal/
    │   │   │   │   ├── METADATA
    │   │   │   │   ├── RECIPROCAL_LICENSE
    │   │   │   │   ├── application.meta_lic
    │   │   │   │   ├── bin/
    │   │   │   │   │   ├── bin1.meta_lic
    │   │   │   │   │   ├── bin2.meta_lic
    │   │   │   │   │   └── bin3.meta_lic
    │   │   │   │   ├── container.zip.meta_lic
    │   │   │   │   ├── highest.apex.meta_lic
    │   │   │   │   └── lib/
    │   │   │   │       ├── liba.so.meta_lic
    │   │   │   │       ├── libb.so.meta_lic
    │   │   │   │       ├── libc.a.meta_lic
    │   │   │   │       └── libd.so.meta_lic
    │   │   │   ├── regressconcur/
    │   │   │   │   ├── README.md
    │   │   │   │   ├── bin/
    │   │   │   │   │   ├── bin1.meta_lic
    │   │   │   │   │   ├── bin2.meta_lic
    │   │   │   │   │   ├── bin3.meta_lic
    │   │   │   │   │   ├── bin4.meta_lic
    │   │   │   │   │   ├── bin5.meta_lic
    │   │   │   │   │   ├── bin6.meta_lic
    │   │   │   │   │   ├── bin7.meta_lic
    │   │   │   │   │   ├── bin8.meta_lic
    │   │   │   │   │   └── bin9.meta_lic
    │   │   │   │   ├── container.zip.meta_lic
    │   │   │   │   └── lib/
    │   │   │   │       ├── lib1.a.meta_lic
    │   │   │   │       ├── lib2.a.meta_lic
    │   │   │   │       ├── lib3.a.meta_lic
    │   │   │   │       ├── lib4.a.meta_lic
    │   │   │   │       ├── lib5.a.meta_lic
    │   │   │   │       ├── lib6.a.meta_lic
    │   │   │   │       ├── lib7.a.meta_lic
    │   │   │   │       ├── lib8.a.meta_lic
    │   │   │   │       └── lib9.a.meta_lic
    │   │   │   ├── regressgpl1/
    │   │   │   │   ├── README.md
    │   │   │   │   ├── bin/
    │   │   │   │   │   ├── bin1.meta_lic
    │   │   │   │   │   ├── bin2.meta_lic
    │   │   │   │   │   └── bin3.meta_lic
    │   │   │   │   ├── container.zip.meta_lic
    │   │   │   │   └── lib/
    │   │   │   │       ├── libapache.so.meta_lic
    │   │   │   │       ├── libc++.so.meta_lic
    │   │   │   │       └── libgpl.so.meta_lic
    │   │   │   ├── regressgpl2/
    │   │   │   │   ├── README.md
    │   │   │   │   ├── bin/
    │   │   │   │   │   ├── bin1.meta_lic
    │   │   │   │   │   ├── bin2.meta_lic
    │   │   │   │   │   └── bin3.meta_lic
    │   │   │   │   ├── container.zip.meta_lic
    │   │   │   │   └── lib/
    │   │   │   │       ├── libapache.so.meta_lic
    │   │   │   │       ├── libc++.so.meta_lic
    │   │   │   │       └── libgpl.so.meta_lic
    │   │   │   └── restricted/
    │   │   │       ├── METADATA
    │   │   │       ├── METADATA.android
    │   │   │       ├── RESTRICTED_LICENSE
    │   │   │       ├── application.meta_lic
    │   │   │       ├── bin/
    │   │   │       │   ├── bin1.meta_lic
    │   │   │       │   ├── bin2.meta_lic
    │   │   │       │   └── bin3.meta_lic
    │   │   │       ├── container.zip.meta_lic
    │   │   │       ├── highest.apex.meta_lic
    │   │   │       └── lib/
    │   │   │           ├── liba.so.meta_lic
    │   │   │           ├── libb.so.meta_lic
    │   │   │           ├── libc.a.meta_lic
    │   │   │           └── libd.so.meta_lic
    │   │   ├── textnotice/
    │   │   │   ├── textnotice.go
    │   │   │   └── textnotice_test.go
    │   │   └── xmlnotice/
    │   │       ├── xmlnotice.go
    │   │       └── xmlnotice_test.go
    │   ├── condition.go
    │   ├── condition_test.go
    │   ├── conditionset.go
    │   ├── conditionset_test.go
    │   ├── doc.go
    │   ├── go.mod
    │   ├── go.work
    │   ├── graph.go
    │   ├── noticeindex.go
    │   ├── policy_policy.go
    │   ├── policy_policy_test.go
    │   ├── policy_resolve.go
    │   ├── policy_resolve_test.go
    │   ├── policy_resolvenotices.go
    │   ├── policy_resolvenotices_test.go
    │   ├── policy_resolveprivacy.go
    │   ├── policy_resolveprivacy_test.go
    │   ├── policy_resolveshare.go
    │   ├── policy_resolveshare_test.go
    │   ├── policy_shareprivacyconflicts.go
    │   ├── policy_shareprivacyconflicts_test.go
    │   ├── policy_shipped.go
    │   ├── policy_shipped_test.go
    │   ├── policy_walk.go
    │   ├── policy_walk_test.go
    │   ├── projectmetadata/
    │   │   ├── Android.bp
    │   │   ├── projectmetadata.go
    │   │   └── projectmetadata_test.go
    │   ├── readgraph.go
    │   ├── readgraph_test.go
    │   ├── resolution.go
    │   ├── resolutionset.go
    │   ├── resolutionset_test.go
    │   ├── test_util.go
    │   └── testfs/
    │       ├── Android.bp
    │       └── testfs.go
    ├── dependency_mapper/
    │   ├── Android.bp
    │   ├── OWNERS
    │   ├── README.md
    │   ├── proto/
    │   │   └── dependency.proto
    │   ├── src/
    │   │   └── com/
    │   │       └── android/
    │   │           └── dependencymapper/
    │   │               ├── ClassDependenciesVisitor.java
    │   │               ├── ClassDependencyAnalyzer.java
    │   │               ├── ClassDependencyData.java
    │   │               ├── ClassRelevancyFilter.java
    │   │               ├── DependencyMapper.java
    │   │               ├── JavaSourceAnalyzer.java
    │   │               ├── JavaSourceData.java
    │   │               ├── Main.java
    │   │               └── Utils.java
    │   └── tests/
    │       ├── res/
    │       │   ├── testdata/
    │       │   │   ├── annotation/
    │       │   │   │   ├── AnnotationUsage.java
    │       │   │   │   ├── RuntimeAnnotation.java
    │       │   │   │   └── SourceAnnotation.java
    │       │   │   ├── constants/
    │       │   │   │   ├── ConstantDefinition.java
    │       │   │   │   └── ConstantUsage.java
    │       │   │   ├── inheritance/
    │       │   │   │   ├── BaseClass.java
    │       │   │   │   ├── BaseImpl.java
    │       │   │   │   └── InheritanceUsage.java
    │       │   │   └── methods/
    │       │   │       ├── FieldUsage.java
    │       │   │       ├── MethodUsage.java
    │       │   │       ├── ReferenceClass1.java
    │       │   │       └── ReferenceClass2.java
    │       │   └── testfiles/
    │       │       ├── dependency-mapper-test-data.jar
    │       │       └── sources.rsp
    │       └── src/
    │           └── com/
    │               └── android/
    │                   └── dependencymapper/
    │                       ├── ClassDependencyAnalyzerTest.java
    │                       ├── ClassRelevancyFilterTest.java
    │                       ├── DependencyMapperTest.java
    │                       ├── JavaSourceAnalyzerTest.java
    │                       └── UtilsTest.java
    ├── docker/
    │   ├── .gitignore
    │   ├── Dockerfile
    │   └── README.md
    ├── droiddoc/
    │   ├── Android.bp
    │   ├── LICENSE
    │   ├── README
    │   ├── templates-pdk/
    │   │   ├── assets/
    │   │   │   ├── android-developer-core.css
    │   │   │   ├── android-developer-docs-devguide.css
    │   │   │   ├── android-developer-docs.css
    │   │   │   ├── android-developer-docs.js
    │   │   │   ├── android-developer-reference.js
    │   │   │   ├── android-developer-resource-browser.css
    │   │   │   ├── android-developer-resource-browser.js
    │   │   │   ├── carousel.js
    │   │   │   ├── customizations.js
    │   │   │   ├── design/
    │   │   │   │   ├── default.css
    │   │   │   │   └── default.js
    │   │   │   ├── jquery-history.js
    │   │   │   ├── microtemplate.js
    │   │   │   ├── prettify.js
    │   │   │   ├── search_autocomplete.js
    │   │   │   ├── style.css
    │   │   │   └── yui-3.3.0-reset-min.css
    │   │   ├── components/
    │   │   │   └── masthead.cs
    │   │   ├── customizations.cs
    │   │   ├── data.hdf
    │   │   ├── docpage.cs
    │   │   ├── footer.cs
    │   │   ├── head_tag.cs
    │   │   ├── header_tabs.cs
    │   │   ├── jd_lists_unified.cs
    │   │   ├── sampleindex.cs
    │   │   ├── sdkpage.cs
    │   │   └── trailer.cs
    │   └── test/
    │       ├── generics/
    │       │   └── src/
    │       │       └── com/
    │       │           └── android/
    │       │               └── generics/
    │       │                   ├── AbsListView.java
    │       │                   ├── Adapter.java
    │       │                   ├── AdapterView.java
    │       │                   ├── Bar.java
    │       │                   ├── Foo.java
    │       │                   ├── FooBar.java
    │       │                   ├── Iface.java
    │       │                   ├── ListAdapter.java
    │       │                   ├── TestComparable.java
    │       │                   └── TestEnum.java
    │       └── stubs/
    │           ├── expected/
    │           │   └── com/
    │           │       └── android/
    │           │           └── stubs/
    │           │               ├── Annot.java
    │           │               ├── InterfaceEnum.java
    │           │               ├── Parent.java
    │           │               ├── SomeEnum.java
    │           │               ├── Types.java
    │           │               ├── a/
    │           │               │   ├── A.java
    │           │               │   └── SomeInterface.java
    │           │               └── b/
    │           │                   └── B.java
    │           ├── func.sh
    │           ├── run.sh
    │           └── src/
    │               └── com/
    │                   └── android/
    │                       └── stubs/
    │                           ├── Annot.java
    │                           ├── InterfaceEnum.java
    │                           ├── Parent.java
    │                           ├── SomeEnum.java
    │                           ├── Types.java
    │                           ├── a/
    │                           │   ├── A.java
    │                           │   └── SomeInterface.java
    │                           ├── b/
    │                           │   └── B.java
    │                           └── hidden/
    │                               ├── Hidden.java
    │                               ├── HiddenOuter.java
    │                               └── PackagePrivate.java
    ├── edit_monitor/
    │   ├── Android.bp
    │   ├── OWNERS
    │   ├── daemon_manager.py
    │   ├── daemon_manager_test.py
    │   ├── edit_monitor.py
    │   ├── edit_monitor_integration_test.py
    │   ├── edit_monitor_test.py
    │   ├── main.py
    │   ├── proto/
    │   │   └── edit_event.proto
    │   ├── utils.py
    │   └── utils_test.py
    ├── envsetup/
    │   ├── run_envsetup_tests
    │   └── spam_for_lunch
    ├── event_log_tags.py
    ├── exercise_compare_builds
    ├── extract_kernel.py
    ├── fat16copy.py
    ├── filelistdiff/
    │   ├── Android.bp
    │   ├── OWNERS
    │   ├── allowlist
    │   ├── allowlist_next
    │   └── file_list_diff.py
    ├── fileslist_util.py
    ├── finalization/
    │   ├── OWNERS
    │   ├── README.md
    │   ├── build-step-0-and-m.sh
    │   ├── build-step-0.sh
    │   ├── build-step-1-and-2.sh
    │   ├── build-step-1-and-m.sh
    │   ├── build-step-1.sh
    │   ├── build_soong_java_droidstubs.go.apply_hack.diff
    │   ├── build_soong_java_droidstubs.go.revert_hack.diff
    │   ├── cleanup.sh
    │   ├── command-line-options.sh
    │   ├── dryrun-cleanup.sh
    │   ├── dryrun-step-1-and-2.sh
    │   ├── dryrun-step-1.sh
    │   ├── environment.sh
    │   ├── finalize-sdk-rel.sh
    │   ├── finalize-sdk-resources.sh
    │   ├── finalize-vintf-resources.sh
    │   ├── frameworks_base.apply_hack.diff
    │   ├── frameworks_base.revert_hack.diff
    │   ├── localonly-steps.sh
    │   ├── step-0.sh
    │   ├── step-1.sh
    │   └── step-2.sh
    ├── find_static_candidates.py
    ├── findleaves.py
    ├── fixlinebreaks.sh
    ├── fs_config/
    │   ├── Android.bp
    │   ├── OWNERS
    │   ├── README.md
    │   ├── end_to_end_test/
    │   │   ├── config.fs
    │   │   ├── product_fs_config_dirs
    │   │   ├── product_fs_config_files
    │   │   ├── run_test.sh
    │   │   ├── system_fs_config_dirs
    │   │   ├── system_fs_config_files
    │   │   ├── vendor_fs_config_dirs
    │   │   └── vendor_fs_config_files
    │   ├── fs_config.c
    │   ├── fs_config.go
    │   ├── fs_config_generator.py
    │   ├── pylintrc
    │   └── test_fs_config_generator.py
    ├── generate-enforce-rro-android-manifest.py
    ├── generate-notice-files.py
    ├── generate-self-extracting-archive.py
    ├── generate_gts_shared_report.py
    ├── ide_query/
    │   ├── OWNERS
    │   ├── cc_analyzer/
    │   │   ├── Android.bp
    │   │   ├── README.md
    │   │   ├── analyzer.cc
    │   │   ├── analyzer.h
    │   │   ├── builtin_headers.cc
    │   │   ├── builtin_headers.h
    │   │   ├── include_scanner.cc
    │   │   ├── include_scanner.h
    │   │   └── main.cc
    │   ├── cc_analyzer_proto/
    │   │   ├── Android.bp
    │   │   ├── cc_analyzer.pb.go
    │   │   ├── cc_analyzer.proto
    │   │   └── regen.sh
    │   ├── go.mod
    │   ├── go.work
    │   ├── go.work.sum
    │   ├── ide_query.go
    │   ├── ide_query.sh
    │   ├── ide_query_proto/
    │   │   ├── ide_query.pb.go
    │   │   ├── ide_query.proto
    │   │   └── regen.sh
    │   └── prober_scripts/
    │       ├── cpp/
    │       │   ├── Android.bp
    │       │   ├── foo.proto
    │       │   └── general.cc
    │       ├── cpp_suite.textpb
    │       ├── ide_query.out
    │       ├── jvm/
    │       │   ├── Android.bp
    │       │   ├── Bar.java
    │       │   ├── Foo.java
    │       │   ├── ide_query.out
    │       │   ├── other/
    │       │   │   └── Other.java
    │       │   └── suite.textpb
    │       └── regen.sh
    ├── java-event-log-tags.py
    ├── libhost/
    │   ├── Android.bp
    │   ├── CopyFile.c
    │   └── include/
    │       └── host/
    │           └── CopyFile.h
    ├── list_files.py
    ├── lunchable
    ├── merge-event-log-tags.py
    ├── missing_soong_module_info.py
    ├── mk2bp_catalog.py
    ├── mk2bp_partition.py
    ├── normalize_path.py
    ├── otatools_package/
    │   └── Android.bp
    ├── perf/
    │   ├── benchmarks
    │   ├── format_benchmarks
    │   ├── pretty.py
    │   └── utils.py
    ├── post_process_props.py
    ├── post_process_props_unittest.xml
    ├── print_module_licenses.sh
    ├── product_config/
    │   ├── Android.bp
    │   ├── MANIFEST.MF
    │   ├── TEST_MANIFEST.MF
    │   ├── inherit_tree.py
    │   ├── src/
    │   │   └── com/
    │   │       └── android/
    │   │           └── build/
    │   │               └── config/
    │   │                   ├── CommandException.java
    │   │                   ├── ConfigBase.java
    │   │                   ├── ConvertMakeToGenericConfig.java
    │   │                   ├── CsvParser.java
    │   │                   ├── DumpConfigParser.java
    │   │                   ├── ErrorReporter.java
    │   │                   ├── Errors.java
    │   │                   ├── FlatConfig.java
    │   │                   ├── FlattenConfig.java
    │   │                   ├── GenericConfig.java
    │   │                   ├── Kati.java
    │   │                   ├── KatiCommand.java
    │   │                   ├── KatiCommandImpl.java
    │   │                   ├── KatiImpl.java
    │   │                   ├── Main.java
    │   │                   ├── MakeConfig.java
    │   │                   ├── MakeWriter.java
    │   │                   ├── Options.java
    │   │                   ├── OutputChecker.java
    │   │                   ├── Position.java
    │   │                   ├── RegexSet.java
    │   │                   ├── Str.java
    │   │                   ├── Value.java
    │   │                   └── VarType.java
    │   ├── test/
    │   │   └── com/
    │   │       └── android/
    │   │           └── build/
    │   │               └── config/
    │   │                   ├── CsvParserTest.java
    │   │                   ├── ErrorReporterTest.java
    │   │                   ├── OptionsTest.java
    │   │                   ├── PositionTest.java
    │   │                   ├── TestErrors.java
    │   │                   └── TestRunner.java
    │   └── test.sh
    ├── protos/
    │   ├── Android.bp
    │   └── metadata_file.proto
    ├── rbcrun/
    │   ├── Android.bp
    │   ├── README.md
    │   ├── go.mod
    │   ├── go.sum
    │   ├── host.go
    │   ├── host_test.go
    │   ├── rbcrun/
    │   │   └── rbcrun.go
    │   └── testdata/
    │       ├── bzl_loads_scl.bzl
    │       ├── bzl_loads_scl_2.bzl
    │       ├── file_ops.star
    │       ├── load.star
    │       ├── module1.star
    │       ├── module2.star
    │       ├── scl_incorrectly_loads_bzl.scl
    │       ├── shell.star
    │       └── test_scl.scl
    ├── record-finalized-flags/
    │   ├── .gitignore
    │   ├── Android.bp
    │   ├── Cargo.toml
    │   ├── OWNERS
    │   ├── src/
    │   │   ├── api_signature_files.rs
    │   │   ├── finalized_flags.rs
    │   │   ├── flag_values.rs
    │   │   └── main.rs
    │   └── tests/
    │       ├── api-signature-file.txt
    │       ├── finalized-flags.txt
    │       ├── flags.declarations
    │       ├── flags.protobuf
    │       ├── flags.values
    │       └── generate-flags-protobuf.sh
    ├── releasetools/
    │   ├── Android.bp
    │   ├── OWNERS
    │   ├── add_img_to_target_files.py
    │   ├── apex_utils.py
    │   ├── blockimgdiff.py
    │   ├── build_image.py
    │   ├── build_super_image.py
    │   ├── care_map_pb2.py
    │   ├── check_ota_package_signature.py
    │   ├── check_partition_sizes.py
    │   ├── check_target_files_signatures.py
    │   ├── check_target_files_vintf.py
    │   ├── common.py
    │   ├── create_brick_ota.py
    │   ├── edify_generator.py
    │   ├── find_shareduid_violation.py
    │   ├── fsverity_metadata_generator.py
    │   ├── images.py
    │   ├── img_from_target_files.py
    │   ├── jarjar-rules.txt
    │   ├── make_recovery_patch.py
    │   ├── merge/
    │   │   ├── Android.bp
    │   │   ├── OWNERS
    │   │   ├── merge_builds.py
    │   │   ├── merge_compatibility_checks.py
    │   │   ├── merge_dexopt.py
    │   │   ├── merge_meta.py
    │   │   ├── merge_target_files.py
    │   │   ├── merge_utils.py
    │   │   ├── test_merge_compatibility_checks.py
    │   │   ├── test_merge_meta.py
    │   │   └── test_merge_utils.py
    │   ├── merge_ota.py
    │   ├── non_ab_ota.py
    │   ├── ota_from_raw_img.py
    │   ├── ota_from_target_files.py
    │   ├── ota_metadata.proto
    │   ├── ota_metadata_pb2.py
    │   ├── ota_package_parser.py
    │   ├── ota_signing_utils.py
    │   ├── ota_utils.py
    │   ├── payload_signer.py
    │   ├── pylintrc
    │   ├── rangelib.py
    │   ├── sign_apex.py
    │   ├── sign_target_files_apks.py
    │   ├── sparse_img.py
    │   ├── target_files_diff.py
    │   ├── test_add_img_to_target_files.py
    │   ├── test_apex_utils.py
    │   ├── test_blockimgdiff.py
    │   ├── test_build_image.py
    │   ├── test_check_partition_sizes.py
    │   ├── test_check_target_files_vintf.py
    │   ├── test_common.py
    │   ├── test_merge_ota.py
    │   ├── test_non_ab_ota.py
    │   ├── test_ota_from_target_files.py
    │   ├── test_ota_utils.py
    │   ├── test_rangelib.py
    │   ├── test_sign_apex.py
    │   ├── test_sign_target_files_apks.py
    │   ├── test_utils.py
    │   ├── test_validate_target_files.py
    │   ├── test_verity_utils.py
    │   ├── testdata/
    │   │   ├── TestApp.apk
    │   │   ├── apexkeys_framework.txt
    │   │   ├── apexkeys_framework_conflict.txt
    │   │   ├── apexkeys_merge.txt
    │   │   ├── apexkeys_vendor.txt
    │   │   ├── apkcerts_framework.txt
    │   │   ├── apkcerts_merge.txt
    │   │   ├── apkcerts_vendor.txt
    │   │   ├── foo.apex
    │   │   ├── has_apk.apex
    │   │   ├── media.x509.pem
    │   │   ├── merge_config_framework_item_list
    │   │   ├── payload_signer.sh
    │   │   ├── platform.x509.pem
    │   │   ├── signing_helper.sh
    │   │   ├── testkey.key
    │   │   ├── testkey.pk8
    │   │   ├── testkey.pubkey.pem
    │   │   ├── testkey.x509.pem
    │   │   ├── testkey_EC.key
    │   │   ├── testkey_RSA4096.key
    │   │   ├── testkey_mincrypt
    │   │   ├── testkey_with_passwd.key
    │   │   ├── testkey_with_passwd.pk8
    │   │   ├── testkey_with_passwd.x509.pem
    │   │   ├── verity.x509.pem
    │   │   ├── verity_mincrypt
    │   │   └── vintf/
    │   │       ├── kernel/
    │   │       │   └── SYSTEM/
    │   │       │       └── etc/
    │   │       │           └── vintf/
    │   │       │               └── compatibility_matrix.1.xml
    │   │       ├── matrix_incompat/
    │   │       │   └── SYSTEM/
    │   │       │       └── etc/
    │   │       │           └── vintf/
    │   │       │               └── compatibility_matrix.1.xml
    │   │       ├── sku_compat/
    │   │       │   ├── ODM/
    │   │       │   │   └── etc/
    │   │       │   │       └── vintf/
    │   │       │   │           └── manifest_sku.xml
    │   │       │   └── SYSTEM/
    │   │       │       └── etc/
    │   │       │           └── vintf/
    │   │       │               └── compatibility_matrix.1.xml
    │   │       └── sku_incompat/
    │   │           ├── ODM/
    │   │           │   └── etc/
    │   │           │       └── vintf/
    │   │           │           └── manifest_sku.xml
    │   │           └── SYSTEM/
    │   │               └── etc/
    │   │                   └── vintf/
    │   │                       └── compatibility_matrix.1.xml
    │   ├── validate_target_files.py
    │   └── verity_utils.py
    ├── sbom/
    │   ├── Android.bp
    │   ├── compliance_metadata.py
    │   ├── gen_notice_xml.py
    │   ├── gen_sbom.py
    │   ├── generate-sbom-framework_res.py
    │   ├── generate-sbom.py
    │   ├── sbom_data.py
    │   ├── sbom_data_test.py
    │   ├── sbom_writers.py
    │   ├── sbom_writers_test.py
    │   └── testdata/
    │       ├── expected_json_sbom.spdx.json
    │       ├── expected_tagvalue_sbom.spdx
    │       ├── expected_tagvalue_sbom_doc_describes_file.spdx
    │       └── expected_tagvalue_sbom_unbundled.spdx
    ├── signapk/
    │   ├── Android.bp
    │   ├── OWNERS
    │   ├── SignApk.mf
    │   ├── src/
    │   │   └── com/
    │   │       └── android/
    │   │           └── signapk/
    │   │               ├── CountingOutputStream.java
    │   │               └── SignApk.java
    │   └── test/
    │       └── run
    ├── signtos/
    │   ├── Android.bp
    │   ├── SignTos.java
    │   └── SignTos.mf
    ├── soong_to_convert.py
    ├── stub_diff_analyzer.py
    ├── test_extract_kernel.py
    ├── test_post_process_props.py
    ├── tool_event_logger/
    │   ├── Android.bp
    │   ├── OWNERS
    │   ├── proto/
    │   │   └── tool_event.proto
    │   ├── tool_event_logger.py
    │   └── tool_event_logger_test.py
    ├── warn/
    │   ├── .pylintrc
    │   ├── OWNERS
    │   ├── __init__.py
    │   ├── android_project_list.py
    │   ├── chrome_project_list.py
    │   ├── cpp_warn_patterns.py
    │   ├── html_writer.py
    │   ├── java_warn_patterns.py
    │   ├── make_warn_patterns.py
    │   ├── other_warn_patterns.py
    │   ├── severity.py
    │   ├── tidy_warn_patterns.py
    │   ├── warn.py
    │   └── warn_common.py
    ├── warn.py
    ├── whichgit
    ├── zipalign/
    │   ├── Android.bp
    │   ├── OWNERS
    │   ├── README.txt
    │   ├── ZipAlign.cpp
    │   ├── ZipAlignMain.cpp
    │   ├── ZipEntry.cpp
    │   ├── ZipEntry.h
    │   ├── ZipFile.cpp
    │   ├── ZipFile.h
    │   ├── include/
    │   │   └── ZipAlign.h
    │   └── tests/
    │       └── src/
    │           └── align_test.cpp
    └── ziptime/
        ├── Android.bp
        ├── README.txt
        ├── ZipEntry.cpp
        ├── ZipEntry.h
        ├── ZipFile.cpp
        ├── ZipFile.h
        └── ZipTime.cpp
Download .txt
Showing preview only (402K chars total). Download the full file or copy to clipboard to get everything.
SYMBOL INDEX (4622 symbols across 431 files)

FILE: backported_fixes/src/java/com/android/build/backportedfixes/CombineBackportedFixes.java
  class CombineBackportedFixes (line 33) | public final class CombineBackportedFixes {
    method main (line 45) | public static void main(String... argv) throws Exception {
    method CombineBackportedFixes (line 51) | CombineBackportedFixes() {
    method run (line 54) | private void run() throws Exception {
    method writeBackportedFixes (line 61) | static void writeBackportedFixes(BackportedFixes fixes, OutputStream out)

FILE: backported_fixes/src/java/com/android/build/backportedfixes/WriteBackportedFixesPropFile.java
  class WriteBackportedFixesPropFile (line 42) | public final class WriteBackportedFixesPropFile {
    method main (line 55) | public static void main(String... argv) throws Exception {
    method WriteBackportedFixesPropFile (line 61) | WriteBackportedFixesPropFile() {
    method run (line 64) | private void run() throws Exception {
    method writeFixesAsAliasBitSet (line 71) | static void writeFixesAsAliasBitSet(BackportedFixes fixes, Writer out) {

FILE: backported_fixes/src/java/com/android/build/backportedfixes/common/Parser.java
  class Parser (line 39) | public final class Parser {
    method getFileInputStreams (line 42) | public static ImmutableList<FileInputStream> getFileInputStreams(List<...
    method getBitSetArray (line 52) | public static long[] getBitSetArray(int[] aliases) {
    method parseBackportedFixFiles (line 63) | public static BackportedFixes parseBackportedFixFiles(List<File> fixFi...
    method fixCollector (line 77) | private static Collector<BackportedFix, ?, BackportedFixes> fixCollect...
    method tunelFileInputStream (line 85) | private static FileInputStream tunelFileInputStream(File file) throws ...
    method tunnelParse (line 93) | private static BackportedFix tunnelParse(InputStream s) throws TunnelE...
    class TunnelException (line 103) | private static class TunnelException extends RuntimeException {
      method TunnelException (line 104) | TunnelException(Exception cause) {
      method rethrow (line 108) | <X extends Exception> RuntimeException rethrow(Class<X> exceptionCla...
      method rethrow (line 116) | public <X1 extends Exception, X2 extends Exception> RuntimeException...
      method exception (line 129) | private static ClassCastException exception(
    method Parser (line 138) | private Parser() {

FILE: backported_fixes/tests/java/com/android/build/backportedfixes/CombineBackportedFixesTest.java
  class CombineBackportedFixesTest (line 27) | public class CombineBackportedFixesTest {
    method writeBackportedFixes_default (line 30) | @Test

FILE: backported_fixes/tests/java/com/android/build/backportedfixes/WriteBackportedFixesPropFileTest.java
  class WriteBackportedFixesPropFileTest (line 27) | public class WriteBackportedFixesPropFileTest {
    method writeFixesAsAliasBitSet_default (line 30) | @Test
    method writeFixesAsAliasBitSet_some (line 44) | @Test

FILE: backported_fixes/tests/java/com/android/build/backportedfixes/common/ParserTest.java
  class ParserTest (line 36) | public class ParserTest {
    method getFileInputStreams (line 41) | @Test
    method getBitSetArray_empty (line 49) | @Test
    method getBitSetArray_2_3_64 (line 55) | @Test
    method parseBackportedFixFiles_empty (line 61) | @Test
    method parseBackportedFixFiles_oneBlank (line 68) | @Test
    method parseBackportedFixFiles_two (line 78) | @Test
    method tempFile (line 97) | private File tempFile(BackportedFix fix) throws IOException {

FILE: ci/build_context.py
  class BuildContext (line 20) | class BuildContext:
    method __init__ (line 22) | def __init__(self, build_context_dict: dict[str, any]):
    method build_target_used (line 32) | def build_target_used(self, target: str) -> bool:
    class TestInfo (line 35) | class TestInfo:
      method __init__ (line 46) | def __init__(self, test_info_dict: dict[str, any]):
      method build_target_used (line 62) | def build_target_used(self, target: str) -> bool:

FILE: ci/build_test_suites.py
  class Error (line 41) | class Error(Exception):
    method __init__ (line 43) | def __init__(self, message):
  class BuildFailureError (line 47) | class BuildFailureError(Error):
    method __init__ (line 49) | def __init__(self, return_code):
  class BuildPlanner (line 54) | class BuildPlanner:
    method __init__ (line 62) | def __init__(
    method create_build_plan (line 72) | def create_build_plan(self):
    method _collect_preliminary_build_targets (line 114) | def _collect_preliminary_build_targets(self, enable_discovery: bool):
    method _legacy_collect_preliminary_build_targets (line 158) | def _legacy_collect_preliminary_build_targets(self):
    method _unused_target_exclusion_enabled (line 169) | def _unused_target_exclusion_enabled(self, target: str) -> bool:
    method _get_test_discovery_zip_regexes (line 175) | def _get_test_discovery_zip_regexes(self) -> set[str]:
    method _build_tf_command (line 185) | def _build_tf_command(self, test_info) -> list[str]:
  class BuildPlan (line 205) | class BuildPlan:
  function build_test_suites (line 210) | def build_test_suites(argv: list[str]) -> int:
  function parse_args (line 244) | def parse_args(argv: list[str]) -> argparse.Namespace:
  function check_required_env (line 264) | def check_required_env():
  function load_build_context (line 279) | def load_build_context():
  function empty_build_context (line 292) | def empty_build_context():
  function execute_build_plan (line 296) | def execute_build_plan(build_plan: BuildPlan):
  function get_top (line 318) | def get_top() -> pathlib.Path:
  function run_command (line 322) | def run_command(args: list[str], stdout=None):
  function get_metrics_agent (line 326) | def get_metrics_agent():
  function main (line 330) | def main(argv):

FILE: ci/build_test_suites_local_test.py
  class BuildTestSuitesLocalTest (line 27) | class BuildTestSuitesLocalTest(ci_test_lib.TestCase):
    method setUp (line 29) | def setUp(self):
    method build_subprocess_args (line 35) | def build_subprocess_args(self, build_args: list[str]):
    method run_build (line 49) | def run_build(self, build_args: list[str]) -> subprocess.CompletedProc...
    method assert_children_alive (line 60) | def assert_children_alive(self, children: list[int]):
    method assert_children_dead (line 64) | def assert_children_dead(self, children: list[int]):
    method test_fails_for_invalid_arg (line 68) | def test_fails_for_invalid_arg(self):
    method test_builds_successfully (line 76) | def test_builds_successfully(self):
    method test_can_interrupt_build (line 79) | def test_can_interrupt_build(self):
    method test_can_kill_build_process_group (line 95) | def test_can_kill_build_process_group(self):
  function query_child_pids (line 112) | def query_child_pids(parent_pid: int) -> set[int]:

FILE: ci/build_test_suites_test.py
  class BuildTestSuitesTest (line 44) | class BuildTestSuitesTest(fake_filesystem_unittest.TestCase):
    method setUp (line 46) | def setUp(self):
    method test_missing_target_release_env_var_raises (line 63) | def test_missing_target_release_env_var_raises(self):
    method test_missing_target_product_env_var_raises (line 69) | def test_missing_target_product_env_var_raises(self):
    method test_missing_top_env_var_raises (line 75) | def test_missing_top_env_var_raises(self):
    method test_missing_dist_dir_env_var_raises (line 81) | def test_missing_dist_dir_env_var_raises(self):
    method test_invalid_arg_raises (line 87) | def test_invalid_arg_raises(self):
    method test_build_failure_returns (line 93) | def test_build_failure_returns(self):
    method test_incorrectly_formatted_build_context_raises (line 101) | def test_incorrectly_formatted_build_context_raises(self):
    method test_build_success_returns (line 109) | def test_build_success_returns(self):
    method assert_raises_word (line 113) | def assert_raises_word(self, cls, word):
    method _setup_working_build_env (line 116) | def _setup_working_build_env(self):
  class RunCommandIntegrationTest (line 139) | class RunCommandIntegrationTest(ci_test_lib.TestCase):
    method setUp (line 141) | def setUp(self):
    method tearDown (line 159) | def tearDown(self):
    method test_raises_on_nonzero_exit (line 162) | def test_raises_on_nonzero_exit(self):
    method test_streams_stdout (line 173) | def test_streams_stdout(self):
    method test_propagates_interruptions (line 200) | def test_propagates_interruptions(self):
    method start_process (line 228) | def start_process(self, *args, **kwargs) -> multiprocessing.Process:
    method assert_process_eventually_dies (line 234) | def assert_process_eventually_dies(self, pid: int):
    method assert_file_eventually_contains (line 240) | def assert_file_eventually_contains(self, file: pathlib.Path, substrin...
    method _terminate_managed_processes (line 244) | def _terminate_managed_processes(self):
  class BuildPlannerTest (line 255) | class BuildPlannerTest(unittest.TestCase):
    class TestOptimizedBuildTarget (line 257) | class TestOptimizedBuildTarget(optimized_targets.OptimizedBuildTarget):
      method __init__ (line 259) | def __init__(
      method get_build_targets_impl (line 266) | def get_build_targets_impl(self):
      method get_package_outputs_commands_impl (line 269) | def get_package_outputs_commands_impl(self):
      method get_enabled_flag (line 272) | def get_enabled_flag(self):
    method setUp (line 275) | def setUp(self):
    method test_build_optimization_off_builds_everything (line 281) | def test_build_optimization_off_builds_everything(self):
    method test_build_optimization_off_doesnt_package (line 292) | def test_build_optimization_off_doesnt_package(self):
    method test_build_optimization_on_optimizes_target (line 304) | def test_build_optimization_on_optimizes_target(self):
    method test_build_optimization_on_packages_target (line 319) | def test_build_optimization_on_packages_target(self):
    method test_individual_build_optimization_off_doesnt_optimize (line 336) | def test_individual_build_optimization_off_doesnt_optimize(self):
    method test_individual_build_optimization_off_doesnt_package (line 346) | def test_individual_build_optimization_off_doesnt_package(self):
    method test_target_output_used_target_built (line 359) | def test_target_output_used_target_built(self):
    method test_target_regex_used_target_built (line 373) | def test_target_regex_used_target_built(self):
    method test_target_output_not_used_target_not_built (line 392) | def test_target_output_not_used_target_not_built(self):
    method test_target_regex_matching_not_too_broad (line 408) | def test_target_regex_matching_not_too_broad(self):
    method create_build_planner (line 427) | def create_build_planner(
    method create_build_context (line 451) | def create_build_context(
    method create_args (line 466) | def create_args(
    method create_target_optimizations (line 473) | def create_target_optimizations(
    method get_target_flag (line 489) | def get_target_flag(self, target: str):
    method get_optimized_target_name (line 492) | def get_optimized_target_name(self, target: str):
    method get_test_context (line 495) | def get_test_context(self, target: str):
    method run_packaging_commands (line 514) | def run_packaging_commands(self, build_plan: build_test_suites.BuildPl...
  function wait_until (line 521) | def wait_until(
  function read_file_contents (line 539) | def read_file_contents(file: pathlib.Path) -> str:
  function read_eventual_file_contents (line 544) | def read_eventual_file_contents(file: pathlib.Path) -> str:

FILE: ci/buildbot.py
  function OutDir (line 32) | def OutDir():
  function DistDir (line 38) | def DistDir():

FILE: ci/ci_test_lib.py
  function process_alive (line 30) | def process_alive(pid):
  class TemporaryProcessSession (line 41) | class TemporaryProcessSession:
    method __init__ (line 43) | def __init__(self, test_case: TestCase):
    method create (line 47) | def create(self, args, kwargs):
    method cleanup (line 52) | def cleanup(self):
  class TestTemporaryDirectory (line 59) | class TestTemporaryDirectory:
    method __init__ (line 61) | def __init__(self, delete: bool, ):
    method create (line 65) | def create(cls, test_case: TestCase, delete: bool = True):
    method get_dir (line 71) | def get_dir(self):
    method cleanup (line 74) | def cleanup(self):
  function main (line 80) | def main():

FILE: ci/metrics_agent.py
  class MetricsAgent (line 24) | class MetricsAgent:
    method __init__ (line 29) | def __init__(self):
    method instance (line 35) | def instance(cls):
    method _init_proto (line 44) | def _init_proto(self):
    method analysis_start (line 48) | def analysis_start(self):
    method analysis_end (line 51) | def analysis_end(self):
    method packaging_start (line 56) | def packaging_start(self):
    method packaging_end (line 59) | def packaging_end(self):
    method report_optimized_target (line 64) | def report_optimized_target(self, name: str):
    method report_unoptimized_target (line 70) | def report_unoptimized_target(self, name: str, optimization_rationale:...
    method target_packaging_start (line 77) | def target_packaging_start(self, name: str):
    method target_packaging_end (line 82) | def target_packaging_end(self, name: str):
    method add_target_artifact (line 88) | def add_target_artifact(
    method end_reporting (line 105) | def end_reporting(self):

FILE: ci/optimized_targets.py
  class OptimizedBuildTarget (line 29) | class OptimizedBuildTarget(ABC):
    method __init__ (line 40) | def __init__(
    method get_build_targets (line 50) | def get_build_targets(self) -> set[str]:
    method get_package_outputs_commands (line 59) | def get_package_outputs_commands(self) -> list[list[str]]:
    method get_package_outputs_commands_impl (line 66) | def get_package_outputs_commands_impl(self) -> list[list[str]]:
    method get_enabled_flag (line 72) | def get_enabled_flag(self):
    method get_build_targets_impl (line 77) | def get_build_targets_impl(self) -> set[str]:
    method _generate_zip_options_for_items (line 82) | def _generate_zip_options_for_items(
    method _query_soong_vars (line 118) | def _query_soong_vars(
    method _base_zip_command (line 154) | def _base_zip_command(
  class NullOptimizer (line 165) | class NullOptimizer(OptimizedBuildTarget):
    method __init__ (line 172) | def __init__(self, target):
    method get_build_targets (line 175) | def get_build_targets(self):
    method get_package_outputs_commands (line 178) | def get_package_outputs_commands(self):
  class ChangeInfo (line 182) | class ChangeInfo:
    method __init__ (line 184) | def __init__(self, change_info_file_path):
    method find_changed_files (line 194) | def find_changed_files(self) -> set[str]:
  class GeneralTestsOptimizer (line 207) | class GeneralTestsOptimizer(OptimizedBuildTarget):
    method get_build_targets_impl (line 225) | def get_build_targets_impl(self) -> set[str]:
    method get_package_outputs_commands_impl (line 267) | def get_package_outputs_commands_impl(self):
    method _collect_config_files (line 363) | def _collect_config_files(
    method _get_zip_test_configs_zips_commands (line 374) | def _get_zip_test_configs_zips_commands(
    method get_enabled_flag (line 473) | def get_enabled_flag(self):
    method get_optimized_targets (line 477) | def get_optimized_targets(cls) -> dict[str, OptimizedBuildTarget]:

FILE: ci/optimized_targets_test.py
  class GeneralTestsOptimizerTest (line 31) | class GeneralTestsOptimizerTest(fake_filesystem_unittest.TestCase):
    method setUp (line 33) | def setUp(self):
    method _setup_working_build_env (line 46) | def _setup_working_build_env(self):
    method _write_soong_ui_file (line 69) | def _write_soong_ui_file(self):
    method _write_change_info_file (line 83) | def _write_change_info_file(self):
    method _write_test_mapping_file (line 98) | def _write_test_mapping_file(self):
    method test_general_tests_optimized (line 110) | def test_general_tests_optimized(self):
    method test_no_change_info_no_optimization (line 122) | def test_no_change_info_no_optimization(self):
    method test_mapping_groups_unused_module_not_built (line 131) | def test_mapping_groups_unused_module_not_built(self):
    method test_general_tests_used_by_non_test_mapping_test_no_optimization (line 154) | def test_general_tests_used_by_non_test_mapping_test_no_optimization(s...
    method test_malformed_change_info_raises (line 168) | def test_malformed_change_info_raises(self):
    method test_malformed_test_mapping_raises (line 177) | def test_malformed_test_mapping_raises(self):
    method test_packaging_outputs_success (line 187) | def test_packaging_outputs_success(self, subprocess_run):
    method test_get_soong_dumpvars_fails_raises (line 198) | def test_get_soong_dumpvars_fails_raises(self, subprocess_run):
    method test_get_soong_dumpvars_bad_output_raises (line 209) | def test_get_soong_dumpvars_bad_output_raises(self, subprocess_run):
    method _create_general_tests_optimizer (line 223) | def _create_general_tests_optimizer(self, build_context: BuildContext ...
    method _create_build_context (line 230) | def _create_build_context(
    method _create_test_context (line 246) | def _create_test_context(self):
    method _get_soong_vars_output (line 271) | def _get_soong_vars_output(
    method _set_up_build_outputs (line 286) | def _set_up_build_outputs(self, targets: list[str]):
    method _verify_soong_zip_commands (line 298) | def _verify_soong_zip_commands(self, commands: list[str], targets: lis...

FILE: ci/test_discovery_agent.py
  class TestDiscoveryAgent (line 22) | class TestDiscoveryAgent:
    method __init__ (line 35) | def __init__(
    method discover_test_zip_regexes (line 45) | def discover_test_zip_regexes(self) -> list[str]:
    method discover_test_modules (line 92) | def discover_test_modules(self) -> list[str]:
    method create_classpath (line 101) | def create_classpath(self, directory):
  class TestDiscoveryError (line 115) | class TestDiscoveryError(Exception):
    method __init__ (line 118) | def __init__(self, message):

FILE: ci/test_mapping_module_retriever.py
  function FilterComments (line 44) | def FilterComments(test_mapping_file: str) -> str:
  function GetTestMappings (line 57) | def GetTestMappings(paths: set[str],
  function FindAffectedModules (line 130) | def FindAffectedModules(
  function MatchesFilePatterns (line 180) | def MatchesFilePatterns(

FILE: core/dex_preopt_config_merger.py
  function main (line 37) | def main():

FILE: tools/aconfig/aconfig/build.rs
  function read_files_to_map_using_env (line 19) | fn read_files_to_map_using_env() -> Result<FinalizedFlagMap> {
  function main (line 79) | fn main() {

FILE: tools/aconfig/aconfig/src/codegen/cpp.rs
  function generate_cpp_code (line 29) | pub fn generate_cpp_code<I>(
  function generate_file (line 78) | pub fn generate_file(file: &FileSpec, context: &Context) -> Result<Outpu...
  type FileSpec (line 87) | pub struct FileSpec<'a> {
  type Context (line 94) | pub struct Context<'a> {
  type ClassElement (line 108) | pub struct ClassElement {
  function create_class_element (line 121) | fn create_class_element(
  constant EXPORTED_PROD_HEADER_EXPECTED (line 175) | const EXPORTED_PROD_HEADER_EXPECTED: &str = r#"
  constant EXPORTED_TEST_HEADER_EXPECTED (line 285) | const EXPORTED_TEST_HEADER_EXPECTED: &str = r#"
  constant EXPORTED_FORCE_READ_ONLY_HEADER_EXPECTED (line 451) | const EXPORTED_FORCE_READ_ONLY_HEADER_EXPECTED: &str = r#"
  constant PROD_SOURCE_FILE_EXPECTED (line 533) | const PROD_SOURCE_FILE_EXPECTED: &str = r#"
  constant TEST_SOURCE_FILE_EXPECTED (line 751) | const TEST_SOURCE_FILE_EXPECTED: &str = r#"
  constant FORCE_READ_ONLY_SOURCE_FILE_EXPECTED (line 1093) | const FORCE_READ_ONLY_SOURCE_FILE_EXPECTED: &str = r#"
  constant READ_ONLY_EXPORTED_PROD_HEADER_EXPECTED (line 1156) | const READ_ONLY_EXPORTED_PROD_HEADER_EXPECTED: &str = r#"
  constant READ_ONLY_PROD_SOURCE_FILE_EXPECTED (line 1225) | const READ_ONLY_PROD_SOURCE_FILE_EXPECTED: &str = r#"
  function test_generate_cpp_code (line 1272) | fn test_generate_cpp_code(
  function test_generate_cpp_code_for_prod (line 1319) | fn test_generate_cpp_code_for_prod() {
  function test_generate_cpp_code_for_test (line 1330) | fn test_generate_cpp_code_for_test() {
  function test_generate_cpp_code_for_force_read_only (line 1341) | fn test_generate_cpp_code_for_force_read_only() {
  function test_generate_cpp_code_for_read_only_prod (line 1352) | fn test_generate_cpp_code_for_read_only_prod() {

FILE: tools/aconfig/aconfig/src/codegen/java.rs
  type JavaCodegenConfig (line 31) | pub struct JavaCodegenConfig {
  function generate_java_code (line 41) | pub fn generate_java_code<I>(
  function gen_flags_by_namespace (line 123) | fn gen_flags_by_namespace(flags: &[FlagElement]) -> Vec<NamespaceFlags> {
  type Context (line 145) | struct Context {
  type NamespaceFlags (line 162) | struct NamespaceFlags {
  type FlagElement (line 168) | struct FlagElement {
  function create_flag_element (line 183) | fn create_flag_element(
  function format_java_method_name (line 237) | fn format_java_method_name(flag_name: &str) -> String {
  function format_property_name (line 258) | fn format_property_name(property_name: &str) -> String {
  function add_feature_flags_impl_template (line 263) | fn add_feature_flags_impl_template(
  constant EXPECTED_FEATUREFLAGS_COMMON_CONTENT (line 323) | const EXPECTED_FEATUREFLAGS_COMMON_CONTENT: &str = r#"
  constant EXPECTED_FLAG_COMMON_CONTENT (line 364) | const EXPECTED_FLAG_COMMON_CONTENT: &str = r#"
  constant EXPECTED_CUSTOMFEATUREFLAGS_CONTENT (line 441) | const EXPECTED_CUSTOMFEATUREFLAGS_CONTENT: &str = r#"
  constant EXPECTED_FAKEFEATUREFLAGSIMPL_CONTENT (line 561) | const EXPECTED_FAKEFEATUREFLAGSIMPL_CONTENT: &str = r#"
  function test_generate_java_code_production (line 614) | fn test_generate_java_code_production() {
  function test_generate_java_code_exported (line 774) | fn test_generate_java_code_exported() {
  function test_generate_java_code_new_exported (line 997) | fn test_generate_java_code_new_exported() {
  function test_generate_java_code_new_exported_with_sdk_check (line 1209) | fn test_generate_java_code_new_exported_with_sdk_check() {
  function test_generate_java_code_flags_with_sdk_check (line 1435) | fn test_generate_java_code_flags_with_sdk_check() {
  function test_generate_java_code_test (line 1483) | fn test_generate_java_code_test() {
  function test_generate_java_code_force_read_only (line 1611) | fn test_generate_java_code_force_read_only() {
  function test_generate_java_code_exported_flags (line 1897) | fn test_generate_java_code_exported_flags() {
  function test_format_java_method_name (line 2000) | fn test_format_java_method_name() {
  function test_format_property_name (line 2024) | fn test_format_property_name() {

FILE: tools/aconfig/aconfig/src/codegen/mod.rs
  function create_device_config_ident (line 25) | pub fn create_device_config_ident(package: &str, flag_name: &str) -> Res...
  type CodegenMode (line 32) | pub enum CodegenMode {
    method fmt (line 40) | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
  function test_create_device_config_ident (line 54) | fn test_create_device_config_ident() {

FILE: tools/aconfig/aconfig/src/codegen/rust.rs
  function generate_rust_code (line 29) | pub fn generate_rust_code<I>(
  type TemplateContext (line 70) | struct TemplateContext {
  type TemplateParsedFlag (line 81) | struct TemplateParsedFlag {
    method new (line 93) | fn new(package: &str, flag_offsets: HashMap<String, u16>, pf: &ProtoPa...
  constant PROD_EXPECTED (line 129) | const PROD_EXPECTED: &str = r#"
  constant TEST_EXPECTED (line 420) | const TEST_EXPECTED: &str = r#"
  constant FORCE_READ_ONLY_EXPECTED (line 838) | const FORCE_READ_ONLY_EXPECTED: &str = r#"
  function test_generate_rust_code (line 922) | fn test_generate_rust_code(mode: CodegenMode, expected: &str) {
  function test_generate_rust_code_for_prod (line 944) | fn test_generate_rust_code_for_prod() {
  function test_generate_rust_code_for_test (line 949) | fn test_generate_rust_code_for_test() {
  function test_generate_rust_code_for_force_read_only (line 954) | fn test_generate_rust_code_for_force_read_only() {

FILE: tools/aconfig/aconfig/src/commands.rs
  type Input (line 39) | pub struct Input {
    method try_parse_flags (line 45) | fn try_parse_flags(&mut self) -> Result<ProtoParsedFlags> {
    method error_context (line 54) | fn error_context(&self) -> String {
  type OutputFile (line 59) | pub struct OutputFile {
  constant DEFAULT_FLAG_STATE (line 64) | pub const DEFAULT_FLAG_STATE: ProtoFlagState = ProtoFlagState::DISABLED;
  constant DEFAULT_FLAG_PERMISSION (line 65) | pub const DEFAULT_FLAG_PERMISSION: ProtoFlagPermission = ProtoFlagPermis...
  function parse_flags (line 67) | pub fn parse_flags(
  function create_java_lib (line 208) | pub fn create_java_lib(
  function create_cpp_lib (line 238) | pub fn create_cpp_lib(mut input: Input, codegen_mode: CodegenMode) -> Re...
  function create_rust_lib (line 254) | pub fn create_rust_lib(mut input: Input, codegen_mode: CodegenMode) -> R...
  function create_storage (line 285) | pub fn create_storage(
  function create_device_config_defaults (line 296) | pub fn create_device_config_defaults(mut input: Input) -> Result<Vec<u8>> {
  function create_device_config_sysprops (line 318) | pub fn create_device_config_sysprops(mut input: Input) -> Result<Vec<u8>> {
  function dump_parsed_flags (line 339) | pub fn dump_parsed_flags(
  function find_unique_package (line 363) | fn find_unique_package(parsed_flags: &[ProtoParsedFlag]) -> Option<&str> {
  function modify_parsed_flags_based_on_mode (line 371) | pub fn modify_parsed_flags_based_on_mode(
  function assign_flag_ids (line 411) | pub fn assign_flag_ids<'a, I>(package: &str, parsed_flags_iter: I) -> Re...
  function compute_flags_fingerprint (line 438) | pub fn compute_flags_fingerprint(flag_names: &mut Vec<String>) -> u64 {
  function extract_flag_names (line 451) | fn extract_flag_names(flags: ProtoParsedFlags) -> Result<Vec<String>> {
  function should_include_flag (line 467) | pub fn should_include_flag(pf: &ProtoParsedFlag) -> bool {
  function test_offset_fingerprint (line 485) | fn test_offset_fingerprint() {
  function test_offset_fingerprint_matches_from_package (line 496) | fn test_offset_fingerprint_matches_from_package() {
  function test_offset_fingerprint_different_packages_does_not_match (line 518) | fn test_offset_fingerprint_different_packages_does_not_match() {
  function test_parse_flags (line 533) | fn test_parse_flags() {
  function test_parse_flags_setting_default (line 583) | fn test_parse_flags_setting_default() {
  function test_parse_flags_package_mismatch_between_declaration_and_command_line (line 615) | fn test_parse_flags_package_mismatch_between_declaration_and_command_lin...
  function test_parse_flags_container_mismatch_between_declaration_and_command_line (line 647) | fn test_parse_flags_container_mismatch_between_declaration_and_command_l...
  function test_parse_flags_no_allow_read_write_default_error (line 678) | fn test_parse_flags_no_allow_read_write_default_error() {
  function test_parse_flags_no_allow_read_write_value_error (line 708) | fn test_parse_flags_no_allow_read_write_value_error() {
  function test_parse_flags_no_allow_read_write_success (line 750) | fn test_parse_flags_no_allow_read_write_success() {
  function test_parse_flags_override_fixed_read_only (line 794) | fn test_parse_flags_override_fixed_read_only() {
  function test_parse_flags_metadata (line 837) | fn test_parse_flags_metadata() {
  function test_create_device_config_defaults (line 873) | fn test_create_device_config_defaults() {
  function test_create_device_config_sysprops (line 881) | fn test_create_device_config_sysprops() {
  function test_dump (line 889) | fn test_dump() {
  function test_dump_multiple_filters (line 903) | fn test_dump_multiple_filters() {
  function test_dump_textproto_format_dedup (line 927) | fn test_dump_textproto_format_dedup() {
  function parse_test_flags_as_input (line 942) | fn parse_test_flags_as_input() -> Input {
  function test_modify_parsed_flags_based_on_mode_prod (line 951) | fn test_modify_parsed_flags_based_on_mode_prod() {
  function test_modify_parsed_flags_based_on_mode_exported (line 963) | fn test_modify_parsed_flags_based_on_mode_exported() {
  function test_assign_flag_ids (line 983) | fn test_assign_flag_ids() {
  function test_modify_parsed_flags_based_on_mode_force_read_only (line 1001) | fn test_modify_parsed_flags_based_on_mode_force_read_only() {

FILE: tools/aconfig/aconfig/src/dump.rs
  type DumpFormat (line 25) | pub enum DumpFormat {
    type Error (line 32) | type Error = anyhow::Error;
    method try_from (line 34) | fn try_from(value: &str) -> std::result::Result<Self, Self::Error> {
  function dump_parsed_flags (line 45) | pub fn dump_parsed_flags<I>(parsed_flags_iter: I, format: DumpFormat) ->...
  function dump_custom_format (line 71) | fn dump_custom_format(flag: &ProtoParsedFlag, format: &str, output: &mut...
  type DumpPredicate (line 117) | pub type DumpPredicate = dyn Fn(&ProtoParsedFlag) -> bool;
  function create_filter_predicate (line 119) | pub fn create_filter_predicate(filter: &str) -> Result<Box<DumpPredicate...
  function create_filter_predicate_single (line 127) | fn create_filter_predicate_single(filter: &str) -> Result<Box<DumpPredic...
  function parse_enabled_ro_flag (line 204) | fn parse_enabled_ro_flag() -> ProtoParsedFlag {
  function test_dumpformat_from_str (line 209) | fn test_dumpformat_from_str() {
  function test_dump_parsed_flags_protobuf_format (line 220) | fn test_dump_parsed_flags_protobuf_format() {
  function test_dump_parsed_flags_textproto_format (line 234) | fn test_dump_parsed_flags_textproto_format() {
  function test_dump_parsed_flags_custom_format (line 243) | fn test_dump_parsed_flags_custom_format() {
  function test_dump_custom_format (line 265) | fn test_dump_custom_format() {
  function test_create_filter_predicate (line 299) | fn test_create_filter_predicate() {

FILE: tools/aconfig/aconfig/src/main.rs
  constant HELP_DUMP_CACHE (line 44) | const HELP_DUMP_CACHE: &str = r#"
  constant HELP_DUMP_FORMAT (line 48) | const HELP_DUMP_FORMAT: &str = r#"
  constant HELP_DUMP_FILTER (line 86) | const HELP_DUMP_FILTER: &str = r#"
  constant HELP_DUMP_DEDUP (line 121) | const HELP_DUMP_DEDUP: &str = r#"
  function cli (line 126) | fn cli() -> Command {
  function get_required_arg (line 293) | fn get_required_arg<'a, T>(matches: &'a ArgMatches, arg_name: &str) -> R...
  function get_optional_arg (line 302) | fn get_optional_arg<'a, T>(matches: &'a ArgMatches, arg_name: &str) -> O...
  function open_zero_or_more_files (line 309) | fn open_zero_or_more_files(matches: &ArgMatches, arg_name: &str) -> Resu...
  function open_single_file (line 318) | fn open_single_file(matches: &ArgMatches, arg_name: &str) -> Result<Inpu...
  function write_output_file_realtive_to_dir (line 326) | fn write_output_file_realtive_to_dir(root: &Path, output_file: &OutputFi...
  function write_output_to_file_or_stdout (line 340) | fn write_output_to_file_or_stdout(path: &str, data: &[u8]) -> Result<()> {
  function load_finalized_flags (line 352) | fn load_finalized_flags() -> Result<FinalizedFlagMap> {
  function main (line 358) | fn main() -> Result<()> {

FILE: tools/aconfig/aconfig/src/storage/flag_info.rs
  function new_header (line 23) | fn new_header(container: &str, num_flags: u32, version: u32) -> FlagInfo...
  function create_flag_info (line 34) | pub fn create_flag_info(
  function create_test_flag_info_list_from_source (line 84) | pub fn create_test_flag_info_list_from_source() -> Result<FlagInfoList> {
  function test_list_contents (line 92) | fn test_list_contents() {

FILE: tools/aconfig/aconfig/src/storage/flag_table.rs
  function new_header (line 25) | fn new_header(container: &str, num_flags: u32, version: u32) -> FlagTabl...
  type FlagTableNodeWrapper (line 40) | struct FlagTableNodeWrapper {
    method new (line 46) | fn new(
    method create_nodes (line 64) | fn create_nodes(package: &FlagPackage, num_buckets: u32) -> Result<Vec...
  function create_flag_table (line 92) | pub fn create_flag_table(
  function create_test_flag_table_from_source (line 153) | fn create_test_flag_table_from_source() -> Result<FlagTable> {
  function test_table_contents (line 161) | fn test_table_contents() {

FILE: tools/aconfig/aconfig/src/storage/flag_value.rs
  function new_header (line 23) | fn new_header(container: &str, num_flags: u32, version: u32) -> FlagValu...
  function create_flag_value (line 34) | pub fn create_flag_value(
  function create_test_flag_value_list_from_source (line 80) | pub fn create_test_flag_value_list_from_source() -> Result<FlagValueList> {
  function test_list_contents (line 88) | fn test_list_contents() {

FILE: tools/aconfig/aconfig/src/storage/mod.rs
  type FlagPackage (line 34) | pub struct FlagPackage<'a> {
  function new (line 46) | fn new(package_name: &'a str, package_id: u32) -> Self {
  function insert (line 57) | fn insert(&mut self, pf: &'a ProtoParsedFlag) {
  function group_flags_by_package (line 64) | pub fn group_flags_by_package<'a, I>(parsed_flags_vec_iter: I, version: ...
  function generate_storage_file (line 109) | pub fn generate_storage_file<'a, I>(
  function parse_all_test_flags (line 147) | pub fn parse_all_test_flags() -> Vec<ProtoParsedFlags> {
  function test_flag_package (line 195) | fn test_flag_package() {
  function test_flag_package_with_fingerprint (line 238) | fn test_flag_package_with_fingerprint() {

FILE: tools/aconfig/aconfig/src/storage/package_table.rs
  function new_header (line 25) | fn new_header(container: &str, num_packages: u32, version: u32) -> Packa...
  type PackageTableNodeWrapper (line 40) | struct PackageTableNodeWrapper {
    method new (line 46) | fn new(package: &FlagPackage, num_buckets: u32) -> Self {
  function create_package_table (line 59) | pub fn create_package_table(
  function create_test_package_table_from_source (line 120) | pub fn create_test_package_table_from_source(version: u32) -> Result<Pac...
  function test_table_contents_default_version (line 128) | fn test_table_contents_default_version() {
  function test_table_contents_max_version (line 150) | fn test_table_contents_max_version() {

FILE: tools/aconfig/aconfig/src/test.rs
  constant TEST_PACKAGE (line 26) | pub const TEST_PACKAGE: &str = "com.android.aconfig.test";
  constant TEST_FLAGS_TEXTPROTO (line 28) | pub const TEST_FLAGS_TEXTPROTO: &str = r#"
  function parse_read_only_test_flags (line 256) | pub fn parse_read_only_test_flags() -> ProtoParsedFlags {
  function parse_test_flags (line 275) | pub fn parse_test_flags() -> ProtoParsedFlags {
  function parse_second_package_flags (line 300) | pub fn parse_second_package_flags() -> ProtoParsedFlags {
  function first_significant_code_diff (line 319) | pub fn first_significant_code_diff(a: &str, b: &str) -> Option<String> {
  function assert_no_significant_code_diff (line 338) | pub fn assert_no_significant_code_diff(expected: &str, actual: &str) {
  function test_first_significant_code_diff (line 361) | fn test_first_significant_code_diff() {

FILE: tools/aconfig/aconfig/tests/AconfigHostTest.java
  class AconfigHostTest (line 15) | @RunWith(JUnit4.class)
    method testThrowsExceptionIfFlagNotSet (line 17) | @Test
    method testSetFlagInFakeFeatureFlagsImpl (line 24) | @Test
    method testSetFlagWithRandomName (line 40) | @Test
    method testResetFlagsInFakeFeatureFlagsImpl (line 47) | @Test
    method testFlagsSetFeatureFlags (line 60) | @Test
    method testFlagsUnsetFeatureFlags (line 70) | @Test
    method testFeatureFlagsImplNotImpl (line 82) | @Test

FILE: tools/aconfig/aconfig/tests/AconfigTest.java
  class AconfigTest (line 26) | @RunWith(JUnit4.class)
    method testDisabledReadOnlyFlag (line 28) | @Test
    method testEnabledReadOnlyFlag (line 34) | @Test
    method testEnabledFixedReadOnlyFlag (line 40) | @Test
    method testDisabledReadWriteFlag (line 46) | @Test
    method testEnabledReadWriteFlag (line 52) | @Test
    method testFakeFeatureFlagsImplImpled (line 58) | @Test
    method testExportedFlag (line 65) | @Test
    method testForceReadOnly (line 71) | @Test

FILE: tools/aconfig/aconfig/tests/aconfig_exported_mode_test.cpp
  function TEST (line 22) | TEST(AconfigTest, TestDisabledRwExportedFlag) {
  function TEST (line 28) | TEST(AconfigTest, TestEnabledFixedRoExportedFlag) {
  function TEST (line 35) | TEST(AconfigTest, TestEnabledRoExportedFlag) {
  function main (line 42) | int main(int argc, char** argv) {

FILE: tools/aconfig/aconfig/tests/aconfig_exported_mode_test.rs
  function test_flags (line 3) | fn test_flags() {

FILE: tools/aconfig/aconfig/tests/aconfig_force_read_only_mode_test.cpp
  function TEST (line 22) | TEST(AconfigTest, TestDisabledReadOnlyFlag) {
  function TEST (line 28) | TEST(AconfigTest, TestEnabledReadOnlyFlag) {
  function TEST (line 34) | TEST(AconfigTest, TestDisabledReadWriteFlag) {
  function TEST (line 40) | TEST(AconfigTest, TestEnabledReadWriteFlag) {
  function TEST (line 46) | TEST(AconfigTest, TestEnabledFixedReadOnlyFlag) {
  function main (line 52) | int main(int argc, char** argv) {

FILE: tools/aconfig/aconfig/tests/aconfig_force_read_only_mode_test.rs
  function test_flags (line 3) | fn test_flags() {

FILE: tools/aconfig/aconfig/tests/aconfig_prod_mode_test.rs
  function test_flags (line 3) | fn test_flags() {

FILE: tools/aconfig/aconfig/tests/aconfig_test.cpp
  function TEST (line 22) | TEST(AconfigTest, TestDisabledReadOnlyFlag) {
  function TEST (line 28) | TEST(AconfigTest, TestEnabledReadOnlyFlag) {
  function TEST (line 34) | TEST(AconfigTest, TestDisabledReadWriteFlag) {
  function TEST (line 40) | TEST(AconfigTest, TestEnabledReadWriteFlag) {
  function TEST (line 46) | TEST(AconfigTest, TestEnabledFixedReadOnlyFlag) {
  function main (line 52) | int main(int argc, char** argv) {

FILE: tools/aconfig/aconfig/tests/aconfig_test_mode_test.rs
  function test_flags (line 3) | fn test_flags() {

FILE: tools/aconfig/aconfig/tests/aconfig_test_test_variant.cpp
  class AconfigTest (line 22) | class AconfigTest : public ::testing::Test {
    method SetUp (line 24) | void SetUp() override {
  function TEST_F (line 29) | TEST_F(AconfigTest, TestDisabledReadOnlyFlag) {
  function TEST_F (line 35) | TEST_F(AconfigTest, TestEnabledReadOnlyFlag) {
  function TEST_F (line 41) | TEST_F(AconfigTest, TestDisabledReadWriteFlag) {
  function TEST_F (line 47) | TEST_F(AconfigTest, TestEnabledReadWriteFlag) {
  function TEST_F (line 53) | TEST_F(AconfigTest, TestEnabledFixedReadOnlyFlag) {
  function TEST_F (line 59) | TEST_F(AconfigTest, OverrideFlagValue) {
  function TEST_F (line 65) | TEST_F(AconfigTest, ResetFlagValue) {
  function main (line 77) | int main(int argc, char** argv) {

FILE: tools/aconfig/aconfig_device_paths/src/DeviceProtosTemplate.java
  class DeviceProtos (line 31) | public class DeviceProtos {
    method loadAndParseFlagProtos (line 49) | public static List<parsed_flag> loadAndParseFlagProtos() throws IOExce...
    method parsedFlagsProtoPaths (line 68) | public static List<String> parsedFlagsProtoPaths() {

FILE: tools/aconfig/aconfig_device_paths/src/DeviceProtosTestUtilTemplate.java
  class DeviceProtosTestUtil (line 29) | public class DeviceProtosTestUtil {
    method loadAndParseFlagProtos (line 47) | public static List<parsed_flag> loadAndParseFlagProtos() throws IOExce...
    method parsedFlagsProtoPaths (line 67) | public static List<String> parsedFlagsProtoPaths() {

FILE: tools/aconfig/aconfig_device_paths/src/HostDeviceProtosTemplate.java
  class HostDeviceProtos (line 30) | public class HostDeviceProtos {
    type AdbCommandExecutor (line 34) | public static interface AdbCommandExecutor {
      method executeAdbCommand (line 36) | String executeAdbCommand(String command);
    method parsedFlagsProtoPaths (line 56) | public static List<String> parsedFlagsProtoPaths(AdbCommandExecutor ad...

FILE: tools/aconfig/aconfig_device_paths/src/lib.rs
  function read_partition_paths (line 24) | fn read_partition_paths() -> Vec<PathBuf> {
  function parsed_flags_proto_paths (line 35) | pub fn parsed_flags_proto_paths() -> Result<Vec<PathBuf>> {
  function test_read_partition_paths (line 64) | fn test_read_partition_paths() {

FILE: tools/aconfig/aconfig_device_paths/test/src/DeviceProtosTestUtilTest.java
  class DeviceProtosTestUtilTest (line 31) | @RunWith(JUnit4.class)
    method testDeviceProtos_loadAndParseFlagProtos (line 36) | @Test

FILE: tools/aconfig/aconfig_flags/src/lib.rs
  function enable_only_new_storage (line 34) | pub fn enable_only_new_storage() -> bool {
  function enable_aconfigd_from_mainline (line 39) | pub fn enable_aconfigd_from_mainline() -> bool {
  function invoke_updatable_aflags (line 44) | pub fn invoke_updatable_aflags() -> bool {
  function enable_only_new_storage (line 53) | pub fn enable_only_new_storage() -> bool {
  function enable_aconfigd_from_mainline (line 59) | pub fn enable_aconfigd_from_mainline() -> bool {
  function invoke_updatable_aflags (line 65) | pub fn invoke_updatable_aflags() -> bool {

FILE: tools/aconfig/aconfig_protos/build.rs
  function main (line 3) | fn main() {

FILE: tools/aconfig/aconfig_protos/src/lib.rs
  constant ACONFIG_PROTO_PATH (line 73) | const ACONFIG_PROTO_PATH: &str = "//build/make/tools/aconfig/aconfig_pro...
  function is_valid_name_ident (line 76) | pub fn is_valid_name_ident(s: &str) -> bool {
  function is_valid_package_ident (line 92) | pub fn is_valid_package_ident(s: &str) -> bool {
  function is_valid_container_ident (line 100) | pub fn is_valid_container_ident(s: &str) -> bool {
  function try_from_text_proto (line 104) | fn try_from_text_proto<T>(s: &str) -> Result<T>
  function verify_fields (line 127) | pub fn verify_fields(pdf: &ProtoFlagDeclaration) -> Result<()> {
  function try_from_text_proto (line 155) | pub fn try_from_text_proto(s: &str) -> Result<ProtoFlagDeclarations> {
  function verify_fields (line 162) | pub fn verify_fields(pdf: &ProtoFlagDeclarations) -> Result<()> {
  function verify_fields (line 189) | pub fn verify_fields(fv: &ProtoFlagValue) -> Result<()> {
  function try_from_text_proto (line 214) | pub fn try_from_text_proto(s: &str) -> Result<ProtoFlagValues> {
  function verify_fields (line 221) | pub fn verify_fields(pfv: &ProtoFlagValues) -> Result<()> {
  function parse_from_str (line 235) | pub fn parse_from_str(permission: &str) -> Result<ProtoFlagPermission> {
  function to_string (line 244) | pub fn to_string(permission: &ProtoFlagPermission) -> &str {
  function verify_fields (line 258) | pub fn verify_fields(tp: &ProtoTracepoint) -> Result<()> {
  function verify_fields (line 273) | pub fn verify_fields(pf: &ProtoParsedFlag) -> Result<()> {
  function path_to_declaration (line 329) | pub fn path_to_declaration(pf: &ProtoParsedFlag) -> &str {
  function try_from_binary_proto (line 342) | pub fn try_from_binary_proto(bytes: &[u8]) -> Result<ProtoParsedFlags> {
  function verify_fields (line 349) | pub fn verify_fields(pf: &ProtoParsedFlags) -> Result<()> {
  function merge (line 377) | pub fn merge(parsed_flags: Vec<ProtoParsedFlags>, dedup: bool) -> Result...
  function sort_parsed_flags (line 394) | pub fn sort_parsed_flags(pf: &mut ProtoParsedFlags) {
  function create_sorting_key (line 398) | fn create_sorting_key(pf: &ProtoParsedFlag) -> String {
  type ParsedFlagExt (line 404) | pub trait ParsedFlagExt {
    method fully_qualified_name (line 406) | fn fully_qualified_name(&self) -> String;
    method fully_qualified_name (line 410) | fn fully_qualified_name(&self) -> String {
  function test_flag_declarations_try_from_text_proto (line 420) | fn test_flag_declarations_try_from_text_proto() {
  function test_flag_values_try_from_text_proto (line 607) | fn test_flag_values_try_from_text_proto() {
  function try_from_binary_proto_from_text_proto (line 692) | fn try_from_binary_proto_from_text_proto(text_proto: &str) -> Result<Pro...
  function test_parsed_flags_try_from_text_proto (line 702) | fn test_parsed_flags_try_from_text_proto() {
  function test_parsed_flag_path_to_declaration (line 915) | fn test_parsed_flag_path_to_declaration() {
  function test_parsed_flags_merge (line 944) | fn test_parsed_flags_merge() {
  function test_is_valid_name_ident (line 1078) | fn test_is_valid_name_ident() {
  function test_is_valid_package_ident (line 1092) | fn test_is_valid_package_ident() {
  function test_is_valid_container_ident (line 1114) | fn test_is_valid_container_ident() {

FILE: tools/aconfig/aconfig_storage_file/aconfig_storage_file.cpp
  type aconfig_storage (line 8) | namespace aconfig_storage {
    function list_flags (line 10) | Result<std::vector<FlagValueSummary>> list_flags(
    function list_flags_with_info (line 33) | Result<std::vector<FlagValueAndInfoSummary>> list_flags_with_info(

FILE: tools/aconfig/aconfig_storage_file/build.rs
  function main (line 3) | fn main() {

FILE: tools/aconfig/aconfig_storage_file/include/aconfig_storage/aconfig_storage_file.hpp
  type aconfig_storage (line 7) | namespace aconfig_storage {
    type FlagValueSummary (line 10) | struct FlagValueSummary {
    type FlagValueAndInfoSummary (line 27) | struct FlagValueAndInfoSummary {

FILE: tools/aconfig/aconfig_storage_file/src/flag_info.rs
  type FlagInfoHeader (line 28) | pub struct FlagInfoHeader {
    method fmt (line 39) | fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
    method into_bytes (line 59) | pub fn into_bytes(&self) -> Vec<u8> {
    method from_bytes (line 73) | pub fn from_bytes(bytes: &[u8]) -> Result<Self, AconfigStorageError> {
  type FlagInfoBit (line 94) | pub enum FlagInfoBit {
  type FlagInfoNode (line 102) | pub struct FlagInfoNode {
    method fmt (line 108) | fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
    method into_bytes (line 122) | pub fn into_bytes(&self) -> Vec<u8> {
    method from_bytes (line 129) | pub fn from_bytes(bytes: &[u8]) -> Result<Self, AconfigStorageError> {
    method create (line 136) | pub fn create(is_flag_rw: bool) -> Self {
  type FlagInfoList (line 143) | pub struct FlagInfoList {
    method fmt (line 150) | fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
    method into_bytes (line 163) | pub fn into_bytes(&self) -> Vec<u8> {
    method from_bytes (line 172) | pub fn from_bytes(bytes: &[u8]) -> Result<Self, AconfigStorageError> {
  function test_serialization (line 203) | fn test_serialization() {
  function test_version_number (line 229) | fn test_version_number() {
  function test_file_type_check (line 239) | fn test_file_type_check() {

FILE: tools/aconfig/aconfig_storage_file/src/flag_table.rs
  type FlagTableHeader (line 31) | pub struct FlagTableHeader {
    method fmt (line 43) | fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
    method into_bytes (line 63) | pub fn into_bytes(&self) -> Vec<u8> {
    method from_bytes (line 78) | pub fn from_bytes(bytes: &[u8]) -> Result<Self, AconfigStorageError> {
  type FlagTableNode (line 100) | pub struct FlagTableNode {
    method fmt (line 111) | fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
    method into_bytes (line 123) | pub fn into_bytes(&self) -> Vec<u8> {
    method from_bytes (line 136) | pub fn from_bytes(bytes: &[u8]) -> Result<Self, AconfigStorageError> {
    method find_bucket_index (line 152) | pub fn find_bucket_index(package_id: u32, flag_name: &str, num_buckets...
  type FlagTable (line 159) | pub struct FlagTable {
    method fmt (line 167) | fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
    method into_bytes (line 183) | pub fn into_bytes(&self) -> Vec<u8> {
    method from_bytes (line 193) | pub fn from_bytes(bytes: &[u8]) -> Result<Self, AconfigStorageError> {
  function test_serialization (line 229) | fn test_serialization() {
  function test_version_number (line 255) | fn test_version_number() {
  function test_file_type_check (line 265) | fn test_file_type_check() {

FILE: tools/aconfig/aconfig_storage_file/src/flag_value.rs
  type FlagValueHeader (line 28) | pub struct FlagValueHeader {
    method fmt (line 39) | fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
    method into_bytes (line 59) | pub fn into_bytes(&self) -> Vec<u8> {
    method from_bytes (line 73) | pub fn from_bytes(bytes: &[u8]) -> Result<Self, AconfigStorageError> {
  type FlagValueList (line 94) | pub struct FlagValueList {
    method fmt (line 101) | fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
    method into_bytes (line 112) | pub fn into_bytes(&self) -> Vec<u8> {
    method from_bytes (line 121) | pub fn from_bytes(bytes: &[u8]) -> Result<Self, AconfigStorageError> {
  function test_serialization (line 141) | fn test_serialization() {
  function test_version_number (line 161) | fn test_version_number() {
  function test_file_type_check (line 171) | fn test_file_type_check() {

FILE: tools/aconfig/aconfig_storage_file/src/lib.rs
  constant MAX_SUPPORTED_FILE_VERSION (line 62) | pub const MAX_SUPPORTED_FILE_VERSION: u32 = 2;
  constant DEFAULT_FILE_VERSION (line 66) | pub const DEFAULT_FILE_VERSION: u32 = 1;
  constant HASH_PRIMES (line 69) | pub(crate) const HASH_PRIMES: [u32; 29] = [
  type StorageFileType (line 77) | pub enum StorageFileType {
    type Error (line 85) | type Error = anyhow::Error;
    method try_from (line 87) | fn try_from(value: &str) -> std::result::Result<Self, Self::Error> {
    type Error (line 101) | type Error = anyhow::Error;
    method try_from (line 103) | fn try_from(value: u8) -> Result<Self, Self::Error> {
  type StoredFlagType (line 117) | pub enum StoredFlagType {
    type Error (line 124) | type Error = AconfigStorageError;
    method try_from (line 126) | fn try_from(value: u16) -> Result<Self, Self::Error> {
  type FlagValueType (line 139) | pub enum FlagValueType {
    type Error (line 144) | type Error = AconfigStorageError;
    method try_from (line 146) | fn try_from(value: StoredFlagType) -> Result<Self, Self::Error> {
    type Error (line 156) | type Error = AconfigStorageError;
    method try_from (line 158) | fn try_from(value: u16) -> Result<Self, Self::Error> {
  type AconfigStorageError (line 169) | pub enum AconfigStorageError {
  function get_table_size (line 212) | pub fn get_table_size(entries: u32) -> Result<u32, AconfigStorageError> {
  function get_bucket_index (line 221) | pub(crate) fn get_bucket_index(val: &[u8], num_buckets: u32) -> u32 {
  function read_u8_from_bytes (line 230) | pub fn read_u8_from_bytes(buf: &[u8], head: &mut usize) -> Result<u8, Ac...
  function read_u16_from_bytes (line 240) | pub(crate) fn read_u16_from_bytes(
  function read_u32_from_start_of_bytes (line 253) | pub fn read_u32_from_start_of_bytes(buf: &[u8]) -> Result<u32, AconfigSt...
  function read_u32_from_bytes (line 258) | pub fn read_u32_from_bytes(buf: &[u8], head: &mut usize) -> Result<u32, ...
  function read_u64_from_bytes (line 268) | pub fn read_u64_from_bytes(buf: &[u8], head: &mut usize) -> Result<u64, ...
  function read_str_from_bytes (line 278) | pub(crate) fn read_str_from_bytes(
  function read_file_to_bytes (line 290) | pub fn read_file_to_bytes(file_path: &str) -> Result<Vec<u8>, AconfigSto...
  type FlagValueSummary (line 307) | pub struct FlagValueSummary {
  function list_flags (line 315) | pub fn list_flags(
  type FlagValueAndInfoSummary (line 351) | pub struct FlagValueAndInfoSummary {
  function list_flags_with_info (line 362) | pub fn list_flags_with_info(
  type FlagValueSummaryCXX (line 410) | pub struct FlagValueSummaryCXX {
  type FlagValueAndInfoSummaryCXX (line 418) | pub struct FlagValueAndInfoSummaryCXX {
  type ListFlagValueResultCXX (line 429) | pub struct ListFlagValueResultCXX {
  type ListFlagValueAndInfoResultCXX (line 436) | pub struct ListFlagValueAndInfoResultCXX {
  function list_flags_cxx (line 444) | pub fn list_flags_cxx(
  function list_flags_with_info_cxx (line 450) | pub fn list_flags_with_info_cxx(
  function new (line 461) | pub(crate) fn new(summary: FlagValueSummary) -> Self {
  function new (line 473) | pub(crate) fn new(summary: FlagValueAndInfoSummary) -> Self {
  function list_flags_cxx (line 487) | pub fn list_flags_cxx(
  function list_flags_with_info_cxx (line 507) | pub fn list_flags_with_info_cxx(
  function test_list_flag (line 537) | fn test_list_flag() {
  function test_list_flag_with_info (line 610) | fn test_list_flag_with_info() {

FILE: tools/aconfig/aconfig_storage_file/src/main.rs
  function cli (line 46) | fn cli() -> Command {
  function print_storage_file (line 96) | fn print_storage_file(
  function to_print_format (line 123) | fn to_print_format<T>(file_contents: T, as_json: bool) -> String
  function main (line 134) | fn main() -> Result<(), AconfigStorageError> {

FILE: tools/aconfig/aconfig_storage_file/src/package_table.rs
  type PackageTableHeader (line 31) | pub struct PackageTableHeader {
    method fmt (line 43) | fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
    method into_bytes (line 63) | pub fn into_bytes(&self) -> Vec<u8> {
    method from_bytes (line 78) | pub fn from_bytes(bytes: &[u8]) -> Result<Self, AconfigStorageError> {
  type PackageTableNode (line 100) | pub struct PackageTableNode {
    method fmt (line 112) | fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
    method into_bytes (line 128) | pub fn into_bytes(&self, version: u32) -> Vec<u8> {
    method into_bytes_v1 (line 137) | fn into_bytes_v1(&self) -> Vec<u8> {
    method into_bytes_v2 (line 148) | fn into_bytes_v2(&self) -> Vec<u8> {
    method from_bytes (line 161) | pub fn from_bytes(bytes: &[u8], version: u32) -> Result<Self, AconfigS...
    method from_bytes_v1 (line 174) | fn from_bytes_v1(bytes: &[u8]) -> Result<Self, AconfigStorageError> {
    method from_bytes_v2 (line 190) | fn from_bytes_v2(bytes: &[u8]) -> Result<Self, AconfigStorageError> {
    method find_bucket_index (line 208) | pub fn find_bucket_index(package: &str, num_buckets: u32) -> u32 {
  type PackageTable (line 215) | pub struct PackageTable {
    method fmt (line 223) | fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
    method into_bytes (line 238) | pub fn into_bytes(&self) -> Vec<u8> {
    method from_bytes (line 252) | pub fn from_bytes(bytes: &[u8]) -> Result<Self, AconfigStorageError> {
  function test_serialization (line 290) | fn test_serialization() {
  function test_version_number (line 317) | fn test_version_number() {
  function test_round_trip_default (line 325) | fn test_round_trip_default() {
  function test_round_trip_max (line 335) | fn test_round_trip_max() {
  function test_file_type_check (line 346) | fn test_file_type_check() {

FILE: tools/aconfig/aconfig_storage_file/src/protos.rs
  function try_from_binary_proto (line 60) | pub fn try_from_binary_proto(bytes: &[u8]) -> Result<ProtoStorageFiles> {
  function verify_fields (line 66) | pub fn verify_fields(storage_files: &ProtoStorageFiles) -> Result<()> {
  function get_binary_proto_from_text_proto (line 87) | pub fn get_binary_proto_from_text_proto(text_proto: &str) -> Result<Vec<...
  function write_proto_to_temp_file (line 94) | pub fn write_proto_to_temp_file(text_proto: &str) -> Result<NamedTempFil...
  function test_parse_storage_record_pb (line 107) | fn test_parse_storage_record_pb() {
  function test_parse_invalid_storage_record_pb (line 147) | fn test_parse_invalid_storage_record_pb() {

FILE: tools/aconfig/aconfig_storage_file/src/sip_hasher13.rs
  type SipHasher13 (line 29) | pub struct SipHasher13 {
    method new (line 118) | pub fn new() -> SipHasher13 {
    method new_with_keys (line 124) | pub fn new_with_keys(key0: u64, key1: u64) -> SipHasher13 {
    method c_rounds (line 138) | fn c_rounds(state: &mut State) {
    method d_rounds (line 143) | fn d_rounds(state: &mut State) {
    method reset (line 150) | fn reset(&mut self) {
    method short_write (line 165) | fn short_write(&mut self, msg: &[u8]) {
  type State (line 40) | struct State {
  function u8to64_le (line 95) | unsafe fn u8to64_le(buf: &[u8], start: usize, len: usize) -> u64 {
  method write_usize (line 198) | fn write_usize(&mut self, i: usize) {
  method write_u8 (line 208) | fn write_u8(&mut self, i: u8) {
  method write (line 213) | fn write(&mut self, msg: &[u8]) {
  method finish (line 259) | fn finish(&self) -> u64 {
  function test_sip_hash13_string_hash (line 284) | fn test_sip_hash13_string_hash() {
  function test_sip_hash13_write (line 296) | fn test_sip_hash13_write() {
  function test_sip_hash13_write_short (line 322) | fn test_sip_hash13_write_short() {

FILE: tools/aconfig/aconfig_storage_file/src/test_utils.rs
  function create_test_package_table (line 27) | pub fn create_test_package_table(version: u32) -> PackageTable {
  method new_expected (line 89) | fn new_expected(
  function create_test_flag_table (line 106) | pub fn create_test_flag_table(version: u32) -> FlagTable {
  function create_test_flag_value_list (line 148) | pub fn create_test_flag_value_list(version: u32) -> FlagValueList {
  function create_test_flag_info_list (line 161) | pub fn create_test_flag_info_list(version: u32) -> FlagInfoList {
  function write_bytes_to_temp_file (line 175) | pub fn write_bytes_to_temp_file(bytes: &[u8]) -> Result<NamedTempFile, A...

FILE: tools/aconfig/aconfig_storage_file/srcs/android/aconfig/storage/AconfigStorageException.java
  class AconfigStorageException (line 25) | public class AconfigStorageException extends RuntimeException {
    method AconfigStorageException (line 52) | public AconfigStorageException(String msg) {
    method AconfigStorageException (line 64) | public AconfigStorageException(String msg, Throwable cause) {
    method AconfigStorageException (line 76) | public AconfigStorageException(int errorCode, String msg) {
    method AconfigStorageException (line 89) | public AconfigStorageException(int errorCode, String msg, Throwable ca...
    method getErrorCode (line 99) | public int getErrorCode() {
    method getMessage (line 109) | @Override
    method errorString (line 119) | private String errorString() {

FILE: tools/aconfig/aconfig_storage_file/srcs/android/aconfig/storage/ByteBufferReader.java
  class ByteBufferReader (line 24) | public class ByteBufferReader {
    method ByteBufferReader (line 29) | public ByteBufferReader(ByteBuffer byteBuffer) {
    method readByte (line 34) | public int readByte() {
    method readShort (line 38) | public int readShort() {
    method readInt (line 42) | public int readInt() {
    method readLong (line 46) | public long readLong() {
    method readString (line 50) | public String readString() {
    method readByte (line 61) | public int readByte(int i) {
    method position (line 65) | public void position(int newPosition) {
    method position (line 69) | public int position() {
    method nextGetIndex (line 73) | private int nextGetIndex(int nb) {
    method getArray (line 79) | private void getArray(int index, byte[] dst, int offset, int length) {

FILE: tools/aconfig/aconfig_storage_file/srcs/android/aconfig/storage/FileType.java
  type FileType (line 19) | public enum FileType {
    method FileType (line 27) | FileType(int type) {
    method fromInt (line 31) | public static FileType fromInt(int index) {
    method toString (line 46) | @Override

FILE: tools/aconfig/aconfig_storage_file/srcs/android/aconfig/storage/FlagTable.java
  class FlagTable (line 24) | public class FlagTable {
    method fromBytes (line 29) | public static FlagTable fromBytes(ByteBuffer bytes) {
    method get (line 37) | public Node get(int packageId, String flagName) {
    method getHeader (line 63) | public Header getHeader() {
    method makeKey (line 67) | private static byte[] makeKey(int packageId, String flagName) {
    class Header (line 72) | public static class Header {
      method fromBytes (line 82) | public static Header fromBytes(ByteBufferReader reader) {
      method getVersion (line 99) | public int getVersion() {
      method getContainer (line 103) | public String getContainer() {
      method getFileType (line 107) | public FileType getFileType() {
      method getFileSize (line 111) | public int getFileSize() {
      method getNumFlags (line 115) | public int getNumFlags() {
      method getBucketOffset (line 119) | public int getBucketOffset() {
      method getNodeOffset (line 123) | public int getNodeOffset() {
    class Node (line 128) | public static class Node {
      method fromBytes (line 136) | public static Node fromBytes(ByteBufferReader reader) {
      method hashCode (line 147) | @Override
      method equals (line 152) | @Override
      method getFlagName (line 170) | public String getFlagName() {
      method getFlagType (line 174) | public FlagType getFlagType() {
      method getPackageId (line 178) | public int getPackageId() {
      method getFlagIndex (line 182) | public int getFlagIndex() {
      method getNextOffset (line 186) | public int getNextOffset() {

FILE: tools/aconfig/aconfig_storage_file/srcs/android/aconfig/storage/FlagType.java
  type FlagType (line 19) | public enum FlagType {
    method FlagType (line 26) | FlagType(int type) {
    method fromInt (line 30) | public static FlagType fromInt(int index) {

FILE: tools/aconfig/aconfig_storage_file/srcs/android/aconfig/storage/FlagValueList.java
  class FlagValueList (line 21) | public class FlagValueList {
    method fromBytes (line 26) | public static FlagValueList fromBytes(ByteBuffer bytes) {
    method getBoolean (line 33) | public boolean getBoolean(int index) {
    method getHeader (line 37) | public Header getHeader() {
    method size (line 41) | public int size() {
    class Header (line 45) | public static class Header {
      method fromBytes (line 54) | public static Header fromBytes(ByteBufferReader reader) {
      method getVersion (line 70) | public int getVersion() {
      method getContainer (line 74) | public String getContainer() {
      method getFileType (line 78) | public FileType getFileType() {
      method getFileSize (line 82) | public int getFileSize() {
      method getNumFlags (line 86) | public int getNumFlags() {
      method getBooleanValueOffset (line 90) | public int getBooleanValueOffset() {

FILE: tools/aconfig/aconfig_storage_file/srcs/android/aconfig/storage/PackageTable.java
  class PackageTable (line 26) | public class PackageTable {
    method fromBytes (line 35) | public static PackageTable fromBytes(ByteBuffer bytes) {
    method get (line 43) | public Node get(String packageName) {
    method getPackageList (line 70) | public List<String> getPackageList() {
    method getHeader (line 83) | public Header getHeader() {
    class Header (line 87) | public static class Header {
      method fromBytes (line 97) | private static Header fromBytes(ByteBufferReader reader) {
      method getVersion (line 114) | public int getVersion() {
      method getContainer (line 118) | public String getContainer() {
      method getFileType (line 122) | public FileType getFileType() {
      method getFileSize (line 126) | public int getFileSize() {
      method getNumPackages (line 130) | public int getNumPackages() {
      method getBucketOffset (line 134) | public int getBucketOffset() {
      method getNodeOffset (line 138) | public int getNodeOffset() {
    class Node (line 143) | public static class Node {
      method fromBytes (line 152) | private static Node fromBytes(ByteBufferReader reader, int version) {
      method fromBytesV1 (line 164) | private static Node fromBytesV1(ByteBufferReader reader) {
      method fromBytesV2 (line 174) | private static Node fromBytesV2(ByteBufferReader reader) {
      method hashCode (line 186) | @Override
      method equals (line 191) | @Override
      method getPackageName (line 208) | public String getPackageName() {
      method getPackageId (line 212) | public int getPackageId() {
      method getPackageFingerprint (line 216) | public long getPackageFingerprint() {
      method getBooleanStartIndex (line 220) | public int getBooleanStartIndex() {
      method getNextOffset (line 224) | public int getNextOffset() {
      method hasPackageFingerprint (line 228) | public boolean hasPackageFingerprint() {

FILE: tools/aconfig/aconfig_storage_file/srcs/android/aconfig/storage/SipHasher13.java
  class SipHasher13 (line 19) | public class SipHasher13 {
    class State (line 20) | static class State {
      method State (line 26) | public State(long k0, long k1) {
      method compress (line 33) | public void compress(long m) {
      method finish (line 39) | public long finish() {
      method cRounds (line 45) | private void cRounds() {
      method dRounds (line 62) | private void dRounds() {
    method hash (line 82) | public static long hash(byte[] data) {
    method loadLe (line 108) | private static long loadLe(byte[] data, int offset, int size) {

FILE: tools/aconfig/aconfig_storage_file/srcs/android/aconfig/storage/StorageFileProvider.java
  class StorageFileProvider (line 35) | public class StorageFileProvider {
    method getDefaultProvider (line 49) | public static StorageFileProvider getDefaultProvider() {
    method StorageFileProvider (line 54) | public StorageFileProvider(String mapPath, String bootPath) {
    method listContainers (line 60) | public List<String> listContainers(String[] excludes) {
    method getPackageTable (line 86) | public PackageTable getPackageTable(String container) {
    method getFlagTable (line 93) | public FlagTable getFlagTable(String container) {
    method getFlagValueList (line 99) | public FlagValueList getFlagValueList(String container) {
    method mapStorageFile (line 105) | private static MappedByteBuffer mapStorageFile(Path file, FileType typ...
    method quietlyDispose (line 120) | private static void quietlyDispose(Closeable closable) {

FILE: tools/aconfig/aconfig_storage_file/srcs/android/aconfig/storage/TableUtils.java
  class TableUtils (line 19) | public class TableUtils {
    method getTableSize (line 54) | public static int getTableSize(int numEntries) {
    method getBucketIndex (line 62) | public static int getBucketIndex(byte[] val, int numBuckets) {
    class StorageFilesBundle (line 67) | public static class StorageFilesBundle {
      method StorageFilesBundle (line 72) | public StorageFilesBundle (PackageTable pTable, FlagTable fTable, Fl...

FILE: tools/aconfig/aconfig_storage_file/tests/srcs/ByteBufferReaderTest.java
  class ByteBufferReaderTest (line 31) | @RunWith(JUnit4.class)
    method testReadByte (line 34) | @Test
    method testReadShort (line 44) | @Test
    method testReadInt (line 55) | @Test
    method testReadString (line 66) | @Test

FILE: tools/aconfig/aconfig_storage_file/tests/srcs/FlagTableTest.java
  class FlagTableTest (line 32) | @RunWith(JUnit4.class)
    method testFlagTable_rightHeader (line 35) | @Test
    method testFlagTable_rightNode (line 48) | @Test
    method testFlagTable_multithreadsRead (line 107) | @Test

FILE: tools/aconfig/aconfig_storage_file/tests/srcs/FlagValueListTest.java
  class FlagValueListTest (line 34) | @RunWith(JUnit4.class)
    method testFlagValueList_rightHeader (line 37) | @Test
    method testFlagValueList_rightNode (line 50) | @Test
    method testFlagValueList_getValue (line 63) | @Test
    method testFlagValueList_multithreadsRead (line 81) | @Test

FILE: tools/aconfig/aconfig_storage_file/tests/srcs/PackageTableTest.java
  class PackageTableTest (line 35) | @RunWith(JUnit4.class)
    method testPackageTable_rightHeader (line 38) | @Test
    method testPackageTable_rightHeader_v2 (line 52) | @Test
    method testPackageTable_rightNode (line 66) | @Test
    method testPackageTable_rightNode_v2 (line 96) | @Test
    method testPackageTable_getPackageList (line 130) | @Test
    method testPackageTable_multithreadsRead (line 148) | @Test

FILE: tools/aconfig/aconfig_storage_file/tests/srcs/SipHasher13Test.java
  class SipHasher13Test (line 28) | @RunWith(JUnit4.class)
    method testSipHash_hashString (line 30) | @Test

FILE: tools/aconfig/aconfig_storage_file/tests/srcs/StorageFileProviderTest.java
  class StorageFileProviderTest (line 35) | @RunWith(JUnit4.class)
    method testlistContainers (line 38) | @Test
    method testLoadFiles (line 55) | @Test

FILE: tools/aconfig/aconfig_storage_file/tests/srcs/TestDataUtils.java
  class TestDataUtils (line 23) | public final class TestDataUtils {
    method getTestPackageMapByteBuffer (line 31) | public static ByteBuffer getTestPackageMapByteBuffer(int version) thro...
    method getTestFlagMapByteBuffer (line 35) | public static ByteBuffer getTestFlagMapByteBuffer(int version) throws ...
    method getTestFlagValByteBuffer (line 39) | public static ByteBuffer getTestFlagValByteBuffer(int version) throws ...
    method getTestFlagInfoByteBuffer (line 43) | public static ByteBuffer getTestFlagInfoByteBuffer(int version) throws...
    method readFile (line 47) | private static ByteBuffer readFile(String fileName) throws Exception {

FILE: tools/aconfig/aconfig_storage_file/tests/storage_file_test.cpp
  function verify_value (line 27) | void verify_value(const FlagValueSummary& flag, const std::string& packa...
  function verify_value_info (line 36) | void verify_value_info(const FlagValueAndInfoSummary& flag,
  function get_flag_list_result (line 51) | Result<std::vector<FlagValueSummary>> get_flag_list_result(
  function get_flag_list_result_with_info (line 61) | Result<std::vector<FlagValueAndInfoSummary>> get_flag_list_result_with_i...
  function TEST (line 73) | TEST(AconfigStorageFileTest, test_list_flag) {
  function TEST (line 98) | TEST(AconfigStorageFileTest, test_list_flag_v2) {
  function TEST (line 122) | TEST(AconfigStorageFileTest, test_list_flag_with_info) {
  function TEST (line 154) | TEST(AconfigStorageFileTest, test_list_flag_with_info_v2) {

FILE: tools/aconfig/aconfig_storage_read_api/aconfig_storage_read_api.cpp
  type aconfig_storage (line 12) | namespace aconfig_storage {
    function find_storage_file (line 23) | static Result<std::string> find_storage_file(
    type private_internal_api (line 43) | namespace private_internal_api {
      function get_mapped_file_impl (line 46) | Result<MappedStorageFile*> get_mapped_file_impl(
    function map_storage_file (line 62) | Result<MappedStorageFile*> map_storage_file(std::string const& file) {
    function map_to_flag_value_type (line 93) | Result<FlagValueType> map_to_flag_value_type(
    function get_mapped_file (line 108) | Result<MappedStorageFile*> get_mapped_file(
    function get_storage_file_version (line 116) | Result<uint32_t> get_storage_file_version(
    function get_package_read_context (line 130) | Result<PackageReadContext> get_package_read_context(
    function get_flag_read_context (line 150) | Result<FlagReadContext> get_flag_read_context(
    function get_boolean_flag_value (line 171) | Result<bool> get_boolean_flag_value(
    function get_flag_attribute (line 187) | Result<uint8_t> get_flag_attribute(

FILE: tools/aconfig/aconfig_storage_read_api/build.rs
  function main (line 1) | fn main() {

FILE: tools/aconfig/aconfig_storage_read_api/include/aconfig_storage/aconfig_storage_read_api.hpp
  type aconfig_storage (line 7) | namespace aconfig_storage {
    type StorageFileType (line 11) | enum StorageFileType {
    type StoredFlagType (line 20) | enum StoredFlagType {
    type FlagValueType (line 28) | enum FlagValueType {
    type FlagInfoBit (line 34) | enum FlagInfoBit {
    type MappedStorageFile (line 41) | struct MappedStorageFile {
    type PackageReadContext (line 48) | struct PackageReadContext {
    type FlagReadContext (line 55) | struct FlagReadContext {
    class Result (line 63) | class Result {
      method Result (line 66) | Result()
      method Result (line 72) | Result(T const& value)
      method ok (line 78) | bool ok() {
      method T (line 82) | T& operator*() {
      method T (line 87) | T* operator->() {
    type private_internal_api (line 103) | namespace private_internal_api {

FILE: tools/aconfig/aconfig_storage_read_api/src/flag_info_query.rs
  function find_flag_attribute (line 26) | pub fn find_flag_attribute(
  function test_is_flag_sticky (line 64) | fn test_is_flag_sticky() {
  function test_is_flag_readwrite (line 75) | fn test_is_flag_readwrite() {
  function test_flag_has_override (line 90) | fn test_flag_has_override() {
  function test_boolean_out_of_range (line 101) | fn test_boolean_out_of_range() {
  function test_higher_version_storage_file (line 113) | fn test_higher_version_storage_file() {

FILE: tools/aconfig/aconfig_storage_read_api/src/flag_table_query.rs
  type FlagReadContext (line 28) | pub struct FlagReadContext {
  function find_flag_read_context (line 34) | pub fn find_flag_read_context(
  function test_flag_query (line 81) | fn test_flag_query() {
  function test_not_existed_flag_query (line 103) | fn test_not_existed_flag_query() {
  function test_higher_version_storage_file (line 113) | fn test_higher_version_storage_file() {

FILE: tools/aconfig/aconfig_storage_read_api/src/flag_value_query.rs
  function find_boolean_flag_value (line 26) | pub fn find_boolean_flag_value(buf: &[u8], flag_index: u32) -> Result<bo...
  function test_flag_value_query (line 55) | fn test_flag_value_query() {
  function test_boolean_out_of_range (line 66) | fn test_boolean_out_of_range() {
  function test_higher_version_storage_file (line 77) | fn test_higher_version_storage_file() {

FILE: tools/aconfig/aconfig_storage_read_api/src/lib.rs
  constant STORAGE_LOCATION (line 62) | pub const STORAGE_LOCATION: &str = "/metadata/aconfig";
  function get_mapped_storage_file (line 75) | pub unsafe fn get_mapped_storage_file(
  function get_package_read_context (line 91) | pub fn get_package_read_context(
  function get_flag_read_context (line 108) | pub fn get_flag_read_context(
  function get_boolean_flag_value (line 124) | pub fn get_boolean_flag_value(file: &[u8], index: u32) -> Result<bool, A...
  function get_storage_file_version (line 134) | pub fn get_storage_file_version(file_path: &str) -> Result<u32, AconfigS...
  function get_flag_attribute (line 159) | pub fn get_flag_attribute(
  type VersionNumberQueryCXX (line 175) | pub struct VersionNumberQueryCXX {
  type PackageReadContextQueryCXX (line 182) | pub struct PackageReadContextQueryCXX {
  type FlagReadContextQueryCXX (line 191) | pub struct FlagReadContextQueryCXX {
  type BooleanFlagValueQueryCXX (line 200) | pub struct BooleanFlagValueQueryCXX {
  type FlagAttributeQueryCXX (line 207) | pub struct FlagAttributeQueryCXX {
  function get_storage_file_version_cxx (line 215) | pub fn get_storage_file_version_cxx(file_path: &str) -> VersionNumberQue...
  function get_package_read_context_cxx (line 217) | pub fn get_package_read_context_cxx(
  function get_flag_read_context_cxx (line 222) | pub fn get_flag_read_context_cxx(
  function get_boolean_flag_value_cxx (line 228) | pub fn get_boolean_flag_value_cxx(file: &[u8], offset: u32) -> BooleanFl...
  function get_flag_attribute_cxx (line 230) | pub fn get_flag_attribute_cxx(
  function new (line 240) | pub(crate) fn new(
  function new (line 273) | pub(crate) fn new(offset_result: Result<Option<FlagReadContext>, Aconfig...
  function new (line 304) | pub(crate) fn new(value_result: Result<bool, AconfigStorageError>) -> Se...
  function new (line 320) | pub(crate) fn new(info_result: Result<u8, AconfigStorageError>) -> Self {
  function new (line 337) | pub(crate) fn new(version_result: Result<u32, AconfigStorageError>) -> S...
  function get_package_read_context_cxx (line 354) | pub fn get_package_read_context_cxx(file: &[u8], package: &str) -> ffi::...
  function get_flag_read_context_cxx (line 359) | pub fn get_flag_read_context_cxx(
  function get_boolean_flag_value_cxx (line 368) | pub fn get_boolean_flag_value_cxx(file: &[u8], offset: u32) -> ffi::Bool...
  function get_flag_attribute_cxx (line 373) | pub fn get_flag_attribute_cxx(
  function get_storage_file_version_cxx (line 387) | pub fn get_storage_file_version_cxx(file_path: &str) -> ffi::VersionNumb...
  function create_test_storage_files (line 399) | fn create_test_storage_files() -> String {
  function test_package_context_query (line 426) | fn test_package_context_query() {
  function test_flag_context_query (line 459) | fn test_flag_context_query() {
  function test_flag_value_query (line 484) | fn test_flag_value_query() {
  function test_flag_info_query (line 497) | fn test_flag_info_query() {
  function test_storage_version_query (line 513) | fn test_storage_version_query() {

FILE: tools/aconfig/aconfig_storage_read_api/src/mapped_file.rs
  function map_file (line 31) | pub unsafe fn map_file(file_path: &str) -> Result<Mmap, AconfigStorageEr...
  function get_mapped_file (line 49) | pub unsafe fn get_mapped_file(
  function map_and_verify (line 75) | fn map_and_verify(storage_dir: &str, file_type: StorageFileType, actual_...
  function create_test_storage_files (line 83) | fn create_test_storage_files() -> String {
  function test_mapped_file_contents (line 109) | fn test_mapped_file_contents() {

FILE: tools/aconfig/aconfig_storage_read_api/src/package_table_query.rs
  type PackageReadContext (line 28) | pub struct PackageReadContext {
  function find_package_read_context (line 35) | pub fn find_package_read_context(
  function test_package_query (line 83) | fn test_package_query() {
  function test_package_query_v2 (line 110) | fn test_package_query_v2() {
  function test_not_existed_package_query (line 146) | fn test_not_existed_package_query() {
  function test_higher_version_storage_file (line 162) | fn test_higher_version_storage_file() {

FILE: tools/aconfig/aconfig_storage_read_api/srcs/android/aconfig/storage/AconfigStorageReadAPI.java
  class AconfigStorageReadAPI (line 28) | public class AconfigStorageReadAPI {
    type StorageFileType (line 34) | public enum StorageFileType {
    method mapStorageFile (line 42) | public static MappedByteBuffer mapStorageFile(String file) throws IOEx...
    method getMappedFile (line 49) | public static MappedByteBuffer getMappedFile(String container, Storage...
    method getPackageReadContextImpl (line 69) | @FastNative
    method getPackageReadContext (line 77) | public static PackageReadContext getPackageReadContext(
    method getFlagReadContextImpl (line 90) | @FastNative
    method getFlagReadContext (line 100) | public static FlagReadContext getFlagReadContext(
    method getBooleanFlagValue (line 112) | @FastNative
    method hash (line 116) | @FastNative

FILE: tools/aconfig/aconfig_storage_read_api/srcs/android/aconfig/storage/FlagReadContext.java
  class FlagReadContext (line 18) | public class FlagReadContext {
    method FlagReadContext (line 22) | public FlagReadContext(int flagType,
    type StoredFlagType (line 29) | public enum StoredFlagType {
      method fromInteger (line 34) | public static StoredFlagType fromInteger(int x) {

FILE: tools/aconfig/aconfig_storage_read_api/srcs/android/aconfig/storage/PackageReadContext.java
  class PackageReadContext (line 18) | public class PackageReadContext {
    method PackageReadContext (line 22) | public PackageReadContext(int packageId,

FILE: tools/aconfig/aconfig_storage_read_api/srcs/android/os/flagging/PlatformAconfigPackage.java
  class PlatformAconfigPackage (line 49) | public class PlatformAconfigPackage {
    method PlatformAconfigPackage (line 60) | private PlatformAconfigPackage() {}
    method load (line 107) | @UnsupportedAppUsage
    method getBooleanFlagValue (line 144) | @UnsupportedAppUsage
    method mapStorageFile (line 154) | private static MappedByteBuffer mapStorageFile(String file) {
    method quietlyDispose (line 169) | private static void quietlyDispose(Closeable closable) {

FILE: tools/aconfig/aconfig_storage_read_api/srcs/android/os/flagging/PlatformAconfigPackageInternal.java
  class PlatformAconfigPackageInternal (line 41) | public class PlatformAconfigPackageInternal {
    method PlatformAconfigPackageInternal (line 46) | private PlatformAconfigPackageInternal(
    method load (line 64) | @UnsupportedAppUsage
    method getBooleanFlagValue (line 97) | @UnsupportedAppUsage

FILE: tools/aconfig/aconfig_storage_read_api/srcs/lib.rs
  function get_package_read_context_java (line 16) | fn get_package_read_context_java(
  function Java_android_aconfig_storage_AconfigStorageReadAPI_getPackageReadContextImpl (line 36) | pub extern "system" fn Java_android_aconfig_storage_AconfigStorageReadAP...
  function get_flag_read_context_java (line 72) | fn get_flag_read_context_java(
  function Java_android_aconfig_storage_AconfigStorageReadAPI_getFlagReadContextImpl (line 93) | pub extern "system" fn Java_android_aconfig_storage_AconfigStorageReadAP...
  function get_boolean_flag_value_java (line 130) | fn get_boolean_flag_value_java(
  function Java_android_aconfig_storage_AconfigStorageReadAPI_getBooleanFlagValue (line 147) | pub extern "system" fn Java_android_aconfig_storage_AconfigStorageReadAP...
  function Java_android_aconfig_storage_AconfigStorageReadAPI_hash (line 167) | pub extern "system" fn Java_android_aconfig_storage_AconfigStorageReadAP...
  function siphasher13_hash (line 181) | fn siphasher13_hash(env: &mut JNIEnv, package_name: JString) -> Result<u...

FILE: tools/aconfig/aconfig_storage_read_api/tests/functional/srcs/AconfigStorageReadAPITest.java
  class AconfigStorageReadAPITest (line 39) | @RunWith(JUnit4.class)
    method testPackageContextQuery (line 44) | @Test
    method testNonExistPackageContextQuery (line 78) | @Test
    method testFlagContextQuery (line 99) | @Test
    method testNonExistFlagContextQuery (line 147) | @Test
    method testBooleanFlagValueQuery (line 171) | @Test
    method testInvalidBooleanFlagValueQuery (line 192) | @Test
    method testRustJavaEqualHash (line 211) | @Test

FILE: tools/aconfig/aconfig_storage_read_api/tests/functional/srcs/PlatformAconfigPackageInternalTest.java
  class PlatformAconfigPackageInternalTest (line 42) | @RunWith(JUnit4.class)
    method testPlatformAconfigPackageInternal_load (line 48) | @Test
    method testPlatformAconfigPackage_load_withError (line 85) | @Test

FILE: tools/aconfig/aconfig_storage_read_api/tests/functional/srcs/PlatformAconfigPackageTest.java
  class PlatformAconfigPackageTest (line 42) | @RunWith(JUnit4.class)
    method testPlatformAconfigPackage_StorageFilesCache (line 48) | @Test
    method testPlatformAconfigPackage_load (line 62) | @Test
    method testPlatformAconfigPackage_load_withError (line 99) | @Test

FILE: tools/aconfig/aconfig_storage_read_api/tests/storage_read_api_test.cpp
  class AconfigStorageTest (line 33) | class AconfigStorageTest : public ::testing::Test {
    method copy_file (line 35) | Result<void> copy_file(std::string const& src_file,
    method SetUp (line 47) | void SetUp() override {
    method TearDown (line 65) | void TearDown() override {
  function TEST_F (line 81) | TEST_F(AconfigStorageTest, test_storage_version_query) {
  function TEST_F (line 97) | TEST_F(AconfigStorageTest, test_none_exist_storage_file_mapping) {
  function TEST_F (line 107) | TEST_F(AconfigStorageTest, test_package_context_query) {
  function TEST_F (line 136) | TEST_F(AconfigStorageTest, test_none_existent_package_context_query) {
  function TEST_F (line 149) | TEST_F(AconfigStorageTest, test_flag_context_query) {
  function TEST_F (line 175) | TEST_F(AconfigStorageTest, test_none_existent_flag_context_query) {
  function TEST_F (line 191) | TEST_F(AconfigStorageTest, test_boolean_flag_value_query) {
  function TEST_F (line 207) | TEST_F(AconfigStorageTest, test_invalid_boolean_flag_value_query) {
  function TEST_F (line 220) | TEST_F(AconfigStorageTest, test_boolean_flag_info_query) {
  function TEST_F (line 239) | TEST_F(AconfigStorageTest, test_invalid_boolean_flag_info_query) {

FILE: tools/aconfig/aconfig_storage_read_api/tests/storage_read_api_test.rs
  function create_test_storage_files (line 12) | fn create_test_storage_files(version: u32) -> String {
  function test_unavailable_storage (line 38) | fn test_unavailable_storage() {
  function test_package_context_query (line 55) | fn test_package_context_query() {
  function test_package_context_query_with_fingerprint (line 89) | fn test_package_context_query_with_fingerprint() {
  function test_none_exist_package_context_query (line 132) | fn test_none_exist_package_context_query() {
  function test_flag_context_query (line 147) | fn test_flag_context_query() {
  function test_none_exist_flag_context_query (line 173) | fn test_none_exist_flag_context_query() {
  function test_boolean_flag_value_query (line 189) | fn test_boolean_flag_value_query() {
  function test_invalid_boolean_flag_value_query (line 203) | fn test_invalid_boolean_flag_value_query() {
  function test_flag_info_query (line 217) | fn test_flag_info_query() {
  function test_invalid_boolean_flag_info_query (line 234) | fn test_invalid_boolean_flag_info_query() {
  function test_storage_version_query_v1 (line 248) | fn test_storage_version_query_v1() {
  function test_storage_version_query_v2 (line 256) | fn test_storage_version_query_v2() {

FILE: tools/aconfig/aconfig_storage_write_api/aconfig_storage_write_api.cpp
  type aconfig_storage (line 14) | namespace aconfig_storage {
    function map_mutable_storage_file (line 17) | android::base::Result<MutableMappedStorageFile *> map_mutable_storage_...
    function set_boolean_flag_value (line 49) | android::base::Result<void> set_boolean_flag_value(
    function set_flag_has_server_override (line 66) | android::base::Result<void> set_flag_has_server_override(
    function set_flag_has_local_override (line 85) | android::base::Result<void> set_flag_has_local_override(

FILE: tools/aconfig/aconfig_storage_write_api/build.rs
  function main (line 1) | fn main() {

FILE: tools/aconfig/aconfig_storage_write_api/include/aconfig_storage/aconfig_storage_write_api.hpp
  type aconfig_storage (line 10) | namespace aconfig_storage {
    type MutableMappedStorageFile (line 13) | struct MutableMappedStorageFile : MappedStorageFile {}

FILE: tools/aconfig/aconfig_storage_write_api/src/flag_info_update.rs
  function get_flag_info_offset (line 25) | fn get_flag_info_offset(
  function get_flag_attribute_and_offset (line 53) | fn get_flag_attribute_and_offset(
  function update_flag_has_server_override (line 65) | pub fn update_flag_has_server_override(
  function update_flag_has_local_override (line 80) | pub fn update_flag_has_local_override(
  function test_update_flag_has_server_override (line 102) | fn test_update_flag_has_server_override() {
  function test_update_flag_has_local_override (line 117) | fn test_update_flag_has_local_override() {

FILE: tools/aconfig/aconfig_storage_write_api/src/flag_value_update.rs
  function update_boolean_flag_value (line 23) | pub fn update_boolean_flag_value(
  function test_boolean_flag_value_update (line 56) | fn test_boolean_flag_value_update() {
  function test_boolean_out_of_range (line 74) | fn test_boolean_out_of_range() {
  function test_higher_version_storage_file (line 85) | fn test_higher_version_storage_file() {

FILE: tools/aconfig/aconfig_storage_write_api/src/lib.rs
  function map_mutable_storage_file (line 42) | pub unsafe fn map_mutable_storage_file(file_path: &str) -> Result<MmapMu...
  function set_boolean_flag_value (line 53) | pub fn set_boolean_flag_value(
  function set_flag_has_server_override (line 71) | pub fn set_flag_has_server_override(
  function set_flag_has_local_override (line 90) | pub fn set_flag_has_local_override(
  type BooleanFlagValueUpdateCXX (line 110) | pub struct BooleanFlagValueUpdateCXX {
  type FlagHasServerOverrideUpdateCXX (line 117) | pub struct FlagHasServerOverrideUpdateCXX {
  type FlagHasLocalOverrideUpdateCXX (line 124) | pub struct FlagHasLocalOverrideUpdateCXX {
  function update_boolean_flag_value_cxx (line 132) | pub fn update_boolean_flag_value_cxx(
  function update_flag_has_server_override_cxx (line 138) | pub fn update_flag_has_server_override_cxx(
  function update_flag_has_local_override_cxx (line 145) | pub fn update_flag_has_local_override_cxx(
  function update_boolean_flag_value_cxx (line 154) | pub(crate) fn update_boolean_flag_value_cxx(
  function update_flag_has_server_override_cxx (line 173) | pub(crate) fn update_flag_has_server_override_cxx(
  function update_flag_has_local_override_cxx (line 204) | pub(crate) fn update_flag_has_local_override_cxx(
  function get_boolean_flag_value_at_offset (line 245) | fn get_boolean_flag_value_at_offset(file: &str, offset: u32) -> bool {
  function test_set_boolean_flag_value (line 253) | fn test_set_boolean_flag_value() {
  function get_flag_attribute_at_offset (line 274) | fn get_flag_attribute_at_offset(file: &str, value_type: FlagValueType, o...
  function test_set_flag_has_server_override (line 282) | fn test_set_flag_has_server_override() {
  function test_set_flag_has_local_override (line 305) | fn test_set_flag_has_local_override() {

FILE: tools/aconfig/aconfig_storage_write_api/src/mapped_file.rs
  function map_file (line 31) | pub(crate) unsafe fn map_file(file_path: &str) -> Result<MmapMut, Aconfi...
  function test_mapped_file_contents (line 58) | fn test_mapped_file_contents() {
  function test_mapped_read_only_file (line 86) | fn test_mapped_read_only_file() {

FILE: tools/aconfig/aconfig_storage_write_api/src/test_utils.rs
  function copy_to_temp_file (line 22) | pub(crate) fn copy_to_temp_file(source_file: &str, read_only: bool) -> R...

FILE: tools/aconfig/aconfig_storage_write_api/tests/storage_write_api_test.cpp
  class AconfigStorageTest (line 36) | class AconfigStorageTest : public ::testing::Test {
    method copy_to_rw_temp_file (line 38) | Result<std::string> copy_to_rw_temp_file(std::string const& source_fil...
    method SetUp (line 54) | void SetUp() override {
    method TearDown (line 60) | void TearDown() override {
  function TEST_F (line 70) | TEST_F(AconfigStorageTest, test_non_writable_storage_file_mapping) {
  function TEST_F (line 79) | TEST_F(AconfigStorageTest, test_boolean_flag_value_update) {
  function TEST_F (line 111) | TEST_F(AconfigStorageTest, test_invalid_boolean_flag_value_update) {
  function TEST_F (line 122) | TEST_F(AconfigStorageTest, test_flag_has_server_override_update) {
  function TEST_F (line 175) | TEST_F(AconfigStorageTest, test_flag_has_local_override_update) {

FILE: tools/aconfig/aconfig_storage_write_api/tests/storage_write_api_test.rs
  function copy_to_temp_rw_file (line 16) | fn copy_to_temp_rw_file(source_file: &str) -> NamedTempFile {
  function get_boolean_flag_value_at_offset (line 23) | fn get_boolean_flag_value_at_offset(file: &str, offset: u32) -> bool {
  function get_flag_attribute_at_offset (line 31) | fn get_flag_attribute_at_offset(file: &str, value_type: FlagValueType, o...
  function test_boolean_flag_value_update (line 40) | fn test_boolean_flag_value_update() {
  function test_set_flag_has_server_override (line 61) | fn test_set_flag_has_server_override() {
  function test_set_flag_has_local_override (line 83) | fn test_set_flag_has_local_override() {

FILE: tools/aconfig/aflags/src/aconfig_storage_source.rs
  type AconfigStorageSource (line 18) | pub struct AconfigStorageSource {}
  type AconfigdSocket (line 23) | enum AconfigdSocket {
    method name (line 29) | pub fn name(&self) -> &str {
  function load_flag_to_container (line 37) | fn load_flag_to_container() -> Result<HashMap<String, String>> {
  function convert (line 41) | fn convert(msg: ProtoFlagQueryReturnMessage, containers: &HashMap<String...
  function read_from_socket (line 101) | fn read_from_socket(socket: AconfigdSocket) -> Result<Vec<ProtoFlagQuery...
  method list_flags (line 145) | fn list_flags() -> Result<Vec<Flag>> {
  method override_flag (line 164) | fn override_flag(_namespace: &str, _qualified_name: &str, _value: &str) ...

FILE: tools/aconfig/aflags/src/device_config_source.rs
  type DeviceConfigSource (line 26) | pub struct DeviceConfigSource {}
  function parse_device_config (line 28) | fn parse_device_config(raw: &str) -> Result<HashMap<String, FlagValue>> {
  function read_device_config_output (line 42) | fn read_device_config_output(command: &[&str]) -> Result<String> {
  function read_device_config_flags (line 61) | fn read_device_config_flags() -> Result<HashMap<String, FlagValue>> {
  function parse_staged_flags (line 73) | fn parse_staged_flags(raw: &str) -> Result<HashMap<String, FlagValue>> {
  function read_staged_flags (line 90) | fn read_staged_flags() -> Result<HashMap<String, FlagValue>> {
  function reconcile (line 95) | fn reconcile(
  method list_flags (line 121) | fn list_flags() -> Result<Vec<Flag>> {
  method override_flag (line 130) | fn override_flag(namespace: &str, qualified_name: &str, value: &str) -> ...
  function test_parse_device_config (line 140) | fn test_parse_device_config() {

FILE: tools/aconfig/aflags/src/load_protos.rs
  function infer_container (line 11) | fn infer_container(path: &Path) -> String {
  function convert_parsed_flag (line 22) | fn convert_parsed_flag(path: &Path, flag: &ProtoParsedFlag) -> Flag {
  function load (line 49) | pub(crate) fn load() -> Result<Vec<Flag>> {
  function list_containers (line 67) | pub(crate) fn list_containers() -> Result<Vec<String>> {

FILE: tools/aconfig/aflags/src/main.rs
  type FlagPermission (line 34) | enum FlagPermission {
    method fmt (line 40) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
  type ValuePickedFrom (line 53) | enum ValuePickedFrom {
    method fmt (line 60) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
  type FlagValue (line 74) | enum FlagValue {
    type Error (line 80) | type Error = anyhow::Error;
    method try_from (line 82) | fn try_from(value: &str) -> std::result::Result<Self, Self::Error> {
    method fmt (line 92) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
  type Flag (line 105) | struct Flag {
    method qualified_name (line 117) | fn qualified_name(&self) -> String {
    method display_staged_value (line 121) | fn display_staged_value(&self) -> String {
  type FlagSource (line 130) | trait FlagSource {
    method list_flags (line 131) | fn list_flags() -> Result<Vec<Flag>>;
    method override_flag (line 132) | fn override_flag(namespace: &str, qualified_name: &str, value: &str) -...
  type FlagSourceType (line 135) | enum FlagSourceType {
  constant ABOUT_TEXT (line 140) | const ABOUT_TEXT: &str = "Tool for reading and writing flags.
  type Cli (line 162) | struct Cli {
  type Command (line 168) | enum Command {
  type PaddingInfo (line 192) | struct PaddingInfo {
  type Filter (line 200) | struct Filter {
    method apply (line 205) | fn apply(&self, flags: &[Flag]) -> Vec<Flag> {
  function format_flag_row (line 217) | fn format_flag_row(flag: &Flag, info: &PaddingInfo) -> String {
  function set_flag (line 240) | fn set_flag(qualified_name: &str, value: &str) -> Result<()> {
  function list (line 254) | fn list(source_type: FlagSourceType, container: Option<String>) -> Resul...
  function display_which_backing (line 296) | fn display_which_backing() -> String {
  function invoke_updatable_aflags (line 304) | fn invoke_updatable_aflags() {
  function main (line 329) | fn main() -> Result<()> {
  function test_filter_container (line 366) | fn test_filter_container() {
  function test_filter_no_container (line 404) | fn test_filter_no_container() {

FILE: tools/aconfig/convert_finalized_flags/src/lib.rs
  constant SDK_INT_MULTIPLIER (line 29) | const SDK_INT_MULTIPLIER: u32 = 100_000;
  type FinalizedFlag (line 33) | pub struct FinalizedFlag {
  type ApiLevel (line 42) | pub struct ApiLevel(pub i32);
  constant EXTENDED_FLAGS_35_APILEVEL (line 45) | pub const EXTENDED_FLAGS_35_APILEVEL: ApiLevel = ApiLevel(35);
  type FinalizedFlagMap (line 49) | pub struct FinalizedFlagMap(HashMap<ApiLevel, HashSet<FinalizedFlag>>);
    method new (line 53) | pub fn new() -> Self {
    method is_empty (line 58) | pub fn is_empty(&self) -> bool {
    method get_finalized_level (line 63) | pub fn get_finalized_level(&self, flag: &FinalizedFlag) -> Option<ApiL...
    method insert_if_new (line 74) | pub fn insert_if_new(&mut self, level: ApiLevel, flag: FinalizedFlag) {
    method contains (line 81) | fn contains(&self, flag: &FinalizedFlag) -> bool {
  function parse_full_version (line 87) | fn parse_full_version(version: String) -> Result<u32> {
  constant EXTENDED_FLAGS_LIST_35 (line 104) | const EXTENDED_FLAGS_LIST_35: &str = "extended_flags_list_35.txt";
  function str_to_api_level (line 108) | fn str_to_api_level(numeric_string: &str) -> Result<ApiLevel> {
  function read_files_to_map_using_path (line 121) | pub fn read_files_to_map_using_path(flag_files: Vec<String>) -> Result<F...
  function read_extend_file_to_map_using_path (line 160) | pub fn read_extend_file_to_map_using_path(extened_file: String) -> Resul...
  function build_finalized_flag (line 178) | fn build_finalized_flag(qualified_flag_name: &String) -> Result<Finalize...
  constant FLAG_FILE_NAME (line 195) | const FLAG_FILE_NAME: &str = "finalized-flags.txt";
  function create_test_flags (line 198) | fn create_test_flags() -> Vec<FinalizedFlag> {
  function add_flags_to_file (line 207) | fn add_flags_to_file(flag_file: &mut File, flags: &[FinalizedFlag]) {
  function test_read_flags_one_file (line 214) | fn test_read_flags_one_file() {
  function test_read_flags_two_files (line 238) | fn test_read_flags_two_files() {
  function test_read_flags_full_numbers (line 275) | fn test_read_flags_full_numbers() {
  function test_read_flags_fractions_round_up (line 308) | fn test_read_flags_fractions_round_up() {
  function test_read_flags_non_numeric (line 343) | fn test_read_flags_non_numeric() {
  function test_read_flags_wrong_file_err (line 378) | fn test_read_flags_wrong_file_err() {
  function test_flags_map_insert_if_new (line 409) | fn test_flags_map_insert_if_new() {
  function test_flags_map_get_level (line 427) | fn test_flags_map_get_level() {
  function test_read_flag_from_extended_file (line 441) | fn test_read_flag_from_extended_file() {
  function test_read_flag_from_wrong_extended_file_err (line 463) | fn test_read_flag_from_wrong_extended_file_err() {
  function test_parse_full_version_correct_input_major_dot_minor (line 486) | fn test_parse_full_version_correct_input_major_dot_minor() {
  function test_parse_full_version_correct_input_omit_dot_minor (line 494) | fn test_parse_full_version_correct_input_omit_dot_minor() {
  function test_parse_full_version_incorrect_input_empty_string (line 502) | fn test_parse_full_version_incorrect_input_empty_string() {
  function test_parse_full_version_incorrect_input_no_numbers_in_string (line 509) | fn test_parse_full_version_incorrect_input_no_numbers_in_string() {
  function test_parse_full_version_incorrect_input_unexpected_patch_version (line 516) | fn test_parse_full_version_incorrect_input_unexpected_patch_version() {
  function test_parse_full_version_incorrect_input_leading_dot_missing_major_version (line 523) | fn test_parse_full_version_incorrect_input_leading_dot_missing_major_ver...
  function test_parse_full_version_incorrect_input_trailing_dot_missing_minor_version (line 530) | fn test_parse_full_version_incorrect_input_trailing_dot_missing_minor_ve...
  function test_parse_full_version_incorrect_input_negative_major_version (line 537) | fn test_parse_full_version_incorrect_input_negative_major_version() {
  function test_parse_full_version_incorrect_input_negative_minor_version (line 544) | fn test_parse_full_version_incorrect_input_negative_minor_version() {
  function test_parse_full_version_incorrect_input_major_version_too_large (line 551) | fn test_parse_full_version_incorrect_input_major_version_too_large() {
  function test_parse_full_version_incorrect_input_minor_version_too_large (line 558) | fn test_parse_full_version_incorrect_input_minor_version_too_large() {

FILE: tools/aconfig/convert_finalized_flags/src/main.rs
  constant ABOUT_TEXT (line 30) | const ABOUT_TEXT: &str = "Tool for processing finalized-flags.txt files.
  type Cli (line 46) | struct Cli {
  function main (line 55) | fn main() -> Result<()> {

FILE: tools/aconfig/exported_flag_check/src/main.rs
  constant ABOUT (line 29) | const ABOUT: &str = "CCheck Exported Flags
  type Cli (line 49) | struct Cli {
  function main (line 60) | fn main() -> Result<()> {
  function test (line 98) | fn test() {

FILE: tools/aconfig/exported_flag_check/src/utils.rs
  type FlagId (line 25) | pub(crate) type FlagId = String;
  function extract_flagged_api_flags (line 29) | pub(crate) fn extract_flagged_api_flags<R: Read>(mut reader: R) -> Resul...
  function read_finalized_flags (line 39) | pub(crate) fn read_finalized_flags<R: Read>(reader: R) -> Result<HashSet...
  function get_exported_flags_from_binary_proto (line 48) | pub(crate) fn get_exported_flags_from_binary_proto<R: Read>(
  function get_allow_flag_list (line 63) | fn get_allow_flag_list() -> Result<HashSet<FlagId>> {
  function get_allow_package_list (line 69) | fn get_allow_package_list() -> Result<HashSet<FlagId>> {
  function check_all_exported_flags (line 77) | pub(crate) fn check_all_exported_flags(
  function test_extract_flagged_api_flags (line 112) | fn test_extract_flagged_api_flags() {
  function test_read_finalized_flags (line 125) | fn test_read_finalized_flags() {
  function test_disabled_or_read_write_flags_are_ignored (line 138) | fn test_disabled_or_read_write_flags_are_ignored() {

FILE: tools/aconfig/fake_device_config/src/android/os/Build.java
  class Build (line 19) | public class Build {
    class VERSION (line 20) | public static class VERSION {
      method placeholder (line 22) | private static int placeholder() {

FILE: tools/aconfig/fake_device_config/src/android/os/flagging/AconfigPackage.java
  class AconfigPackage (line 22) | public class AconfigPackage {
    method load (line 23) | public static AconfigPackage load(String packageName) {
    method getBooleanFlagValue (line 27) | public boolean getBooleanFlagValue(String flagName, boolean defaultVal...

FILE: tools/aconfig/fake_device_config/src/android/os/flagging/AconfigPackageInternal.java
  class AconfigPackageInternal (line 22) | public class AconfigPackageInternal {
    method load (line 24) | public static AconfigPackageInternal load(String packageName, long pac...
    method getBooleanFlagValue (line 28) | public boolean getBooleanFlagValue(int index) {

FILE: tools/aconfig/fake_device_config/src/android/os/flagging/PlatformAconfigPackage.java
  class PlatformAconfigPackage (line 24) | public class PlatformAconfigPackage {
    method load (line 33) | public static PlatformAconfigPackage load(String packageName) {
    method getBooleanFlagValue (line 37) | public boolean getBooleanFlagValue(String flagName, boolean defaultVal...

FILE: tools/aconfig/fake_device_config/src/android/os/flagging/PlatformAconfigPackageInternal.java
  class PlatformAconfigPackageInternal (line 22) | public class PlatformAconfigPackageInternal {
    method load (line 24) | public static PlatformAconfigPackageInternal load(String packageName, ...
    method getBooleanFlagValue (line 28) | public boolean getBooleanFlagValue(int index) {

FILE: tools/aconfig/fake_device_config/src/android/util/Log.java
  class Log (line 3) | public final class Log {
    method i (line 4) | public static int i(String tag, String msg) {
    method w (line 8) | public static int w(String tag, String msg) {
    method e (line 12) | public static int e(String tag, String msg) {
    method e (line 16) | public static int e(String tag, String msg, Throwable tr) {

FILE: tools/aconfig/overrideflags/overrideflags.py
  function _parse_packages (line 50) | def _parse_packages(file: pathlib.Path) -> set[str]:
  function _create_android_bp (line 64) | def _create_android_bp(packages: set[str], file_name: str) -> str:
  function _write_android_bp (line 82) | def _write_android_bp(new_android_bp: str, out: pathlib.Path) -> None:
  function main (line 101) | def main(args):

FILE: tools/acp/acp.c
  function process (line 41) | int process(int argc, char* const argv[], unsigned int options)
  function main (line 171) | int main(int argc, char* const argv[])

FILE: tools/atree/atree.cpp
  function usage (line 59) | int usage()
  function add_variable (line 65) | static bool
  function debug_printf (line 80) | static void
  function string (line 94) | static string
  function main (line 113) | int

FILE: tools/atree/files.cpp
  function is_comment_line (line 13) | static bool
  function string (line 22) | static string
  function is_whitespace_line (line 33) | static bool
  function is_exclude_line (line 45) | static bool
  function split_line (line 61) | void
  function add_file (line 113) | static void
  function string (line 127) | static string
  function read_list_file (line 177) | int
  function locate (line 330) | int
  function stat_out (line 363) | void
  function string (line 382) | string
  function add_more (line 392) | static void
  function matches_excludes (line 411) | static bool
  function list_dir (line 423) | static int
  function list_dir (line 463) | int

FILE: tools/atree/files.h
  type FileOpType (line 11) | enum FileOpType {
  type FileRecord (line 17) | struct FileRecord

FILE: tools/atree/fs.cpp
  function is_dir (line 20) | static bool
  function remove_file (line 29) | static int
  function remove_recursively (line 41) | int
  function mkdir_recursively (line 101) | int
  function copy_file (line 135) | int
  function strip_file (line 145) | int

FILE: tools/auto_gen_test_config.py
  function main (line 40) | def main(argv):

FILE: tools/auto_gen_test_config_test.py
  class AutoGenTestConfigUnittests (line 188) | class AutoGenTestConfigUnittests(unittest.TestCase):
    method setUp (line 191) | def setUp(self):
    method tearDown (line 207) | def tearDown(self):
    method testInvalidManifest (line 211) | def testInvalidManifest(self):
    method testCreateJUnitTestConfig (line 226) | def testCreateJUnitTestConfig(self):
    method testCreateInstrumentationTestConfig (line 240) | def testCreateInstrumentationTestConfig(self):
    method testCreateJUnitTestConfigWithXMLTree (line 255) | def testCreateJUnitTestConfigWithXMLTree(self):
    method testCreateInstrumentationTestConfigWithXMLTree (line 269) | def testCreateInstrumentationTestConfigWithXMLTree(self):

FILE: tools/build-runfiles.cc
  type FileType (line 66) | enum FileType {
  type FileInfo (line 72) | struct FileInfo {
  class RunfilesCreator (line 87) | class RunfilesCreator {
    method RunfilesCreator (line 89) | explicit RunfilesCreator(const std::string &output_base)
    method ReadManifest (line 99) | void ReadManifest(const std::string &manifest_file, bool allow_relative,
    method CreateRunfiles (line 173) | void CreateRunfiles() {
    method SetupOutputBase (line 191) | void SetupOutputBase() {
    method ScanTreeAndPrune (line 204) | void ScanTreeAndPrune(const std::string &path) {
    method CreateFiles (line 250) | void CreateFiles() {
    method FileType (line 281) | FileType DentryToFileType(const std::string &path, struct dirent *ent) {
    method LStatOrDie (line 306) | void LStatOrDie(const std::string &path, struct stat *st) {
    method StatOrDie (line 312) | void StatOrDie(const std::string &path, struct stat *st) {
    method ReadLinkOrDie (line 318) | void ReadLinkOrDie(const std::string &path, std::string *output) {
    method EnsureDirReadAndWritePerms (line 328) | void EnsureDirReadAndWritePerms(const std::string &path) {
    method DelTree (line 340) | bool DelTree(const std::string &path, FileType file_type) {
  function main (line 382) | int main(int argc, char **argv) {

FILE: tools/canoninja/canoninja.go
  function Generate (line 17) | func Generate(path string, buffer []byte, sink io.Writer) error {
  function getLine (line 94) | func getLine(b []byte) []byte {
  function getBuildRuleName (line 102) | func getBuildRuleName(line []byte) []byte {
  function ruleName (line 118) | func ruleName(lineAfterRule []byte) []byte {

FILE: tools/canoninja/canoninja_test.go
  function TestGenerate (line 8) | func TestGenerate(t *testing.T) {

FILE: tools/canoninja/cmd/canoninja.go
  function main (line 16) | func main() {

FILE: tools/check_elf_file.py
  function _get_os_name (line 74) | def _get_os_name():
  function _get_build_top (line 83) | def _get_build_top():
  function _select_latest_llvm_version (line 95) | def _select_latest_llvm_version(versions):
  function _get_latest_llvm_version (line 112) | def _get_latest_llvm_version(llvm_dir):
  function _get_llvm_dir (line 117) | def _get_llvm_dir():
  function _get_llvm_readobj (line 143) | def _get_llvm_readobj():
  class ELFError (line 150) | class ELFError(ValueError):
  class ELFInvalidMagicError (line 155) | class ELFInvalidMagicError(ELFError):
    method __init__ (line 157) | def __init__(self):
  class ELFParser (line 161) | class ELFParser(object):
    method _read_elf_header (line 165) | def _read_elf_header(cls, elf_file_path):
    method open (line 176) | def open(cls, elf_file_path, llvm_readobj):
    method _find_prefix (line 188) | def _find_prefix(cls, pattern, lines_it):
    method _read_llvm_readobj (line 197) | def _read_llvm_readobj(cls, elf_file_path, header, llvm_readobj):
    method _parse_llvm_readobj (line 207) | def _parse_llvm_readobj(cls, elf_file_path, header, lines):
    method _parse_program_headers (line 225) | def _parse_program_headers(cls, lines_it):
    method _parse_dynamic_table (line 274) | def _parse_dynamic_table(cls, elf_file_path, lines_it):
    method _parse_symbol_name (line 311) | def _parse_symbol_name(name_with_version):
    method _parse_dynamic_symbols (line 328) | def _parse_dynamic_symbols(cls, lines_it):
    method _parse_dynamic_symbols_internal (line 348) | def _parse_dynamic_symbols_internal(cls, lines_it):
  class Checker (line 375) | class Checker(object):
    method __init__ (line 378) | def __init__(self, llvm_readobj):
    method _error (line 394) | def _error(self, *args):
    method _note (line 399) | def _note(self, *args):
    method _load_elf_file (line 404) | def _load_elf_file(self, path, skip_bad_elf_magic):
    method load_file_under_test (line 422) | def load_file_under_test(self, path, skip_bad_elf_magic,
    method load_shared_libs (line 433) | def load_shared_libs(self, shared_lib_paths):
    method check_dt_soname (line 439) | def check_dt_soname(self, soname):
    method check_dt_needed (line 447) | def check_dt_needed(self, system_shared_lib_names):
    method check_max_page_size (line 486) | def check_max_page_size(self, max_page_size):
    method _find_symbol (line 511) | def _find_symbol(lib, name, version):
    method _find_symbol_from_libs (line 524) | def _find_symbol_from_libs(cls, libs, name, version):
    method check_symbols (line 533) | def check_symbols(self):
  function _parse_args (line 563) | def _parse_args():
  function main (line 599) | def main():

FILE: tools/compare_builds.py
  class DiffType (line 171) | class DiffType(object):
    method __init__ (line 172) | def __init__(self, code, message):
  function main (line 183) | def main():
  function AssertAtTop (line 315) | def AssertAtTop():
  function RequireEnvVar (line 323) | def RequireEnvVar(name):
  function RunSoong (line 332) | def RunSoong(out_dir, args, capture_output):
  function GetBuildVar (line 345) | def GetBuildVar(out_dir, name):
  function RequireBuildVar (line 354) | def RequireBuildVar(out_dir, name):
  function Clean (line 364) | def Clean(directory):
  function RunBuild (line 372) | def RunBuild(work_dir, out_dir, target, hide_build_output):
  function DiffFileList (line 387) | def DiffFileList(first_files, second_files):
  function FindOutFilesTouchedAfter (line 442) | def FindOutFilesTouchedAfter(files, timestamp):
  function GetFileTimestamp (line 452) | def GetFileTimestamp(filename):
  function SortByTimestamp (line 458) | def SortByTimestamp(items, key=lambda item: item):
  function FindSourceFilesTouchedAfter (line 468) | def FindSourceFilesTouchedAfter(timestamp):
  function FindFilesAndDirectories (line 483) | def FindFilesAndDirectories(directory):
  function CreateEmptyFile (line 492) | def CreateEmptyFile(filename):
  function TouchFile (line 502) | def TouchFile(filename):
  function DiffFiles (line 506) | def DiffFiles(first_filename, second_filename):
  class FileIterator (line 541) | class FileIterator(object):
    method __init__ (line 551) | def __init__(self, base_dir):
    method __iter__ (line 554) | def __iter__(self):
    method ShouldIncludeFile (line 557) | def ShouldIncludeFile(self, root, path):
    class _Iterator (line 560) | class _Iterator(object):
      method __init__ (line 561) | def __init__(self, parent, base_dir):
      method __iter__ (line 568) | def __iter__(self):
      method __next__ (line 571) | def __next__(self):
  class OutFiles (line 588) | class OutFiles(FileIterator):
    method __init__ (line 592) | def __init__(self, out_dir):
    method ShouldIncludeFile (line 596) | def ShouldIncludeFile(self, root, relative):
  class ProductFiles (line 611) | class ProductFiles(FileIterator):
    method __init__ (line 614) | def __init__(self, product_out, subdirs):
    method ShouldIncludeFile (line 618) | def ShouldIncludeFile(self, root, relative):
  class TouchedFile (line 625) | class TouchedFile(object):
    method __init__ (line 627) | def __init__(self, filename, timestamp):
  function RemoveItemsFromList (line 632) | def RemoveItemsFromList(haystack, needles):
  class Printer (line 640) | class Printer(object):
    method __init__ (line 641) | def __init__(self):
    method PrintList (line 644) | def PrintList(self, title, items, fmt="%s"):

FILE: tools/compliance/cmd/checkmetadata/checkmetadata.go
  function main (line 36) | func main() {
  function checkProjectMetadata (line 133) | func checkProjectMetadata(stdout, stderr io.Writer, rootFS fs.FS, projec...

FILE: tools/compliance/cmd/checkmetadata/checkmetadata_test.go
  function TestMain (line 27) | func TestMain(m *testing.M) {
  function Test (line 37) | func Test(t *testing.T) {

FILE: tools/compliance/cmd/checkshare/checkshare.go
  type byError (line 39) | type byError
    method Len (line 41) | func (l byError) Len() int           { return len(l) }
    method Swap (line 42) | func (l byError) Swap(i, j int)      { l[i], l[j] = l[j], l[i] }
    method Less (line 43) | func (l byError) Less(i, j int) bool { return l[i].Error() < l[j].Erro...
  function main (line 45) | func main() {
  function checkShare (line 149) | func checkShare(stdout, stderr io.Writer, rootFS fs.FS, files ...string)...

FILE: tools/compliance/cmd/checkshare/checkshare_test.go
  function TestMain (line 27) | func TestMain(m *testing.M) {
  type outcome (line 37) | type outcome struct
    method String (line 43) | func (o *outcome) String() string {
  type outcomeList (line 47) | type outcomeList
    method String (line 49) | func (ol outcomeList) String() string {
  function Test (line 57) | func Test(t *testing.T) {

FILE: tools/compliance/cmd/dumpgraph/dumpgraph.go
  type context (line 37) | type context struct
    method strip (line 43) | func (ctx context) strip(installPath string) string {
  function newMultiString (line 57) | func newMultiString(flags *flag.FlagSet, name, usage string) *multiString {
  type multiString (line 64) | type multiString
    method String (line 66) | func (ms *multiString) String() string     { return strings.Join(*ms, ...
    method Set (line 67) | func (ms *multiString) Set(s string) error { *ms = append(*ms, s); ret...
  function main (line 69) | func main() {
  function dumpGraph (line 173) | func dumpGraph(ctx *context, stdout, stderr io.Writer, rootFS fs.FS, fil...

FILE: tools/compliance/cmd/dumpgraph/dumpgraph_test.go
  function TestMain (line 27) | func TestMain(m *testing.M) {
  function Test_plaintext (line 37) | func Test_plaintext(t *testing.T) {
  type testContext (line 521) | type testContext struct
  type matcher (line 526) | type matcher interface
  type targetMatcher (line 531) | type targetMatcher struct
    method matchString (line 536) | func (tm *targetMatcher) matchString(ctx *testContext) string {
    method typeString (line 545) | func (tm *targetMatcher) typeString() string {
  type edgeMatcher (line 549) | type edgeMatcher struct
    method matchString (line 555) | func (em *edgeMatcher) matchString(ctx *testContext) string {
    method typeString (line 559) | func (tm *edgeMatcher) typeString() string {
  type getMatcher (line 563) | type getMatcher
  function matchTarget (line 565) | func matchTarget(target string, conditions ...string) getMatcher {
  function matchEdge (line 573) | func matchEdge(target, dep string, annotations ...string) getMatcher {
  function Test_graphviz (line 585) | func Test_graphviz(t *testing.T) {

FILE: tools/compliance/cmd/dumpresolutions/dumpresolutions.go
  type context (line 37) | type context struct
    method strip (line 44) | func (ctx context) strip(installPath string) string {
  function newMultiString (line 58) | func newMultiString(flags *flag.FlagSet, name, usage string) *multiString {
  type multiString (line 65) | type multiString
    method String (line 67) | func (ms *multiString) String() string     { return strings.Join(*ms, ...
    method Set (line 68) | func (ms *multiString) Set(s string) error { *ms = append(*ms, s); ret...
  function main (line 70) | func main() {
  function dumpResolutions (line 186) | func dumpResolutions(ctx *context, stdout, stderr io.Writer, rootFS fs.F...

FILE: tools/compliance/cmd/dumpresolutions/dumpresolutions_test.go
  function TestMain (line 27) | func TestMain(m *testing.M) {
  function Test_plaintext (line 37) | func Test_plaintext(t *testing.T) {
  type testContext (line 930) | type testContext struct
  type matcher (line 935) | type matcher interface
  type targetMatcher (line 940) | type targetMatcher struct
    method matchString (line 957) | func (tm *targetMatcher) matchString(ctx *testContext, lg *compliance....
    method typeString (line 967) | func (tm *targetMatcher) typeString() string {
  function newTestCondition (line 946) | func newTestCondition(lg *compliance.LicenseGraph, conditionName ...stri...
  type resolutionMatcher (line 971) | type resolutionMatcher struct
    method matchString (line 977) | func (rm *resolutionMatcher) matchString(ctx *testContext, lg *complia...
    method typeString (line 983) | func (rm *resolutionMatcher) typeString() string {
  type getMatcher (line 987) | type getMatcher
  function matchTarget (line 989) | func matchTarget(target string, conditions ...string) getMatcher {
  function matchResolution (line 997) | func matchResolution(appliesTo, actsOn string, conditions ...string) get...
  function Test_graphviz (line 1011) | func Test_graphviz(t *testing.T) {

FILE: tools/compliance/cmd/htmlnotice/htmlnotice.go
  type context (line 41) | type context struct
    method strip (line 52) | func (ctx context) strip(installPath string) string {
  function newMultiString (line 69) | func newMultiString(flags *flag.FlagSet, name, usage string) *multiString {
  type multiString (line 76) | type multiString
    method String (line 78) | func (ms *multiString) String() string     { return strings.Join(*ms, ...
    method Set (line 79) | func (ms *multiString) Set(s string) error { *ms = append(*ms, s); ret...
  function main (line 81) | func main() {
  function htmlNotice (line 199) | func htmlNotice(ctx *context, files ...string) error {

FILE: tools/compliance/cmd/htmlnotice/htmlnotice_test.go
  function TestMain (line 45) | func TestMain(m *testing.M) {
  function Test (line 55) | func Test(t *testing.T) {
  function checkTitle (line 884) | func checkTitle(line string) string {
  type matcher (line 892) | type matcher interface
  type pageTitle (line 897) | type pageTitle struct
    method isMatch (line 901) | func (m pageTitle) isMatch(line string) bool {
    method String (line 909) | func (m pageTitle) String() string {
  type toc (line 913) | type toc struct
    method isMatch (line 915) | func (m toc) isMatch(line string) bool {
    method String (line 919) | func (m toc) String() string {
  type target (line 923) | type target struct
    method isMatch (line 927) | func (m target) isMatch(line string) bool {
    method String (line 935) | func (m target) String() string {
  type uses (line 939) | type uses struct
    method isMatch (line 943) | func (m uses) isMatch(line string) bool {
    method String (line 951) | func (m uses) String() string {
  type hr (line 955) | type hr struct
    method isMatch (line 957) | func (m hr) isMatch(line string) bool {
    method String (line 961) | func (m hr) String() string {
  type library (line 965) | type library struct
    method isMatch (line 969) | func (m library) isMatch(line string) bool {
    method String (line 977) | func (m library) String() string {
  type usedBy (line 981) | type usedBy struct
    method isMatch (line 985) | func (m usedBy) isMatch(line string) bool {
    method String (line 993) | func (m usedBy) String() string {
  function matchesText (line 997) | func matchesText(line, text string) bool {
  function expectedText (line 1005) | func expectedText(text string) string {
  type firstParty (line 1009) | type firstParty struct
    method isMatch (line 1011) | func (m firstParty) isMatch(line string) bool {
    method String (line 1015) | func (m firstParty) String() string {
  type notice (line 1019) | type notice struct
    method isMatch (line 1021) | func (m notice) isMatch(line string) bool {
    method String (line 1025) | func (m notice) String() string {
  type reciprocal (line 1029) | type reciprocal struct
    method isMatch (line 1031) | func (m reciprocal) isMatch(line string) bool {
    method String (line 1035) | func (m reciprocal) String() string {
  type restricted (line 1039) | type restricted struct
    method isMatch (line 1041) | func (m restricted) isMatch(line string) bool {
    method String (line 1045) | func (m restricted) String() string {
  type proprietary (line 1049) | type proprietary struct
    method isMatch (line 1051) | func (m proprietary) isMatch(line string) bool {
    method String (line 1055) | func (m proprietary) String() string {
  type matcherList (line 1059) | type matcherList
    method String (line 1061) | func (l matcherList) String() string {

FILE: tools/compliance/cmd/listshare/listshare.go
  function main (line 37) | func main() {
  function listShare (line 131) | func listShare(stdout, stderr io.Writer, rootFS fs.FS, files ...string) ...

FILE: tools/compliance/cmd/listshare/listshare_test.go
  function TestMain (line 27) | func TestMain(m *testing.M) {
  function Test (line 37) | func Test(t *testing.T) {

FILE: tools/compliance/cmd/rtrace/rtrace.go
  type context (line 38) | type context struct
    method strip (line 43) | func (ctx context) strip(installPath string) string {
  function newMultiString (line 57) | func newMultiString(flags *flag.FlagSet, name, usage string) *multiString {
  type multiString (line 64) | type multiString
    method String (line 66) | func (ms *multiString) String() string     { return strings.Join(*ms, ...
    method Set (line 67) | func (ms *multiString) Set(s string) error { *ms = append(*ms, s); ret...
  function main (line 69) | func main() {
  function traceRestricted (line 183) | func traceRestricted(ctx *context, stdout, stderr io.Writer, rootFS fs.F...

FILE: tools/compliance/cmd/rtrace/rtrace_test.go
  function TestMain (line 27) | func TestMain(m *testing.M) {
  function Test_plaintext (line 37) | func Test_plaintext(t *testing.T) {

FILE: tools/compliance/cmd/shippedlibs/shippedlibs.go
  type context (line 36) | type context struct
  function main (line 42) | func main() {
  function shippedLibs (line 138) | func shippedLibs(ctx *context, files ...string) error {

FILE: tools/compliance/cmd/shippedlibs/shippedlibs_test.go
  function TestMain (line 28) | func TestMain(m *testing.M) {
  function Test (line 38) | func Test(t *testing.T) {

FILE: tools/compliance/cmd/textnotice/textnotice.go
  type context (line 40) | type context struct
    method strip (line 50) | func (ctx context) strip(installPath string) string {
  function newMultiString (line 67) | func newMultiString(flags *flag.FlagSet, name, usage string) *multiString {
  type multiString (line 74) | type multiString
    method String (line 76) | func (ms *multiString) String() string     { return strings.Join(*ms, ...
    method Set (line 77) | func (ms *multiString) Set(s string) error { *ms = append(*ms, s); ret...
  function main (line 79) | func main() {
  function textNotice (line 195) | func textNotice(ctx *context, files ...string) error {

FILE: tools/compliance/cmd/textnotice/textnotice_test.go
  function TestMain (line 34) | func TestMain(m *testing.M) {
  function Test (line 44) | func Test(t *testing.T) {
  type matcher (line 741) | type matcher interface
  type hr (line 746) | type hr struct
    method isMatch (line 748) | func (m hr) isMatch(line string) bool {
    method String (line 752) | func (m hr) String() string {
  type library (line 756) | type library struct
    method isMatch (line 760) | func (m library) isMatch(line string) bool {
    method String (line 764) | func (m library) String() string {
  type usedBy (line 768) | type usedBy struct
    method isMatch (line 772) | func (m usedBy) isMatch(line string) bool {
    method String (line 776) | func (m usedBy) String() string {
  type firstParty (line 780) | type firstParty struct
    method isMatch (line 782) | func (m firstParty) isMatch(line string) bool {
    method String (line 786) | func (m firstParty) String() string {
  type notice (line 790) | type notice struct
    method isMatch (line 792) | func (m notice) isMatch(line string) bool {
    method String (line 796) | func (m notice) String() string {
  type reciprocal (line 800) | type reciprocal struct
    method isMatch (line 802) | func (m reciprocal) isMatch(line string) bool {
    method String (line 806) | func (m reciprocal) String() string {
  type restricted (line 810) | type restricted struct
    method isMatch (line 812) | func (m restricted) isMatch(line string) bool {
    method String (line 816) | func (m restricted) String() string {
  type proprietary (line 820) | type proprietary struct
    method isMatch (line 822) | func (m proprietary) isMatch(line string) bool {
    method String (line 826) | func (m proprietary) String() string {
  type matcherList (line 830) | type matcherList
    method String (line 832) | func (l matcherList) String() string {

FILE: tools/compliance/cmd/xmlnotice/xmlnotice.go
  type context (line 41) | type context struct
    method strip (line 51) | func (ctx context) strip(installPath string) string {
  function newMultiString (line 68) | func newMultiString(flags *flag.FlagSet, name, usage string) *multiString {
  type multiString (line 75) | type multiString
    method String (line 77) | func (ms *multiString) String() string     { return strings.Join(*ms, ...
    method Set (line 78) | func (ms *multiString) Set(s string) error { *ms = append(*ms, s); ret...
  function main (line 80) | func main() {
  function xmlNotice (line 197) | func xmlNotice(ctx *context, files ...string) error {

FILE: tools/compliance/cmd/xmlnotice/xmlnotice_test.go
  function TestMain (line 36) | func TestMain(m *testing.M) {
  function Test (line 46) | func Test(t *testing.T) {
  function escape (line 660) | func escape(s string) string {
  type matcher (line 666) | type matcher interface
  type target (line 671) | type target struct
    method isMatch (line 676) | func (m target) isMatch(line string) bool {
    method String (line 684) | func (m target) String() string {
  function matchesText (line 688) | func matchesText(line, text string) bool {
  function expectedText (line 696) | func expectedText(text string) string {
  type firstParty (line 700) | type firstParty struct
    method isMatch (line 702) | func (m firstParty) isMatch(line string) bool {
    method String (line 706) | func (m firstParty) String() string {
  type notice (line 710) | type notice struct
    method isMatch (line 712) | func (m notice) isMatch(line string) bool {
    method String (line 716) | func (m notice) String() string {
  type reciprocal (line 720) | type reciprocal struct
    method isMatch (line 722) | func (m reciprocal) isMatch(line string) bool {
    method String (line 726) | func (m reciprocal) String() string {
  type restricted (line 730) | type restricted struct
    method isMatch (line 732) | func (m restricted) isMatch(line string) bool {
    method String (line 736) | func (m restricted) String() string {
  type proprietary (line 740) | type proprietary struct
    method isMatch (line 742) | func (m proprietary) isMatch(line string) bool {
    method String (line 746) | func (m proprietary) String() string {
  type matcherList (line 750) | type matcherList
    method String (line 752) | func (l matcherList) String() string {

FILE: tools/compliance/condition.go
  type LicenseCondition (line 23) | type LicenseCondition
    method Name (line 74) | func (lc LicenseCondition) Name() string {
  constant LicenseConditionMask (line 26) | LicenseConditionMask = LicenseCondition(0x1ff)
  constant UnencumberedCondition (line 31) | UnencumberedCondition = LicenseCondition(0x0001)
  constant PermissiveCondition (line 34) | PermissiveCondition = LicenseCondition(0x0002)
  constant NoticeCondition (line 37) | NoticeCondition = LicenseCondition(0x0004)
  constant ReciprocalCondition (line 40) | ReciprocalCondition = LicenseCondition(0x0008)
  constant RestrictedCondition (line 43) | RestrictedCondition = LicenseCondition(0x0010)
  constant WeaklyRestrictedCondition (line 46) | WeaklyRestrictedCondition = LicenseCondition(0x0020)
  constant ProprietaryCondition (line 49) | ProprietaryCondition = LicenseCondition(0x0040)
  constant ByExceptionOnlyCondition (line 52) | ByExceptionOnlyCondition = LicenseCondition(0x0080)
  constant NotAllowedCondition (line 55) | NotAllowedCondition = LicenseCondition(0x0100)

FILE: tools/compliance/condition_test.go
  function TestConditionSetHas (line 21) | func TestConditionSetHas(t *testing.T) {
  function TestConditionName (line 43) | func TestConditionName(t *testing.T) {
  function TestConditionName_InvalidCondition (line 52) | func TestConditionName_InvalidCondition(t *testing.T) {

FILE: tools/compliance/conditionset.go
  type LicenseConditionSet (line 23) | type LicenseConditionSet
    method Plus (line 40) | func (cs LicenseConditionSet) Plus(conditions ...LicenseCondition) Lic...
    method Union (line 50) | func (cs LicenseConditionSet) Union(other ...LicenseConditionSet) Lice...
    method MatchingAny (line 59) | func (cs LicenseConditionSet) MatchingAny(conditions ...LicenseConditi...
    method MatchingAnySet (line 69) | func (cs LicenseConditionSet) MatchingAnySet(other ...LicenseCondition...
    method HasAny (line 78) | func (cs LicenseConditionSet) HasAny(conditions ...LicenseCondition) b...
    method MatchesAnySet (line 89) | func (cs LicenseConditionSet) MatchesAnySet(other ...LicenseConditionS...
    method HasAll (line 99) | func (cs LicenseConditionSet) HasAll(conditions ...LicenseCondition) b...
    method MatchesEverySet (line 110) | func (cs LicenseConditionSet) MatchesEverySet(other ...LicenseConditio...
    method Intersection (line 121) | func (cs LicenseConditionSet) Intersection(other ...LicenseConditionSe...
    method Minus (line 130) | func (cs LicenseConditionSet) Minus(conditions ...LicenseCondition) Li...
    method Difference (line 140) | func (cs LicenseConditionSet) Difference(other ...LicenseConditionSet)...
    method Len (line 149) | func (cs LicenseConditionSet) Len() int {
    method AsList (line 160) | func (cs LicenseConditionSet) AsList() []LicenseCondition {
    method Names (line 171) | func (cs LicenseConditionSet) Names() []string {
    method IsEmpty (line 182) | func (cs LicenseConditionSet) IsEmpty() bool {
    method String (line 187) | func (cs LicenseConditionSet) String() string {
  constant AllLicenseConditions (line 26) | AllLicenseConditions = LicenseConditionSet(LicenseConditionMask)
  function NewLicenseConditionSet (line 30) | func NewLicenseConditionSet(conditions ...LicenseCondition) LicenseCondi...

FILE: tools/compliance/conditionset_test.go
  function TestConditionSet (line 22) | func TestConditionSet(t *testing.T) {

FILE: tools/compliance/graph.go
  type LicenseGraph (line 40) | type LicenseGraph struct
    method Edges (line 76) | func (lg *LicenseGraph) Edges() TargetEdgeList {
    method Targets (line 83) | func (lg *LicenseGraph) Targets() TargetNodeList {
    method TargetNames (line 92) | func (lg *LicenseGraph) TargetNames() []string {
  function newLicenseGraph (line 103) | func newLicenseGraph() *LicenseGraph {
  type TargetEdge (line 117) | type TargetEdge struct
    method Target (line 128) | func (e *TargetEdge) Target() *TargetNode {
    method Dependency (line 135) | func (e *TargetEdge) Dependency() *TargetNode {
    method Annotations (line 145) | func (e *TargetEdge) Annotations() TargetEdgeAnnotations {
    method IsRuntimeDependency (line 151) | func (e *TargetEdge) IsRuntimeDependency() bool {
    method IsDerivation (line 157) | func (e *TargetEdge) IsDerivation() bool {
    method IsBuildTool (line 163) | func (e *TargetEdge) IsBuildTool() bool {
    method String (line 168) | func (e *TargetEdge) String() string {
  type TargetEdgeList (line 173) | type TargetEdgeList
    method Len (line 176) | func (l TargetEdgeList) Len() int { return len(l) }
    method Swap (line 179) | func (l TargetEdgeList) Swap(i, j int) { l[i], l[j] = l[j], l[i] }
    method Less (line 182) | func (l TargetEdgeList) Less(i, j int) bool {
  type TargetEdgePathSegment (line 197) | type TargetEdgePathSegment struct
    method Target (line 205) | func (s TargetEdgePathSegment) Target() *TargetNode {
    method Dependency (line 212) | func (s TargetEdgePathSegment) Dependency() *TargetNode {
    method Edge (line 217) | func (s TargetEdgePathSegment) Edge() *TargetEdge {
    method Annotations (line 227) | func (s TargetEdgePathSegment) Annotations() TargetEdgeAnnotations {
    method Context (line 233) | func (s TargetEdgePathSegment) Context() interface{} {
    method String (line 238) | func (s TargetEdgePathSegment) String() string {
  type TargetEdgePath (line 244) | type TargetEdgePath
    method Push (line 254) | func (p *TargetEdgePath) Push(edge *TargetEdge, ctx interface{}) {
    method Pop (line 266) | func (p *TargetEdgePath) Pop() {
    method Clear (line 274) | func (p *TargetEdgePath) Clear() {
    method Copy (line 279) | func (p *TargetEdgePath) Copy() *TargetEdgePath {
    method String (line 288) | func (p *TargetEdgePath) String() string {
  function NewTargetEdgePath (line 247) | func NewTargetEdgePath(cap int) *TargetEdgePath {
  type TargetNode (line 313) | type TargetNode
    method Name (line 317) | func (tn *TargetNode) Name() string {
    method Dependencies (line 322) | func (tn *TargetNode) Dependencies() TargetEdgeList {
    method PackageName (line 329) | func (tn *TargetNode) PackageName() string {
    method ModuleName (line 334) | func (tn *TargetNode) ModuleName() string {
    method Projects (line 343) | func (tn *TargetNode) Projects() []string {
    method LicenseConditions (line 352) | func (tn *TargetNode) LicenseConditions() LicenseConditionSet {
    method LicenseTexts (line 358) | func (tn *TargetNode) LicenseTexts() []string {
    method IsContainer (line 364) | func (tn *TargetNode) IsContainer() bool {
    method Built (line 369) | func (tn *TargetNode) Built() []string {
    method Installed (line 375) | func (tn *TargetNode) Installed() []string {
    method TargetFiles (line 381) | func (tn *TargetNode) TargetFiles() []string {
    method InstallMap (line 388) | func (tn *TargetNode) InstallMap() []InstallMap {
    method Sources (line 399) | func (tn *TargetNode) Sources() []string {
  type InstallMap (line 405) | type InstallMap struct
  type TargetEdgeAnnotations (line 419) | type TargetEdgeAnnotations struct
    method HasAnnotation (line 429) | func (ea TargetEdgeAnnotations) HasAnnotation(ann string) bool {
    method Compare (line 438) | func (ea TargetEdgeAnnotations) Compare(other TargetEdgeAnnotations) i...
    method AsList (line 462) | func (ea TargetEdgeAnnotations) AsList() []string {
  function newEdgeAnnotations (line 424) | func newEdgeAnnotations() TargetEdgeAnnotations {
  type TargetNodeSet (line 471) | type TargetNodeSet
    method Contains (line 474) | func (ts TargetNodeSet) Contains(target *TargetNode) bool {
    method Names (line 480) | func (ts TargetNodeSet) Names() []string {
    method String (line 489) | func (ts TargetNodeSet) String() string {
  type TargetNodeList (line 494) | type TargetNodeList
    method Len (line 497) | func (l TargetNodeList) Len() int { return len(l) }
    method Swap (line 500) | func (l TargetNodeList) Swap(i, j int) { l[i], l[j] = l[j], l[i] }
    method Less (line 503) | func (l TargetNodeList) Less(i, j int) bool {
    method String (line 508) | func (l TargetNodeList) String() string {
    method Names (line 521) | func (l TargetNodeList) Names() []string {

FILE: tools/compliance/noticeindex.go
  type NoticeIndex (line 37) | type NoticeIndex struct
    method Hashes (line 201) | func (ni *NoticeIndex) Hashes() chan hash {
    method InputFiles (line 233) | func (ni *NoticeIndex) InputFiles() []string {
    method HashLibs (line 246) | func (ni *NoticeIndex) HashLibs(h hash) []string {
    method HashLibInstalls (line 257) | func (ni *NoticeIndex) HashLibInstalls(h hash, libName string) []string {
    method InstallPaths (line 267) | func (ni *NoticeIndex) InstallPaths() chan string {
    method InstallHashes (line 284) | func (ni *NoticeIndex) InstallHashes(installPath string) []hash {
    method InstallHashLibs (line 297) | func (ni *NoticeIndex) InstallHashLibs(installPath string, h hash) []s...
    method Libraries (line 307) | func (ni *NoticeIndex) Libraries() chan string {
    method HashText (line 324) | func (ni *NoticeIndex) HashText(h hash) []byte {
    method getLibName (line 329) | func (ni *NoticeIndex) getLibName(noticeFor *TargetNode, h hash) (stri...
    method checkMetadata (line 441) | func (ni *NoticeIndex) checkMetadata(noticeFor *TargetNode) (string, e...
    method checkMetadataForLicenseText (line 456) | func (ni *NoticeIndex) checkMetadataForLicenseText(noticeFor *TargetNo...
    method addText (line 488) | func (ni *NoticeIndex) addText(file string) error {
  function IndexLicenseTexts (line 68) | func IndexLicenseTexts(rootFS fs.FS, lg *LicenseGraph, rs ResolutionSet)...
  function getInstallPaths (line 513) | func getInstallPaths(attachesTo *TargetNode, path TargetEdgePath) []stri...
  type hash (line 597) | type hash struct
    method String (line 602) | func (h hash) String() string {
  type hashList (line 607) | type hashList struct
    method Len (line 615) | func (l hashList) Len() int { return len(*l.hashes) }
    method Swap (line 619) | func (l hashList) Swap(i, j int) { (*l.hashes)[i], (*l.hashes)[j] = (*...
    method Less (line 623) | func (l hashList) Less(i, j int) bool {

FILE: tools/compliance/policy_policy.go
  type safePathPrefixesType (line 87) | type safePathPrefixesType struct
  type safePrebuiltPrefixesType (line 92) | type safePrebuiltPrefixesType struct
  function init (line 104) | func init() {
  function LicenseConditionSetFromNames (line 117) | func LicenseConditionSetFromNames(names ...string) LicenseConditionSet {
  function depConditionsPropagatingToTarget (line 175) | func depConditionsPropagatingToTarget(lg *LicenseGraph, e *TargetEdge, d...
  function targetConditionsPropagatingToDep (line 199) | func targetConditionsPropagatingToDep(lg *LicenseGraph, e *TargetEdge, t...
  function conditionsAttachingAcrossEdge (line 230) | func conditionsAttachingAcrossEdge(lg *LicenseGraph, e *TargetEdge, univ...
  function edgeIsDynamicLink (line 245) | func edgeIsDynamicLink(e *TargetEdge) bool {
  function edgeIsDerivation (line 251) | func edgeIsDerivation(e *TargetEdge) bool {

FILE: tools/compliance/policy_policy_test.go
  function TestPolicy_edgeConditions (line 27) | func TestPolicy_edgeConditions(t *testing.T) {

FILE: tools/compliance/policy_resolve.go
  type TraceConditions (line 25) | type TraceConditions
  function ResolveBottomUpConditions (line 37) | func ResolveBottomUpConditions(lg *LicenseGraph) {
  function TraceBottomUpConditions (line 45) | func TraceBottomUpConditions(lg *LicenseGraph, conditionsFn TraceConditi...
  function ResolveTopDownConditions (line 107) | func ResolveTopDownConditions(lg *LicenseGraph) {
  function TraceTopDownConditions (line 114) | func TraceTopDownConditions(lg *LicenseGraph, conditionsFn TraceConditio...

FILE: tools/compliance/policy_resolve_test.go
  function TestResolveBottomUpConditions (line 23) | func TestResolveBottomUpConditions(t *testing.T) {
  function TestResolveTopDownConditions (line 363) | func TestResolveTopDownConditions(t *testing.T) {

FILE: tools/compliance/policy_resolvenotices.go
  function ResolveNotices (line 18) | func ResolveNotices(lg *LicenseGraph) ResolutionSet {

FILE: tools/compliance/policy_resolvenotices_test.go
  function TestResolveNotices (line 22) | func TestResolveNotices(t *testing.T) {

FILE: tools/compliance/policy_resolveprivacy.go
  function ResolveSourcePrivacy (line 18) | func ResolveSourcePrivacy(lg *LicenseGraph) ResolutionSet {

FILE: tools/compliance/policy_resolveprivacy_test.go
  function TestResolveSourcePrivacy (line 22) | func TestResolveSourcePrivacy(t *testing.T) {

FILE: tools/compliance/policy_resolveshare.go
  function ResolveSourceSharing (line 18) | func ResolveSourceSharing(lg *LicenseGraph) ResolutionSet {

FILE: tools/compliance/policy_resolveshare_test.go
  function TestResolveSourceSharing (line 22) | func TestResolveSourceSharing(t *testing.T) {

FILE: tools/compliance/policy_shareprivacyconflicts.go
  type SourceSharePrivacyConflict (line 23) | type SourceSharePrivacyConflict struct
    method Error (line 30) | func (conflict SourceSharePrivacyConflict) Error() string {
    method IsEqualTo (line 36) | func (conflict SourceSharePrivacyConflict) IsEqualTo(other SourceShare...
  function ConflictingSharedPrivateSource (line 44) | func ConflictingSharedPrivateSource(lg *LicenseGraph) []SourceSharePriva...

FILE: tools/compliance/policy_shareprivacyconflicts_test.go
  type byConflict (line 24) | type byConflict
    method Len (line 27) | func (l byConflict) Len() int { return len(l) }
    method Swap (line 31) | func (l byConflict) Swap(i, j int) { l[i], l[j] = l[j], l[i] }
    method Less (line 35) | func (l byConflict) Less(i, j int) bool {
  function TestConflictingSharedPrivateSource (line 45) | func TestConflictingSharedPrivateSource(t *testing.T) {

FILE: tools/compliance/policy_shipped.go
  function ShippedNodes (line 19) | func ShippedNodes(lg *LicenseGraph) TargetNodeSet {

FILE: tools/compliance/policy_shipped_test.go
  function TestShippedNodes (line 24) | func TestShippedNodes(t *testing.T) {

FILE: tools/compliance/policy_walk.go
  type EdgeContextProvider (line 19) | type EdgeContextProvider interface
  type NoEdgeContext (line 25) | type NoEdgeContext struct
    method Context (line 28) | func (ctx NoEdgeContext) Context(lg *LicenseGraph, path TargetEdgePath...
  type ApplicableConditionsContext (line 34) | type ApplicableConditionsContext struct
    method Context (line 39) | func (ctx ApplicableConditionsContext) Context(lg *LicenseGraph, path ...
  type VisitNode (line 50) | type VisitNode
  function WalkTopDown (line 54) | func WalkTopDown(ctx EdgeContextProvider, lg *LicenseGraph, visit VisitN...
  function WalkTopDownBreadthFirst (line 84) | func WalkTopDownBreadthFirst(ctx EdgeContextProvider, lg *LicenseGraph, ...
  type resolutionKey (line 132) | type resolutionKey struct
  function WalkResolutionsForCondition (line 139) | func WalkResolutionsForCondition(lg *LicenseGraph, conditions LicenseCon...
  function WalkActionsForCondition (line 249) | func WalkActionsForCondition(lg *LicenseGraph, conditions LicenseConditi...

FILE: tools/compliance/policy_walk_test.go
  function TestMain (line 25) | func TestMain(m *testing.M) {
  function TestWalkResolutionsForCondition (line 35) | func TestWalkResolutionsForCondition(t *testing.T) {
  function TestWalkActionsForCondition (line 616) | func TestWalkActionsForCondition(t *testing.T) {
  function TestWalkTopDownBreadthFirst (line 1209) | func TestWalkTopDownBreadthFirst(t *testing.T) {
  function TestWalkTopDownBreadthFirstWithoutDuplicates (line 1421) | func TestWalkTopDownBreadthFirstWithoutDuplicates(t *testing.T) {

FILE: tools/compliance/projectmetadata/projectmetadata.go
  type ProjectMetadata (line 36) | type ProjectMetadata struct
    method String (line 57) | func (pm *ProjectMetadata) String() string {
    method Project (line 62) | func (pm *ProjectMetadata) Project() string {
    method Name (line 67) | func (pm *ProjectMetadata) Name() string {
    method Version (line 72) | func (pm *ProjectMetadata) Version() string {
    method VersionedName (line 82) | func (pm *ProjectMetadata) VersionedName() string {
    method UrlsByTypeName (line 102) | func (pm *ProjectMetadata) UrlsByTypeName() ProjectUrlMap {
  type ProjectUrlMap (line 44) | type ProjectUrlMap
    method DownloadUrl (line 47) | func (m ProjectUrlMap) DownloadUrl() string {
  type projectIndex (line 124) | type projectIndex struct
    method finish (line 133) | func (pi *projectIndex) finish() {
    method wait (line 138) | func (pi *projectIndex) wait() {
  type Index (line 143) | type Index struct
    method MetadataForProjects (line 169) | func (ix *Index) MetadataForProjects(projects ...string) ([]*ProjectMe...
    method AllMetadataFiles (line 240) | func (ix *Index) AllMetadataFiles() []string {
    method readMetadataFile (line 253) | func (ix *Index) readMetadataFile(pi *projectIndex, path string) {
  function NewIndex (line 156) | func NewIndex(rootFS fs.FS) *Index {

FILE: tools/compliance/projectmetadata/projectmetadata_test.go
  constant EMPTY (line 28) | EMPTY = ``
  constant INVALID_NAME (line 31) | INVALID_NAME = `name: a library\n`
  constant INVALID_DESCRIPTION (line 34) | INVALID_DESCRIPTION = `description: unquoted text\n`
  constant INVALID_VERSION (line 37) | INVALID_VERSION = `third_party { version: 1 }`
  constant MY_LIB_1_0 (line 40) | MY_LIB_1_0 = `name: "mylib" description: "my library" third_party { vers...
  constant NO_NAME_0_1 (line 43) | NO_NAME_0_1 = `description: "my library" third_party { version: "0.1" }`
  constant GIT_URL (line 46) | GIT_URL          = "http://example.github.com/my_lib"
  constant SVN_URL (line 47) | SVN_URL          = "http://example.svn.com/my_lib"
  constant HG_URL (line 48) | HG_URL           = "http://example.hg.com/my_lib"
  constant DARCS_URL (line 49) | DARCS_URL        = "http://example.darcs.com/my_lib"
  constant PIPER_URL (line 50) | PIPER_URL        = "http://google3/third_party/my/package"
  constant HOMEPAGE_URL (line 51) | HOMEPAGE_URL     = "http://example.com/homepage"
  constant OTHER_URL (line 52) | OTHER_URL        = "http://google.com/"
  constant ARCHIVE_URL (line 53) | ARCHIVE_URL      = "http://ftp.example.com/"
  constant LOCAL_SOURCE_URL (line 54) | LOCAL_SOURCE_URL = "https://android.googlesource.com/platform/external/a...
  function libWithUrl (line 58) | func libWithUrl(urlTypes ...string) string {
  function TestVerifyAllUrlTypes (line 96) | func TestVerifyAllUrlTypes(t *testing.T) {
  function TestUnknownPanics (line 106) | func TestUnknownPanics(t *testing.T) {
  function TestReadMetadataForProjects (line 117) | func TestReadMetadataForProjects(t *testing.T) {
  type pmeta (line 653) | type pmeta struct
    method String (line 661) | func (pm pmeta) String() string {
    method equals (line 665) | func (pm pmeta) equals(other *ProjectMetadata) bool {
    method difference (line 684) | func (pm pmeta) difference(other *ProjectMetadata) string {

FILE: tools/compliance/readgraph.go
  type globalFS (line 35) | type globalFS struct
    method Open (line 40) | func (s globalFS) Open(name string) (fs.File, error) {
    method Stat (line 44) | func (s globalFS) Stat(name string) (fs.FileInfo, error) {
  function GetFS (line 51) | func GetFS(outDir string) fs.FS {
  type result (line 59) | type result struct
  type receiver (line 71) | type receiver struct
  function ReadLicenseGraph (line 94) | func ReadLicenseGraph(rootFS fs.FS, stderr io.Writer, files []string) (*...
  type targetNode (line 191) | type targetNode struct
  function addDependencies (line 214) | func addDependencies(lg *LicenseGraph, tn *TargetNode) error {
  function readFile (line 245) | func readFile(recv *receiver, file string) {

FILE: tools/compliance/readgraph_test.go
  function TestReadLicenseGraph (line 26) | func TestReadLicenseGraph(t *testing.T) {

FILE: tools/compliance/resolution.go
  type Resolution (line 33) | type Resolution struct
    method AttachesTo (line 39) | func (r Resolution) AttachesTo() *TargetNode {
    method ActsOn (line 46) | func (r Resolution) ActsOn() *TargetNode {
    method Resolves (line 51) | func (r Resolution) Resolves() LicenseConditionSet {
    method asString (line 56) | func (r Resolution) asString() string {
  type ResolutionList (line 66) | type ResolutionList
    method Len (line 69) | func (l ResolutionList) Len() int { return len(l) }
    method Swap (line 72) | func (l ResolutionList) Swap(i, j int) { l[i], l[j] = l[j], l[i] }
    method Less (line 75) | func (l ResolutionList) Less(i, j int) bool {
    method String (line 83) | func (rl ResolutionList) String() string {
    method AllConditions (line 97) | func (rl ResolutionList) AllConditions() LicenseConditionSet {
    method Matching (line 107) | func (rl ResolutionList) Matching(conditions LicenseConditionSet) Reso...
    method CountMatching (line 119) | func (rl ResolutionList) CountMatching(conditions LicenseConditionSet)...
    method ByActsOn (line 130) | func (rl ResolutionList) ByActsOn(actsOn *TargetNode) ResolutionList {
    method CountByActsOn (line 141) | func (rl ResolutionList) CountByActsOn(actsOn *TargetNode) int {

FILE: tools/compliance/resolutionset.go
  type ResolutionSet (line 56) | type ResolutionSet
    method AttachesTo (line 60) | func (rs ResolutionSet) AttachesTo() TargetNodeList {
    method AttachesToTarget (line 70) | func (rs ResolutionSet) AttachesToTarget(target *TargetNode) bool {
    method IsPureAggregate (line 77) | func (rs ResolutionSet) IsPureAggregate(target *TargetNode) bool {
    method Resolutions (line 87) | func (rs ResolutionSet) Resolutions(attachesTo *TargetNode) Resolution...
    method AllActions (line 101) | func (rs ResolutionSet) AllActions() ActionSet {
    method String (line 116) | func (rs ResolutionSet) String() string {
  type ActionSet (line 130) | type ActionSet
    method String (line 133) | func (as ActionSet) String() string {

FILE: tools/compliance/resolutionset_test.go
  function TestResolutionSet_AttachesTo (line 76) | func TestResolutionSet_AttachesTo(t *testing.T) {
  function TestResolutionSet_AttachesToTarget (line 119) | func TestResolutionSet_AttachesToTarget(t *testing.T) {

FILE: tools/compliance/test_util.go
  constant AOSP (line 29) | AOSP = `` +
  constant GPL (line 36) | GPL = `` +
  constant Classpath (line 43) | Classpath = `` +
  constant DependentModule (line 50) | DependentModule = `` +
  constant LGPL (line 57) | LGPL = `` +
  constant MPL (line 64) | MPL = `` +
  constant MIT (line 71) | MIT = `` +
  constant Proprietary (line 78) | Proprietary = `` +
  constant ByException (line 85) | ByException = `` +
  function newTestNode (line 115) | func newTestNode(lg *LicenseGraph, targetName string) *TargetNode {
  function newTestCondition (line 125) | func newTestCondition(conditionName string) LicenseCondition {
  function newTestConditionSet (line 137) | func newTestConditionSet(conditionName []string) LicenseConditionSet {
  type edge (line 146) | type edge struct
    method String (line 151) | func (e edge) String() string {
  type byEdge (line 156) | type byEdge
    method Len (line 159) | func (l byEdge) Len() int { return len(l) }
    method Swap (line 163) | func (l byEdge) Swap(i, j int) { l[i], l[j] = l[j], l[i] }
    method Less (line 167) | func (l byEdge) Less(i, j int) bool {
  type annotated (line 175) | type annotated struct
    method String (line 180) | func (e annotated) String() string {
    method IsEqualTo (line 187) | func (e annotated) IsEqualTo(other annotated) bool {
  function toGraph (line 208) | func toGraph(stderr io.Writer, roots []string, edges []annotated) (*Lice...
  function logGraph (line 240) | func logGraph(lg *LicenseGraph, t *testing.T) {
  type byAnnotatedEdge (line 256) | type byAnnotatedEdge
    method Len (line 258) | func (l byAnnotatedEdge) Len() int      { return len(l) }
    method Swap (line 259) | func (l byAnnotatedEdge) Swap(i, j int) { l[i], l[j] = l[j], l[i] }
    method Less (line 260) | func (l byAnnotatedEdge) Less(i, j int) bool {
  type act (line 281) | type act struct
    method String (line 286) | func (a act) String() string {
  function toActionSet (line 291) | func toActionSet(lg *LicenseGraph, data []act) ActionSet {
  type res (line 302) | type res struct
  function toResolutionSet (line 307) | func toResolutionSet(lg *LicenseGraph, data []res) ResolutionSet {
  type tcond (line 322) | type tcond struct
  type action (line 327) | type action struct
    method String (line 333) | func (a action) String() string {
  type actionList (line 339) | type actionList
    method String (line 342) | func (l actionList) String() string {
    method Len (line 355) | func (l actionList) Len() int { return len(l) }
    method Swap (line 359) | func (l actionList) Swap(i, j int) { l[i], l[j] = l[j], l[i] }
    method Less (line 363) | func (l actionList) Less(i, j int) bool {
  function asActionList (line 372) | func asActionList(lg *LicenseGraph) actionList {
  function toActionList (line 386) | func toActionList(lg *LicenseGraph, actions []tcond) actionList {
  type confl (line 405) | type confl struct
  function toConflictList (line 411) | func toConflictList(lg *LicenseGraph, data []confl) []SourceSharePrivacy...
  function checkSameActions (line 428) | func checkSameActions(lg *LicenseGraph, asActual, asExpected ActionSet, ...
  function checkSame (line 438) | func checkSame(rsActual, rsExpected ResolutionSet, t *testing.T) {
  function checkResolvesActions (line 492) | func checkResolvesActions(lg *LicenseGraph, asActual, asExpected ActionS...
  function checkResolves (line 503) | func checkResolves(rsActual, rsExpected ResolutionSet, t *testing.T) {

FILE: tools/compliance/testfs/testfs.go
  type TestFS (line 26) | type TestFS
    method Open (line 32) | func (tfs *TestFS) Open(name string) (fs.File, error) {
    method Stat (line 40) | func (tfs *TestFS) Stat(name string) (fs.FileInfo, error) {
  type TestFileInfo (line 57) | type TestFileInfo struct
    method Name (line 66) | func (fi *TestFileInfo) Name() string {
    method Size (line 71) | func (fi *TestFileInfo) Size() int64 {
    method Mode (line 76) | func (fi *TestFileInfo) Mode() fs.FileMode {
    method ModTime (line 81) | func (fi *TestFileInfo) ModTime() time.Time {
    method IsDir (line 86) | func (fi *TestFileInfo) IsDir() bool {
    method Sys (line 91) | func (fi *TestFileInfo) Sys() any {
  type TestFile (line 96) | type TestFile struct
    method Stat (line 105) | func (f *TestFile) Stat() (fs.FileInfo, error) {
    method Read (line 110) | func (f *TestFile) Read(b []byte) (int, error) {
    method Close (line 123) | func (f *TestFile) Close() error {

FILE: tools/dependency_mapper/src/com/android/dependencymapper/ClassDependenciesVisitor.java
  class ClassDependenciesVisitor (line 36) | public class ClassDependenciesVisitor extends ClassVisitor {
    method ClassDependenciesVisitor (line 50) | private ClassDependenciesVisitor(ClassReader reader, ClassRelevancyFil...
    method analyze (line 60) | public static ClassDependencyData analyze(
    method visitSource (line 73) | @Override
    method visit (line 78) | @Override
    method collectRemainingClassDependencies (line 97) | private void collectRemainingClassDependencies(ClassReader reader) {
    method maybeAddClassTypesFromSignature (line 111) | private void maybeAddClassTypesFromSignature(String signature, Set<Str...
    method maybeAddClassType (line 124) | protected void maybeAddClassType(Set<String> types, Type type) {
    method getSource (line 138) | public String getSource() {
    method getClassTypes (line 142) | public Set<String> getClassTypes() {
    method getConstantsDefined (line 146) | public Set<Object> getConstantsDefined() {
    method getInlinedUsages (line 150) | public Set<Object> getInlinedUsages() {
    method isAnnotationType (line 154) | private boolean isAnnotationType(String[] interfaces) {
    method visitField (line 158) | @Override
    method visitMethod (line 169) | @Override
    method visitAnnotation (line 181) | @Override
    method isAccessible (line 191) | private static boolean isAccessible(int access) {
    method isAccessibleConstant (line 195) | private static boolean isAccessibleConstant(int access, Object value) {
    method isConstant (line 199) | private static boolean isConstant(int access) {
    method isDependencyToAll (line 203) | public boolean isDependencyToAll() {
    class FieldVisitor (line 207) | private class FieldVisitor extends org.objectweb.asm.FieldVisitor {
      method FieldVisitor (line 210) | public FieldVisitor(Set<String> types) {
      method visitAnnotation (line 215) | @Override
      method visitTypeAnnotation (line 222) | @Override
    class MethodVisitor (line 230) | private class MethodVisitor extends org.objectweb.asm.MethodVisitor {
      method MethodVisitor (line 233) | protected MethodVisitor(Set<String> types) {
      method visitLdcInsn (line 238) | @Override
      method visitLocalVariable (line 244) | @Override
      method visitAnnotation (line 252) | @Override
      method visitParameterAnnotation (line 259) | @Override
      method visitTypeAnnotation (line 266) | @Override
    class RetentionPolicyVisitor (line 274) | private class RetentionPolicyVisitor extends org.objectweb.asm.Annotat...
      method RetentionPolicyVisitor (line 275) | public RetentionPolicyVisitor() {
      method visitEnum (line 279) | @Override
    class AnnotationVisitor (line 290) | private class AnnotationVisitor extends org.objectweb.asm.AnnotationVi...
      method AnnotationVisitor (line 293) | public AnnotationVisitor(Set<String> types) {
      method visit (line 298) | @Override
      method visitArray (line 305) | @Override
      method visitAnnotation (line 310) | @Override

FILE: tools/dependency_mapper/src/com/android/dependencymapper/ClassDependencyAnalyzer.java
  class ClassDependencyAnalyzer (line 33) | public class ClassDependencyAnalyzer {
    method analyze (line 35) | public static List<ClassDependencyData> analyze(Path classJar, ClassRe...

FILE: tools/dependency_mapper/src/com/android/dependencymapper/ClassDependencyData.java
  class ClassDependencyData (line 23) | public class ClassDependencyData {
    method ClassDependencyData (line 31) | public ClassDependencyData(String packagePrependedClassSource, String ...
    method getPackagePrependedClassSource (line 42) | public String getPackagePrependedClassSource() {
    method getQualifiedName (line 46) | public String getQualifiedName() {
    method getClassDependencies (line 50) | public Set<String> getClassDependencies() {
    method getConstantsDefined (line 54) | public Set<Object> getConstantsDefined() {
    method inlinedUsages (line 58) | public Set<Object> inlinedUsages() {
    method isDependencyToAll (line 62) | public boolean isDependencyToAll() {

FILE: tools/dependency_mapper/src/com/android/dependencymapper/ClassRelevancyFilter.java
  class ClassRelevancyFilter (line 24) | public class ClassRelevancyFilter implements Predicate<String> {
    method ClassRelevancyFilter (line 28) | public ClassRelevancyFilter(Set<String> allowlistedClassNames) {
    method test (line 32) | @Override

FILE: tools/dependency_mapper/src/com/android/dependencymapper/DependencyMapper.java
  class DependencyMapper (line 31) | public class DependencyMapper {
    method DependencyMapper (line 39) | public DependencyMapper(List<ClassDependencyData> classAnalysisList, L...
    method buildDependencyMaps (line 44) | public DependencyProto.FileDependencyList buildDependencyMaps() {
    method buildClassDependencyMaps (line 50) | private void buildClassDependencyMaps() {
    method generateSourcePaths (line 88) | private Map<String, String> generateSourcePaths() {
    method combineDependencies (line 95) | private Map<String, Set<String>> combineDependencies(Map<String, Set<S...
    method buildConstantDependencies (line 105) | private Map<String, Set<String>> buildConstantDependencies(
    method buildFileDependencies (line 126) | private void buildFileDependencies(Map<String, Set<String>> combinedCl...
    method buildSourceToClassMap (line 145) | private void buildSourceToClassMap() {
    method createFileDependencies (line 151) | private DependencyProto.FileDependencyList createFileDependencies() {

FILE: tools/dependency_mapper/src/com/android/dependencymapper/JavaSourceAnalyzer.java
  class JavaSourceAnalyzer (line 32) | public class JavaSourceAnalyzer {
    method analyze (line 37) | public static List<JavaSourceData> analyze(Path srcRspFile) {
    method constructPackagePrependedFileName (line 58) | private static String constructPackagePrependedFileName(String filePat...

FILE: tools/dependency_mapper/src/com/android/dependencymapper/JavaSourceData.java
  class JavaSourceData (line 21) | public class JavaSourceData {
    method JavaSourceData (line 26) | public JavaSourceData(String filePath, String packagePrependedFileName) {
    method getFilePath (line 31) | public String getFilePath() {
    method getPackagePrependedFileName (line 35) | public String getPackagePrependedFileName() {

FILE: tools/dependency_mapper/src/com/android/dependencymapper/Main.java
  class Main (line 28) | public class Main {
    method main (line 30) | public static void main(String[] args) throws IOException, Interrupted...
    class InputData (line 40) | private static class InputData {
      method InputData (line 45) | public InputData(Path srcList, Path classesJar, Path dependencyMapPr...
    method parseAndValidateInput (line 52) | private static InputData parseAndValidateInput(String[] args) {
    method validateFile (line 87) | private static void validateFile(Path path, String argName) {
    method generateDependencyMap (line 99) | private static void generateDependencyMap(InputData input) {
    method showUsage (line 115) | private static void showUsage() {

FILE: tools/dependency_mapper/src/com/android/dependencymapper/Utils.java
  class Utils (line 36) | public class Utils {
    method trimAndConvertToPackageBasedPath (line 38) | public static String trimAndConvertToPackageBasedPath(String fileBased...
    method buildPackagePrependedClassSource (line 43) | public static String buildPackagePrependedClassSource(String qualified...
    method writeContentsToJson (line 51) | public static void writeContentsToJson(DependencyProto.FileDependencyL...
    method writeContentsToProto (line 67) | public static void writeContentsToProto(DependencyProto.FileDependency...
    method listClassesInJar (line 77) | public static Set<String> listClassesInJar(Path classesJarPath) {

FILE: tools/dependency_mapper/tests/res/testdata/annotation/AnnotationUsage.java
  class AnnotationUsage (line 18) | @res.testdata.annotation.RuntimeAnnotation
    method AnnotationUsage (line 23) | public AnnotationUsage(@res.testdata.annotation.SourceAnnotation int s...
    method getSourceAnnField (line 27) | public @res.testdata.annotation.SourceAnnotation int getSourceAnnField...

FILE: tools/dependency_mapper/tests/res/testdata/constants/ConstantDefinition.java
  class ConstantDefinition (line 18) | public class ConstantDefinition {

FILE: tools/dependency_mapper/tests/res/testdata/constants/ConstantUsage.java
  class ConstantUsage (line 18) | public class ConstantUsage {
    method ConstantUsage (line 20) | public ConstantUsage(){}
    method useConstantInMethodBody (line 22) | public String useConstantInMethodBody() {

FILE: tools/dependency_mapper/tests/res/testdata/inheritance/BaseClass.java
  class BaseClass (line 18) | public class BaseClass {

FILE: tools/dependency_mapper/tests/res/testdata/inheritance/BaseImpl.java
  type BaseImpl (line 18) | public interface BaseImpl {
    method baseImpl (line 20) | void baseImpl();

FILE: tools/dependency_mapper/tests/res/testdata/inheritance/InheritanceUsage.java
  class InheritanceUsage (line 18) | public class InheritanceUsage extends res.testdata.inheritance.BaseClass...
    method baseImpl (line 20) | @Override

FILE: tools/dependency_mapper/tests/res/testdata/methods/FieldUsage.java
  class FieldUsage (line 18) | public class FieldUsage {

FILE: tools/dependency_mapper/tests/res/testdata/methods/MethodUsage.java
  class MethodUsage (line 18) | public class MethodUsage {
    method methodReferences (line 20) | public void methodReferences(res.testdata.methods.ReferenceClass1 mRef...

FILE: tools/dependency_mapper/tests/res/testdata/methods/ReferenceClass1.java
  class ReferenceClass1 (line 18) | public class ReferenceClass1 {
    method ReferenceClass1 (line 20) | public ReferenceClass1(){}

FILE: tools/dependency_mapper/tests/res/testdata/methods/ReferenceClass2.java
  class ReferenceClass2 (line 18) | public class ReferenceClass2 {
    method ReferenceClass2 (line 19) | public ReferenceClass2(){}

FILE: tools/dependency_mapper/tests/src/com/android/dependencymapper/ClassDependencyAnalyzerTest.java
  class ClassDependencyAnalyzerTest (line 33) | public class ClassDependencyAnalyzerTest {
    method beforeClass (line 40) | @BeforeClass
    method testAnnotationDeps (line 49) | @Test
    method testConstantsDeps (line 68) | @Test
    method testInheritanceDeps (line 92) | @Test
    method testMethodDeps (line 103) | @Test
    method dependencyVerifier (line 116) | private void dependencyVerifier(String qualifiedName, Set<String> deps...

FILE: tools/dependency_mapper/tests/src/com/android/dependencymapper/ClassRelevancyFilterTest.java
  class ClassRelevancyFilterTest (line 34) | public class ClassRelevancyFilterTest {
    method testClassRelevancyFilter (line 39) | @Test

FILE: tools/dependency_mapper/tests/src/com/android/dependencymapper/DependencyMapperTest.java
  class DependencyMapperTest (line 32) | public class DependencyMapperTest {
    method beforeAll (line 114) | @BeforeClass
    method testFileDependencies (line 120) | @Test
    method validateDependencies (line 166) | private void validateDependencies(DependencyProto.FileDependency depen...
    method buildActualDepsMap (line 171) | private static Map<String, DependencyProto.FileDependency> buildActual...

FILE: tools/dependency_mapper/tests/src/com/android/dependencymapper/JavaSourceAnalyzerTest.java
  class JavaSourceAnalyzerTest (line 30) | public class JavaSourceAnalyzerTest {
    method beforeClass (line 36) | @BeforeClass
    method validateSourceData (line 43) | @Test
    method expectedSourceData (line 59) | private Map<String, String> expectedSourceData() {

FILE: tools/dependency_mapper/tests/src/com/android/dependencymapper/UtilsTest.java
  class UtilsTest (line 24) | public class UtilsTest {
    method testTrimAndConvertToPackageBasedPath (line 26) | @Test
    method testBuildPackagePrependedClassSource (line 40) | @Test

FILE: tools/droiddoc/templates-pdk/assets/android-developer-docs.js
  function addLoadEvent (line 16) | function addLoadEvent(newfun) {
  function mobileSetup (line 48) | function mobileSetup() {
  function setToRoot (line 71) | function setToRoot(root) {
  function restoreWidth (line 76) | function restoreWidth(navWidth) {
  function restoreHeight (line 90) | function restoreHeight(packageHeight) {
  function readCookie (line 103) | function readCookie(cookie) {
  function writeCookie (line 120) | function writeCookie(cookie, val, section, expiration) {
  function init (line 131) | function init() {
  function tryPopulateResourcesNav (line 174) | function tryPopulateResourcesNav() {
  function highlightNav (line 249) | function highlightNav(fullPageName) {
  function resizePackagesHeight (line 307) | function resizePackagesHeight() {
  function resizeHeight (line 323) | function resizeHeight() {
  function resizeWidth (line 354) | function resizeWidth() {
  function resizeAll (line 383) | function resizeAll() {
  function getBaseUri (line 388) | function getBaseUri(uri) {
  function requestAppendHL (line 401) | function requestAppendHL(uri) {
  function loadLast (line 414) | function loadLast(cookiePath) {
  function toggle (line 438) | function toggle(obj, slide) {
  function buildToggleLists (line 458) | function buildToggleLists() {
  function getNavPref (line 466) | function getNavPref() {
  function chooseDefaultNav (line 474) | function chooseDefaultNav() {
  function swapNav (line 484) | function swapNav() {
  function scrollIntoView (line 507) | function scrollIntoView(nav) {
  function changeTabLang (line 535) | function changeTabLang(lang) {
  function changeNavLang (line 549) | function changeNavLang(lang) {
  function changeDocLang (line 563) | function changeDocLang(lang) {
  function changeLangPref (line 568) | function changeLangPref(lang, refresh) {
  function loadLangPref (line 580) | function loadLangPref() {
  function getLangPref (line 587) | function getLangPref() {
  function toggleContent (line 598) | function toggleContent(obj) {

FILE: tools/droiddoc/templates-pdk/assets/android-developer-reference.js
  function toggleApiLevelSelector (line 10) | function toggleApiLevelSelector(checkbox) {
  function buildApiLevelSelector (line 26) | function buildApiLevelSelector() {
  function changeApiLevel (line 58) | function changeApiLevel() {
  function toggleVisisbleApis (line 87) | function toggleVisisbleApis(selectedLevel, context) {
  function new_node (line 117) | function new_node(me, mom, text, link, children_data, api_level)
  function expand_node (line 196) | function expand_node(me, node)
  function get_node (line 215) | function get_node(me, mom)
  function this_page_relative (line 225) | function this_page_relative(toroot)
  function find_page (line 252) | function find_page(url, data)
  function load_navtree_data (line 271) | function load_navtree_data(toroot) {
  function init_default_navtree (line 278) | function init_default_navtree(toroot) {
  function init_navtree (line 286) | function init_navtree(navtree_id, toroot, root_nodes)
  function toggleInherited (line 326) | function toggleInherited(linkObj, expand) {
  function toggleAllInherited (line 353) | function toggleAllInherited(linkObj, expand) {
  function toggleAllClassInherited (line 373) | function toggleAllClassInherited() {
  function ensureAllInheritedExpanded (line 391) | function ensureAllInheritedExpanded() {

FILE: tools/droiddoc/templates-pdk/assets/android-developer-resource-browser.js
  function resultMatchesKeyword (line 42) | function resultMatchesKeyword(result, keyword) {
  function loadTags (line 60) | function loadTags() {
  function loadResources (line 74) | function loadResources() {
  function showResults (line 104) | function showResults(params) {
  function humanizeList (line 176) | function humanizeList(arr, itemFormatter) {
  function parseParams (line 194) | function parseParams(paramStr) {
  function makeArray (line 224) | function makeArray(o) {

FILE: tools/droiddoc/templates-pdk/assets/carousel.js
  function randomDroid (line 21) | function randomDroid(){
  function droid (line 42) | function droid(appName){
  function buildCarousel (line 59) | function buildCarousel() {
  function showPreview (line 131) | function showPreview(slideName) {
  function makeSlideStrip (line 155) | function makeSlideStrip() {
  function slide (line 178) | function slide(goal, id, go_left, cp) {
  function getStyle (line 212) | function getStyle(element, cssProperty){
  function page_left (line 223) | function page_left() {
  function page_right (line 228) | function page_right() {
  function animateSlide (line 236) | function animateSlide(amount,dir) {
  function centerSlide (line 295) | function centerSlide(slideName) {
  function initCarousel (line 307) | function initCarousel(def) {

FILE: tools/droiddoc/templates-pdk/assets/customizations.js
  function showApiWarning (line 1) | function showApiWarning(thing, selectedLevel, minLevel) {

FILE: tools/droiddoc/templates-pdk/assets/prettify.js
  function Ld (line 11) | function Ld(a){return a.replace(Ja,pb).replace(Ka,qb).replace(La,rb).rep...
  function ga (line 11) | function ga(a){return a.replace(Ja,pb).replace(Ka,qb).replace(La,rb)}
  function Sd (line 12) | function Sd(a){var b=a.indexOf(G);if(b<0)return a;for(--b;(b=a.indexOf(t...
  function Ma (line 12) | function Ma(a){return yb===a.tagName}
  function W (line 12) | function W(a,b){switch(a.nodeType){case 1:var c=
  function Na (line 13) | function Na(a){for(var b=0,c=z,d=z,g=0,i=a.length;g<i;++g){var m=a[g];if...
  function Td (line 18) | function Td(a){if(r===ha){var b=document.createElement(gc);b.appendChild...
  function Ud (line 18) | function Ud(a){var b=0;return function(c){for(var d=r,g=0,i=0,m=c.length...
  function Zd (line 19) | function Zd(a){var b=a.match(Vd),c=[],d=0,g=[];if(b)for(var i=0,m=b.leng...
  function $d (line 20) | function $d(a){return!!a.replace(/\s(\w+)\s*=\s*(?:\"([^\"]*)\"|'([^\']*...
  function ia (line 20) | function ia(a,b,c,d){if(b){var g={source:b,b:a};c(g);d.push.apply(d,g.c)}}
  function K (line 20) | function K(a,b){var c={},d;(function(){for(var m=a.concat(b),
  function C (line 22) | function C(a){var b=[],c=[];if(a.tripleQuotedStrings)b.push([U,/^(?:\'\'...
  function be (line 24) | function be(a){var b=a.source,c=a.f,d=a.c,
  function y (line 26) | function y(a,b){for(var c=b.length;--c>=0;){var d=b[c];if(X.hasOwnProper...
  function Ra (line 26) | function Ra(a,b){a&&X.hasOwnProperty(a)||(a=/^\s*</.test(b)?Kc:Lc);retur...
  function Sa (line 29) | function Sa(a){var b=a.e,c=a.d;a.a=b;try{var d=Zd(b),g=d.source;a.source...
  function ce (line 29) | function ce(a,b){var c={e:a,d:b};Sa(c);return c.a}
  function de (line 29) | function de(a){for(var b=window._pr_isIE6(),c=[document.getElementsByTag...

FILE: tools/droiddoc/templates-pdk/assets/search_autocomplete.js
  function set_row_selected (line 9) | function set_row_selected(row, selected)
  function set_row_values (line 22) | function set_row_values(toroot, row, match)
  function sync_selection_table (line 30) | function sync_selection_table(toroot)
  function search_changed (line 104) | function search_changed(e, kd, toroot)
  function rank_autocomplete_results (line 161) | function rank_autocomplete_results(query) {
  function highlight_autocomplete_result_labels (line 231) | function highlight_autocomplete_result_labels(query) {
  function search_focus_changed (line 246) | function search_focus_changed(obj, focused)
  function submit_search (line 262) | function submit_search() {

FILE: tools/droiddoc/test/generics/src/com/android/generics/AbsListView.java
  class AbsListView (line 19) | public class AbsListView implements AdapterView<ListAdapter> {

FILE: tools/droiddoc/test/generics/src/com/android/generics/Adapter.java
  class Adapter (line 19) | public class Adapter {

FILE: tools/droiddoc/test/generics/src/com/android/generics/AdapterView.java
  type AdapterView (line 19) | public interface AdapterView<T extends Adapter> {

FILE: tools/droiddoc/test/generics/src/com/android/generics/Bar.java
  type Bar (line 19) | public interface Bar<K> {
    method bar (line 20) | public K bar(K arg);

FILE: tools/droiddoc/test/generics/src/com/android/generics/Foo.java
  class Foo (line 19) | public class Foo<V> {
    method Foo (line 20) | public Foo(V v) {
    method foo (line 23) | public V foo(V arg) {

FILE: tools/droiddoc/test/generics/src/com/android/generics/FooBar.java
  class FooBar (line 19) | public class FooBar<K,V,L> extends Foo<V> implements Bar<K> {
    class C (line 20) | public class C
    class CI (line 24) | public class CI extends C implements Iface
    method FooBar (line 28) | public FooBar(K k) {
    method bar (line 33) | public K bar(K arg) {
    method a (line 37) | public FooBar<K,? extends Foo,L> a(K arg) {
    method b (line 41) | public FooBar<V,K,L> b(Bar<? extends K> arg) {
    method f (line 45) | public <L extends C & Iface> void f(L arg) {

FILE: tools/droiddoc/test/generics/src/com/android/generics/Iface.java
  type Iface (line 19) | public interface Iface {

FILE: tools/droiddoc/test/generics/src/com/android/generics/ListAdapter.java
  class ListAdapter (line 19) | public class ListAdapter extends Adapter {

FILE: tools/droiddoc/test/generics/src/com/android/generics/TestComparable.java
  type TestComparable (line 19) | public interface TestComparable<T> {

FILE: tools/droiddoc/test/generics/src/com/android/generics/TestEnum.java
  class TestEnum (line 19) | public class TestEnum<E extends TestEnum<E>> implements TestComparable<E> {

FILE: tools/droiddoc/test/stubs/expected/com/android/stubs/InterfaceEnum.java
  type InterfaceEnum (line 2) | public enum InterfaceEnum
    method method (line 6) | public  void method() { throw new RuntimeException("Stub!"); }

FILE: tools/droiddoc/test/stubs/expected/com/android/stubs/Parent.java
  class Parent (line 2) | @com.android.stubs.Annot(value="asdf")
    type Interface (line 5) | public static interface Interface
      method method (line 7) | public  void method();
    method Parent (line 9) | public  Parent() { throw new RuntimeException("Stub!"); }
    method methodString (line 10) | public  java.lang.String methodString() { throw new RuntimeException("...
    method method (line 11) | public  int method(boolean b, char c, int i, long l, float f, double d...
    method protectedMethod (line 12) | protected  void protectedMethod() { throw new RuntimeException("Stub!"...

FILE: tools/droiddoc/test/stubs/expected/com/android/stubs/SomeEnum.java
  type SomeEnum (line 2) | public enum SomeEnum

FILE: tools/droiddoc/test/stubs/expected/com/android/stubs/Types.java
  class Types (line 2) | public class Types
    type Interface (line 4) | public static interface Interface
    method Types (line 15) | protected  Types() { throw new RuntimeException("Stub!"); }

FILE: tools/droiddoc/test/stubs/expected/com/android/stubs/a/A.java
  class A (line 2) | public abstract class A
    class Inner (line 6) | public class Inner
      method Inner (line 8) | public  Inner() { throw new RuntimeException("Stub!"); }
    method A (line 10) | protected  A(int a) { throw new RuntimeException("Stub!"); }
    method varargs (line 11) | public  com.android.stubs.a.A varargs(com.android.stubs.Parent[]... ar...
    method method (line 12) | public  void method() { throw new RuntimeException("Stub!"); }
    method stringArrayMethod (line 13) | public abstract  java.lang.String[] stringArrayMethod() throws java.io...

FILE: tools/droiddoc/test/stubs/expected/com/android/stubs/a/SomeInterface.java
  type SomeInterface (line 2) | public interface SomeInterface

FILE: tools/droiddoc/test/stubs/expected/com/android/stubs/b/B.java
  class B (line 2) | public class B
    method B (line 4) | public  B() { throw new RuntimeException("Stub!"); }

FILE: tools/droiddoc/test/stubs/src/com/android/stubs/InterfaceEnum.java
  type InterfaceEnum (line 19) | public enum InterfaceEnum implements Parent.Interface {
    method method (line 22) | public void method() { }

FILE: tools/droiddoc/test/stubs/src/com/android/stubs/Parent.java
  class Parent (line 19) | @Annot("asdf")
    type Interface (line 35) | public interface Interface {
      method method (line 36) | void method();
    method Parent (line 39) | public Parent() {
    method methodString (line 42) | public String methodString() {
    method method (line 46) | public int method(boolean b, char c, int i, long l, float f, double d) {
    method protectedMethod (line 50) | protected void protectedMethod() {
    method packagePrivateMethod (line 53) | void packagePrivateMethod() {
    method hiddenMethod (line 57) | public void hiddenMethod() {

FILE: tools/droiddoc/test/stubs/src/com/android/stubs/SomeEnum.java
  type SomeEnum (line 19) | public enum SomeEnum {

FILE: tools/droiddoc/test/stubs/src/com/android/stubs/Types.java
  class Types (line 19) | public class Types {
    method Types (line 39) | public Types() {
    type Interface (line 61) | public interface Interface {

FILE: tools/droiddoc/test/stubs/src/com/android/stubs/a/A.java
  class A (line 21) | public abstract class A extends Parent implements Parent.Interface, Some...
    method A (line 22) | protected A(int a) {
    method varargs (line 26) | public A varargs(Parent... args) {
    method method (line 30) | public void method() {
    method stringArrayMethod (line 32) | public abstract String[] stringArrayMethod() throws java.io.IOException;
    class Inner (line 34) | public class Inner {
      method method (line 35) | int method() {

FILE: tools/droiddoc/test/stubs/src/com/android/stubs/a/SomeInterface.java
  type SomeInterface (line 19) | public interface SomeInterface {

FILE: tools/droiddoc/test/stubs/src/com/android/stubs/b/B.java
  class B (line 22) | public class B {
    method method (line 23) | Parent method(Parent p) {

FILE: tools/droiddoc/test/stubs/src/com/android/stubs/hidden/Hidden.java
  class Hidden (line 20) | public class Hidden {

FILE: tools/droiddoc/test/stubs/src/com/android/stubs/hidden/HiddenOuter.java
  class HiddenOuter (line 20) | public class HiddenOuter {
    class NotHiddenInner (line 22) | public class NotHiddenInner {

FILE: tools/droiddoc/test/stubs/src/com/android/stubs/hidden/PackagePrivate.java
  class PackagePrivate (line 19) | class PackagePrivate {

FILE: tools/edit_monitor/daemon_manager.py
  function default_daemon_target (line 47) | def default_daemon_target():
  class DaemonManager (line 52) | class DaemonManager:
    method __init__ (line 55) | def __init__(
    method start (line 86) | def start(self):
    method monitor_daemon (line 132) | def monitor_daemon(
    method stop (line 189) | def stop(self):
    method reboot (line 211) | def reboot(self):
    method cleanup (line 236) | def cleanup(self):
    method _stop_any_existing_instance (line 264) | def _stop_any_existing_instance(self):
    method _read_pid_from_pidfile (line 276) | def _read_pid_from_pidfile(self) -> int | None:
    method _write_pid_to_pidfile (line 284) | def _write_pid_to_pidfile(self):
    method _start_daemon_process (line 301) | def _start_daemon_process(self):
    method _terminate_process (line 312) | def _terminate_process(
    method _wait_for_process_terminate (line 331) | def _wait_for_process_terminate(self, pid: int, timeout: int) -> bool:
    method _is_process_alive (line 342) | def _is_process_alive(self, pid: int) -> bool:
    method _remove_pidfile (line 358) | def _remove_pidfile(self, expected_pid: int):
    method _get_pid_file_path (line 380) | def _get_pid_file_path(self, pid_file_dir: pathlib.Path) -> pathlib.Path:
    method _get_process_memory_percent (line 394) | def _get_process_memory_percent(self, pid: int) -> float:
    method _get_process_cpu_percent (line 407) | def _get_process_cpu_percent(self, pid: int, interval: int = 1) -> float:
    method _get_total_cpu_time (line 422) | def _get_total_cpu_time(self, pid: int) -> float:
    method _find_all_instances_pids (line 431) | def _find_all_instances_pids(self) -> list[int]:
    method _send_error_event_to_clearcut (line 450) | def _send_error_event_to_clearcut(self, error_type):

FILE: tools/edit_monitor/daemon_manager_test.py
  function simple_daemon (line 39) | def simple_daemon(output_file):
  function long_running_daemon (line 44) | def long_running_daemon():
  function memory_consume_daemon_target (line 49) | def memory_consume_daemon_target(size_mb):
  function cpu_consume_daemon_target (line 58) | def cpu_consume_daemon_target(target_usage_percent):
  class DaemonManagerTest (line 68) | class DaemonManagerTest(unittest.TestCase):
    method setUpClass (line 71) | def setUpClass(cls):
    method setUp (line 78) | def setUp(self):
    method tearDown (line 90) | def tearDown(self):
    method test_start_success_with_no_existing_instance (line 99) | def test_start_success_with_no_existing_instance(self):
    method test_start_success_with_existing_instance_running (line 102) | def test_start_success_with_existing_instance_running(self):
    method test_start_success_with_existing_instance_already_dead (line 109) | def test_start_success_with_existing_instance_already_dead(self):
    method test_start_success_with_existing_instance_from_different_binary (line 120) | def test_start_success_with_existing_instance_from_different_binary(se...
    method test_start_return_directly_if_block_sign_exists (line 131) | def test_start_return_directly_if_block_sign_exists(self):
    method test_start_return_directly_if_disabled (line 146) | def test_start_return_directly_if_disabled(self):
    method test_start_return_directly_if_in_cog_env (line 153) | def test_start_return_directly_if_in_cog_env(self):
    method test_start_failed_other_instance_is_starting (line 162) | def test_start_failed_other_instance_is_starting(self):
    method test_start_failed_to_kill_existing_instance (line 182) | def test_start_failed_to_kill_existing_instance(self, mock_kill):
    method test_start_failed_to_write_pidfile (line 199) | def test_start_failed_to_write_pidfile(self):
    method test_start_failed_to_start_daemon_process (line 216) | def test_start_failed_to_start_daemon_process(self):
    method test_monitor_reboot_with_high_memory_usage (line 231) | def test_monitor_reboot_with_high_memory_usage(self, mock_execv):
    method test_monitor_daemon_subprocess_killed_high_cpu_usage (line 256) | def test_monitor_daemon_subprocess_killed_high_cpu_usage(self):
    method test_monitor_daemon_failed_does_not_matter (line 275) | def test_monitor_daemon_failed_does_not_matter(self, mock_output):
    method test_monitor_daemon_reboot_triggered (line 280) | def test_monitor_daemon_reboot_triggered(self, mock_execv):
    method test_stop_success (line 293) | def test_stop_success(self):
    method test_stop_failed_to_kill_daemon_process (line 304) | def test_stop_failed_to_kill_daemon_process(self, mock_kill):
    method test_stop_failed_to_remove_pidfile (line 323) | def test_stop_failed_to_remove_pidfile(self, mock_remove):
    method test_reboot_success (line 344) | def test_reboot_success(self, mock_execv):
    method test_reboot_binary_no_longer_exists (line 362) | def test_reboot_binary_no_longer_exists(self, mock_execv):
    method test_reboot_failed (line 374) | def test_reboot_failed(self, mock_execv):
    method test_cleanup_success (line 396) | def test_cleanup_success(self, mock_check_output):
    method assert_run_simple_daemon_success (line 415) | def assert_run_simple_daemon_success(self):
    method assert_no_subprocess_running (line 438) | def assert_no_subprocess_running(self):
    method _get_child_processes (line 445) | def _get_child_processes(self, parent_pid: int) -> list[int]:
    method _is_process_alive (line 460) | def _is_process_alive(self, pid: int) -> bool:
    method _cleanup_child_processes (line 470) | def _cleanup_child_processes(self):
    method _create_fake_deamon_process (line 479) | def _create_fake_deamon_process(
    method _assert_error_event_logged (line 495) | def _assert_error_event_logged(self, fake_cclient, error_type):
  class FakeClearcutClient (line 506) | class FakeClearcutClient:
    method __init__ (line 508) | def __init__(self):
    method log (line 512) | def log(self, log_event):
    method flush_events (line 515) | def flush_events(self):
    method get_sent_events (line 519) | def get_sent_events(self):

FILE: tools/edit_monitor/edit_monitor.py
  class ClearcutEventHandler (line 39) | class ClearcutEventHandler(PatternMatchingEventHandler):
    method __init__ (line 41) | def __init__(
    method on_moved (line 65) | def on_moved(self, event: FileSystemEvent):
    method on_created (line 68) | def on_created(self, event: FileSystemEvent):
    method on_deleted (line 71) | def on_deleted(self, event: FileSystemEvent):
    method on_modified (line 74) | def on_modified(self, event: FileSystemEvent):
    method flushall (line 77) | def flushall(self):
    method _log_edit_event (line 87) | def _log_edit_event(
    method _is_hidden_file (line 130) | def _is_hidden_file(self, file_path: pathlib.Path) -> bool:
    method _is_under_git_project (line 136) | def _is_under_git_project(self, file_path: pathlib.Path) -> bool:
    method _log_clearcut_events (line 143) | def _log_clearcut_events(self):
  function start (line 183) | def start(

FILE: tools/edit_monitor/edit_monitor_integration_test.py
  class EditMonitorIntegrationTest (line 32) | class EditMonitorIntegrationTest(unittest.TestCase):
    method setUpClass (line 35) | def setUpClass(cls):
    method setUp (line 42) | def setUp(self):
    method tearDown (line 55) | def tearDown(self):
    method test_log_single_edit_event_success (line 60) | def test_log_single_edit_event_success(self):
    method test_start_multiple_edit_monitor_only_one_started (line 86) | def test_start_multiple_edit_monitor_only_one_started(self):
    method _start_edit_monitor_process (line 100) | def _start_edit_monitor_process(self, wait_for_observer_start=True):
    method _wait_for_observer_start (line 116) | def _wait_for_observer_start(self, time_out):
    method _get_logged_events_num (line 132) | def _get_logged_events_num(self):
    method _get_live_processes (line 144) | def _get_live_processes(self, processes):
    method _import_executable (line 156) | def _import_executable(self, executable_name: str) -> pathlib.Path:

FILE: tools/edit_monitor/edit_monitor_test.py
  class EditMonitorTest (line 32) | class EditMonitorTest(unittest.TestCase):
    method setUpClass (line 35) | def setUpClass(cls):
    method setUp (line 42) | def setUp(self):
    method tearDown (line 52) | def tearDown(self):
    method test_log_single_edit_event_success (line 56) | def test_log_single_edit_event_success(self):
    method test_log_aggregated_edit_event_success (line 131) | def test_log_aggregated_edit_event_success(self):
    method test_do_not_log_edit_event_for_directory_change (line 166) | def test_do_not_log_edit_event_for_directory_change(self):
    method test_do_not_log_edit_event_for_hidden_file (line 185) | def test_do_not_log_edit_event_for_hidden_file(self):
    method test_do_not_log_edit_event_for_non_git_project_file (line 208) | def test_do_not_log_edit_event_for_non_git_project_file(self):
    method test_log_edit_event_fail (line 229) | def test_log_edit_event_fail(self):
    method _start_test_edit_monitor_process (line 249) | def _start_test_edit_monitor_process(
    method _get_logged_events (line 268) | def _get_logged_events(self):
  class FakeClearcutClient (line 279) | class FakeClearcutClient:
    method __init__ (line 281) | def __init__(self, log_output_file, raise_log_exception=False):
    method log (line 286) | def log(self, log_event):
    method flush_events (line 291) | def flush_events(self):

FILE: tools/edit_monitor/main.py
  function create_arg_parser (line 26) | def create_arg_parser():
  function configure_logging (line 71) | def configure_logging(verbose=False):
  function term_signal_handler (line 89) | def term_signal_handler(_signal_number, _frame):
  function main (line 94) | def main(argv: list[str]):

FILE: tools/edit_monitor/utils.py
  function is_feature_enabled (line 20) | def is_feature_enabled(

FILE: tools/edit_monitor/utils_test.py
  class EnableFeatureTest (line 28) | class EnableFeatureTest(unittest.TestCase):
    method test_feature_enabled_without_flag (line 30) | def test_feature_enabled_without_flag(self):
    method test_feature_disabled_with_flag (line 34) | def test_feature_disabled_with_flag(self):
    method test_feature_enabled_with_flag (line 42) | def test_feature_enabled_with_flag(self):
    method test_feature_enabled_with_rollout_percentage (line 49) | def test_feature_enabled_with_rollout_percentage(self):
    method test_feature_disabled_with_rollout_percentage (line 59) | def test_feature_disabled_with_rollout_percentage(self):

FILE: tools/event_log_tags.py
  class Tag (line 23) | class Tag:
  class TagFile (line 31) | class TagFile:
    method AddError (line 33) | def AddError(self, msg, linenum=None):
    method AddWarning (line 38) | def AddWarning(self, msg, linenum=None):
    method __init__ (line 43) | def __init__(self, filename, file_object=None):
  function BooleanFromString (line 105) | def BooleanFromString(s):
  function WriteOutput (line 117) | def WriteOutput(output_file, data):

FILE: tools/extract_kernel.py
  function get_from_release (line 46) | def get_from_release(input_bytes, start_idx, key):
  function dump_from_release (line 60) | def dump_from_release(input_bytes, key):
  function dump_version (line 77) | def dump_version(input_bytes):
  function dump_compiler (line 85) | def dump_compiler(input_bytes):
  function dump_release (line 93) | def dump_release(input_bytes):
  function dump_configs (line 101) | def dump_configs(input_bytes):
  function try_decompress_bytes (line 130) | def try_decompress_bytes(cmd, input_bytes):
  function try_decompress (line 138) | def try_decompress(cmd, search_bytes, input_bytes):
  function decompress_dump (line 149) | def decompress_dump(func, input_bytes):
  function dump_to_file (line 171) | def dump_to_file(f, dump_fn, input_bytes, desc):
  function to_bytes_io (line 186) | def to_bytes_io(b):
  function main (line 192) | def main():

FILE: tools/fat16copy.py
  function read_le_short (line 42) | def read_le_short(f):
  function read_le_long (line 46) | def read_le_long(f):
  function read_byte (line 50) | def read_byte(f):
  function skip_bytes (line 54) | def skip_bytes(f, n):
  function skip_short (line 58) | def skip_short(f):
  function skip_byte (line 62) | def skip_byte(f):
  function rewind_bytes (line 66) | def rewind_bytes(f, n):
  function rewind_short (line 70) | def rewind_short(f):
  class fake_file (line 74) | class fake_file(object):
    method seek (line 81) | def seek(self, amount, direction=0):
  class fat_file (line 95) | class fat_file(fake_file):
    method __init__ (line 102) | def __init__(self, fs, cluster, size=None):
    method read (line 118) | def read(self, size):
    method write (line 126) | def write(self, data):
  function shorten (line 134) | def shorten(name, index):
  class fat_dir (line 144) | class fat_dir(object):
    method __init__ (line 147) | def __init__(self, backing):
    method __str__ (line 165) | def __str__(self):
    method add_dentry (line 168) | def add_dentry(self, attributes, shortname, ext, longname, first_cluster,
    method make_short_name (line 187) | def make_short_name(self, name):
    method new_file (line 214) | def new_file(self, name, data=None):
    method open_subdirectory (line 237) | def open_subdirectory(self, name):
  function lfn_checksum (line 263) | def lfn_checksum(name_data):
  class dentry (line 282) | class dentry(object):
    method __init__ (line 284) | def __init__(self, fs, attributes, shortname, ext, longname,
    method name (line 307) | def name(self):
    method __str__ (line 317) | def __str__(self):
    method is_directory (line 321) | def is_directory(self):
    method open_file (line 325) | def open_file(self):
    method open_directory (line 330) | def open_directory(self):
    method longname_records (line 335) | def longname_records(self, checksum):
    method commit (line 370) | def commit(self, f):
  class root_dentry_file (line 417) | class root_dentry_file(fake_file):
    method __init__ (line 422) | def __init__(self, fs):
    method read (line 427) | def read(self, count):
    method write (line 438) | def write(self, data):
  class fat (line 450) | class fat(object):
    method __init__ (line 453) | def __init__(self, path):
    method data_start (line 482) | def data_start(self):
    method get_chain_size (line 488) | def get_chain_size(self, head_cluster):
    method read_dentry (line 508) | def read_dentry(self, f=None):
    method read_file (line 574) | def read_file(self, head_cluster, start_byte, size):
    method write_cluster_entry (line 621) | def write_cluster_entry(self, entry):
    method allocate (line 632) | def allocate(self, amount):
    method extend_cluster (line 696) | def extend_cluster(self, cluster, amount):
    method write_file (line 713) | def write_file(self, head_cluster, start_byte, data):
  function add_item (line 748) | def add_item(directory, item):

FILE: tools/filelistdiff/file_list_diff.py
  function find_unique_items (line 22) | def find_unique_items(kati_installed_files, soong_installed_files, syste...

FILE: tools/fileslist_util.py
  function PrintFileNames (line 22) | def PrintFileNames(path):
  function PrintCanonicalList (line 28) | def PrintCanonicalList(path):
  function main (line 34) | def main():

FILE: tools/find_static_candidates.py
  function parse_args (line 59) | def parse_args():
  class TransitiveHelper (line 111) | class TransitiveHelper:
    method __init__ (line 113) | def __init__(self):
    method flattenDeps (line 121) | def flattenDeps(self, module, module_info):
  function main (line 137) | def main():

FILE: tools/findleaves.py
  function perform_find (line 26) | def perform_find(mindepth, prune, dirlist, filenames):
  function usage (line 70) | def usage():
  function main (line 87) | def main(argv):

FILE: tools/fs_config/fs_config.c
  function usage (line 51) | static void usage() {
  function main (line 55) | int main(int argc, char** argv) {

FILE: tools/fs_config/fs_config.go
  function init (line 23) | func init() {
  function targetFSConfigGenFactory (line 29) | func targetFSConfigGenFactory() android.Module {
  type targetFSConfigGen (line 37) | type targetFSConfigGen struct
    method DepsMutator (line 42) | func (targetFSConfigGen) DepsMutator(ctx android.BottomUpMutatorContex...
    method GenerateAndroidBuildActions (line 44) | func (t *targetFSConfigGen) GenerateAndroidBuildActions(ctx android.Mo...
    method Srcs (line 58) | func (t *targetFSConfigGen) Srcs() android.Paths {

FILE: tools/fs_config/fs_config_generator.py
  class generator (line 25) | class generator(object):  # pylint: disable=invalid-name
    method __init__ (line 42) | def __init__(self, gen):
    method __call__ (line 58) | def __call__(self, cls):
    method get (line 64) | def get():
  class Utils (line 73) | class Utils(object):
    method in_any_range (line 77) | def in_any_range(va
Condensed preview — 1380 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (7,796K chars).
[
  {
    "path": ".gitignore",
    "chars": 42,
    "preview": "*.iml\n*.pyc\n*.swp\nblueprint/\nkati/\nsoong/\n"
  },
  {
    "path": "Android.bp",
    "chars": 1104,
    "preview": "// Copyright 2024 Google Inc. All rights reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");"
  },
  {
    "path": "Changes.md",
    "chars": 37786,
    "preview": "# Build System Changes for Android.mk/Android.bp Writers\n\n## Soong genrules are now sandboxed\n\nPreviously, soong genrule"
  },
  {
    "path": "CleanSpec.mk",
    "chars": 40291,
    "preview": "# Copyright (C) 2007 The Android Open Source Project\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");"
  },
  {
    "path": "Deprecation.md",
    "chars": 3478,
    "preview": "# Deprecation of Make\n\nWe've made significant progress converting AOSP from Make to Soong (Android.mk\nto Android.bp), an"
  },
  {
    "path": "OWNERS",
    "chars": 276,
    "preview": "include platform/build/soong:/OWNERS\n\n# Since this file affects all Android developers, lock it down. There is still\n# r"
  },
  {
    "path": "PREUPLOAD.cfg",
    "chars": 146,
    "preview": "[Hook Scripts]\ndo_not_use_DO_NOT_MERGE = ${REPO_ROOT}/build/soong/scripts/check_do_not_merge.sh ${PREUPLOAD_COMMIT}\n\n[Bu"
  },
  {
    "path": "README.md",
    "chars": 1055,
    "preview": "# Android Make Build System\n\nThis is the Makefile-based portion of the Android Build System.\n\nFor documentation on how t"
  },
  {
    "path": "Usage.txt",
    "chars": 3720,
    "preview": "Android build system usage:\n\nm [-j] [<targets>] [<variable>=<value>...]\n\n\nWays to specify what to build:\n  The common wa"
  },
  {
    "path": "backported_fixes/Android.bp",
    "chars": 3948,
    "preview": "// Copyright 2024 Google Inc. All rights reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");"
  },
  {
    "path": "backported_fixes/OWNERS",
    "chars": 58,
    "preview": "essick@google.com\nnchalko@google.com\nportmannc@google.com\n"
  },
  {
    "path": "backported_fixes/applied_fixes/ki350037023.txtpb",
    "chars": 705,
    "preview": "# Copyright (C) 2024 The Android Open Source Project\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");"
  },
  {
    "path": "backported_fixes/backported_fixes.proto",
    "chars": 1189,
    "preview": "// Copyright (C) 2024 The Android Open Source Project\n//\n// Licensed under the Apache License, Version 2.0 (the \"License"
  },
  {
    "path": "backported_fixes/src/java/com/android/build/backportedfixes/CombineBackportedFixes.java",
    "chars": 2153,
    "preview": "\n/*\n * Copyright (C) 2024 The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"Lic"
  },
  {
    "path": "backported_fixes/src/java/com/android/build/backportedfixes/WriteBackportedFixesPropFile.java",
    "chars": 3323,
    "preview": "\n/*\n * Copyright (C) 2024 The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"Lic"
  },
  {
    "path": "backported_fixes/src/java/com/android/build/backportedfixes/common/Parser.java",
    "chars": 5068,
    "preview": "/*\n * Copyright (C) 2024 The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"Lice"
  },
  {
    "path": "backported_fixes/tests/java/com/android/build/backportedfixes/CombineBackportedFixesTest.java",
    "chars": 1431,
    "preview": "\n/*\n * Copyright (C) 2024 The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"Lic"
  },
  {
    "path": "backported_fixes/tests/java/com/android/build/backportedfixes/WriteBackportedFixesPropFileTest.java",
    "chars": 2472,
    "preview": "\n/*\n * Copyright (C) 2024 The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"Lic"
  },
  {
    "path": "backported_fixes/tests/java/com/android/build/backportedfixes/common/ParserTest.java",
    "chars": 3450,
    "preview": "/*\n * Copyright (C) 2024 The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"Lice"
  },
  {
    "path": "banchanHelp.sh",
    "chars": 1111,
    "preview": "#!/bin/bash\n\n# locate some directories\ncd \"$(dirname $0)\"\nSCRIPT_DIR=\"${PWD}\"\ncd ../..\nTOP=\"${PWD}\"\n\nmessage='usage: ban"
  },
  {
    "path": "buildspec.mk.default",
    "chars": 4376,
    "preview": "#\n# Copyright (C) 2007 The Android Open Source Project\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\""
  },
  {
    "path": "ci/Android.bp",
    "chars": 3132,
    "preview": "// Copyright 2024 Google Inc. All rights reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");"
  },
  {
    "path": "ci/AndroidTest.xml.template",
    "chars": 941,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!-- Copyright (C) 2020 The Android Open Source Project\n\n     Licensed under the "
  },
  {
    "path": "ci/build_context.py",
    "chars": 2529,
    "preview": "# Copyright 2024, The Android Open Source Project\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# "
  },
  {
    "path": "ci/build_device_and_tests",
    "chars": 786,
    "preview": "#!/usr/bin/env bash\n#\n# Copyright 2024, The Android Open Source Project\n#\n# Licensed under the Apache License, Version 2"
  },
  {
    "path": "ci/build_metadata",
    "chars": 1191,
    "preview": "#/bin/bash\n\n# Copyright 2024, The Android Open Source Project\n#\n# Licensed under the Apache License, Version 2.0 (the \"L"
  },
  {
    "path": "ci/build_test_suites",
    "chars": 771,
    "preview": "#!/usr/bin/env bash\n#\n# Copyright 2024, The Android Open Source Project\n#\n# Licensed under the Apache License, Version 2"
  },
  {
    "path": "ci/build_test_suites.py",
    "chars": 11191,
    "preview": "# Copyright 2024, The Android Open Source Project\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# "
  },
  {
    "path": "ci/build_test_suites_local_test.py",
    "chars": 3781,
    "preview": "# Copyright 2024, The Android Open Source Project\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# "
  },
  {
    "path": "ci/build_test_suites_test.py",
    "chars": 17804,
    "preview": "# Copyright 2024, The Android Open Source Project\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# "
  },
  {
    "path": "ci/buildbot.py",
    "chars": 1655,
    "preview": "# Copyright 2024, The Android Open Source Project\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# "
  },
  {
    "path": "ci/ci_test_lib.py",
    "chars": 2184,
    "preview": "# Copyright 2024, The Android Open Source Project\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# "
  },
  {
    "path": "ci/dump_product_config",
    "chars": 12182,
    "preview": "#!prebuilts/build-tools/linux-x86/bin/py3-cmd -B\n\n# Copyright 2024, The Android Open Source Project\n#\n# Licensed under t"
  },
  {
    "path": "ci/metrics_agent.py",
    "chars": 4124,
    "preview": "# Copyright 2024, The Android Open Source Project\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# "
  },
  {
    "path": "ci/optimized_targets.py",
    "chars": 14957,
    "preview": "#\n# Copyright 2024, The Android Open Source Project\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n"
  },
  {
    "path": "ci/optimized_targets_test.py",
    "chars": 12311,
    "preview": "# Copyright 2024, The Android Open Source Project\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# "
  },
  {
    "path": "ci/test_discovery_agent.py",
    "chars": 4308,
    "preview": "# Copyright 2024, The Android Open Source Project\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# "
  },
  {
    "path": "ci/test_mapping_module_retriever.py",
    "chars": 6694,
    "preview": "# Copyright 2024, The Android Open Source Project\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# "
  },
  {
    "path": "common/core.mk",
    "chars": 1598,
    "preview": "#\n# Copyright (C) 2018 The Android Open Source Project\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\""
  },
  {
    "path": "common/json.mk",
    "chars": 2282,
    "preview": "4space :=$= $(space)$(space)$(space)$(space)\ninvert_bool =$= $(if $(strip $(1)),,true)\n\n# Converts a list to a JSON list"
  },
  {
    "path": "common/math.mk",
    "chars": 16874,
    "preview": "#\n# Copyright (C) 2017 The Android Open Source Project\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\""
  },
  {
    "path": "common/strings.mk",
    "chars": 5610,
    "preview": "#\n# Copyright (C) 2018 The Android Open Source Project\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\""
  },
  {
    "path": "core/LINUX_KERNEL_COPYING",
    "chars": 18693,
    "preview": "\n   NOTE! This copyright does *not* cover user programs that use kernel\n services by normal system calls - this is merel"
  },
  {
    "path": "core/Makefile",
    "chars": 373361,
    "preview": "# Put some miscellaneous rules here\n\n# HACK: clear LOCAL_PATH from including last build target before calling\n# intermed"
  },
  {
    "path": "core/OWNERS",
    "chars": 498,
    "preview": "\n# For global Proguard rules\nper-file proguard*.flags = jdduke@google.com\n\n# For version updates\nper-file version_defaul"
  },
  {
    "path": "core/WINPTHREADS_COPYING",
    "chars": 2883,
    "preview": "Copyright (c) 2011 mingw-w64 project\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of th"
  },
  {
    "path": "core/aapt2.mk",
    "chars": 6682,
    "preview": "######################################\n# Compile resource with AAPT2\n# Input variables:\n# - full_android_manifest\n# - my"
  },
  {
    "path": "core/aapt_flags.mk",
    "chars": 791,
    "preview": "## AAPT Flags\n# aapt doesn't accept multiple --extra-packages flags.\n# We have to collapse them into a single --extra-pa"
  },
  {
    "path": "core/allowed_ndk_types.mk",
    "chars": 3447,
    "preview": "# Determines the types of NDK modules the current module is allowed to link to.\n# Input variables:\n#   LOCAL_MODULE\n#   "
  },
  {
    "path": "core/android_manifest.mk",
    "chars": 5527,
    "preview": "# Handle AndroidManifest.xmls\n# Input: LOCAL_MANIFEST_FILE, LOCAL_FULL_MANIFEST_FILE, LOCAL_FULL_LIBS_MANIFEST_FILES,\n# "
  },
  {
    "path": "core/android_soong_config_vars.mk",
    "chars": 21618,
    "preview": "# Copyright (C) 2020 The Android Open Source Project\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");"
  },
  {
    "path": "core/app_certificate_validate.mk",
    "chars": 479,
    "preview": "\nifeq (true,$(non_system_module))\n  ifneq (,$(filter $(dir $(DEFAULT_SYSTEM_DEV_CERTIFICATE))%,$(LOCAL_CERTIFICATE)))\n  "
  },
  {
    "path": "core/app_prebuilt_internal.mk",
    "chars": 11187,
    "preview": "#\n# Copyright (C) 2019 The Android Open Source Project\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\""
  },
  {
    "path": "core/art_config.mk",
    "chars": 1749,
    "preview": "# ART configuration that has to be determined after product config is resolved.\n#\n# Inputs:\n# PRODUCT_ENABLE_UFFD_GC: Se"
  },
  {
    "path": "core/artifact_path_requirements.mk",
    "chars": 4077,
    "preview": "# This file contains logic to enforce artifact path requirements\n# defined in product makefiles.\n\n# Fakes don't get inst"
  },
  {
    "path": "core/autogen_test_config.mk",
    "chars": 3495,
    "preview": "#\n# Copyright (C) 2017 The Android Open Source Project\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\""
  },
  {
    "path": "core/base_rules.mk",
    "chars": 53977,
    "preview": "#\n# Copyright (C) 2008 The Android Open Source Project\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\""
  },
  {
    "path": "core/binary.mk",
    "chars": 78117,
    "preview": "###########################################################\n## Standard rules for building binary object files from\n## a"
  },
  {
    "path": "core/board_config.mk",
    "chars": 44888,
    "preview": "#\n# Copyright (C) 2019 The Android Open Source Project\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\""
  },
  {
    "path": "core/board_config_wifi.mk",
    "chars": 3276,
    "preview": "#\n# Copyright (C) 2022 The Android Open Source Project\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\""
  },
  {
    "path": "core/board_config_wpa_supplicant.mk",
    "chars": 3426,
    "preview": "#\n# Copyright (C) 2024 The Android Open Source Project\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\""
  },
  {
    "path": "core/build-system.html",
    "chars": 45172,
    "preview": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\n \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
  },
  {
    "path": "core/build_id.mk",
    "chars": 811,
    "preview": "#\n# Copyright (C) 2008 The Android Open Source Project\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\""
  },
  {
    "path": "core/build_rro_package.mk",
    "chars": 1317,
    "preview": "#############################################################################\n## Standard rules for installing runtime r"
  },
  {
    "path": "core/cc_prebuilt_internal.mk",
    "chars": 8227,
    "preview": "#\n# Copyright (C) 2019 The Android Open Source Project\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\""
  },
  {
    "path": "core/ccache.mk",
    "chars": 2431,
    "preview": "#\n# Copyright (C) 2015 The Android Open Source Project\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\""
  },
  {
    "path": "core/check_elf_file.mk",
    "chars": 3194,
    "preview": "# Check the correctness of the prebuilt ELF files\n#\n# This check ensures that DT_SONAME matches with the filename, DT_NE"
  },
  {
    "path": "core/checktree",
    "chars": 2799,
    "preview": "#!/usr/bin/python -E\n\nimport sys, os, re\n\nexcludes = [r'.*?/\\.obj.*?',\n            r'.*?~',\n            r'.*?\\/.DS_Store"
  },
  {
    "path": "core/clang/HOST_x86.mk",
    "chars": 187,
    "preview": "$(clang_2nd_arch_prefix)HOST_LIBPROFILE_RT := $(LLVM_RTLIB_PATH)/libclang_rt.profile-i386.a\n$(clang_2nd_arch_prefix)HOST"
  },
  {
    "path": "core/clang/HOST_x86_64.mk",
    "chars": 143,
    "preview": "HOST_LIBPROFILE_RT := $(LLVM_RTLIB_PATH)/libclang_rt.profile-x86_64.a\nHOST_LIBCRT_BUILTINS := $(LLVM_RTLIB_PATH)/libclan"
  },
  {
    "path": "core/clang/TARGET_arm.mk",
    "chars": 726,
    "preview": "$(clang_2nd_arch_prefix)RS_TRIPLE := renderscript32-linux-androideabi\n$(clang_2nd_arch_prefix)RS_TRIPLE_CFLAGS :=\n$(clan"
  },
  {
    "path": "core/clang/TARGET_arm64.mk",
    "chars": 523,
    "preview": "RS_TRIPLE := renderscript64-linux-android\nRS_TRIPLE_CFLAGS :=\nRS_COMPAT_TRIPLE := aarch64-linux-android\n\nTARGET_LIBPROFI"
  },
  {
    "path": "core/clang/TARGET_riscv64.mk",
    "chars": 537,
    "preview": "RS_TRIPLE := renderscript64-linux-android\nRS_TRIPLE_CFLAGS := -D__riscv64__\nRS_COMPAT_TRIPLE := riscv64-linux-android\n\nT"
  },
  {
    "path": "core/clang/TARGET_x86.mk",
    "chars": 735,
    "preview": "$(clang_2nd_arch_prefix)RS_TRIPLE := renderscript32-linux-androideabi\n$(clang_2nd_arch_prefix)RS_TRIPLE_CFLAGS := -D__i3"
  },
  {
    "path": "core/clang/TARGET_x86_64.mk",
    "chars": 531,
    "preview": "RS_TRIPLE := renderscript64-linux-android\nRS_TRIPLE_CFLAGS := -D__x86_64__\nRS_COMPAT_TRIPLE := x86_64-linux-android\n\nTAR"
  },
  {
    "path": "core/clang/config.mk",
    "chars": 1692,
    "preview": "## Clang configurations.\n\nLLVM_READOBJ := $(LLVM_PREBUILTS_BASE)/$(BUILD_OS)-x86/$(LLVM_PREBUILTS_VERSION)/bin/llvm-read"
  },
  {
    "path": "core/clang/tidy.mk",
    "chars": 1552,
    "preview": "#\n# Copyright (C) 2016 The Android Open Source Project\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\""
  },
  {
    "path": "core/cleanbuild.mk",
    "chars": 6463,
    "preview": "# Copyright (C) 2007 The Android Open Source Project\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");"
  },
  {
    "path": "core/cleanspec.mk",
    "chars": 3498,
    "preview": "# Copyright (C) 2007 The Android Open Source Project\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");"
  },
  {
    "path": "core/clear_vars.mk",
    "chars": 14490,
    "preview": "###########################################################\n## Clear out values of all variables used by rule templates."
  },
  {
    "path": "core/combo/HOST_darwin.mk",
    "chars": 2161,
    "preview": "#\n# Copyright (C) 2006 The Android Open Source Project\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\""
  },
  {
    "path": "core/combo/HOST_linux.mk",
    "chars": 904,
    "preview": "#\n# Copyright (C) 2006 The Android Open Source Project\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\""
  },
  {
    "path": "core/combo/TARGET_linux-arm.mk",
    "chars": 3031,
    "preview": "#\n# Copyright (C) 2006 The Android Open Source Project\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\""
  },
  {
    "path": "core/combo/TARGET_linux-arm64.mk",
    "chars": 1475,
    "preview": "#\n# Copyright (C) 2013 The Android Open Source Project\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\""
  },
  {
    "path": "core/combo/TARGET_linux-riscv64.mk",
    "chars": 935,
    "preview": "#\n# Copyright (C) 2022 The Android Open Source Project\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\""
  },
  {
    "path": "core/combo/TARGET_linux-x86.mk",
    "chars": 1130,
    "preview": "#\n# Copyright (C) 2006 The Android Open Source Project\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\""
  },
  {
    "path": "core/combo/TARGET_linux-x86_64.mk",
    "chars": 980,
    "preview": "#\n# Copyright (C) 2006 The Android Open Source Project\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\""
  },
  {
    "path": "core/combo/javac.mk",
    "chars": 557,
    "preview": "# Selects a Java compiler.\n#\n# Outputs:\n#   ANDROID_JAVA_TOOLCHAIN -- Directory that contains javac and other java tools"
  },
  {
    "path": "core/combo/select.mk",
    "chars": 1600,
    "preview": "#\n# Copyright (C) 2006 The Android Open Source Project\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\""
  },
  {
    "path": "core/config.mk",
    "chars": 58869,
    "preview": "# This is included by the top-level Makefile.\n# It sets up standard variables based on the\n# current configuration and p"
  },
  {
    "path": "core/config_sanitizers.mk",
    "chars": 22857,
    "preview": "##############################################\n## Perform configuration steps for sanitizers.\n##########################"
  },
  {
    "path": "core/configure_module_stem.mk",
    "chars": 925,
    "preview": "my_multilib_stem := $(LOCAL_MODULE_STEM_$(if $($(LOCAL_2ND_ARCH_VAR_PREFIX)$(my_prefix)IS_64_BIT),64,32))\nifdef my_multi"
  },
  {
    "path": "core/copy_headers.mk",
    "chars": 2184,
    "preview": "ifneq (,$(strip $(LOCAL_COPY_HEADERS)))\n###########################################################\n## Copy headers to t"
  },
  {
    "path": "core/cxx_stl_setup.mk",
    "chars": 3499,
    "preview": "#############################################################\n## Set up flags based on LOCAL_CXX_STL.\n## Input variables"
  },
  {
    "path": "core/definitions.mk",
    "chars": 160662,
    "preview": "#\n# Copyright (C) 2008 The Android Open Source Project\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\""
  },
  {
    "path": "core/deprecation.mk",
    "chars": 1833,
    "preview": "# These module types can still be used without warnings or errors.\nAVAILABLE_BUILD_MODULE_TYPES :=$= \\\n  BUILD_EXECUTABL"
  },
  {
    "path": "core/dex_preopt.mk",
    "chars": 1419,
    "preview": "####################################\n# dexpreopt support - typically used on user builds to run dexopt (for Dalvik) or d"
  },
  {
    "path": "core/dex_preopt_config.mk",
    "chars": 8967,
    "preview": "DEX_PREOPT_CONFIG := $(SOONG_OUT_DIR)/dexpreopt${COVERAGE_SUFFIX}.config\n\nENABLE_PREOPT := true\nENABLE_PREOPT_BOOT_IMAGE"
  },
  {
    "path": "core/dex_preopt_config_merger.py",
    "chars": 3787,
    "preview": "#!/usr/bin/env python\n#\n# Copyright (C) 2021 The Android Open Source Project\n#\n# Licensed under the Apache License, Vers"
  },
  {
    "path": "core/dex_preopt_odex_install.mk",
    "chars": 25572,
    "preview": "# dexpreopt_odex_install.mk is used to define odex creation rules for JARs and APKs\n# This file depends on variables set"
  },
  {
    "path": "core/distdir.mk",
    "chars": 9713,
    "preview": "#\n# Copyright (C) 2007 The Android Open Source Project\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\""
  },
  {
    "path": "core/dumpconfig.mk",
    "chars": 3634,
    "preview": "# Read and dump the product configuration.\n\n# Called from the product-config tool, not from the main build system.\n\n#\n# "
  },
  {
    "path": "core/dumpvar.mk",
    "chars": 1178,
    "preview": "# ---------------------------------------------------------------\n# the setpath shell function in envsetup.sh uses this "
  },
  {
    "path": "core/dupcheck.sh",
    "chars": 4426,
    "preview": "#!/bin/bash\n\n# Find duplicate shared libraries by md5 checksum and possible duplicates by size.\n# Results will be availa"
  },
  {
    "path": "core/dynamic_binary.mk",
    "chars": 6157,
    "preview": "###########################################################\n## Standard rules for building any target-side binaries\n## w"
  },
  {
    "path": "core/empty_test_config.xml",
    "chars": 857,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!-- Copyright (C) 2017 The Android Open Source Project\n\n     Licensed under the "
  },
  {
    "path": "core/envsetup.mk",
    "chars": 44984,
    "preview": "# Variables we check:\n#     HOST_BUILD_TYPE = { release debug }\n#     TARGET_BUILD_TYPE = { release debug }\n# and we out"
  },
  {
    "path": "core/executable.mk",
    "chars": 2571,
    "preview": "# We don't automatically set up rules to build executables for both\n# TARGET_ARCH and TARGET_2ND_ARCH.\n# By default, an "
  },
  {
    "path": "core/executable_internal.mk",
    "chars": 4875,
    "preview": "###########################################################\n## Standard rules for building an executable file.\n##\n## Add"
  },
  {
    "path": "core/executable_prefer_symlink.mk",
    "chars": 1501,
    "preview": "# include this makefile to create the LOCAL_MODULE symlink to the primary version binary.\n# but this requires the primar"
  },
  {
    "path": "core/filter_symbols.sh",
    "chars": 337,
    "preview": "NM=$1\n\nshift\n\nPREFIX=$1\n\nshift\n\nSUFFIX=$1\n\nshift\n\nwhile test \"$1\" != \"\"\ndo\n    $NM -g -fp $1 | while read -a line\n    do"
  },
  {
    "path": "core/force_aapt2.mk",
    "chars": 1825,
    "preview": "#\n# Copyright (C) 2018 The Android Open Source Project\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\""
  },
  {
    "path": "core/fuzz_test.mk",
    "chars": 1409,
    "preview": "###########################################\n## A thin wrapper around BUILD_EXECUTABLE\n## Common flags for fuzz tests are"
  },
  {
    "path": "core/generate_enforce_rro.mk",
    "chars": 2550,
    "preview": "include $(CLEAR_VARS)\n\nenforce_rro_module := $(enforce_rro_source_module)__$(PRODUCT_NAME)__auto_generated_rro_$(enforce"
  },
  {
    "path": "core/header_library.mk",
    "chars": 925,
    "preview": "$(call record-module-type,HEADER_LIBRARY)\nifdef LOCAL_IS_HOST_MODULE\n  my_prefix := HOST_\n  LOCAL_HOST_PREFIX :=\nelse\n  "
  },
  {
    "path": "core/header_library_internal.mk",
    "chars": 710,
    "preview": "###########################################################\n## Standard rules for building a header library.\n##\n## Addit"
  },
  {
    "path": "core/host_executable.mk",
    "chars": 1480,
    "preview": "$(call record-module-type,HOST_EXECUTABLE)\nLOCAL_IS_HOST_MODULE := true\nmy_prefix := HOST_\nLOCAL_HOST_PREFIX :=\ninclude "
  },
  {
    "path": "core/host_executable_internal.mk",
    "chars": 2117,
    "preview": "###########################################################\n## Standard rules for building an executable file.\n##\n## Add"
  },
  {
    "path": "core/host_java_library.mk",
    "chars": 4963,
    "preview": "#\n# Copyright (C) 2008 The Android Open Source Project\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\""
  },
  {
    "path": "core/host_java_library_common.mk",
    "chars": 1506,
    "preview": "#\n# Copyright (C) 2013 The Android Open Source Project\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\""
  },
  {
    "path": "core/host_prebuilt.mk",
    "chars": 805,
    "preview": "#\n# Copyright (C) 2008 The Android Open Source Project\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\""
  },
  {
    "path": "core/host_shared_library.mk",
    "chars": 1372,
    "preview": "$(call record-module-type,HOST_SHARED_LIBRARY)\nLOCAL_IS_HOST_MODULE := true\nmy_prefix := HOST_\nLOCAL_HOST_PREFIX :=\nincl"
  },
  {
    "path": "core/host_shared_library_internal.mk",
    "chars": 1937,
    "preview": "###########################################################\n## Standard rules for building a normal shared library.\n##\n#"
  },
  {
    "path": "core/host_static_library.mk",
    "chars": 1372,
    "preview": "$(call record-module-type,HOST_STATIC_LIBRARY)\nLOCAL_IS_HOST_MODULE := true\nmy_prefix := HOST_\nLOCAL_HOST_PREFIX :=\nincl"
  },
  {
    "path": "core/host_static_library_internal.mk",
    "chars": 869,
    "preview": "###########################################################\n## Standard rules for building a static library for the host"
  },
  {
    "path": "core/install_jni_libs.mk",
    "chars": 4057,
    "preview": "# Decides how to install the jni libraries needed by an apk.\n# Input variables:\n#   my_module_multilib, LOCAL_2ND_ARCH_V"
  },
  {
    "path": "core/install_jni_libs_internal.mk",
    "chars": 7190,
    "preview": "# Install jni libraries for one arch.\n# Input variables:\n#   my_2nd_arch_prefix: indicate if this is for TARGET_2ND_ARCH"
  },
  {
    "path": "core/instrumentation_test_config_template.xml",
    "chars": 1344,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!-- Copyright (C) 2023 The Android Open Source Project\n\n     Licensed under the "
  },
  {
    "path": "core/jacoco.mk",
    "chars": 6262,
    "preview": "#\n# Copyright (C) 2017 The Android Open Source Project\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\""
  },
  {
    "path": "core/java.mk",
    "chars": 22755,
    "preview": "# Target Java.\n# Requires:\n# LOCAL_MODULE_SUFFIX\n# LOCAL_MODULE_CLASS\n# all_res_assets\n\nLOCAL_NO_STANDARD_LIBRARIES:=$(s"
  },
  {
    "path": "core/java_common.mk",
    "chars": 25170,
    "preview": "# Common to host and target Java modules.\n\nmy_soong_problems :=\n\nifneq ($(filter ../%,$(LOCAL_SRC_FILES)),)\nmy_soong_pro"
  },
  {
    "path": "core/java_host_test_config_template.xml",
    "chars": 1058,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!-- Copyright (C) 2023 The Android Open Source Project\n\n     Licensed under the "
  },
  {
    "path": "core/java_host_unit_test_config_template.xml",
    "chars": 2062,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!-- Copyright (C) 2020 The Android Open Source Project\n\n     Licensed under the "
  },
  {
    "path": "core/java_library.mk",
    "chars": 3337,
    "preview": "###########################################################\n## Standard rules for building a java library.\n##\n##########"
  },
  {
    "path": "core/java_prebuilt_internal.mk",
    "chars": 8490,
    "preview": "#\n# Copyright (C) 2019 The Android Open Source Project\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\""
  },
  {
    "path": "core/java_renderscript.mk",
    "chars": 6537,
    "preview": "###############################################################\n## Renderscript support for java\n## Adds rules to conver"
  },
  {
    "path": "core/java_test_config_template.xml",
    "chars": 1613,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!-- Copyright (C) 2018 The Android Open Source Project\n\n     Licensed under the "
  },
  {
    "path": "core/layoutlib_data.mk",
    "chars": 12140,
    "preview": "# Data files for layoutlib\n\nFONT_TEMP := $(call intermediates-dir-for,PACKAGING,fonts,HOST,COMMON)\n\n# The font configura"
  },
  {
    "path": "core/link_type.mk",
    "chars": 1187,
    "preview": "# Inputs:\n#   LOCAL_MODULE_CLASS, LOCAL_MODULE, LOCAL_MODULE_MAKEFILE, LOCAL_BUILT_MODULE\n#   from base_rules.mk: my_kin"
  },
  {
    "path": "core/local_current_sdk.mk",
    "chars": 1485,
    "preview": "#\n# Copyright (C) 2020 The Android Open Source Project\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\""
  },
  {
    "path": "core/local_systemsdk.mk",
    "chars": 4434,
    "preview": "#\n# Copyright (C) 2018 The Android Open Source Project\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\""
  },
  {
    "path": "core/local_vendor_product.mk",
    "chars": 1017,
    "preview": "# LOCAL_USE_VNDK is not the variable which set by module directly, but there are some modules do so.\n# Set those as LOCA"
  },
  {
    "path": "core/main.mk",
    "chars": 82092,
    "preview": "ifndef KATI\n$(warning Calling make directly is no longer supported.)\n$(warning Either use 'envsetup.sh; m' or 'build/soo"
  },
  {
    "path": "core/misc_prebuilt_internal.mk",
    "chars": 1428,
    "preview": "#\n# Copyright (C) 2019 The Android Open Source Project\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\""
  },
  {
    "path": "core/module_arch_supported.mk",
    "chars": 2346,
    "preview": "###########################################################\n## Determine if a module can be built for an arch\n##\n## Inpu"
  },
  {
    "path": "core/multi_prebuilt.mk",
    "chars": 4085,
    "preview": "#\n# Copyright (C) 2008 The Android Open Source Project\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\""
  },
  {
    "path": "core/multilib.mk",
    "chars": 537,
    "preview": "# Translate LOCAL_32_BIT_ONLY to LOCAL_MULTILIB,\n# and check LOCAL_MULTILIB is a valid value.  Returns module's multilib"
  },
  {
    "path": "core/native_benchmark_test_config_template.xml",
    "chars": 1367,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!-- Copyright (C) 2018 The Android Open Source Project\n\n     Licensed under the "
  },
  {
    "path": "core/native_host_test_config_template.xml",
    "chars": 979,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!-- Copyright (C) 2018 The Android Open Source Project\n\n     Licensed under the "
  },
  {
    "path": "core/native_test.mk",
    "chars": 679,
    "preview": "###########################################\n## A thin wrapper around BUILD_EXECUTABLE\n## Common flags for native tests a"
  },
  {
    "path": "core/native_test_config_template.xml",
    "chars": 1367,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!-- Copyright (C) 2023 The Android Open Source Project\n\n     Licensed under the "
  },
  {
    "path": "core/ninja_config.mk",
    "chars": 1567,
    "preview": "ifeq ($(filter address,$(SANITIZE_HOST)),)\nNINJA ?= prebuilts/build-tools/$(HOST_PREBUILT_TAG)/bin/ninja\nelse\nNINJA ?= p"
  },
  {
    "path": "core/node_fns.mk",
    "chars": 8057,
    "preview": "#\n# Copyright (C) 2007 The Android Open Source Project\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\""
  },
  {
    "path": "core/notice_files.mk",
    "chars": 6312,
    "preview": "###########################################################\n## Track NOTICE files\n######################################"
  },
  {
    "path": "core/os_licensing.mk",
    "chars": 8092,
    "preview": "ifeq ($(TARGET_BUILD_APPS),)\n\n.PHONY: systemlicense\nsystemlicense: $(call corresponding-license-metadata, $(SYSTEM_NOTIC"
  },
  {
    "path": "core/pack_dyn_relocs_setup.mk",
    "chars": 1501,
    "preview": "#############################################################\n## Set up my_pack_module_relocations\n## Input variables:\n#"
  },
  {
    "path": "core/package.mk",
    "chars": 2176,
    "preview": "# We don't automatically set up rules to build packages for both\n# TARGET_ARCH and TARGET_2ND_ARCH.\n# To build it for TA"
  },
  {
    "path": "core/package_internal.mk",
    "chars": 27708,
    "preview": "#\n# Copyright (C) 2008 The Android Open Source Project\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\""
  },
  {
    "path": "core/packaging/flags.mk",
    "chars": 8588,
    "preview": "# Copyright (C) 2023 The Android Open Source Project\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");"
  },
  {
    "path": "core/pathmap.mk",
    "chars": 3040,
    "preview": "#\n# Copyright (C) 2008 The Android Open Source Project\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\""
  },
  {
    "path": "core/phony_package.mk",
    "chars": 471,
    "preview": "$(call record-module-type,PHONY_PACKAGE)\nifneq ($(strip $(LOCAL_SRC_FILES)),)\n$(error LOCAL_SRC_FILES are not allowed fo"
  },
  {
    "path": "core/prebuilt.mk",
    "chars": 1563,
    "preview": "###########################################################\n## Standard rules for copying files that are prebuilt\n##\n## "
  },
  {
    "path": "core/prebuilt_internal.mk",
    "chars": 2830,
    "preview": "###########################################################\n## Standard rules for copying files that are prebuilt\n##\n## "
  },
  {
    "path": "core/process_wrapper.sh",
    "chars": 535,
    "preview": "#!/bin/sh\n\n# When using a process wrapper, this is the top-level\n# command that is executed instead of the server\n# comm"
  },
  {
    "path": "core/process_wrapper_gdb.cmds",
    "chars": 4,
    "preview": "run\n"
  },
  {
    "path": "core/process_wrapper_gdb.sh",
    "chars": 675,
    "preview": "#!/bin/sh\n\n# This is the command running inside the xterm of our\n# debug wrapper.  It needs to take care of starting\n# t"
  },
  {
    "path": "core/product-graph.mk",
    "chars": 3034,
    "preview": "#\n# Copyright (C) 2009 The Android Open Source Project\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\""
  },
  {
    "path": "core/product.mk",
    "chars": 30908,
    "preview": "#\n# Copyright (C) 2007 The Android Open Source Project\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\""
  },
  {
    "path": "core/product_config.mk",
    "chars": 27396,
    "preview": "#\n# Copyright (C) 2008 The Android Open Source Project\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\""
  },
  {
    "path": "core/product_config.rbc",
    "chars": 32581,
    "preview": "# Copyright 2021 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this f"
  },
  {
    "path": "core/product_validation_checks.mk",
    "chars": 3863,
    "preview": "# PRODUCT_VALIDATION_CHECKS allows you to enforce that your product config variables follow some\n# rules. To use it, add"
  },
  {
    "path": "core/proguard/checknotnull.flags",
    "chars": 771,
    "preview": "# Tell R8 that the following methods are check not null methods, and to\n# replace invocations to them with a more concis"
  },
  {
    "path": "core/proguard/kotlin.flags",
    "chars": 1078,
    "preview": "# Ignore missing Kotlin meta-annotations so that Java-only projects can depend\n# on projects that happen to be written i"
  },
  {
    "path": "core/proguard.flags",
    "chars": 2912,
    "preview": "# Keep classes and members with the platform-defined @VisibleForTesting annotation.\n-keep @com.android.internal.annotati"
  },
  {
    "path": "core/proguard.jacoco.flags",
    "chars": 151,
    "preview": "# Keep everything for the emma classes\n-keep class com.vladium.** {\n  *;\n}\n# Keep everything for the jacoco classes\n-kee"
  },
  {
    "path": "core/proguard_basic_keeps.flags",
    "chars": 4645,
    "preview": "# Preserve line number information for debugging stack traces.\n-keepattributes SourceFile,LineNumberTable\n\n# Annotations"
  },
  {
    "path": "core/project_definitions.mk",
    "chars": 779,
    "preview": "#\n# Copyright (C) 2018 The Android Open Source Project\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\""
  },
  {
    "path": "core/python_binary_host_mobly_test_config_template.xml",
    "chars": 963,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!-- Copyright (C) 2023 The Android Open Source Project\n     Licensed under the A"
  },
  {
    "path": "core/python_binary_host_test_config_template.xml",
    "chars": 947,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!-- Copyright (C) 2018 The Android Open Source Project\n\n     Licensed under the "
  },
  {
    "path": "core/ravenwood_test_config_template.xml",
    "chars": 2449,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!-- Copyright (C) 2023 The Android Open Source Project\n\n     Licensed under the "
  },
  {
    "path": "core/rbe.mk",
    "chars": 3198,
    "preview": "#\n# Copyright (C) 2019 The Android Open Source Project\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\""
  },
  {
    "path": "core/release_config.mk",
    "chars": 16208,
    "preview": "# Copyright (C) 2023 The Android Open Source Project\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");"
  },
  {
    "path": "core/release_config.scl",
    "chars": 7830,
    "preview": "# Copyright (C) 2023 The Android Open Source Project\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");"
  },
  {
    "path": "core/robolectric_test_config_template.xml",
    "chars": 2977,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!-- Copyright (C) 2020 The Android Open Source Project\n\n     Licensed under the "
  },
  {
    "path": "core/root.mk",
    "chars": 92,
    "preview": "### DO NOT EDIT THIS FILE ###\ninclude build/make/core/main.mk\n### DO NOT EDIT THIS FILE ###\n"
  },
  {
    "path": "core/rust_device_benchmark_config_template.xml",
    "chars": 1292,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!-- Copyright (C) 2021 The Android Open Source Project\n\n     Licensed under the "
  },
  {
    "path": "core/rust_device_test_config_template.xml",
    "chars": 1262,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!-- Copyright (C) 2019 The Android Open Source Project\n\n     Licensed under the "
  },
  {
    "path": "core/rust_host_benchmark_config_template.xml",
    "chars": 1007,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!-- Copyright (C) 2021 The Android Open Source Project\n\n     Licensed under the "
  },
  {
    "path": "core/rust_host_test_config_template.xml",
    "chars": 940,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!-- Copyright (C) 2019 The Android Open Source Project\n\n     Licensed under the "
  },
  {
    "path": "core/sbom.mk",
    "chars": 1716,
    "preview": "# For SBOM generation\n# This is included by base_rules.mk and is not necessary to be included in other .mk files\n# unles"
  },
  {
    "path": "core/sdk_check.mk",
    "chars": 1386,
    "preview": "\n# Enforcement checks that LOCAL_SDK_VERSION and LOCAL_PRIVATE_PLATFORM_APIS are\n# set correctly.\n# Should be included b"
  },
  {
    "path": "core/shared_library.mk",
    "chars": 1904,
    "preview": "$(call record-module-type,SHARED_LIBRARY)\nifdef LOCAL_IS_HOST_MODULE\n  $(call pretty-error,BUILD_SHARED_LIBRARY is incom"
  },
  {
    "path": "core/shared_library_internal.mk",
    "chars": 4067,
    "preview": "###########################################################\n## Standard rules for building a normal shared library.\n##\n#"
  },
  {
    "path": "core/shell_test_config_template.xml",
    "chars": 1385,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!-- Copyright (C) 2020 The Android Open Source Project\n\n    Licensed under the A"
  },
  {
    "path": "core/soong_android_app_set.mk",
    "chars": 865,
    "preview": "# App prebuilt coming from Soong.\n# Extra inputs:\n# LOCAL_APK_SET_INSTALL_FILE\n\nifneq ($(LOCAL_MODULE_MAKEFILE),$(SOONG_"
  },
  {
    "path": "core/soong_app_prebuilt.mk",
    "chars": 9637,
    "preview": "# App prebuilt coming from Soong.\n# Extra inputs:\n# LOCAL_SOONG_BUILT_INSTALLED\n# LOCAL_SOONG_BUNDLE\n# LOCAL_SOONG_CLASS"
  },
  {
    "path": "core/soong_cc_rust_prebuilt.mk",
    "chars": 10915,
    "preview": "# Native prebuilt coming from Soong.\n# Extra inputs:\n# LOCAL_SOONG_LINK_TYPE\n# LOCAL_SOONG_TOC\n# LOCAL_SOONG_UNSTRIPPED_"
  },
  {
    "path": "core/soong_config.mk",
    "chars": 40818,
    "preview": "SOONG_MAKEVARS_MK := $(SOONG_OUT_DIR)/make_vars-$(TARGET_PRODUCT)$(COVERAGE_SUFFIX).mk\nSOONG_ANDROID_MK := $(SOONG_OUT_D"
  },
  {
    "path": "core/soong_droiddoc_prebuilt.mk",
    "chars": 2026,
    "preview": "# Droiddoc prebuilt coming from Soong.\n\nifneq ($(LOCAL_MODULE_MAKEFILE),$(SOONG_ANDROID_MK))\n  $(call pretty-error,soong"
  },
  {
    "path": "core/soong_extra_config.mk",
    "chars": 5719,
    "preview": "$(call json_start)\n\n$(call add_json_str, DeviceCpuVariantRuntime,           $(TARGET_CPU_VARIANT_RUNTIME))\n$(call add_js"
  }
]

// ... and 1180 more files (download for full content)

About this extraction

This page contains the full source code of the android/platform_build GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 1380 files (7.0 MB), approximately 1.9M tokens, and a symbol index with 4622 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!