Remove apex.generate_hashtree
It's deprecated. Ignore-AOSP-First: internal branches use this. Will be gone. Fixes: 184914612 Test: m Change-Id: I14316a9a288ffc2727bb7033ebded4f4d48b1e6c
This commit is contained in:
@@ -167,10 +167,6 @@ type apexBundleProperties struct {
|
||||
// Default is false.
|
||||
Ignore_system_library_special_case *bool
|
||||
|
||||
// Whenever apex_payload.img of the APEX should include dm-verity hashtree.
|
||||
// Default value is true.
|
||||
Generate_hashtree *bool
|
||||
|
||||
// Whenever apex_payload.img of the APEX should not be dm-verity signed. Should be only
|
||||
// used in tests.
|
||||
Test_only_unsigned_payload *bool
|
||||
@@ -1425,11 +1421,6 @@ func (a *apexBundle) installable() bool {
|
||||
return !a.properties.PreventInstall && (a.properties.Installable == nil || proptools.Bool(a.properties.Installable))
|
||||
}
|
||||
|
||||
// See the generate_hashtree property
|
||||
func (a *apexBundle) shouldGenerateHashtree() bool {
|
||||
return proptools.BoolDefault(a.properties.Generate_hashtree, true)
|
||||
}
|
||||
|
||||
// See the test_only_unsigned_payload property
|
||||
func (a *apexBundle) testOnlyShouldSkipPayloadSign() bool {
|
||||
return proptools.Bool(a.properties.Test_only_unsigned_payload)
|
||||
|
@@ -7054,7 +7054,6 @@ func TestLegacyAndroid10Support(t *testing.T) {
|
||||
module := ctx.ModuleForTests("myapex", "android_common_myapex")
|
||||
args := module.Rule("apexRule").Args
|
||||
ensureContains(t, args["opt_flags"], "--manifest_json "+module.Output("apex_manifest.json").Output.String())
|
||||
ensureNotContains(t, args["opt_flags"], "--no_hashtree")
|
||||
|
||||
// The copies of the libraries in the apex should have one more dependency than
|
||||
// the ones outside the apex, namely the unwinder. Ideally we should check
|
||||
|
@@ -766,18 +766,6 @@ func (a *apexBundle) buildApex(ctx android.ModuleContext) {
|
||||
implicitInputs = append(implicitInputs, noticeAssetPath)
|
||||
optFlags = append(optFlags, "--assets_dir "+filepath.Dir(noticeAssetPath.String()))
|
||||
|
||||
// Apexes which are supposed to be installed in builtin dirs(/system, etc)
|
||||
// don't need hashtree for activation. Therefore, by removing hashtree from
|
||||
// apex bundle (filesystem image in it, to be specific), we can save storage.
|
||||
needHashTree := moduleMinSdkVersion.LessThanOrEqualTo(android.SdkVersion_Android10) ||
|
||||
a.shouldGenerateHashtree()
|
||||
if ctx.Config().ApexCompressionEnabled() && a.isCompressable() {
|
||||
needHashTree = true
|
||||
}
|
||||
if !needHashTree {
|
||||
optFlags = append(optFlags, "--no_hashtree")
|
||||
}
|
||||
|
||||
if a.testOnlyShouldSkipPayloadSign() {
|
||||
optFlags = append(optFlags, "--unsigned_payload")
|
||||
}
|
||||
|
Reference in New Issue
Block a user