Previously pm install ran on BOOT_COMPLETED, triggering idmap2d overlay re-evaluation under load and causing repeated SIGKILL cycles. New design: - ACTION_BASE_PROVISION (BOOT_COMPLETED): applies settings from the pre-installed config APK and configures the setup wizard state. No network, no pm install, completes quickly. - ACTION_OTA_UPDATE (USER_PRESENT): downloads the config APK URL and installs it over the built-in copy if the OTA check interval has elapsed (default 24 h, configurable via ota_check_interval_ms in vendor.cfg). Attempt timestamp is recorded before download to prevent server-error storms on repeated screen unlocks. All shared helpers (applyConfigApkSettings, applyApns, configureSetupWizard, downloadApk, installApk) moved to service level so both tasks share them.
36 lines
1.5 KiB
XML
36 lines
1.5 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
|
package="dev.oxmc.configprovisioner"
|
|
android:sharedUserId="android.uid.system">
|
|
|
|
<uses-permission android:name="android.permission.INSTALL_PACKAGES" />
|
|
<uses-permission android:name="android.permission.INTERNET" />
|
|
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
|
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
|
|
<uses-permission android:name="android.permission.WRITE_SECURE_SETTINGS" />
|
|
<uses-permission android:name="android.permission.CHANGE_COMPONENT_ENABLED_STATE" />
|
|
<uses-permission android:name="android.permission.WRITE_APN_SETTINGS" />
|
|
|
|
<application
|
|
android:allowBackup="false"
|
|
android:label="Config Provisioner"
|
|
android:supportsRtl="true">
|
|
|
|
<receiver
|
|
android:name=".BootReceiver"
|
|
android:enabled="true"
|
|
android:exported="true"
|
|
android:permission="android.permission.SYSTEM_ALERT_WINDOW">
|
|
<intent-filter android:priority="1000">
|
|
<action android:name="android.intent.action.LOCKED_BOOT_COMPLETED" />
|
|
<action android:name="android.intent.action.BOOT_COMPLETED" />
|
|
<action android:name="android.intent.action.USER_PRESENT" />
|
|
</intent-filter>
|
|
</receiver>
|
|
|
|
<service
|
|
android:name=".ProvisioningService"
|
|
android:exported="false" />
|
|
|
|
</application>
|
|
</manifest> |