Modern Apps git

MAOS.git

Public
git clone https://git.maproj.org/MAOS.git
main ▾

MAOS.git / sysconfig-modern-apps.xml

sysconfig-modern-apps.xml65 lines · 4.2 KiBRaw
1<?xml version="1.0" encoding="utf-8"?>
2<!--
3 Sysconfig for Modern Apps headless system services.
4 Copied to /product/etc/sysconfig/ by modern_apps.mk.
5
6 NetworkLocation (com.vayunmathur.networklocation) replaces GrapheneOS's NetworkLocation
7 module and must keep running in the background to service location/geocoder requests. These
8 entries mirror GrapheneOS's own networklocation sysconfig so the app is:
9 - allow-in-power-save exempt from Doze app-standby (runs during idle windows)
10 - allow-in-data-usage-save exempt from Data Saver background-data restrictions
11 - allow-unthrottled-location exempt from the background location throttle
12
13 Backup (com.vayunmathur.backup) is the system app-data backup transport, replacing Seedvault.
14 A transport is only bindable if its service is named here: BackupManagerService reads this
15 allowlist through SystemConfig.getBackupTransportWhitelist() and refuses to bind anything
16 absent from it, so config_backup_transport alone is not enough to select ours. Mirrors
17 Seedvault's own allowlist_com.stevesoltys.seedvault.xml, including the Doze exemption its
18 file-backup foreground service needs to start from the background.
19-->
20<config>
21 <allow-in-power-save package="com.vayunmathur.networklocation" />
22 <allow-in-data-usage-save package="com.vayunmathur.networklocation" />
23 <allow-unthrottled-location package="com.vayunmathur.networklocation" />
24
25
26 <backup-transport-whitelisted-service
27 service="com.vayunmathur.backup/.service.ConfigurableBackupTransportService" />
28 <allow-in-power-save package="com.vayunmathur.backup" />
29
30 <!-- Cast reaches VirtualDisplayConfig.Builder.setSupportedModes() and setUniqueId() by
31 reflection: the first declares the TV's resolutions on the cast display so Android's
32 external-display resolution picker offers them, the second gives the display a stable
33 unique id. Both are @SystemApi, so hidden-API enforcement blocks the reflection for a
34 presigned (non-platform-signed) app and the modes never reach the picker. Exempt the
35 package. ALLOW_HIDDENAPI_WHITELISTING is granted to the product partition
36 (SystemConfig.java), so this is honoured from /product/etc/sysconfig. -->
37 <hidden-api-whitelisted-app package="com.vayunmathur.cast" />
38
39 <!-- Parental Controls reaches UsageStatsManager.registerAppUsageLimitObserver and its unregister
40 counterpart by reflection. Both are @SystemApi members of an ordinary public class, so a
41 compileOnly stub is the wrong shape - it would shadow the real UsageStatsManager for
42 every other caller in the app - and reflection is what the repo uses for that case (see
43 logviewer's HiddenFrameworkApi). Hidden-API enforcement blocks that for a presigned,
44 non-platform-signed app, exactly as it does for cast above.
45
46 Only the reflection needs this. The SupervisionManager and SupervisionAppService calls
47 are direct, through library/supervision-stubs, and link without an exemption.
48
49 UsageStatsService still applies its own permission check on the other side; it passes
50 only because we hold the supervision role. The exemption buys visibility, not privilege. -->
51 <hidden-api-whitelisted-app package="com.vayunmathur.parentalcontrols" />
52 <hidden-api-whitelisted-app package="com.vayunmathur.screentime" />
53
54 <!-- Share reaches the Mosey (AWDL) HAL for AirDrop through hidden framework members:
55 ServiceManager.isDeclared / waitForDeclaredService to find IMoseyService, and the hidden
56 LinkProperties / LinkAddress / RouteInfo / NetworkCapabilities.Builder members needed to
57 publish `mosey0`. Like cast above, a presigned app needs this exemption for the reflection
58 to resolve; the framework still enforces the permissions behind each call. -->
59 <hidden-api-whitelisted-app package="com.vayunmathur.share" />
60 <!-- Emergency (com.vayunmathur.emergency) replaces AOSP EmergencyInfo. The SOS
61 countdown runs as a foreground service off an exact alarm; exempt it from Doze
62 like stock does so the countdown is not killed while the screen is off. -->
63 <allow-in-power-save package="com.vayunmathur.emergency" />
64
65</config>