Skip to content

Repository files navigation

Latch

Custom lock overlay for the AYN Thor (and similar Android handhelds). Unlock with an ordered face-button sequence — like a PIN made of A → B → X → Y.

This is an app-level lock, not a replacement for Android’s system Keyguard.

Features

  • Full-screen lock overlay on both Thor displays
  • App lock with unlock modes: relock on leave, stay unlocked, or timed
  • Backup PIN / pattern unlock
  • Customizable lock look (wallpaper / solid / per-screen images, font, elements) with live preview
  • Optional auto-lock when the screen turns off
  • Wrong-sequence reset + short lockout after repeated failures
  • Haptic feedback on presses

Requirements

  • Android 8.0+ (API 26); tested target: AYN Thor
  • Accessibility permission (button capture + overlay)
  • No root / Shizuku required

Quick start

  1. Install the APK (.\build.ps1 assembleDebugapp/build/outputs/apk/debug/app-debug.apk)
  2. Open Latch
  3. Tap Enable button detection → turn on Latch in Accessibility
  4. Tap Set unlock sequence → press at least 4 buttons → Done → confirm → Save
  5. (Optional) Set a backup PIN/pattern, enable auto-lock, disable battery optimization
  6. Add the Latch Quick Settings tile, or tap Lock now

How unlock works

While locked, press your buttons in order. Progress dots fill as you go. A wrong button clears the attempt. After 5 failed attempts you must wait 30 seconds.

Limitations

  • Does not replace the Android lock screen / PIN / biometrics
  • Cannot fully block power-button reboot, safe mode, or every OEM gesture
  • Overlay covers both built-in displays on dual-screen devices (Thor top + bottom)
  • Treat this as a convenience lock for handheld use, not high-security protection

Build

cd c:\Users\mezra\joystick-lock
.\build.ps1 assembleDebug

Uses the local .jdk folder when present (junction to Screen Switcher’s JDK is fine).

Support

If Latch helps you out, optional tips are welcome:

Support me on Ko-fi

About

Latch - lock dual-screen handhelds with a joystick button sequence

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages