[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-1033":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":9,"language":9,"languages":9,"totalLinesOfCode":9,"stars":10,"forks":11,"watchers":12,"openIssues":13,"contributorsCount":14,"subscribersCount":14,"size":14,"stars1d":15,"stars7d":16,"stars30d":17,"stars90d":14,"forks30d":14,"starsTrendScore":11,"compositeScore":18,"rankGlobal":9,"rankLanguage":9,"license":19,"archived":20,"fork":20,"defaultBranch":21,"hasWiki":20,"hasPages":20,"topics":22,"createdAt":9,"pushedAt":9,"updatedAt":23,"readmeContent":24,"aiSummary":25,"trendingCount":14,"starSnapshotCount":14,"syncStatus":26,"lastSyncTime":27,"discoverSource":28},1033,"LSFG-Android","FrankBarretta\u002FLSFG-Android","FrankBarretta","Lossless Scaling Frames Generator (LSFG) Application for Android",null,587,36,8,90,0,12,23,93,8.7,"Other",false,"main",[],"2026-06-12 02:00:22","# LSFG-Android — frame generation on Android via the lsfg-vk pipeline\n\n[![Discord](https:\u002F\u002Fimg.shields.io\u002Fdiscord\u002F1496212333595463780?label=Discord&logo=discord)](https:\u002F\u002Fdiscord.gg\u002FCkuumNJ7s4)\n\nLSFG-Android brings the [`lsfg-vk`](https:\u002F\u002Fgithub.com\u002FPancakeTAS\u002Flsfg-vk)\nVulkan frame-generation pipeline to Android. Because Android 12+ blocks\nloading external code into non-debuggable processes, the layer can't hook\nanother app's swapchain the way the Linux implicit layer does. Instead, the\napp runs frame interpolation on a `MediaProjection` capture and composites\nthe generated frames in a system overlay sitting on top of the target game.\nEnd-to-end frame generation works today on Adreno 7xx-class GPUs and newer.\n\n\n## Video\n\n[LSFG-Android 0.1.0 Test](https:\u002F\u002Fyoutu.be\u002FLx-_b9AJdK0)\n\n\n\n## Repository layout\n\n| Path | What it is |\n|---|---|\n| [`LSFG-Android\u002F`](LSFG-Android\u002F) | Android Studio project — Kotlin + Jetpack Compose UI, JNI\u002FC++ render loop. The user-facing app. |\n| [`lsfg-vk-android\u002F`](lsfg-vk-android\u002F) | Submodule. **Branch of [`lsfg-vk`](https:\u002F\u002Fgithub.com\u002FPancakeTAS\u002Flsfg-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. |\n\nThe Android app pulls `framegen\u002F` directly from the submodule via CMake\n`add_subdirectory()`. There is no separate prebuilt `.so` to ship — building\nthe app builds the framegen library transparently for `arm64-v8a` and\n`x86_64`.\n\n## What it does\n\n- **Frame generation (LSFG_3_1 \u002F LSFG_3_1P)** running on-GPU via AHardwareBuffer\n  sharing between the app's Vulkan session and framegen's internal device.\n- **Live in-game settings drawer**: multiplier (2×–8×), flow scale (0.25–1.0),\n  performance \u002F HDR mode, anti-artifacts, bypass, vsync alignment with slack\n  control, pacing presets, target FPS cap, queue depth, EMA jitter smoothing.\n  Most parameters re-init the native context on the fly; bypass \u002F pacing \u002F\n  Shizuku timing have hot-apply paths that don't drop the session.\n- **Automatic per-app overlay** — pick target apps and the overlay arms when\n  one of them comes to the foreground. Two entry modes: a draggable launcher\n  dot or an icon button on the configurable edge of the screen.\n- **First-launch tutorial** that walks through the Accessibility setup\n  (the touch-passthrough service and the Restricted-Settings unblock that\n  sideloaded apps trigger on Android 13+).\n- **Touch passthrough** at full opacity. The overlay can be hosted as a\n  `SYSTEM_ALERT_WINDOW` or, when the user enables `LsfgAccessibilityService`,\n  as a `TYPE_ACCESSIBILITY_OVERLAY` — the latter is the opt-in path for OEMs\n  with strict untrusted-touch filters.\n- **Capture sources**: MediaProjection (default, used for the visible frames\n  on every session) and Shizuku metrics mode, which adds a privileged\n  target-UID-filtered timing side channel for pacing diagnostics without\n  ever feeding Shizuku buffers into the visible video path.\n- **Post-processing pipelines**: NPU presets via NNAPI (sharpen, detail boost,\n  chroma clean, game crisp), GPU upscaling stage, and CPU enhancement\n  (LUT, vibrance, saturation, vignette).\n- **Frame graph HUD** with real-vs-total FPS counter, frame-time graph, and\n  pacing diagnostics.\n- **Crash reporter** capturing both Java\u002FKotlin uncaught exceptions and\n  native signals (SIGSEGV, SIGABRT, …) with stack-walking; one-tap share via\n  `ACTION_SEND` for bug reports.\n- **Vulkan swapchain output path** for efficient frame presentation on top of\n  the CPU-blit fallback.\n- **Rotation and immersive-mode aware** overlay components.\n\n> [!IMPORTANT]\n> You need a legitimately purchased copy of Lossless Scaling. The `Lossless.dll`\n> is **not** shipped, downloaded, or bundled by anything in this repository.\n> The user picks their own DLL via the Storage Access Framework, the app\n> extracts the shaders on-device into its private storage, then deletes the\n> DLL copy. Nothing about this project distributes Lossless Scaling assets.\n\n## Build\n\n```sh\ncd LSFG-Android\n.\u002Fgradlew :app:assembleDebug         # or :app:assembleRelease\n```\n\nThe APK lands in `LSFG-Android\u002Fapp\u002Fbuild\u002Foutputs\u002Fapk\u002Fdebug\u002Fapp-debug.apk`.\nInstall with `adb install`.\n\nToolchain: Android Studio Ladybug+, NDK 27.0.12077973, CMake 3.22.1, JDK 17,\nC++20. ABIs: `arm64-v8a` (production) and `x86_64` (emulator only).\n`minSdk=29` (Android 10), `targetSdk=35` (Android 15).\n\nCMake automatically resolves the submodule via the relative path\n`..\u002F..\u002F..\u002F..\u002F..\u002Flsfg-vk-android` from the JNI sources. Keep both folders\nside-by-side as in this repository's layout — moving or renaming either one\nbreaks the native build.\n\nFor the standalone Linux build of the patched `lsfg-vk`, see\n[`lsfg-vk-android\u002FREADME.md`](lsfg-vk-android\u002FREADME.md). The Android-specific\npatches are no-ops on non-Android targets, so the upstream build commands\nwork unchanged.\n\n## Platform limits (read once)\n\nOn non-rooted Android there is **no equivalent to Linux's Vulkan implicit\nlayer mechanism**. Android 12+ explicitly blocks loading external code into\nnon-debuggable processes, so this app cannot hook another app's Vulkan\nswapchain. Frame generation runs on a `MediaProjection` screen-capture stream\ninstead, and the result is composited in a system overlay over the target.\n\nThat adds roughly 50–80 ms of latency versus the Linux Vulkan layer. It is a\nplatform constraint, not a bug. `MediaProjection` also requires explicit user\nconsent on every session start and surfaces a persistent system indicator.\nThe combination of `SYSTEM_ALERT_WINDOW` + screen capture + `AccessibilityService`\nviolates Google Play policy, so this app is distributable only as a sideloaded\nAPK. A Magisk module installing a Vulkan implicit layer into\n`\u002Fsystem\u002Fetc\u002Fvulkan\u002Fimplicit_layer.d\u002F` would be the only realistic path to\nmatch the Linux experience, and is out of scope here.\n\n## Component-level READMEs\n\n- [`LSFG-Android\u002FREADME.md`](LSFG-Android\u002FREADME.md) — app architecture,\n  feature breakdown, device requirements, native module layout.\n- [`lsfg-vk-android\u002FREADME.md`](lsfg-vk-android\u002FREADME.md) — the framegen\n  library, the Android patch set, and the precise diff against upstream\n  `lsfg-vk` 1.0.0.\n\n## Credits\n\nThis project would not exist without the work of:\n\n- **[PancakeTAS](https:\u002F\u002Fgithub.com\u002FPancakeTAS) and the lsfg-vk contributors** —\n  authors of the original [`lsfg-vk`](https:\u002F\u002Fgithub.com\u002FPancakeTAS\u002Flsfg-vk)\n  Vulkan frame-generation layer, which is the entire backbone of this port.\n- **THS \u002F Lossless Scaling** — original authors of the Lossless Scaling\n  frame-generation shaders. The shaders are extracted on-device from the\n  user's own legitimately purchased copy of `Lossless.dll` and are never\n  redistributed by this project.\n- **[FrankBarretta](https:\u002F\u002Fgithub.com\u002FFrankBarretta)** — Android port\n  (this repository): JNI\u002FVulkan glue, AHardwareBuffer-based image sharing,\n  MediaProjection capture pipeline, overlay\u002Fforeground service, accessibility-\n  overlay touch passthrough, Compose UI, settings drawer, automatic overlay,\n  draggable launcher dot, first-run tutorial, Shizuku integration, frame graph HUD, \n  crash reporter, Vulkan swapchain output, and the upstream patches added \n  under `#ifdef __ANDROID__` in the [`lsfg-vk-android`](lsfg-vk-android\u002F) submodule.\n\nThird-party libraries used by the native build: [`volk`](https:\u002F\u002Fgithub.com\u002Fzeux\u002Fvolk),\n[`pe-parse`](https:\u002F\u002Fgithub.com\u002Ftrailofbits\u002Fpe-parse), DXVK's `dxbc` translator,\nand [Shizuku](https:\u002F\u002Fgithub.com\u002FRikkaApps\u002FShizuku) for the privileged timing\nside channel.\n\nIf you fork this project or build something on top of it, please keep both\nthe upstream `lsfg-vk` attribution and the LSFG-Android port attribution\nintact (this is also a requirement of the licenses below).\n\n## License\n\nThe top-level files of this repository are released under the **MIT License** —\nsee [`LICENSE`](LICENSE). The two main subdirectories carry their own\nlicenses, which prevail over the root MIT license within their respective\ntrees:\n\n| Subdirectory | License | File |\n|---|---|---|\n| [`LSFG-Android\u002F`](LSFG-Android\u002F) | **Custom License — No Play Store, No Commercial Use** | [`LSFG-Android\u002FLICENSE`](LSFG-Android\u002FLICENSE) |\n| [`lsfg-vk-android\u002F`](lsfg-vk-android\u002F) | **MIT** (inherited from upstream `lsfg-vk`) | [`lsfg-vk-android\u002FLICENSE.md`](lsfg-vk-android\u002FLICENSE.md) |\n\nIf you redistribute the repository as a whole, reproduce all three license\nfiles and respect the most restrictive terms applicable to each subtree —\nin particular, the LSFG-Android app may not be published on Google Play or\nany other commercial app store, and may not be used commercially.\n\n`Lossless.dll` is the property of THS \u002F Lossless Scaling and is **not**\ndistributed by this project under any circumstances.\n","LSFG-Android 是一个适用于安卓系统的无损帧生成应用。它通过 Vulkan 图形管线技术，在安卓设备上实现帧插值，从而提升游戏和其他应用的视觉流畅度。项目基于 lsfg-vk 框架，并针对安卓平台进行了优化，如使用 AHardwareBuffer 进行图像共享等。用户可以通过 MediaProjection 捕获屏幕内容，并在系统级覆盖层中合成生成的帧，以实现实时帧率增强。此外，该应用还提供了丰富的设置选项，包括帧数倍增、HDR 模式选择及抗锯齿处理等，非常适合需要提高画面流畅度或进行视频录制的游戏场景。",2,"2026-06-11 02:41:14","CREATED_QUERY"]