How to Set Up a Persistent Wi‑Fi Hotspot That Stays On After Reboot (No Root)

12 min read Learn how to configure a Wi‑Fi hotspot on Android that automatically restarts after a reboot, using only ADB commands and built‑in settings – no root required. October 14, 2026 07:00 How to Set Up a Persistent Wi‑Fi Hotspot That Stays On After Reboot (No Root)

Many Android users need a hotspot that stays active even after the phone restarts – for example, a small office, a travel router, or a headless device that provides internet to IoT gadgets. By default Android disables the hotspot when the device powers off, and there is no UI option to auto‑restart it. This tutorial shows how to make the hotspot persistent using only ADB (no root) and a tiny helper app to trigger the hotspot on boot.

Before you start

  • Device charge: Ensure the phone is at least 50 % charged or connected to power. A hotspot consumes significant battery.
  • USB debugging enabled: Settings > About phone → Tap Build number seven times, then go to Settings > System > Developer options → Enable USB debugging.
  • ADB installed on your PC: Download the platform‑tools package from the Android developer site and extract it. Add the folder to your PATH or run commands from the folder.
  • Wi‑Fi hotspot credentials: Decide on an SSID and password you want to keep permanent.
  • Optional helper app: We’ll use MacroDroid (free) to launch a tiny ADB command on boot. Any app that can run a shell command on startup works.

Step 1 – Verify ADB connection

  1. Connect the phone to the PC with a USB cable.
  2. Open a terminal (or Command Prompt) and run:
    adb devices
    You should see a device ID followed by device. If it shows unauthorized, check the phone for the RSA fingerprint prompt and tap Allow.
  3. Once the device is listed, you’re ready to issue commands.

Step 2 – Configure the hotspot parameters once

  1. Run the following ADB commands, replacing MyHotspot and StrongPass123 with your desired SSID and password:
    adb shell settings put global tether_dun_required 0
    adb shell settings put global wifi_ap_ssid MyHotspot
    adb shell settings put global wifi_ap_password StrongPass123
    adb shell settings put global wifi_ap_security 3
  2. Explanation: These settings put global commands write the hotspot configuration into the system database. wifi_ap_security 3 corresponds to WPA2‑PSK, the most compatible option on Android 6‑13.
  3. Verify the values have been stored:
    adb shell settings get global wifi_ap_ssid
    The command should output MyHotspot.

Step 3 – Create a shell script that turns the hotspot on

Android does not expose a direct "enable hotspot" ADB command, but we can trigger the system UI action that toggles it. The following one‑liner works on most stock Android builds (Pixel, OnePlus, Samsung, etc.).

adb shell am start -a android.settings.TETHER_SETTINGS

That opens the tethering screen, but we need to actually enable the hotspot. The reliable way is to use the svc wifi service:

adb shell svc wifi enable
adb shell settings put global tethering_on 1
adb shell service call connectivity 34 i32 1

Explanation:

  • svc wifi enable makes sure Wi‑Fi is on (the hotspot uses the Wi‑Fi radio).
  • settings put global tethering_on 1 tells the system that tethering is active.
  • service call connectivity 34 i32 1 invokes the hidden API that actually starts the hotspot. The transaction code 34 works on Android 8‑12; on Android 13 it changed to 35. We'll handle that in the next step.

Step 4 – Make the command version‑aware

Because the transaction code differs between Android releases, we’ll create a small helper script that detects the OS version and runs the correct call.

# Save this as enable_hotspot.sh on your PC
#!/system/bin/sh
ver=$(getprop ro.build.version.sdk)
if [ "$ver" -ge 33 ]; then
  # Android 13 (API 33) and newer
  service call connectivity 35 i32 1
else
  # Android 8‑12
  service call connectivity 34 i32 1
fi
svc wifi enable
settings put global tethering_on 1

Push the script to the device (it will reside in /data/local/tmp which is writable without root):

adb push enable_hotspot.sh /data/local/tmp/

Make it executable:

adb shell chmod 755 /data/local/tmp/enable_hotspot.sh

Step 5 – Automate the script at boot

Android does not allow arbitrary shell scripts to run on boot without root, but a lightweight automation app can execute the script with the Run Shell Command action. We’ll use MacroDroid because it’s free and works on most devices.

  1. Install MacroDroid from the Play Store.
  2. Open MacroDroid → Add Macro.
    • Trigger: Device Boot (found under Device Events).
    • Action: Run Shell Command. Enter the full path:
      /data/local/tmp/enable_hotspot.sh
      Tick Use root – leave unchecked because the script works without root.
    • Constraints (optional): Add Wi‑Fi is on if you want the macro to wait until Wi‑Fi hardware is ready.
  3. Save the macro with a recognizable name, e.g., "Start Persistent Hotspot".
  4. Reboot the phone. After the boot animation, the macro will fire, executing the script and turning the hotspot on automatically.

Step 6 – Verify persistence

Once the device has rebooted:

  • Swipe down to open the quick settings panel and look for the Hotspot tile. It should be highlighted, indicating the hotspot is active.
  • On a second device (laptop, tablet, etc.), scan for Wi‑Fi networks. You should see the SSID you set earlier (e.g., MyHotspot) and be able to connect using the password.

If the hotspot is off, open MacroDroid, go to the macro you created, and tap Run Macro manually. This will surface any error messages (e.g., permission denial) that you can address before relying on the boot trigger.

Alternative: Using a dedicated "Auto‑Hotspot" app

If you prefer not to install a generic automation app, there are a few Play Store utilities that claim to enable a hotspot on boot. Look for apps that explicitly state they work without root and that request the android.permission.WRITE_SETTINGS and android.permission.CHANGE_NETWORK_STATE permissions. The steps are essentially the same: grant the permissions, set the SSID/password once via the app, and enable the "Start on boot" toggle.

Troubleshooting

  • Hotspot does not start after reboot:
    1. Open MacroDroid → Macros → find "Start Persistent Hotspot" → tap the Run Macro button. If it works, the problem is with the boot trigger. Ensure the macro’s trigger is set to Device Boot and that the app is not battery‑optimized (Settings > Apps > MacroDroid > Battery → Unrestricted).
    2. Check the script permissions: adb shell ls -l /data/local/tmp/enable_hotspot.sh should show -rwxr-xr-x.
  • "service call connectivity" fails with "Permission denied":

    This can happen on heavily customized OEM skins that restrict hidden APIs. In that case, replace the service call line with the more generic command:

    adb shell am broadcast -a android.intent.action.TETHER_STATE_CHANGED --ez state true

    Then re‑push the script and test again.

  • Battery drain concerns:

    A constantly‑on hotspot will drain the battery quickly. Keep the phone plugged into a charger, or enable Android's Battery Saver for other apps while the hotspot runs.

Safety notes

  • Never expose the hotspot to an untrusted public network without a strong password – the default WPA2‑PSK is safe, but use a long, random passphrase.
  • When using MacroDroid, avoid granting the app unnecessary permissions (e.g., SMS or contacts) unless you need them for other macros.
  • If you ever decide to stop using the persistent hotspot, disable the macro and delete the script to prevent accidental activation.

Wrap‑up

By storing the hotspot configuration with settings put, creating a version‑aware script, and letting a lightweight automation app fire the script at boot, you achieve a truly persistent Wi‑Fi hotspot on any Android device without rooting. The method works on Android 8 through Android 13, adapts to OEM variations, and leaves the system untouched – perfect for travel routers, IoT gateways, or a simple on‑the‑go internet hotspot.

User Comments (0)

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