Skip to content

Add profile selection for the Shizuku installer - #101

Open
darkydtm wants to merge 4 commits into
whyorean:masterfrom
darkydtm:pr/install-profile-shizuku
Open

darkydtm wants to merge 4 commits into
whyorean:masterfrom
darkydtm:pr/install-profile-shizuku

Conversation

@darkydtm

Copy link
Copy Markdown

What this does

Lets you choose which user profile the Shizuku installer installs into - Current profile (default), Work profile or All profiles. Other installers lack the privileges for cross-profile installs and ignore the setting.

Implementation

  • ShizukuInstaller resolves target user ids via IUserManager.getUsers(...), binds a PackageInstaller to each id through the hidden PackageInstallerHidden constructor and creates one session per profile - falling back to the current profile when the requested one doesn't exist (e.g. no work profile present).
  • Adds the PREFERENCE_INSTALLATION_PROFILE setting, a preference UI to pick the profile, and strings translated into all bundled locales.

darkydtm added 3 commits June 30, 2026 00:28
Allow choosing which user profile the Shizuku installer targets:
current (personal), work profile, or all profiles at once.

- ShizukuInstaller now enumerates profiles via IUserManager and creates
  install sessions bound to each target user id through PackageInstallerHidden,
  falling back to the current profile when the requested one is unavailable.
- New PREFERENCE_INSTALLATION_PROFILE preference with a single-choice dialog
  in the installation settings, shown only when Shizuku is the active installer.
The hidden-api stub's IUserManager exposes getUsers(), not getProfiles(),
which broke compilation (unresolved reference). Switch to getUsers() with the
three-arg overload on API 30+ and the single-arg overload below it, keeping the
managed-profile filter for the work profile and falling back to the current
profile when enumeration yields nothing.
Translate the four pref_install_profile_* strings into all 53 supported locales.
@darkydtm
darkydtm force-pushed the pr/install-profile-shizuku branch from 1cfe33c to 5d7c95c Compare June 29, 2026 19:38
@darkydtm

Copy link
Copy Markdown
Author

fixed conflicts

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.

2 participants