diff options
author | 2024-11-20 09:05:53 +0000 | |
---|---|---|
committer | 2024-11-22 06:41:46 +0000 | |
commit | 4380820944e96ec8179993ef9e3ac22c3ef092bd (patch) | |
tree | 20b6c0cc4772dcad08bfe48265142b9b18d09ce2 /android/neverallow.go | |
parent | 9ddba9f7de5b3d368544b40418f36649b7145c84 (diff) |
Allow librecovery_ui_ext to set InstallInRoot() to true.
`librecovery_ui_ext` is the Recovery UI library used by the device in
Recovery mode. Its default installation directory is
$(TARGET_RECOVERY_ROOT_OUT), not $(TARGET_RECOVERY_ROOT_OUT)/system.
It needs to be able to set InstallInRoot to true to match the original
installation location settings.
Bug: 339143524
Test: m -j librecovery_ui_ext
Change-Id: Ic2f7fd9bacc7d1e320481dd4dc034b5db8e80fa7
Diffstat (limited to 'android/neverallow.go')
-rw-r--r-- | android/neverallow.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/android/neverallow.go b/android/neverallow.go index 326150be5..22155043b 100644 --- a/android/neverallow.go +++ b/android/neverallow.go @@ -55,7 +55,7 @@ func init() { AddNeverAllowRules(createJavaDeviceForHostRules()...) AddNeverAllowRules(createCcSdkVariantRules()...) AddNeverAllowRules(createUncompressDexRules()...) - AddNeverAllowRules(createInitFirstStageRules()...) + AddNeverAllowRules(createInstallInRootAllowingRules()...) AddNeverAllowRules(createProhibitFrameworkAccessRules()...) AddNeverAllowRules(createCcStubsRule()) AddNeverAllowRules(createProhibitHeaderOnlyRule()) @@ -235,15 +235,16 @@ func createUncompressDexRules() []Rule { } } -func createInitFirstStageRules() []Rule { +func createInstallInRootAllowingRules() []Rule { return []Rule{ NeverAllow(). Without("name", "init_first_stage_defaults"). Without("name", "init_first_stage"). Without("name", "init_first_stage.microdroid"). + Without("name", "librecovery_ui_ext"). With("install_in_root", "true"). NotModuleType("prebuilt_root"). - Because("install_in_root is only for init_first_stage."), + Because("install_in_root is only for init_first_stage or librecovery_ui_ext."), } } |