Skip to content

[Enhancement] Auto-apply templates and presets to newly installed apps #100

@NewTechDesign

Description

@NewTechDesign

Steps to reproduce/复现步骤

  1. Open HMA-OSS (version oss-161)
  2. Go to App List
  3. Install a new app on the device (any app, e.g., from Play Store or APK)
  4. Return to HMA-OSS App List
  5. Observe the newly installed app

Current result: The new app appears in the list but has NO settings applied (all toggles are disabled). User must manually configure it.

Expected result (with this enhancement): The new app should automatically receive settings from a user-selected preset/template.

Expected behaviour/预期行为

After installing a new app, HMA-OSS should automatically apply a predefined configuration (preset/template) to that app without requiring manual user intervention.

Specifically:

  1. User selects a preset in Settings (e.g., "Detector apps" preset)
  2. User enables "Auto-configure new apps" toggle
  3. When a new app is installed, HMA-OSS detects the ACTION_PACKAGE_ADDED event
  4. HMA-OSS automatically applies the selected preset's settings to the new app:
    • Activity Launch Protection (ON/OFF based on preset)
    • Install Source Spoofing (ON/OFF based on preset)
    • Blacklist/Whitelist mode (based on preset)
    • Data isolation settings (based on preset)
    • Risky package protection (based on preset)
  5. The user sees the configured state immediately when opening HMA-OSS app list
  6. Optionally, user can override auto-applied settings manually later

Example:

  • User creates a preset named "Detectors" with Activity Launch Protection = ON
  • User installs "Disclosure" app
  • HMA-OSS automatically enables Activity Launch Protection for Disclosure
  • User does nothing — the protection is already active

This feature should work for apps installed from:

  • Google Play Store
  • Manual APK installation
  • ADB install
  • Third-party app stores

Expected user experience: "Set it once, forget it — all new apps are automatically protected according to my rules."

Actual behaviour/实际行为

When a new app is installed, HMA-OSS does NOT apply any configuration automatically. All settings (Activity Launch Protection, Install Source Spoofing, etc.) remain OFF by default. The user must manually configure each new app individually or via Batch Setup Wizard. No auto-configuration feature exists.

Xposed Module List/Xposed 模块列表

HMA-OSS

Magisk Module List/Magisk 模块列表

ReZygisk
Hybrid Mount

HMA-OSS version/HMA-OSS 版本

161

Android version/Android 版本

16

Magisk version/Magisk 版本

30.6

Version requirement/版本要求

Latest CI debug build/最新 CI debug 构建

Logs/日志

No

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions