Enable a Persistent Wi‑Fi Hotspot on Android with ADB (No Root)

10 min read Learn step‑by‑step how to turn on a Wi‑Fi hotspot on any Android phone using ADB, set SSID/password, and keep it active without rooting the device. September 26, 2026 23:00 How to Enable a Persistent Wi‑Fi Hotspot on Android Using ADB (No Root)

Why you might need ADB for a hotspot

Most Android phones let you share their mobile data via the built‑in hotspot feature. However, the UI often imposes carrier‑imposed limits, requires a PIN, or disables the hotspot after a reboot. Using adb (Android Debug Bridge) you can:

  • Activate the hotspot without opening the Settings UI.
  • Set a custom SSID and password in a single command.
  • Bypass the "tethering not allowed" flag that some carriers enforce.
  • Create a quick script on your PC that re‑enables the hotspot whenever the phone is plugged in, giving you a pseudo‑persistent hotspot.

This tutorial walks you through the entire process, from preparing your device to troubleshooting common failures.

Before you start

Prerequisites

  • A Windows, macOS, or Linux computer with adb installed. (If you don’t have it yet, download the Platform‑Tools package from the Android developer site and unzip it.)
  • A USB cable that can transfer data (charging‑only cables won’t work for ADB).
  • The phone should be charged to at least 50 % to avoid accidental shutdown while toggling Wi‑Fi.
  • Wi‑Fi on the phone can be turned off – the hotspot uses the same radio, but the UI will re‑enable it automatically.
  • If your carrier blocks tethering, you’ll need to disable the carrier‑check flag (covered below).

Step 1 – Enable Developer Options and USB Debugging

  1. Open Settings → About phone.
  2. Tap Build number seven times. You’ll see a toast saying “You are now a developer!”.
  3. Go back to the main Settings screen, then open System → Developer options (on some OEM skins it may be directly under Settings).
  4. Toggle USB debugging on. Confirm the prompt that appears.

    Leaving USB debugging on all the time can expose your device to accidental ADB commands if you plug it into an untrusted computer. Consider disabling it after you finish.

Step 2 – Install and verify ADB on your computer

  1. Download the Platform‑Tools zip for your OS.
  2. Extract the folder to a convenient location, e.g., C:\adb or ~/adb.
  3. Open a terminal (Command Prompt, PowerShell, Terminal.app, or a Linux shell) and navigate to the extracted folder.
    cd path/to/platform-tools
  4. Run adb devices. You should see a line like:
    List of devices attached
    1234567890ABCDEF    device
    If you see unauthorized, check your phone – a dialog will ask you to allow the computer’s RSA key. Tap Allow and optionally tick “Always allow from this computer”.

Step 3 – Disable the carrier tether‑check (optional but often necessary)

Many carriers set the system property net.tethering.noprovisioning to block hotspot usage. You can clear this flag with a single ADB command:

adb shell settings put global tether_dun_required 0

This tells Android that a “Dial‑up‑Network” (DUN) connection is not required, effectively bypassing the carrier check. The change is stored in the global settings database and survives reboots.

Step 4 – Configure SSID and password

Android stores hotspot configuration in a single JSON string under the key tether_wifi_ap_config. You can write a new configuration with settings put global. Replace the example values with your own.

adb shell settings put global tether_wifi_ap_config '{"SSID":"MyHotspot","Password":"StrongPass123","SecurityType":3}'

Explanation of the fields:

  • SSID: The network name visible to other devices.
  • Password: Must be at least 8 characters for WPA2 (SecurityType 3).
  • SecurityType: 3 = WPA2‑PSK, 2 = WPA‑PSK, 1 = Open (no password). We recommend 3 for security.

If you ever need to read the current configuration, run:

adb shell settings get global tether_wifi_ap_config

Step 5 – Turn the hotspot on

With the configuration in place, start the hotspot using the cmd wifi service:

adb shell cmd wifi start-softap

After a few seconds you should see the hotspot icon in the status bar. On most devices you can verify it by pulling down the quick‑settings panel – the “Hotspot” tile will be highlighted.

Step 6 – Make the hotspot re‑activate automatically when the phone is plugged in (pseudo‑persistent)

Android does not allow a true “always‑on” hotspot without root, but you can simulate persistence by running a short script on your PC each time the device connects via USB. Create a file called hotspot_on.bat (Windows) or hotspot_on.sh (macOS/Linux) with the following content:

# Windows batch example (hotspot_on.bat)
@echo off
adb wait-for-device
adb shell cmd wifi start-softap

For Linux/macOS:

#!/bin/bash
adb wait-for-device
adb shell cmd wifi start-softap

Make the script executable (chmod +x hotspot_on.sh) and place it in a convenient folder. Whenever you plug the phone in, run the script – it will wait for the device, then turn the hotspot back on. You can even add the script to your OS’s “autostart” or “login items” so it runs automatically when you start your computer.

Because the hotspot is started from the host PC, the phone must stay connected via USB for the script to work. If you need a completely autonomous solution you will have to use a third‑party automation app (e.g., Tasker) with the adb shell cmd wifi start-softap command granted via ADB.

Troubleshooting

Hotspot does not start – “Failed to start SoftAP”

  • Check Wi‑Fi state: Some OEM skins disable hotspot while Wi‑Fi is manually turned off. Run adb shell settings get global wifi_on. If it returns 0, enable Wi‑Fi first: adb shell svc wifi enable.
  • Carrier restriction: If the hotspot icon never appears, your carrier may enforce a data‑plan check. Re‑run the command from Step 3 to ensure the flag is cleared.
  • Invalid password length: WPA2 requires at least 8 characters. Double‑check the JSON string for typos.

Device reboots and hotspot is off

The configuration you saved in Step 4 persists across reboots, but the hotspot service itself does not start automatically. The only reliable way to have it on after a reboot without root is to use a PC‑side script (Step 6) or a local automation app with the appropriate ADB permission.

“Permission denied” when running ADB commands

Make sure USB debugging is still enabled (some devices turn it off after a reboot). Also verify that the RSA key prompt on the phone was accepted. If the prompt never appears, try disconnecting and reconnecting the USB cable while the phone is unlocked.

Security considerations

  • Never share your hotspot password publicly. Use a strong, unique password (minimum 12 characters is best).
  • If you use the PC‑side script, keep your computer in a secure environment – anyone with physical access could plug in the phone and start the hotspot without your knowledge.
  • Remember to disable USB debugging when you’re done, especially if you travel with the device.

Wrapping up

By following the steps above you can quickly enable a Wi‑Fi hotspot on any Android phone, set a custom SSID/password, and work around carrier restrictions – all without rooting the device. While true always‑on hotspot requires root, the simple PC‑side script gives you a practical “persistent” experience for everyday use.

Feel free to adapt the JSON configuration in Step 4 for different SSIDs or security levels, and keep the adb commands handy for future devices. Happy sharing!

User Comments (0)

Add Comment
We'll never share your email with anyone else.