Back to feed

FrankBarretta/LSFG-Android

FrankBarretta/LSFG-Android
342
+23/day
16

Lossless Scaling Frames Generator (LSFG) Application for Android

From the README

LSFG-Android — frame generation on Android via the lsfg-vk pipeline

LSFG-Android brings the lsfg-vk Vulkan frame-generation pipeline to Android. Because Android 12+ blocks loading external code into non-debuggable processes, the layer can't hook another app's swapchain the way the Linux implicit layer does. Instead, the app runs frame interpolation on a MediaProjection capture and composites the generated frames in a system overlay sitting on top of the target game. End-to-end frame generation works today on Adreno 7xx-class GPUs and newer.

Video

LSFG-Android 0.1.0 Test

Repository layout

| Path | What it is | |---|---| | LSFG-Android/ | Android Studio project — Kotlin + Jetpack Compose UI, JNI/C++ render loop. The user-facing app. | | lsfg-vk-android/ | Submodule. Branch of lsfg-vk 1.0.0 with Android-specific patches added on top (AHardwareBuffer-based image sharing, createContextFromAHB, waitIdle). All patches are guarded by #ifdef __ANDROID__, so the original Linux build path still works unchanged. |

The Android app pulls framegen/ directly from the submodule via CMake add_subdirectory(). There is no separate prebuilt .so to ship — building the app builds the framegen library transparently for arm64-v8a and x86_64.

What it does

  • Frame generation (LSFG_3_1 / LSFG_3_1P) running on-GPU via AHardwareBuffer sharing between the app's Vulkan session and framegen's internal device.
  • Live in-game settings drawer: multiplier (2×–8×), flow scale (0.25–1.0), performance / HDR mode, anti-artifacts, bypass, vsync alignment with slack control, pacing presets, target FPS cap, queue depth, EMA jitter smoothing. Most parameters re-init the native context on the fly; bypass / pacing / Shizuku timing have hot-apply paths that don't drop the session.
  • Automatic per-app overlay — pick target apps and the overlay arms when one of them comes to the foreground. Two entry modes: a draggable launcher dot or an icon button on the configurable edge of the screen.
  • First-launch tutorial that walks through the Accessibility setup (the touch-passthrough service and the Restricted-Settings unblock that sideloaded apps trigger on Android 13+).
  • Touch passthrough at full opacity. The overlay can be hosted as a SYSTEM_ALERT_WINDOW or, when the user enables LsfgAccessibilityService, as a TYPE_ACCESSIBILITY_OVERLAY — the latter is the opt-in path for OEMs with strict untrusted-touch filters.
  • Capture sources: MediaProjection (default, used for the visible frames on every session) and Shizuku metrics mode, which adds a privileged target-UID-filtered timing side channel for pacing diagnostics without ever feeding Shizuku buffers into the visible video path.
  • Post-processing pipelines: NPU presets via NNAPI (sharpen, detail boost, chroma clean, game crisp), GPU upscaling stage, and CPU enhancement (LUT, vibrance, s