ShizuStore

Fold Switcher

eiyooooo

1.2.2 · GitHub

Download APK
Display management Android 12+ 1 year ago Apache-2.0
24 ShizuStore
4.8k GitHub
105 Stars
2 MB Size

More about this app

Switch between various display folding states on foldable devices

Fold_Switcher(折叠屏切换器)

GitHub license GitHub release GitHub downloads

English / 简体中文

👋Introduction

  • This application can switch between various folding states on foldable devices, such as closed mode, half-open mode, tent mode, and fully open mode. Some devices support dual-screen display.
  • Most devices can switch modes in user mode (out-of-the-box), while a few devices require Shizuku mode for switching.

📥Download

Get it on F-Droid

Or download the latest APK from the Releases Section.

🚀Getting Started Guide

  1. Download and install the apk.

  2. If prompted for Shizuku permissions, please download Shizuku and refer to the Shizuku manual for configuration instructions.

  3. Click on the fold state to switch.

    If you are unable to switch fold state normally, please try switching to a different execute mode

⚙️Quick Switch Settings

  1. Long press on the fold state to set it as Quick Switch.
  2. For Android 13 and above, a request will appear. For other Android versions, you need manually pull down the status bar and edit the switch.

🔄Integration with Other Apps

You can control the fold state from automation apps like Tasker, MacroDroid, or through ADB commands.

Method 1: Using Intents

// Set a specific fold state
val intent = Intent()
intent.setComponent(ComponentName("com.eiyooooo.foldswitcher", "com.eiyooooo.foldswitcher.ReceiverActivity"))
intent.putExtra("state_id", 1) // Replace with desired state ID (non-negative number)
startActivity(intent)

// Reset to default state
val resetIntent = Intent()
resetIntent.setComponent(ComponentName("com.eiyooooo.foldswitcher", "com.eiyooooo.foldswitcher.ReceiverActivity"))
resetIntent.putExtra("state_id", -1)
startActivity(resetIntent)

Method 2: Using ADB Commands

# Set a specific fold state (replace 1 with desired state ID, non-negative number)
adb shell am start -n com.eiyooooo.foldswitcher/.ReceiverActivity --ei state_id 1

# Reset to default state
adb shell am start -n com.eiyooooo.foldswitcher/.ReceiverActivity --ei state_id -1

Method 3: Integration with Automation Apps like Tasker, MacroDroid

Create a new task in your automation app and add the "System" → "Send Intent" action with the following parameters:

To set a specific fold state:

  • Action: Leave empty
  • Category: Leave empty
  • Mime Type: Activity
  • Package: com.eiyooooo.foldswitcher
  • Class: com.eiyooooo.foldswitcher.ReceiverActivity
  • Extra:
    • Name: state_id
    • Type: Integer
    • Value: [desired state ID] (non-negative integer, e.g., 1)

To reset to default state:

  • Action: Leave empty
  • Category: Leave empty
  • Mime Type: Activity
  • Package: com.eiyooooo.foldswitcher
  • Class: com.eiyooooo.foldswitcher.ReceiverActivity
  • Extra:
    • Name: state_id
    • Type: Integer
    • Value: -1

Available state IDs can be found by long-pressing the retrieved state in the app. The actual states may vary depending on your device.

⭐Support Me

  • If you enjoy this application, please consider giving this repository a star.
Close

How Shizuku is used

Can switch, reset and monitor foldable display states via `cmd device_state` commands and the `device_state` service through Shizuku.

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

Shizuku lets the app control and observe the foldable display state on devices where a normal app cannot reach those controls.

  • List folding states: the app shows the foldable states the device supports by running cmd device_state print-states through Shizuku and by querying the device_state system service when needed.
  • Switch folding state: tapping a state in the main list applies that folding state with cmd device_state state through Shizuku, or with a direct request to the device_state system service on supported devices.
  • Reset folding state: choosing the reset entry clears any forced folding state with cmd device_state state reset through Shizuku, or by canceling the active request on the device_state system service.
  • Track current state: the app reads the current folding state with cmd device_state print-state through Shizuku and through live updates from the device_state system service, so the list and tile can show which state is active.
  • Switch from Quick Settings: the Quick Settings tile applies the saved quick-switch state or clears it, using the same Shizuku shell and system service paths as the main list.
  • Switch from shortcuts: an external shortcut entry can apply a chosen state identifier or reset the state, using the same Shizuku shell and system service paths.

Android APIs or commands used

  • cmd device_state print-states
  • cmd device_state print-state
  • cmd device_state state
  • cmd device_state state reset
  • android.hardware.devicestate.IDeviceStateManager.requestState
  • android.hardware.devicestate.IDeviceStateManager.cancelStateRequest
  • android.hardware.devicestate.IDeviceStateManager.getDeviceStateInfo
  • android.hardware.devicestate.IDeviceStateManager.registerCallback

Notable details

The same fold list, switch, reset and current state features can work without Shizuku when the local shell path is available, the app prefers that path and uses the Shizuku path otherwise.

Close

Changelog

What's new for version 1.2.2

Close

Permissions

2 permissions requested

  • com.eiyooooo.foldswitcher.DYNAMIC_RECEIVER_NOT_EXPORTED_PERMISSION
  • moe.shizuku.manager.permission.API_V23
Close

Sources

2 sources

1.2.2 GitHub · com.eiyooooo.foldswitcher
Selected Download
1.2.2 F-Droid · com.eiyooooo.foldswitcher · com.eiyooooo.foldswitcher
Download