Per-app refresh rates for the AYN Thor, plus an automatic sleep for the bottom screen.
Pick the apps and games you care about, give each one 60 Hz or 120 Hz, and ThorControls switches the Thor's refresh rate whenever you open them.
- Your apps only. Choose apps from a searchable list of everything installed. Apps you don't pick are left alone.
- Per game, too. Emulators get a separate gameplay rate, and detected RetroArch and DroidDeck (Steam) games can each have their own.
- Bottom screen sleep. The bottom screen turns black after the number of seconds you choose without a touch. Double-tap to wake it. Any app can keep it awake.
- Screen gestures. Hold Start (or Back) to swap the apps on the two screens, or add D-pad down/up to move one app. Apps keep running and are resized to fit the screen they land on.
- Charging loop fix. When the charger keeps connecting and disconnecting (charging animation over and over, fans pulsing with the lid closed), ThorControls switches Charging separation off and on again for you.
- Small and quick. No ads, no tracking, no accounts. Plain Android views, no animations. The background is a very dark gray rather than pure black, which avoids OLED smearing while scrolling.
- Open Releases and download
the newest
ThorControls-v<version>-arm64.apk. - Open it on the Thor and allow installing from your browser or file manager if Android asks.
- Open ThorControls and tap Open settings on the Finish setup card.
Later updates: ThorControls checks GitHub once each time you open it and only speaks up when there's a newer version (Settings → Check for updates checks by hand). It verifies the download and its signature, then opens Android's installer. Your settings carry over. Full releases only by default; turn on Settings → Prereleases to get test builds too.
ThorControls asks for two permissions. Both are in Settings (gear icon).
| Permission | Why |
|---|---|
| Modify system settings | To change the refresh rate. |
| App detection (accessibility) | To see which app is open on the top screen, and to notice touches on the bottom screen for bottom screen sleep. |
| Game detection (optional) | Separate rates per DroidDeck Steam game. Turned on with one tap through AYN's built-in system bridge. |
Choose apps. Tap Choose apps, tick the apps and games you want, then tap Done. Use the search box or the Selected filter to find them.
Set a rate. Every app has a switch: Manual (use the Thor's own setting), 60 or 120. 60 Hz shows in blue, 120 Hz in amber.
Dropdown. Emulators and DroidDeck have a dropdown (tap the row):
- Gameplay: the rate while a game is running. Menu means it uses the app's own rate.
- Detected games: one rate per game. DroidDeck Steam game names are found automatically the first time a game is seen and saved, so each is looked up only once. If that fails, it tries again the next time the game is noticed (at most every 5 minutes). Tap a name to rename it yourself, or Find name to try right away.
Other apps have no dropdown.
Groups. Tap an app's name for its menu: move it to a group, create a new
group, take it out of its group, or remove it from your list (its rates are
kept if you add it back). Grouped apps show as RetroArch/Emulators and sit
in that group's section. Use Edit on a section to rename or delete it.
Sleep off. While bottom screen sleep is on, each app has a Sleep off button next to its rate switch. Turned on (✓ Sleep off), the bottom screen never sleeps while that app is open.
Master switch. The switch in the top bar turns automatic switching on or off. While it's off, the list is dimmed and the Thor goes back to its own refresh-rate setting.
| App | How the gameplay rate is detected |
|---|---|
| RetroArch | Its local status interface. In RetroArch, turn on Settings → Network → Network Commands (port 55355). |
| DroidDeck | Its local content provider, with Game detection enabled. |
| Dolphin, Azahar / Citra / Lime3DS, melonDS, Eden / Yuzu / Sudachi / Citron | The emulator's game screen versus its menu. |
Turn on Settings → Bottom screen → Sleep when idle, then set Sleep after to any number of seconds from 5 to 86,400.
- After that long without a touch, the bottom screen turns black. It's an OLED panel, so black pixels are switched off.
- Double-tap it to wake it. Single taps while it's asleep do nothing.
- Opening an app on the bottom screen restarts the countdown.
- Black stays black: if the bottom screen was asleep when the Thor went to standby, the lid closed or the bottom screen was switched off, it's still black when it comes back, until you double-tap it. If it was awake, it comes back awake with a fresh countdown.
- Turn on Sleep off next to an app to stop the bottom screen from sleeping while that app is open on the top screen.
Turn them on in Settings → Screens → Screen gestures, and pick the hold button (Start or Back) and how long to hold it (0.8, 1.2 or 1.6 s; 1.2 s by default).
| You do | What happens |
|---|---|
| Hold the button and let go | The front apps on the top and bottom screens swap. |
| Hold it + D-pad down (or A) | The top screen's app moves to the bottom. |
| Hold it + D-pad up (or Y) | The bottom screen's app moves to the top. |
| Any shorter press | Goes to the game as usual; ThorControls doesn't touch it. |
- Apps keep running while they move. With gestures on, Android's "Force activities to be resizable" option is switched on too, so apps take the size of the screen they move to instead of being cut off or getting side bars. Restart the Thor once after turning gestures on. Some apps restart when moved.
- Once the hold time is reached, the game's press is cancelled and it gets no controller input until you let go. (A game that reacts the moment the button goes down, rather than when it's let go, still sees that press.)
- Only the default launchers stay put; any other app (ES-DE too) moves. If a screen has no app, there's nothing to move there; nothing pops up.
- AYN's bottom-screen panel (rates, temperatures; the AYN button opens it) never blocks a move: the app behind it moves. The panel itself stays open; close it with the AYN button.
- Moving an app to the bottom screen wakes it (or switches it on in top-only mode). Moving an app up never wakes the bottom screen.
- With gestures off, button presses don't pass through ThorControls at all.
- Moves use
am display move-stackthrough AYN's system bridge, so no Shizuku or wireless debugging is needed.
Some Thors get stuck in a loop while charging: the charger keeps "connecting" and "disconnecting", the charging animation plays over and over, and with the lid closed the fans keep spinning up. Switching Charging separation off and on stops it, so ThorControls can do that for you.
Turn it on in Settings → Charging → Fix charging loop. Then:
- 4 connect/disconnect events within 30 seconds count as a loop.
- ThorControls flips AYN's
is_charging_separationsetting and back, then watches for 8 seconds. If the loop goes on, it tries again (up to 3 rounds, with longer pauses). - Your own Charging separation setting is always put back.
- After a run it waits 60 seconds before acting again.
- It also works with the lid closed.
Settings shows when it last ran.
Settings → App → Settings file → Back up saves your apps, groups, rates and settings to a JSON file. Restore loads one.
Android's refresh-rate settings (min_refresh_rate / peak_refresh_rate)
affect both of the Thor's screens. Changing them while the 60 Hz bottom panel
is off can leave it black, so ThorControls only writes them when both screens
are on and settled. If the Thor is in top-screen-only mode, the bottom screen
is switched on for the change and off again 1.5 seconds later. A change that
fails isn't retried until a different rate is needed, and a rate you change
yourself in AYN's control center isn't overridden until the next app switch.
Bottom screen sleep draws a black accessibility overlay on the bottom display, plus a 1×1 pixel watcher that notices touches there.
- No analytics, ads or accounts, and no third-party libraries.
- Network use: RetroArch's status on
127.0.0.1only; Steam's store API to find a DroidDeck game's name, only when DroidDeck's own library doesn't have it and only until the name is found (it's saved on the device); and GitHub once when you open the app (update check) or when you check by hand. - The accessibility service reads which app is open and notices touches on the bottom screen. With screen gestures on, it reacts to the hold button (Start or Back), and takes all controller input only while it is held; every other button passes through untouched. It doesn't record keystrokes or read screen text.
- With the charging loop fix on, ThorControls listens for charger
connect/disconnect events and changes only AYN's
is_charging_separationsetting (and always restores it).
Requirements: Git, Node.js (no npm install needed), and optionally
Android Studio (SDK 35 and JDK 17) for local build checks.
npm run setup-signing # once: create the release key and the 4 GitHub secrets
npm run deploy # check, raise the version, commit, push
npm run deploy -- -m "What changed"
npm run bump # only raise the versionnpm run deploy refuses to upload if a check fails: missing build files,
Java files outside com.thor.controls, signing keys or other private files
in the folder, or a failed local Gradle build.
GitHub Actions then builds an R8-optimized ARM64 APK and publishes every new version as a prerelease. When a prerelease is good, open Actions → Publish full release → Run workflow to make it a full release (the same APK, not rebuilt).
Without the signing secrets, builds are test APKs under Actions → Artifacts only: their key changes every run, so they could never update an installed copy.
Manual builds: ./gradlew :app:assembleDebug, or :app:assembleRelease for
the optimized APK. Windows: gradlew.bat. VS Code tasks are under
Terminal → Run Task → Thor: ….
Every update must be signed with the same key, or Android refuses to install
it over the old one. npm run setup-signing creates the key in
ThorControls-signing in your user folder, outside the project. Back that
folder up. Without it, installed copies can't be updated without
uninstalling, which erases their settings. Never commit the key.
All saved settings live in one SharedPreferences file, and their keys are
listed in ProfileStore.java. Keep them stable so updates carry settings
over.
| File | Role |
|---|---|
RateController |
Writes refresh rates safely (both screens on, settled). |
AppMonitorService |
Accessibility service: foreground app, game detection, sleep. |
BottomScreenSleeper |
Bottom screen sleep and double-tap wake. |
ProfileStore |
All saved settings (stable keys). |
MainActivity, SettingsSheet, AppPicker, Ui |
The interface. |
RetroArchProbe, DroidDeckProbe, ActivityModeDetector |
Gameplay detection. |
AppUpdater |
Verified updates from GitHub Releases. |
ThorControls is built to use as little power as possible while staying quick:
- No background polling for normal apps: Android tells the accessibility service when the app on screen changes. Bursts of window events are handled once, after the burst (a quarter second).
- RetroArch and DroidDeck are checked once a second, and only while they're open on the top screen and the screen is on.
- Bottom screen sleep, the charging loop fix and screen gestures only react to events (a touch, a charger event, a button). They never poll.
- Refresh-rate changes are written only when the rate actually has to change.
- Device: built for the AYN Thor on stock firmware (Android 13, ARM64).
- Android versions:
minSdk30,targetSdk33. - Testing: refresh-rate switching and bottom screen sleep rely on AYN's firmware behaviour, so test changes on a real device.
- History: formerly ThorRefreshRateControl (
com.thor.refreshrate). ThorControls (com.thor.controls) is a separate app, so move your settings with a backup.