NetworkSwitch
One-tap network switching for Android
Install / Use
/learn @aunchagaonkar/NetworkSwitchREADME
A modern Android application that enables users to toggle between network modes, supporting 34 different network configurations including 2G, 3G, 4G, and 5G combinations. Features dual control methods: Root access for rooted devices and Shizuku for non-rooted devices. Built using Jetpack Compose and Material Design 3.
Purpose
Network Switch provides control over your device's network modes, supporting 34 different configurations from basic 2G-only to advanced 5G combinations. This includes:
- Basic Modes: GSM (2G), WCDMA (3G), LTE (4G), NR (5G) only
- Combined Modes: Various 2G/3G/4G/5G combinations
- Regional Modes: CDMA support for US carriers, TD-SCDMA for Chinese networks
- Global Modes: Network support for international usage
Use Cases
- Quick network switching through customizable Quick Settings tile
- Battery optimization by selecting power-efficient modes
- Speed optimization by forcing high-performance modes
- Coverage optimization in areas with poor signal quality
- Data usage management with specific network restrictions
- Testing network compatibility and performance
The app provides two methods of operation:
- Root Method: Direct system access for rooted devices
- Shizuku Method: System access through Shizuku service for non-rooted devices
Features
- Network Control: 34 different network modes including pure and combined configurations
- Privacy-Focused: No internet permissions, all operations are local
- Configurable Toggle Modes: Choose any two network modes for quick switching
- Quick Settings Tile: Shows current and next modes with customizable configuration
- Dual Control Methods: Root and Shizuku support for compatibility
- Modern Material Design 3 Interface: Clean, intuitive UI with extensive configuration options
Configuration
Network Mode Selection
The app supports 34 different network modes:
Basic Modes:
- GSM Only (2G)
- WCDMA Only (3G)
- LTE Only (4G)
- NR Only (5G)
Combined Modes:
- 2G/3G combinations with preference settings
- 3G/4G combinations (LTE/WCDMA)
- 4G/5G combinations (NR/LTE)
- Multi-generation support (2G/3G/4G/5G)
Regional Modes:
- CDMA support for US carriers (Verizon)
- TD-SCDMA support for Chinese networks
- Global modes for international roaming
Toggle Configuration
- Open the app and tap the configuration icon
- Select Mode A and Mode B from the dropdown menus
- Preview your configuration
- Save the configuration
- Use the main toggle or Quick Settings tile to switch between modes
Screenshots
<div align="center"> <img src="media/screenshot_main.jpg" alt="Main Screen" width="240" /> <img src="media/screenshot_settings.jpg" alt="Settings Screen" width="240"/> </div>Requirements
Root Method
- Rooted Android device (Android 10+)
- Root permissions granted to the app
Shizuku Method
- Non-rooted Android device (Android 10+)
- Shizuku app installed and running
- ADB or Wireless ADB access to start Shizuku
Installation
<div align="center"><img src="media/get_it_github.png" alt="Get it on GitHub" height="80" align="center"> <img src="https://gitlab.com/IzzyOnDroid/repo/-/raw/master/assets/IzzyOnDroid.png" alt="Get it at IzzyOnDroid" height="80" align="center"> <img src="https://raw.githubusercontent.com/ImranR98/Obtainium/main/assets/graphics/badge_obtainium.png" alt="Get it on Obtainium" height="55" align="center"> <img src="https://www.openapk.net/images/openapk-badge.png" height="80" align="center">
</div>- Download the latest APK from the Releases page
- Install on your Android device
- Choose your preferred control method:
- Root: Grant root permissions when prompted
- Shizuku: Install Shizuku app and grant permission
- Configure your preferred network modes in the app
- Add the "Network Switch" tile to Quick Settings for instant access
Project Structure
app/
├── src/main/java/com/supernova/networkswitch/
│ ├── presentation/ # UI Layer
│ │ ├── ui/
│ │ │ ├── activity/ # Activities
│ │ │ ├── composable/ # Reusable Compose components
│ │ │ └── components/ # Shared UI components
│ │ ├── viewmodel/ # ViewModels with state management
│ │ └── theme/ # Material Design 3 theme
│ ├── domain/ # Business Logic Layer
│ │ ├── model/ # Domain models
│ │ ├── repository/ # Repository interfaces
│ │ └── usecase/ # Business use cases
│ ├── data/ # Data Layer
│ │ ├── repository/ # Repository implementations
│ │ └── source/ # Data sources
│ ├── service/ # System Services
│ │ ├── NetworkTileService # Smart Quick Settings tile
│ │ ├── RootNetworkControllerService # Root-based network control
│ │ └── ShizukuControllerService # Shizuku-based network control
│ └── di/ # Hilt dependency injection modules
├── src/main/aidl/ # AIDL interfaces for IPC
├── build.gradle.kts # App build configuration
└── proguard-rules.pro # ProGuard rules
hiddenapi/ # Android Hidden API access module
├── src/main/aidl/ # AIDL interfaces
└── build.gradle.kts # Hidden API build config
.github/workflows/ # CI/CD pipelines
├── ci.yml # Continuous Integration
└── build-release.yml # Release workflow
gradle/
├── libs.versions.toml # Version catalog
└── wrapper/ # Gradle wrapper
build.gradle.kts # Root build configuration
settings.gradle.kts # Project settings
Building from Source
# Clone the repository
git clone https://github.com/aunchagaonkar/NetworkSwitch.git
cd NetworkSwitch
# Build debug APK
./gradlew assembleDebug
# Build release APK
./gradlew assembleRelease
TODO
- [x] Add unit tests for all core components
- [x] Add customizable network mode support (34 modes)
- [x] Implement adaptive app icon, with icon-pack launcher compatibility
- [ ] Implement scheduled/automatic network switching
- [ ] Add network speed monitoring and performance metrics
- [ ] Add multi-language support
- [ ] Add network performance benchmarking tools
Contributing
Contributions are welcome! Please follow these guidelines:
Getting Started
- Fork the repository
- Create a feature branch (
git checkout -b feature/feature-name) - Make your changes following the project's code style
- Test your changes thoroughly
- Commit your changes (
git commit -m 'Add feature-name') - Push to the branch (
git push origin feature/feature-name) - Open a Pull Request
Code Style
- Follow Kotlin coding conventions
- Use meaningful variable and function names
- Add documentation for public APIs
- Maintain clean architecture principles
- Follow Material Design guidelines for UI changes
Testing
This project includes a suite of unit tests to ensure code quality and stability.
To run the unit tests, execute the following command from the root of the project:
./gradlew test
Testing Guidelines:
- Add unit tests for new functionality
- Test on both rooted and non-rooted devices
- Verify compatibility across different Android versions (10+)
- Test network mode switching with various configurations
- Validate AIDL interface implementations
- Test Quick Settings tile functionality
- Verify configuration persistence and restoration
Reporting Issues
- Use the GitHub issue tracker
- Provide detailed reproduction steps
- Include device information and Android version
- Attach relevant logs when possible
LICENSE
This project is licensed under the GNU General Public License v3.0. See the LICENSE file for details.
Dependencies and Credits
Core Dependencies
- Shizuku: Root-less system API access
- libsu: Root access management
- Hilt: Dependency injection
- DataStore: Modern preferences storage
- Jetpack Compose: Modern UI framework
- Material Design 3: UI components and theming
- Kotlin Coroutines: Asynchronous operations
Special thanks to the Android development community and the maintainers of the open-source libraries used in this project.
Related Skills
node-connect
341.8kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
84.6kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
341.8kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
84.6kCommit, push, and open a PR
