ShizuStore

Duo Fold Live

joeconsorti

3.5.2 · GitHub

Download APK
Vendor-specific Android 14+ 4 days ago MIT
15 ShizuStore
15.4k GitHub
90 Stars
20 MB Size

More about this app

Live hinge-driven iPhone-Duo fold animation for Galaxy Z Fold 8 with windowed glass, live cover previews and smooth display handoff, reading the true hinge angle via Shizuku.

DuoFold Live

Duo Fold Live · 3.5.2

Current official release: 3.5.2. Occasional unlock wallpaper flashing remains a known issue. For Keep Awake, disable Samsung’s “Lock when folded”; see troubleshooting. Rollback baseline and release history.

📺 Step-by-step installation tutorial

New here? Watch the full setup walkthrough on YouTube.

Created by a Duo Fold Live user—not by me. Huge thanks for putting this together!

An iPhone Duo-inspired folding animation for the Samsung Galaxy Z Fold 8, with windowed glass, live cover previews, and smooth black fades around Samsung’s display handoff. Free and open source. Runs over One UI and ordinary apps without replacing your launcher.

Download 3.5.2 · 3.5.2 release notes · Report an issue

Only tested on the Z Fold 8 (SM-F971U). Fold 8 Ultra, Fold 7, and other devices are unverified. Do not expect compatibility. Model recognition includes regional SM-F971, SM-F976, and SM-F966 families. Unknown models display a warning and may proceed. Android 17 and the existing Samsung wallpaper/API checks are still required. Recognition is not verified compatibility.

Updating from an older version

The signing key changed. Older public installs require one uninstall/reinstall, followed by setup again. Uninstalling removes local settings and the saved custom wallpaper. Recent alphas using the current key can update directly. Future releases using this permanent key will update in place; another signing-key migration is not planned.

Quick setup

  1. Download and install the APK from Releases.
  2. Follow the app’s setup guide: start Shizuku/Shizuku+, authorize Duo, and apply the required Samsung fold wallpapers when prompted.
  3. Allow the requested overlay/accessibility permissions and enable the animation. If Android blocks accessibility, use App info → ⋮ → Allow restricted settings.
  4. Optionally choose a custom wallpaper in the built-in wallpaper menu.

The app guides setup. Samsung’s interactive wallpaper and Shizuku running in ADB mode are required for hinge measurements. The Samsung assets are not bundled. Shizuku normally needs restarting after a phone reboot. The in-app Trouble with Shizuku/Fold shutting off? section covers background operation and offline troubleshooting.

What Duo Fold Live does

Your actual screen becomes part of the folding animation. Duo follows the hinge as you move it, projecting your content through glass, reflections, blur, and a softened display handoff. The default path uses live content, so supported content can keep moving behind the effect.

Four animation styles

  • Windowed Glass: the default, iPhone Duo-inspired experience with a live cover preview, reflected left side, progressive glass, and a black fade around the screen switch.
  • Duo Classic: glass over the inner screen’s own content with a black reveal, without the mirrored cover preview.
  • Fold-Only: Windowed Glass when closing; normal behavior when opening.
  • Unfold-Only: Windowed Glass when opening; normal behavior when closing.

A cover-screen preview inside the inner display

  • Clean right-side preview: see the cover content without its animation layered into the mirror. The right preview is committed before the left reflection starts.
  • Two left-side appearances: Frosted Reflection is the default blurred, horizontally mirrored image. Animated Reflection mirrors the cover animation for a more literal glass-window effect. Select either in Advanced settings.
  • Soft center blending: blur feathers across the fold into the right side during folding and unfolding. Adjust its position from 0–15% of the inner display width beyond the fold; the default is 7%.
  • Screen-size-aware alignment: projection follows the cover’s proportions to keep its corners anchored, rather than using a fixed height for one phone.

Tune the look and motion

  • V2 Window Reveal · experimental is the default projection, with Original available for comparison. Cover early stretch defaults to 90%, end stretch to 125% (80–150%), and vertical compression to 115%. Separate inner controls default to 30% early stretch, 45% end stretch (0–150%), and 60% vertical compression. Both vertical sliders range from 0–200%; 100% retains the original perspective. Startup easing is on and toggleable.

  • Motion smoothness, blur amount, and glass strength have separate controls and reset buttons. Defaults: 30 ms, 30%, and 100% respectively.

  • Black fade smoothing and gradualness let you shape the transition around Samsung’s display switch.

  • Manual live-content targets: 120 FPS experimental by default, or 60 FPS for lower GPU cost. No automatic switching based on the display’s reported refresh rate. These are targets, not guaranteed frame rates.

  • Three anti-aliasing methods in Advanced: Lightweight Texture Filtering (default), Edge-Adaptive Smoothing, and 4× Supersampling. AA can be disabled or adjusted within a narrow strength range, independently of blur and glass strength. The two heavier methods remain experimental.

  • Optional full-resolution glass for users who prefer more rendering detail; half-resolution glass is the baseline to reduce GPU work.

  • Adjustable hinge thresholds: choose when the effect treats the phone as fully open or closed. Defaults: 172° open and 2° closed.

Your wallpaper, your launcher, your settings

  • Custom photo wallpaper: choose a photo, preview its folded and unfolded crops, and keep it saved across compatible app updates.
  • Works over One UI and ordinary apps without replacing your launcher.
  • Temporary orientation locking during transitions, followed by release, plus an Advanced Repair auto-rotate button for recovery.
  • Guided setup and connection recovery: wallpaper checks, Shizuku authorization, accessibility guidance, and reconnect controls are built in.
  • Keep Awake support is enabled and checked in the background. Disable Samsung’s Lock when folded setting to keep the cover awake when closing from Home; see troubleshooting.

Experiments and useful diagnostics

  • Optional dual-screen screenshot handoff under Advanced → Developer settings, for experimenting with a held image instead of the default live handoff. Off by default.
  • Copyable status reports include angle-feed latency, measured capture throughput, renderer submission rates, preview/handoff events, AA settings, and 24-hour app-process health samples. Separate wallpaper reports help investigate unlock flashes.
  • Free and open source: all features are available without donating. Optional support reminders can be snoozed or permanently dismissed.

Actual performance depends on the device, firmware, content, and selected effects. Fades soften Samsung’s display-switch blackout; the underlying panel transition remains. The mirrored preview does not run two independent apps on the two panels.

Setup recovery in 3.0.3

Installs that previously skipped onboarding without verifying wallpaper setup reopen the setup wizard after updating. Complete wallpaper setup, overlay access, and accessibility. If angles still do not arrive, the main screen offers Repair wallpaper & check permissions and a connection report. Shizuku authorization alone does not verify live angles.

3.0.3 fixes. Regional and Ultra zero-angle failures still need affected-device verification.

Known bugs

  1. Black screen when switching between folded and unfolded displays. This is a Samsung-side hardware limitation, not an issue with the app. We’re working on workarounds; for now, Duo uses a black fade transition to smooth the handoff in both directions.
  2. Unlocking directly onto Home may briefly reveal the underlying live wallpaper before the custom photo. The latest release improves this, but occasional flashes remain.
  3. Occasionally part of the unfolding fade does not trigger correctly, so the transition may look choppy.

Work in progress

  • Refining the experimental screenshot handoff to more closely mimic iPhone Duo’s held-image animation, alongside the default live-content handoff.
  • Further workarounds for Samsung’s display-switch blackout and smoother fold/unfold handoffs.
  • More consistent custom wallpaper visibility during unlock and display changes.
  • Refinements to animation timing, responsiveness, and visual consistency.
  • Better setup recovery, compatibility checks, and diagnostics across supported devices.

These are active areas of development, not promised release dates.

Troubleshooting and reports

Phone locks when you fold it, despite Keep Awake?

  1. Open Samsung Settings and search for Lock when folded.
  2. Turn Lock when folded OFF.
  3. Return to Home, then fold the phone to test.

This Samsung setting can override Keep Awake. The project owner confirmed that disabling it resolved closing-from-Home sleep on their device. If it still happens, check Shizuku below and include a status report.

Use Trouble with Shizuku/Fold shutting off? beneath the animation options first. Check that Shizuku is running and authorized and Duo’s accessibility service is enabled.

For an issue, include your app version, phone model, Android/One UI version, fold direction, and steps to reproduce. Attach Copy status report; for wallpaper issues also use Copy background report in the wallpaper menu. A short recording helps. Review reports for personal information before sharing.

All future release announcements and updates will be on GitHub.

Support the Project

Duo Fold Live is free and open source. If you find it useful and would like to support the work, tips are welcome and entirely optional.

bc1qz86gl559xlg8k3qur45xrlel2x79wu5ecaw0ss

Tips do not unlock features or promise fixes. Bug reports, testing, and pull requests are equally appreciated.

Build

Install JDK 17, Android SDK platform 36, and Android build tools. Set ANDROID_HOME or a local sdk.dir in local.properties.

./gradlew testReleaseUnitTest assembleRelease

Without signing environment variables this creates an unsigned release APK. Debug builds use your local Android debug key and cannot replace the official signed release.

For a signed release, supply these environment variables privately: DUO_KEYSTORE (absolute path), DUO_STORE_PASSWORD, DUO_KEY_ALIAS, and DUO_KEY_PASSWORD. No signing key is included in this repository. A different key cannot update an existing install.

Compile-only framework stubs in wallpaper-stubs/ describe hidden Android interfaces; they must never be packaged as Android framework replacements. app/libs/ contains the existing Shizuku client jars with checksums in DEPENDENCIES.md.

Architecture

  • LiveAngles / AngleReader: Shizuku-assisted Samsung wallpaper angle reader.
  • CoverHandoff, DirectHandoffPolicy, InnerLiveMirror, PreviewExpansion: default preview and direct concurrent handoff.
  • ConcurrentController, HandoffFrames, FreezePolicy: optional dual-panel screenshot handoff.
  • DuoGlass, ClassicGlassShader, FrameSmoothing: renderers and frame-rate-independent smoothing.
  • FirstRun, OnboardingPolicy, SetupActivity: first-install flow and upgrade preservation.
  • WallpaperSetupService: short-lived ADB-mode helper for required home-wallpaper setup.
  • org.duofold.live.wallpaperlayer: retained custom-photo compositor host and diagnostics.

Credits and license

Duo Fold Live is the name of this app. The following are separate upstream projects whose work deserves credit:

  • Folio launcher — McCal-Codes/folio: the v0.6.0 release supplied a starting point for the fold engine and diagnostics. Its upstream lineage includes Duo Launcher. The preserved MIT notice credits Duo Launcher contributors.
  • iPhone Duo animation concept — chuspeeism/iphone-duo: the interactive Three.js reference for projected screen content, progressive blur, and darkening. The iPhone Duo Inspired option adapts this work to Android rendering; it does not embed the Three.js demo unchanged. The upstream MIT notice credits jadon7.
  • Shizuku and its API contributors: the ADB-assisted access used by the live angle reader and helpers.

Thank you to the original authors and contributors. These credits do not imply their endorsement of this app. MIT for project code, subject to preserved third-party licenses; see LICENSE, THIRD_PARTY_NOTICES.md, and the notices bundled under app/src/main/assets/licenses/.

Close

How Shizuku is used

Can animate the fold with live hinge angles, keep awake on fold, hold rotation and show custom wallpaper via `Shizuku user services`.

This is an AI-assisted analysis of Shizuku-related usages in the app's public source code. It is best effort, so it may not catch every single usage.

How this app uses Shizuku

Duo Fold Live uses Shizuku to run privileged helpers that drive its fold animation, display handoff and wallpaper features.

  • Read live hinge angle: the app starts a Shizuku helper that listens to system wallpaper log output with logcat and parses the current hinge angle to drive the animation and cover previews.
  • Keep awake on fold: a value chosen for the fold behavior is applied with the settings put system fold_lock_behavior shell command through Shizuku so folding does not put the phone to sleep.
  • Recover fold sleep: after the cover closes, the helper checks the last sleep reason through the power service and requests a wake with IPowerManager wakeUp only for fold sleep, without changing the lock screen.
  • Hold screen rotation: during the animation the helper freezes the current rotation with freezeDisplayRotation and related display rotation controls, then restores the saved auto rotate and posture settings afterward.
  • Capture glass previews: the helper captures the display with the system display capture API through Shizuku to render blurred glass, live cover previews and smooth handoff, skipping secure content.
  • Show inner system UI: the helper reads and sets inner display decoration policy with shouldShowSystemDecors controls through Shizuku to show system UI and navigation on the inner panel.
  • Apply custom wallpaper: the chosen photo is installed as a seamless cover and inner background through a Shizuku wallpaper host that manages the photo layer on both screens.

Android APIs or commands used

  • logcat
  • settings get system fold_lock_behavior
  • settings put system fold_lock_behavior
  • settings delete system fold_lock_behavior
  • settings get system accelerometer_rotation
  • settings get system user_rotation
  • settings get secure device_state_rotation_lock
  • wm fixed-to-user-rotation
  • IPowerManager.isInteractive
  • IPowerManager.getLastSleepReason
  • IPowerManager.wakeUp
  • IWindowManager.freezeDisplayRotation
  • IWindowManager.thawDisplayRotation
  • IWindowManager.isDisplayRotationFrozen
  • IWindowManager.getDisplayUserRotation
  • IWindowManager.setFixedToUserRotation
  • IWindowManager.setDeviceStateAutoRotateSetting
  • IWindowManager.shouldShowSystemDecors
  • IWindowManager.setShouldShowSystemDecors
  • IWindowManager.hasNavigationBar
  • IWindowManager.isKeyguardLocked
  • IDisplayManager.getDisplayInfo
  • DisplayManagerGlobal.getDisplayInfo
  • SurfaceControl.Transaction.setSkipScreenshot
Close

Changelog

What's new for version 3.5.2

Automated build of main at 8ca4371bf4c83ea6c840a2d500325e55635245be. Version code: 1071

Duo Fold Live 3.5.2

Promotes the tested alpha.7 feature set with three default/reset adjustments:

  • Cover vertical compression: 115%.
  • Inner vertical compression: 60%.
  • Inner end stretch: 45%.

Inner early stretch remains 30%; all other defaults and animation math remain unchanged. Previously saved manual selections remain intact; use the corresponding reset buttons to apply these defaults.

Included since 3.5.1

  • Independent inner-display V2 stretch and easing controls, with separate cover/inner settings cards.
  • Independent vertical-compression sliders; Classic glass remains unchanged because it has no vertical compression to scale.
  • Corrected low inner stretch so it reduces outward motion without an inward squeeze; 0% means no horizontal stretch.
  • Stale-shadow clearing and fallback diagnostics.
  • Independent rotation recovery on reader-process exit and graceful release before normal shutdown. Recovery cannot guarantee immediate cleanup if both processes are terminated together or the device reboots.
  • Keep Awake troubleshooting for Samsung's “Lock when folded” setting.

The Samsung panel handoff blackout and occasional custom-wallpaper unlock flash remain documented limitations. This is the latest official release, not a prerelease.

Close

Permissions

9 permissions requested

  • moe.shizuku.manager.permission.API_V23
  • android.permission.SYSTEM_ALERT_WINDOW
  • android.permission.SET_WALLPAPER
  • android.permission.FOREGROUND_SERVICE
  • android.permission.FOREGROUND_SERVICE_SPECIAL_USE
  • android.permission.POST_NOTIFICATIONS
  • android.permission.RECEIVE_BOOT_COMPLETED
  • android.permission.WAKE_LOCK
  • org.duofold.live.DYNAMIC_RECEIVER_NOT_EXPORTED_PERMISSION
Close