diff options
| -rw-r--r-- | scripts/gen_build_prop.py | 16 | ||||
| -rw-r--r-- | ui/build/build.go | 4 | ||||
| -rw-r--r-- | ui/build/cleanbuild.go | 8 | ||||
| -rw-r--r-- | ui/build/dumpvars.go | 2 | ||||
| -rw-r--r-- | ui/build/paths/config.go | 6 |
5 files changed, 34 insertions, 2 deletions
diff --git a/scripts/gen_build_prop.py b/scripts/gen_build_prop.py index 331cc5715..16507bb11 100644 --- a/scripts/gen_build_prop.py +++ b/scripts/gen_build_prop.py @@ -126,6 +126,8 @@ def parse_args(): if config["BuildNumber"].startswith("eng."): config["BuildNumber"] = config["DateUtc"] + config["DEVICE_MAINTAINERS"] = 0 + override_config(config) append_additional_system_props(args) @@ -254,6 +256,10 @@ def generate_build_info(args): print(f"ro.build.flavor={config['BuildFlavor']}") print(f"ro.lineage.device={config['LineageDevice']}") + print(f"ro.aicp.device={config['LineageDevice']}") + + if config["DEVICE_MAINTAINERS"] != 0: + print(f"ro.aicp.maintainer={config['DEVICE_MAINTAINERS']}") # These values are deprecated, use "ro.product.cpu.abilist" # instead (see below). @@ -372,13 +378,21 @@ def append_additional_system_props(args): enable_target_debugging = False enable_dalvik_lock_contention_logging = False else: + # AICP: also set ro.adb.secure for userdebug + if config["BuildVariant"] == "userdebug": + props.append("ro.adb.secure=1") + # Disable debugging in userdebug builds if PRODUCT_NOT_DEBUGGABLE_IN_USERDEBUG # is set. if config["ProductNotDebuggableInUserdebug"]: enable_target_debugging = False # Disallow mock locations by default for user builds - props.append("ro.allow.mock.location=0") + # AICP: still allow for userdebug + if config["BuildVariant"] == "userdebug": + props.append("ro.allow.mock.location=1") + else: + props.append("ro.allow.mock.location=0") else: # Turn on checkjni for non-user builds. props.append("ro.kernel.android.checkjni=1") diff --git a/ui/build/build.go b/ui/build/build.go index 781ca182f..7fea863df 100644 --- a/ui/build/build.go +++ b/ui/build/build.go @@ -355,6 +355,10 @@ func Build(ctx Context, config Config) { dataClean(ctx, config) ctx.Println("Deleted data files.") return + } else if inList("deviceclean", config.Arguments()) { + deviceClean(ctx, config, what) + ctx.Println("Performed minimal product cleaning.") + return } // Still generate the kati suffix in soong-only builds because soong-only still uses kati for diff --git a/ui/build/cleanbuild.go b/ui/build/cleanbuild.go index 42bc9a5c3..6772f0354 100644 --- a/ui/build/cleanbuild.go +++ b/ui/build/cleanbuild.go @@ -71,6 +71,13 @@ func dataClean(ctx Context, config Config) { ctx.Println("Entire data directory removed.") } +// Remove everything relevant for a clean ota package +func deviceClean(ctx Context, config Config, what int) { + productOutPath := config.ProductOut() + removeGlobs(ctx, productOutPath) + ctx.Println(productOutPath, "removed.") +} + // installClean deletes all of the installed files -- the intent is to remove // files that may no longer be installed, either because the user previously // installed them, or they were previously installed by default but no longer @@ -135,6 +142,7 @@ func installClean(ctx Context, config Config) { productOut("skin"), productOut("obj/NOTICE_FILES"), productOut("obj/PACKAGING"), + productOut("obj/KERNEL_OBJ"), productOut("ramdisk"), productOut("ramdisk_16k"), productOut("debug_ramdisk"), diff --git a/ui/build/dumpvars.go b/ui/build/dumpvars.go index edb5b2a3a..dcbd603b8 100644 --- a/ui/build/dumpvars.go +++ b/ui/build/dumpvars.go @@ -153,7 +153,7 @@ func dumpMakeVars(ctx Context, config Config, goals, vars []string, write_soong_ var BannerVars = []string{ "PLATFORM_VERSION_CODENAME", "PLATFORM_VERSION", - "LINEAGE_VERSION", + "AICP_VERSION", "PRODUCT_SOURCE_ROOT_DIRS", "TARGET_PRODUCT", "TARGET_BUILD_VARIANT", diff --git a/ui/build/paths/config.go b/ui/build/paths/config.go index 4af7d708c..ceef561b6 100644 --- a/ui/build/paths/config.go +++ b/ui/build/paths/config.go @@ -110,6 +110,12 @@ var Configuration = map[string]PathConfig{ "unzip": Allowed, "zip": Allowed, + // AICP specific tools + "shuf": Allowed, + "mogrify": Allowed, + "xmllint": Allowed, + "repo": Allowed, + // Host toolchain is removed. In-tree toolchain should be used instead. // GCC also can't find cc1 with this implementation. "ar": Forbidden, |
