Skip to content

Conversation

@sameerasw
Copy link
Owner

This pull request introduces support for root permissions as an alternative to Shizuku for several features, refactors permission checks to use a unified ShellUtils utility, and updates the UI and registries to reflect these changes. The update allows users to enable features using root access if available, improving flexibility and reliability, especially for advanced users. Additionally, the codebase now consistently uses the application context and the new permission logic across services and activities.

Root permission support and permission logic refactor:

  • Added root permission as an alternative to Shizuku for features like Freeze, Button Remap, and Maps Power Saving, updating FeatureRegistry to dynamically set required permissions based on root availability. [1] [2] [3] [4]
  • Refactored permission checks throughout the codebase to use ShellUtils for unified root/Shizuku detection and command execution, replacing direct Shizuku calls. [1] [2] [3] [4] [5] [6] [7] [8]

UI and user experience improvements:

  • Updated settings and feature permission UIs to display root options and status, including a toggle for root usage and dynamic permission cards in SettingsActivity and FeatureSettingsActivity. [1] [2] [3] [4] [5] [6]

Registry and context handling updates:

  • Registered new root permission keys and associated features in PermissionRegistry, ensuring correct mapping for feature dependencies.
  • Added a global context property to EssentialsApp for consistent application context access, required by new permission logic.
  • Added a key for root usage preference in SettingsRepository.

Bug fixes and minor improvements:

  • Fixed a bug in ShortcutHandlerActivity where the wrong context was passed to FreezeManager.unfreezeApp.

These changes collectively improve feature reliability, user control, and maintainability by supporting root permissions and centralizing permission logic.

@sameerasw sameerasw self-assigned this Jan 12, 2026
@sameerasw sameerasw added the enhancement New feature or request label Jan 12, 2026
@sameerasw sameerasw merged commit 5b6f23b into develop Jan 12, 2026
1 check passed
@github-project-automation github-project-automation bot moved this from Backlog to Done in Essentials Progress Jan 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants