Repository navigation
Adaptive Hz v2.4.0 - Beta
Pre-releaseAdaptive Hz — Custom Refresh Rates, Safer Restore and HyperOS 3 Support
This release brings the largest refresh-rate engine update to Adaptive Hz so far. It adds safe custom refresh-rate selection on compatible devices, improves global and per-app behavior, strengthens permission and Shizuku handling, and ensures temporary display changes are restored when Adaptive Hz stops controlling the screen.
Testing status: Custom values are device-tested on the Samsung Galaxy S24. Broader One UI compatibility and the new HyperOS 3 custom-value path are currently in testing. Existing vendor modes remain available as the safe fallback.
What's new
Custom refresh-rate values
- Choose a single interaction target for global Adaptive mode.
- Choose independent custom values for global Minimum and Maximum modes.
- Choose independent custom values for per-app Minimum and Maximum profiles.
- Custom per-app Adaptive profiles are intentionally not included; apps using the Default profile inherit the global Adaptive target.
- Available values are discovered from the display's physical modes instead of a hardcoded device or Hz list.
- Floating-point values such as
120.00001and30.000002are normalized safely. - Only modes compatible with the active display resolution are offered.
- The custom refresh-rate card remains visible but passive while Adaptive Hz is Off.
Samsung / One UI
- Compatible One UI devices use Shizuku-owned, session-scoped DisplayManager minimum/maximum tokens for custom values.
- Adaptive Hz temporarily opens the full physical refresh-rate range before applying a custom token, preventing supported values above 60 Hz from being incorrectly clamped.
- The previous Samsung refresh-rate mode is restored when the custom session ends.
- Unsupported Samsung firmware automatically falls back to the existing
refresh_rate_modeimplementation. - Existing Samsung Adaptive, Minimum, Maximum and Off behavior remains unchanged.
Xiaomi / HyperOS 3
- Added guarded custom-value support for HyperOS 3 devices.
- Adaptive Hz evaluates both
user_refresh_rateandmiui_refresh_ratefrom the live device state instead of trusting a fixed ROM or model table. - A setting write or successful read-back is not treated as proof of success. The route is accepted only after the active physical
Display.modereaches the requested refresh rate. - If the requested rate is already active, Adaptive Hz performs a reversible physical-mode probe before trusting the route.
- A verified route is cached only for the current firmware and display identity.
- Failed candidates are restored immediately and the existing Xiaomi strategy is used as fallback.
- HyperOS 1, HyperOS 2 and existing normal HyperOS 3 modes continue to use their previous behavior.
Safety and restoration
Custom refresh-rate handling has been redesigned so temporary app state cannot silently become permanent device state.
- New custom selections do not use persistent generic
min_refresh_rateorpeak_refresh_rateoverrides. - HyperOS 3 snapshots the exact original values and presence state of both known vendor keys before applying a custom value.
- Both HyperOS keys are restored, including changes caused indirectly by the OEM framework.
- Restoration is retried and verified before the recovery snapshot is cleared.
- Cleanup runs when:
- Global mode is turned Off
- The app returns to a normal vendor mode
- Accessibility service stops
- Shizuku service stops or disconnects
- The app process or its Binder client dies
- The package is updated
- The device restarts
- Legacy persistent min/peak snapshots left by older builds are detected and restored.
- Failed custom requests restore the original state before falling back to normal vendor behavior.
Reliability improvements
- Fixed stale
WRITE_SECURE_SETTINGSstate after reinstalling or updating the app. - Shizuku UserService now uses an APK-aware protocol revision, preventing a new build from reconnecting to an incompatible older AIDL service.
- Refresh-rate operations are serialized to prevent overlapping mode writes.
- Rapid actions use latest-command-wins behavior across the app, notification, widget and Quick Settings tile.
- Reduced redundant refresh writes and mode-transition stalls.
- Fixed default-display discovery from application, service and receiver contexts.
- Improved recovery after boot, package replacement, service teardown and Shizuku disconnects.
- Battery Saver changes trigger a safe re-evaluation of the current mode.
Per-app profile fixes
- Fixed global behavior overriding active per-app Minimum and Maximum profiles.
- Per-app profiles now take precedence only while their selected app is in the foreground.
- Removed the ambiguous per-app custom Adaptive option.
- Legacy per-app Adaptive values are migrated safely without creating a persistent lock.
- Improved installed-app discovery, filtering and recent-app handling.
- Fixed the Apply Profile card layout on narrow and high-density screens.
Setup and interface
- Added Shizuku to guided setup and Settings as optional but recommended.
- Existing vendor modes continue to work without Shizuku.
- Compatible custom values require an active Shizuku connection so their lifecycle and cleanup can be managed safely.
- Added clear dialogs before actions that benefit from Shizuku while still allowing users to continue without it.
- Improved error messages so missing
WRITE_SECURE_SETTINGS, unavailable Shizuku and unsupported custom values are reported separately. - Improved mode synchronization between the app, foreground notification, home-screen widget and Quick Settings tile.
- Added responsive custom-value controls for global and per-app modes.
- Added diagnostics improvements for vendor, selected setting path, foreground app and last refresh-rate operation.
Requirements
- Android 12 or newer
WRITE_SECURE_SETTINGS, granted through ADB or optional root-assisted setup- Adaptive Hz Accessibility service enabled
- Shizuku running and permission granted for compatible custom refresh-rate values
Root is not required. Shizuku remains optional for the established vendor modes and is recommended for more accurate touch detection.
Grant the secure settings permission with:
adb shell pm grant com.mahmutalperenunal.adaptivehz android.permission.WRITE_SECURE_SETTINGSCompatibility status
| Platform | Status | Notes |
|---|---|---|
| Samsung Galaxy S24 / One UI | ✅ Device-tested | Global and per-app custom values verified on-device |
| Other compatible Samsung / One UI devices | 🧪 Testing | Requires the compatible DisplayManager token API and Shizuku |
| HyperOS 1 | ✅ Existing behavior retained | Continues using the established user_refresh_rate strategy |
| HyperOS 2 | Existing miui_refresh_rate strategy is unchanged |
|
| HyperOS 3 normal modes | ✅ Existing behavior retained | Existing Adaptive, Minimum, Maximum, Off and app-profile paths are unchanged |
| HyperOS 3 custom values | 🧪 Testing | Uses runtime route discovery, physical-mode verification and exact-state restoration |
| Other Android vendors | Custom-value support is not enabled without a verified vendor transport |
Updating from an earlier build
Installing over an existing version is supported and is useful for validating the real update path. The app rechecks the live Android permission state and forces Shizuku to recreate incompatible older UserService implementations.
After updating, confirm that:
WRITE_SECURE_SETTINGSis shown as granted.- Accessibility remains enabled.
- Shizuku is running and Adaptive Hz permission is granted if custom values will be used.
- Turning Adaptive Hz Off returns the phone to its native refresh-rate behavior.
What to test
Please include the device model, Android version, One UI/HyperOS version and Adaptive Hz diagnostics report with any issue.
- Test Adaptive, Minimum, Maximum and Off from the app.
- Repeat mode changes from the notification, widget and Quick Settings tile.
- Test every custom refresh-rate value offered by the device.
- Confirm Adaptive reaches the selected target on interaction and returns to the normal low policy afterward.
- Test per-app Minimum and Maximum values while moving between profiled and unprofiled apps.
- Turn Adaptive Hz Off and confirm the phone's native refresh-rate selector works normally.
- Stop Shizuku while a custom value is active and confirm normal behavior is restored.
- Reboot once with a custom configuration and verify recovery after startup.
For the limited HyperOS 3 device session, use the included single-pass acceptance checklist.
Known limitations
- OEM power-saving, thermal, AOD, lock-screen, resolution and content policies may temporarily clamp the effective refresh rate.
- A physical mode reported by Android does not guarantee that every app or content type can use it continuously.
- HyperOS behavior can differ between regional firmware builds.
- Force-stopping the app disables background adaptive switching until the service is started again.
- Custom values require a live, compatible Shizuku transport; otherwise Adaptive Hz restores and uses the established vendor mode.
Automated validation
- 52 unit tests passed with 0 failures
- Android lint completed with 0 errors
- Debug APK built successfully
- Minified release APK built successfully
- Instrumentation APK built successfully
- Whitespace validation passed
Thank you to everyone testing Adaptive Hz and sharing device-specific behavior. Reports from additional One UI and HyperOS devices are especially valuable for expanding verified compatibility safely.