Create a Persistent Wi‑Fi Hotspot on Android (No Root)

11 min read Step‑by‑step guide to set up a Wi‑Fi hotspot that stays active after reboot using Termux and free tools, without rooting your Android device. October 10, 2026 13:30 How to Create a Persistent Wi‑Fi Hotspot on Android (No Root)

Many Android users need a hotspot that stays on even after the device restarts. By default Android disables the hotspot during a reboot and offers no UI option to make it permanent. This tutorial shows how to automate hotspot activation using only free tools, no root required.

Why the hotspot disappears

When Android boots it restores the last known network state. The hotspot is considered a temporary tethering session, so the system turns it off to save battery and to avoid exposing the device unintentionally. Because the setting lives in the system’s secure storage, only privileged components can toggle it automatically.

What the tutorial will accomplish

  • Install Termux and the Termux:Boot add‑on.
  • Create a tiny shell script that enables the hotspot with a predefined SSID and password.
  • Register the script to run automatically at every boot.
  • Verify that the hotspot is up after a reboot.

Before you start

  • Charge your phone to at least 50 % – the process will briefly toggle Wi‑Fi and may consume extra power.
  • Connect to a stable Wi‑Fi or mobile network so you can download Termux and its add‑on.
  • Enable Developer options (Settings ▶ About phone ▶ Tap “Build number” seven times).
  • In Developer options, turn on USB debugging. You’ll need a PC for a one‑time ADB command (see the troubleshooting section).

Step 1 – Install Termux and required packages

  1. Open the F‑Droid page for Termux and install the app. (F‑Droid provides the most up‑to‑date, ad‑free build.)
  2. Launch Termux and run the following commands to update the package repository and install the tools we need:
    pkg update && pkg upgrade -y
    pkg install bash termux-api -y
  3. Grant Termux the permission to modify system settings (required for changing the hotspot SSID/password). Connect the phone to a PC, open a terminal on the PC and execute:
    adb shell pm grant com.termux android.permission.WRITE_SECURE_SETTINGS

    If you have never used ADB before, install the platform‑tools package from Google and enable USB debugging on the phone.

Step 2 – Install the Termux:Boot add‑on

  1. From the same F‑Droid repository, install Termux:Boot. This add‑on watches a special directory (~/.termux/boot/) and runs any executable script placed there each time the device boots.
  2. Open Termux once more and create the boot directory:
    mkdir -p ~/.termux/boot

Step 3 – Write the hotspot‑enable script

  1. In Termux, open the built‑in editor (or use nano) and create a file called hotspot.sh inside the boot folder:
    nano ~/.termux/boot/hotspot.sh
  2. Paste the following script. Adjust SSID and PASS to your preferred values (password must be at least 8 characters on Android 10+).
    #!/data/data/com.termux/files/usr/bin/bash
    # ---------------------------------------------------
    # Persistent Wi‑Fi Hotspot script for Android (no root)
    # ---------------------------------------------------
    
    # Desired hotspot name and password – change these lines.
    SSID="MyAndroidHotspot"
    PASS="StrongPass123"
    
    # Apply the SSID and password to the system settings.
    settings put global tether_wifi_ssid "$SSID"
    settings put global tether_wifi_password "$PASS"
    
    # Enable the hotspot. The command varies slightly by Android version:
    #   Android 9‑10:   svc wifi tether start
    #   Android 11+:   cmd wifi tether start
    # Try the newer command first; if it fails, the older one works on many devices.
    if cmd wifi tether start 2>/dev/null; then
      echo "Hotspot started via cmd wifi"
    else
      svc wifi tether start && echo "Hotspot started via svc wifi"
    fi
    
    exit 0
  3. Save the file (Ctrl + X, then Y, then Enter in nano).
  4. Make the script executable:
    chmod +x ~/.termux/boot/hotspot.sh

Step 4 – Test the script manually

  1. Run the script directly from Termux to ensure it works before relying on the boot process:
    ~/.termux/boot/hotspot.sh
  2. Open the Quick Settings panel and look for the hotspot icon. You should see it lit, and other devices should be able to see the SSID you defined.
  3. If the hotspot does not appear, open the log with:
    logcat -d | grep -i tether
    and look for error messages. Common issues are missing permissions (repeat the ADB grant) or a typo in the command.

Step 5 – Verify persistence across reboots

  1. Reboot the device: Settings ▶ System ▶ Restart, or simply power‑off and power‑on.
  2. After the device finishes booting, pull down the Quick Settings panel again. The hotspot icon should be active without any manual interaction.
  3. If it is not active, double‑check that the script is still executable and that the boot directory is exactly ~/.termux/boot/. Termux:Boot will not run scripts placed elsewhere.

Troubleshooting

  • Command not found: Some Android builds expose the hotspot command only via svc wifi tether start. Edit hotspot.sh and replace the cmd wifi tether start line with the older command.
  • Permission denied (WRITE_SECURE_SETTINGS): The ADB grant must be executed while the device is connected via USB and USB debugging is enabled. Run the ADB command again, then restart Termux.
  • Hotspot turns off after a few minutes: This is a power‑saving policy on some OEM skins. Open Settings ▶ Battery ▶ Battery optimization, find Termux, and set it to “Don’t optimize”.
  • Device does not show the SSID you set: Some manufacturers store the hotspot name in a vendor‑specific setting. In that case you can manually set the SSID from the UI once, then the script will keep the same value without needing to write it each boot.

Alternative approaches (if the script fails)

If your device blocks the cmd wifi tether command even after granting WRITE_SECURE_SETTINGS, consider one of the following:

  • Use a third‑party app like Hotspot Control together with Tasker. Tasker can trigger the “Toggle Hotspot” action at boot without root, but it requires the paid version of Tasker.
  • On devices that support the netd service, you can start the hotspot via am startservice -n com.android.settings/.TetherService. This method is less reliable across Android versions.

Safety and privacy notes

  • Keeping a hotspot permanently active can quickly drain battery and increase data usage. Monitor your data plan and consider disabling the hotspot when you are away from the devices that need it.
  • The script stores your hotspot password in plain text inside ~/.termux/boot/hotspot.sh. Protect your phone with a strong lock screen and avoid sharing the script file.
  • Granting WRITE_SECURE_SETTINGS gives Termux a high level of system access. Only install Termux from trusted sources (F‑Droid or the official Play Store) and keep the app updated.

What to expect after a successful setup

Once the steps are complete, your Android device will automatically turn on the Wi‑Fi hotspot with the SSID and password you defined, every time it boots. Connected devices will retain network access unless the hotspot is manually turned off or the device runs out of power.

This solution works on most Android 9 (Pie) and newer devices. Older versions may require a slightly different command (svc wifi tether start) and may not allow the WRITE_SECURE_SETTINGS grant without a rooted device.

Enjoy a hands‑free hotspot that’s ready whenever you need it – all without rooting your phone.

User Comments (0)

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