Fold Switcher
1.2.2 · GitHub
More about this app
Switch between various display folding states on foldable devices
👋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
Or download the latest APK from the Releases Section.
🚀Getting Started Guide
Download and install the apk.
If prompted for Shizuku permissions, please download Shizuku and refer to the Shizuku manual for configuration instructions.
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
- Long press on the fold state to set it as Quick Switch.
- 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)
- Name:
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
- Name:
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.
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-statesthrough Shizuku and by querying thedevice_statesystem service when needed. - Switch folding state: tapping a state in the main list applies that folding state with
cmd device_state statethrough Shizuku, or with a direct request to thedevice_statesystem service on supported devices. - Reset folding state: choosing the reset entry clears any forced folding state with
cmd device_state state resetthrough Shizuku, or by canceling the active request on thedevice_statesystem service. - Track current state: the app reads the current folding state with
cmd device_state print-statethrough Shizuku and through live updates from thedevice_statesystem 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-statescmd device_state print-statecmd device_state statecmd device_state state resetandroid.hardware.devicestate.IDeviceStateManager.requestStateandroid.hardware.devicestate.IDeviceStateManager.cancelStateRequestandroid.hardware.devicestate.IDeviceStateManager.getDeviceStateInfoandroid.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.
Changelog
What's new for version 1.2.2
Permissions
2 permissions requested
Sources
2 sources
Sources
2 sources
