Skip to content

feat: Installer choice for users#2799

Open
bikram-agarwal wants to merge 1 commit intoImranR98:mainfrom
bikram-agarwal:feature/installer_options
Open

feat: Installer choice for users#2799
bikram-agarwal wants to merge 1 commit intoImranR98:mainfrom
bikram-agarwal:feature/installer_options

Conversation

@bikram-agarwal
Copy link
Copy Markdown

@bikram-agarwal bikram-agarwal commented Feb 25, 2026

Add choice of installers 🔧

Summary

Adds a third installer option alongside Stock and Shizuku - a Legacy installer mode. This lets users delegate APK installations to an external installer app (e.g. InstallerX, App Manager) via a custom ContentProvider, bypassing Android's "Install Unknown Apps" restriction for the source app.

What's included

  • Installer mode selector in Settings - segmented button to switch between Stock, Shizuku, and Legacy
  • Installer app chooser - bottom sheet picker showing all compatible installer apps with their icons
  • CacheContentProvider - serves APKs from internal cache via content:// URIs with world-readable permissions
  • Install result detection - native BroadcastReceiver listens for ACTION_PACKAGE_ADDED / ACTION_PACKAGE_REPLACED to confirm installation success back to the app
  • Settings migration - existing users with Shizuku enabled won't lose their preference on upgrade

Screenshot

ObtainX

Why this matters 🛡️

Users with Android's Advanced Protection enabled cannot grant "Install Unknown Apps" permission to any app. This feature provides a clean workaround by routing installations through a privileged installer that already has root/Shizuku access, without requiring any new app permissions.

Files changed (8)

  • AndroidManifest.xml - CacheContentProvider declaration + package visibility queries
  • CacheContentProvider.kt - Custom ContentProvider for serving cached APKs
  • MainActivity.kt - MethodChannel bridge for installer queries and install intent dispatch
  • installer_provider.dart - Dart-side installer channel wrapper
  • settings_provider.dart - installerMode setting + migration from old useShizuku boolean
  • settings.dart - Installer mode UI (SegmentedButton + legacy installer picker)
  • apps_provider.dart - Legacy install flow integration
  • en.json - 7 new translation keys (other locales welcome)

@victordou
Copy link
Copy Markdown

Great feature, free to change any installer, can't wait!

@ImranR98
Copy link
Copy Markdown
Owner

ImranR98 commented Mar 20, 2026

Have you tested to see if this works for background updates? This is a pretty big PR with native code, might take a while for me to get around to checking fully.

@bikram-agarwal
Copy link
Copy Markdown
Author

Hi. No, I hadn't tested background updates. I always disable background updates on all my stores, since I like to read changelogs before updating.

I tried these steps now:

  • Enabled background update in settings.
  • Update checking interval: 15 minutes.
  • Saw that there is an update available for WAEnhancer.
  • Left the phone on desk for 20 minutes, didn't interact.
  • Picked up the phone after 20 minutes - nothing had changed, no update installation had happened.

Maybe we can add a warning that background update installation may not be possible with Legacy mode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants