maos: exempt store and updater from hibernation, grant store INSTALL_PACKAGES
- Commit
23bc01af99ee83d6c0fb15e6a25905693b4f3538- Author
- Vayun Mathur <[email protected]>
- When
- 2026-11-08 18:57 UTC (27 days ago)
- Parents
f700bb0
Extend the GrapheneOS hibernation exemption set with com.vayunmathur.appstore and com.vayunmathur.updater, and add a privapp-permissions entry granting INSTALL_PACKAGES to the store (first-party package source; silent updates when held, user-confirmed fallback when not). Updater needs no install permission (OTAs via update_engine).
Diff
patches/permission_roles.patch
diff --git a/patches/permission_roles.patch b/patches/permission_roles.patchindex 49438fa..661dcb8 100644--- a/patches/permission_roles.patch+++ b/patches/permission_roles.patch@@ -23,6 +23,20 @@ index dadfd1bf3a..bcc93965c4 100644 exclusive="false" exclusivity="none" minSdkVersion="33"+diff --git a/PermissionController/src/com/android/permissioncontroller/hibernation/HibernationPolicy.kt b/PermissionController/src/com/android/permissioncontroller/hibernation/HibernationPolicy.kt+index 5777343127..67c647749b 100644+--- a/PermissionController/src/com/android/permissioncontroller/hibernation/HibernationPolicy.kt++++ b/PermissionController/src/com/android/permissioncontroller/hibernation/HibernationPolicy.kt+@@ -126,6 +126,9 @@ private val HIBERNATION_EXEMPT_SYSTEM_PACKAGES =+ "app.attestation.auditor",+ "app.grapheneos.apps",+ "app.seamlessupdate.client",++ // MAOS: first-party store and updater must never hibernate.++ "com.vayunmathur.appstore",++ "com.vayunmathur.updater",+ )+ + private var SKIP_NEXT_RUN = false diff --git a/SafetyCenter/Resources/AndroidManifest.xml b/SafetyCenter/Resources/AndroidManifest.xml index 8129ddb01c..452246f827 100644 --- a/SafetyCenter/Resources/AndroidManifest.xml
privapp-permissions-modern-apps.xml
diff --git a/privapp-permissions-modern-apps.xml b/privapp-permissions-modern-apps.xmlindex ebf326b..d987e43 100644--- a/privapp-permissions-modern-apps.xml+++ b/privapp-permissions-modern-apps.xml@@ -170,6 +170,14 @@ <permission name="android.permission.ALLOCATE_AGGRESSIVE"/> </privapp-permissions> + <!-- Store (com.vayunmathur.appstore) is the first-party package source. INSTALL_PACKAGES+ lets it apply updates silently when held; without it the app falls back to a+ user-confirmed install session. Updater (com.vayunmathur.updater) applies OTAs via+ update_engine and needs no install permission, so it is intentionally absent here. -->+ <privapp-permissions package="com.vayunmathur.appstore">+ <permission name="android.permission.INSTALL_PACKAGES"/>+ </privapp-permissions>+ <!-- Emergency (com.vayunmathur.emergency) is the EMERGENCY role holder and replaces AOSP's EmergencyInfo. It needs these signature|privileged perms: CALL_PRIVILEGED places the emergency call, WRITE_SECURE_SETTINGS lets the gesture provider persist the