Noureddine RAMDI / Network Switch: toggling Android network modes with root and Shizuku APIs

Created Sat, 23 May 2026 20:41:14 +0000 Modified Sat, 23 May 2026 20:41:27 +0000

aunchagaonkar/NetworkSwitch

Network Switch addresses a niche but real pain point: toggling between various mobile network configurations on Android devices with minimal friction. Normally, changing network modes (2G, 3G, 4G, 5G combinations) is hidden behind complex menus or restricted to carriers and rooted phones. This app solves that by exposing 34 network modes accessible via a single tap, supporting both rooted and non-rooted devices through two control methods.

what network switch does and its architecture

Network Switch is an Android app written in Kotlin, targeting devices running Android 10 and above. It supports switching among 34 network modes, covering everything from 2G-only to various 5G combinations. This wide support is useful for power users who want to optimize battery life, troubleshoot coverage issues, or test network compatibility.

The app uses a clean architecture split into presentation, domain, and data layers. The UI is built with Jetpack Compose and Material Design 3, ensuring a modern and responsive interface. Dependency injection is handled by Hilt, which keeps the code modular and testable.

A standout feature is the customizable Quick Settings tile, which shows the current network mode and the next one available. This tile allows instant toggling without opening the full app, improving developer experience and user convenience.

NetworkSwitch supports two control pathways:

  • Root method: For rooted devices, the app requests root permissions and directly modifies telephony settings. This method relies on granted root access, which is common among advanced users.

  • Shizuku method: For non-rooted devices, the app leverages the Shizuku service, which uses Android’s hidden AIDL-based APIs to bridge system calls typically restricted to system apps or carriers. This method requires the Shizuku app to be installed and running, and an initial ADB or wireless ADB command to start the service. This workaround is clever because it bypasses the root requirement by using a permission bridge sanctioned by Android but not commonly used.

The app persists user preferences and configurations using DataStore, maintaining settings offline without any internet permissions. This approach respects user privacy by avoiding network access.

dual network control methods and architectural tradeoffs

The dual control method is the technical highlight. Root access allows direct, powerful control but limits the audience to rooted devices. Rooting is often risky, device-dependent, and voids warranties.

The Shizuku approach expands compatibility to non-rooted devices by exploiting Android’s hidden APIs through AIDL interfaces. This is a neat workaround introduced post-Android 9, when Google tightened access to telephony settings. It requires installing the Shizuku app and starting its service via ADB, which adds complexity but broadens usability.

This design balances reach and power:

  • Root method: Full control, simpler user flow if root is present, but narrow device audience.
  • Shizuku method: Broader device support, no root needed, but setup overhead and potential fragility due to reliance on hidden APIs.

The codebase is surprisingly clean and modular considering it deals with low-level system settings. The use of Jetpack Compose modernizes the UI layer, and Hilt keeps dependencies manageable.

The Quick Settings tile integration is a nice DX touch, letting users cycle through modes quickly. Internally, the app uses DataStore for persistence, which is more modern and less error-prone than SharedPreferences.

A tradeoff is inherent in using hidden APIs: future Android versions could break this mechanism without warning, and behavior may vary across OEMs and carriers.

installation and getting started

The README provides clear instructions for installing and setting up the app:

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

  • 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

Getting started with development

# Fork the repo
# Create a feature branch
git checkout -b feature/feature-name
# Make your changes following project style
# Test thoroughly
# Commit and push
git commit -m 'Add feature-name'
git push origin feature/feature-name
# Open a Pull Request

verdict: a practical tool for network-savvy Android users

Network Switch fills a useful niche for Android power users and developers who need quick access to a wide range of network modes. The dual control method using root or Shizuku is a clever solution to Android’s permission barriers.

That said, it’s not for casual users. Rooting is complex and risky, and Shizuku setup requires ADB, somewhat technical overhead. Additionally, reliance on hidden APIs means future Android updates or OEM customizations could break functionality.

The app’s privacy-conscious design—no internet permissions, offline-only operation—is a plus.

Overall, if you regularly switch network modes for testing or optimization, Network Switch offers a clean, modern interface with solid architecture. Its use of Jetpack Compose and Hilt indicates good coding practices, and the Quick Settings tile integration is a thoughtful touch for daily usability.

// Example snippet showing the Quick Settings tile label update
@Composable
fun NetworkSwitchTile(currentMode: String, nextMode: String) {
    Text(text = "Current: $currentMode | Next: $nextMode", style = MaterialTheme.typography.bodyMedium)
}

For developers, the project is straightforward to navigate with clear layering and dependency injection, making it a good Kotlin Android example for system-level app design with unusual permission models.


→ GitHub Repo: aunchagaonkar/NetworkSwitch ⭐ 381 · Kotlin