A modern, open-source Android application built with Jetpack Compose, Clean Architecture, and Material Design 3 that enables users to toggle between cellular network modes. Supports 34 different network configurations (2G, 3G, 4G, and 5G combinations) using dual system control methods: Root access (libsu) or Shizuku service for non-rooted devices.
Network Switch provides granular control over device cellular network radio modes, supporting 34 different configurations ranging from pure single-mode forced configurations (e.g. 5G SA/NR-only, 4G LTE-only) to complex multi-mode preference stacks.
- Quick Switching: Instantly toggle between configured network modes directly from the Quick Settings panel.
- Speed & Signal Optimization: Force high-performance modes (e.g., 5G/NR or 4G/LTE) in areas with poor auto-selection logic.
- Battery Preservation: Drop down to power-efficient network modes when high-speed data is not needed.
- Coverage & Roaming: Force specific radio bands when traveling internationally or using specialized carrier configurations.
- Privacy First: No internet permissions required—all operations run locally on device.
- 34 Network Modes: Comprehensive coverage for global carriers, CDMA (US), TD-SCDMA (China), and standard GSM/WCDMA/LTE/NR stacks.
- Smart Quick Settings Tile: Dynamically renders active network technology text (5G, 4G, 3G, 2G) directly inside the tile icon, rendering clearly on both compact circular QS panels and full expanded tiles.
- Configurable Toggle Pairs: Select any two network modes (Mode A / Mode B) for instant 1-tap toggling.
- Dual System Operations:
- Shizuku Method: Non-rooted system access via Shizuku API.
- Root Method: Direct root access via
libsuservice.
- Modern Clean Architecture: Decoupled Data, Domain, and Presentation layers powered by Hilt dependency injection, DataStore preferences, and Kotlin Flow.
- Material 3 UI: Clean, reactive Compose interfaces with dynamic theming.
- Basic Modes: GSM Only (2G), WCDMA Only (3G), LTE Only (4G), NR Only (5G).
- Combined Modes: 2G/3G preference stacks, 3G/4G (LTE/WCDMA), 4G/5G (NR/LTE), and 2G/3G/4G/5G combined.
- Regional & Global Modes: CDMA / EvDo (US carriers), TD-SCDMA (China), and Global 4G/5G international stacks.
- Open the app and navigate to Network Mode Config / settings.
- Select Mode A and Mode B from the available network mode list.
- Save configuration.
- Tap the Quick Settings tile or main app toggle to switch between the two modes instantly.
- Android Version: Android 10 (API level 29) or higher.
- Control Method Requirement (Choose one):
- Shizuku Method: Shizuku app installed and running (via Wireless ADB or ADB connection).
- Root Method: Rooted Android device with root permissions granted to Network Switch.
- Download the latest APK from the Releases tab.
- Install the APK on your device.
- Grant access permissions for your preferred control method (Shizuku or Root).
- Add the Network Switch tile to your Quick Settings panel.
The project follows modern Android Clean Architecture and MVVM patterns:
app/
├── src/main/
│ ├── java/com/supernova/networkswitch/
│ │ ├── presentation/ # UI Layer (MVVM & Compose)
│ │ │ ├── ui/
│ │ │ │ ├── activity/ # MainActivity, SettingsActivity, NetworkModeConfigActivity
│ │ │ │ ├── composable/ # Reusable Compose views & selectors
│ │ │ │ └── components/ # Shared Material 3 components
│ │ │ ├── viewmodel/ # ViewModels handling UI state
│ │ │ └── theme/ # Material Design 3 theme definitions
│ │ ├── domain/ # Domain Layer (Pure Business Logic)
│ │ │ ├── model/ # NetworkMode, ToggleModeConfig, ControlMethod
│ │ │ ├── repository/ # Repository interfaces
│ │ │ └── usecase/ # Domain Use Cases (Toggle, Mode Check, Compatibility)
│ │ ├── data/ # Data Layer
│ │ │ ├── repository/ # NetworkControl & Preferences repository implementations
│ │ │ └── source/ # DataStore & Network Control data sources
│ │ ├── service/ # Android System Services
│ │ │ ├── NetworkTileService.kt # Smart Quick Settings Tile
│ │ │ ├── RootNetworkControllerService.kt # Root IPC service
│ │ │ └── ShizukuControllerService.kt # Shizuku IPC service
│ │ └── di/ # Hilt DI modules (DataModule, etc.)
│ └── aidl/ # AIDL definitions for IPC
│
hiddenapi/ # Android Hidden API stubs module
.github/workflows/
├── build.yml # CI build verification
└── release.yml # GitHub release automated build
# Clone repository
git clone https://github.com/markvoronin354/NetworkSwitch.git
cd NetworkSwitch
# Build debug APK
./gradlew assembleDebug
# Run unit test suite
./gradlew testDebugUnitTestThe codebase includes comprehensive unit tests utilizing JUnit 4, MockK, and Kotlinx Coroutines Test:
./gradlew testContributions are welcome!
- Fork the repository
- Create a feature branch (
git checkout -b feature/my-feature) - Ensure all unit tests pass (
./gradlew test) - Commit changes following standard Kotlin coding guidelines
- Submit a Pull Request
This project is licensed under the GNU General Public License v3.0. See the LICENSE file for details.
- Shizuku: Non-root system API execution
- libsu: Root service management
- Hilt: Dependency injection framework
- Jetpack Compose: Declarative UI library


