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.
Build number seven times, then go to Settings > System > Developer options → Enable USB debugging.PATH or run commands from the folder.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.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
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.adb shell settings get global wifi_ap_ssid
The command should output MyHotspot.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.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
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.
/data/local/tmp/enable_hotspot.sh
Tick Use root – leave unchecked because the script works without root.Once the device has rebooted:
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.
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.
adb shell ls -l /data/local/tmp/enable_hotspot.sh should show -rwxr-xr-x.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.
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.
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.









