Loading

Architecture

A short tour of how one tap becomes a network mode change.

How a mode switch travels through Switcher 5GEntry points (app, tile, widget, broadcast) feed the network mode manager. It tries Shizuku, then root, then RadioInfo. Shizuku calls a user service running as the shell user, which calls the phone's telephony API. 1. You trigger a switch 2. The manager picks an engine 3. Android changes the mode App screen Quick Settings tile Home screen widget ADB / Termux broadcastor switcher5g:// link NetworkModeManagerswitchTo(mode, subId)tries engines in order Root (su shell) RadioInfo menu Shizuku (first choice) Shizuku user serviceown process, runs as shellIUserService (AIDL) Android telephonypreferred network type You pick it by hand If Shizuku is not ready, the manager tries root. If root is missing too, it opens RadioInfo so you can set the type yourself. Widget buttons need Shizuku or root, because they run in the background and never open a screen.

Switching engines

Every switch goes through one class, NetworkModeManager. It takes a mode (NR_ONLY, NR_LTE or LTE_ONLY) and an optional SIM subscription ID. The activation method in Settings decides which engine runs:

  • Auto and Direct ADB: try Shizuku, then root, then open RadioInfo. Direct ADB mainly helps you start Shizuku: the app copies the command for you.
  • Shizuku: only the Shizuku service. Fails clearly if it is not running or not authorized.
  • Root: runs the switch through su. Includes carrier-specific network types and keeps the allowed-types mask wide, so 2G, 3G and LTE stay available alongside 5G.
  • RadioInfo: opens the phone’s hidden testing screen so you can choose the type yourself. The app looks for the AOSP, Qualcomm, MediaTek and Samsung variants.

The Shizuku user service

Changing the network type needs a permission normal apps do not have. Shizuku can start a small process for us that runs as the shell user, which does have it. That process is NetworkModeUserService, and the app talks to it through an AIDL interface with four calls:

interface IUserService {
  String setNetworkMode(int subId, String mode); // "OK:" prefix means success
  int getDefaultDataSubId();                      // -1 if unknown
  int[] getAvailableSubIds();                     // active SIMs
  void destroy();
}

The service calls the telephony API with fallbacks for phones that restrict it, including Samsung One UI. The app binds to the service when needed and unbinds when done.

Quick Settings tiles and the widget

  1. Tap. The tile or widget button receives the tap.
  2. Choose the engine. It uses your saved activation method if that engine is ready. Otherwise it picks Shizuku, then root.
  3. Switch off the main thread. The work runs in a coroutine, and the tile shows “Switching…” while it waits.
  4. Report back. The tile updates its label (SA, NSA or LTE) and a short message appears. On failure the old state returns.

There are four tiles: a Power Switcher that cycles SA, NSA and LTE on each tap, a 2-mode toggle between two modes you choose, a Root tile and a Manual 5G Settings tile that opens RadioInfo. The widget has one button per mode and never opens a screen.

Preferences

Settings live in SharedPreferences on the phone. They include the activation method, default mode, the two toggle-tile modes, theme mode, AMOLED, palette, color style, font, auto-scan SIMs, auto-check updates, animations, predictive back and depth blur. Settings can be exported to and imported from a JSON backup file. Nothing is uploaded.