
TrafficManager
ExclusiveOpen SourceVerified SafeVersion 1.0.2.r8.nogit (8)
Published 3/6/2026
Download APKSize
3.02 MB
Android
10.0+
Downloads
68
Architecture
Universal
Security Scan
Verified Safe
✓ Scanned with ClamAV, APKiD, and Quark-Engine
What's New
https://github.com/L-aros/TrafficManager/compare/v1.0.1...v1.0.2/
Description
TrafficManager is an Android app + LSPosed module that automatically switches to the default SIM (SIM1/SIM2) based on Wi-Fi SSID/BSSID rules.
This project was developed with full assistance from Codex + GPT-5.3-Codex. It includes no network connectivity features, so it can be used with complete peace of mind.
Main Features
- Support for SSID/BSSID matching rules
- Support for rule priorities
- Support for anti-bounce cooldown time (cooldownSec)
- Support for Wi-Fi exit strategies (leaveDelaySec, leaveMissThreshold, revertOnLeave)
- Support for SIM switching chains:
- LSPosed bridge broadcast (priority)
- Root commands as fallback
- Support for real-time status display and "one-tap learning of current Wi-Fi rule"
- Support for log export and SIM switch event notifications
- Support for switching between power-saving/resident modes
Current Compatibility Scope
The current version is compatible only with Xiaomi HyperOS 3 (formerly MIUI OS 3). Other ROMs or system versions have not been fully tested and may not work due to differences in scopes, permissions, or system interfaces.
Environmental Requirements
- Android 10+
- Root (recommended for greater compatibility)
- LSPosed (Zygisk version recommended)
- Dual-SIM device recommended
Installation and Activation
1. Install the APK
2. Enable the module in LSPosed
3. Select the recommended scopes (default):
- com.android.phone
- com.xiaomi.phone
- com.qti.phone
- com.qualcomm.qti.telephonyservice
- com.android.services.telephony
- com.android.telephony
4. If it still doesn't work, try manually selecting the android scope for extra compatibility
5. Reboot the device
6. Open the app, configure rules, and enable automatic SIM switching
Power-Saving/Resident Mode Explanation
- Power-saving mode: Does not start foreground service or resident notification; relies on system broadcasts, which may cause delays or missed triggers
- Resident mode: More stable and responsive foreground service; requires resident notification and uses more battery
Basic Configuration Example
{
"enabled": true,
"powerSaveMode": true,
"screenOnIntervalSec": 20,
"screenOffIntervalSec": 90,
"cooldownSec": 90,
"leaveDelaySec": 180,
"leaveMissThreshold": 3,
"revertOnLeave": true,
"fixedLeaveSlot": null,
"noWifiSlot": 0,
"noWifiImmediate": true,
"logRetentionDays": 7,
"logMaxMb": 10,
"rootCommandTemplates": [
"cmd phone set-default-data-subscription {subId}",
"cmd phone set-data-subscription {subId}",
"settings put global multi_sim_data_call {slot}"
],
"rules": [
{
"id": "home_wifi",
"priority": 100,
"ssid": "MyHomeWiFi",
"bssid": null,
"targetSlot": 0
}
]
}
- enabled: Enables/disables automatic SIM switching
- powerSaveMode: true uses system broadcast-based power-saving strategies; false uses more stable resident service
- screenOnIntervalSec / screenOffIntervalSec: Check frequency with screen on/off
- cooldownSec: Cooldown time after rule match, anti-bounce
- leaveDelaySec / leaveMissThreshold: Time and number of missed detections to consider Wi-Fi exit
- revertOnLeave: Reverts to previous SIM on Wi-Fi exit
- fixedLeaveSlot: Forces specific SIM on Wi-Fi exit (null = automatic logic)
- noWifiSlot / noWifiImmediate: Target SIM without Wi-Fi and whether to switch immediately
- logRetentionDays / logMaxMb: Log retention days and size limit
- rootCommandTemplates: Root fallback commands (multiple supported)
- rules: Wi-Fi rules list; higher priority = precedence; targetSlot 0/1 = SIM1/SIM2
Common Troubleshooting
- Verify location permissions and "Nearby devices (Wi-Fi)"
- Ensure system "total location switch" is enabled
- Check log directory: Android/data/com.laros.lsp.traffics/files/logs/
- If LSPosed fails, verify root fallback
- Custom root commands with accelerometer_rotation / user_rotation are blocked for safety (prevents incorrect orientation changes)
SIM Switching Without Wi-Fi
- noWifiSlot automatically switches to the specified SIM without Wi-Fi
- Triggers affected by leaveDelaySec and leaveMissThreshold (anti-bounce)
- For immediate switch without Wi-Fi: noWifiImmediate: true (ignores cooldownSec)
- App "Advanced" page: "Immediate without Wi-Fi" switch and target slot selection (Off / SIM1 / SIM2)
Future Development Plans (TODO)
- Add ROM compatibility (AOSP / OneUI / ColorOS etc.)
- Scope and chain auto-diagnostic page
- Rule debug mode (shows matches and miss reasons)
- Config import/export and version migration
- More granular notifications/logs
- Automatic compatibility tests and regressions
Open Source License
MIT
Rate this app
Ratings & Reviews
No reviews yet.