Wi-Fi Hotspot Can't be Enabled in Android 8

4,909 views
Skip to first unread message

Fran T

unread,
Oct 21, 2017, 2:08:41 AM10/21/17
to Automate
I know this block may not work on some devices, but I thought I'd see if anything could be done. I'm running Oreo on a Pixel 2 XL. I tried running the 'Show System Setting' flow to see which system setting changes when I manually enable the hotspot, but nothing at all gets logged.

BTW, I am turning off Wi-Fi in my flow before trying to enable the hotspot.

Thanks - any insight is greatly appreciated!

Henrik "The Developer" Lindqvist

unread,
Oct 21, 2017, 2:12:14 PM10/21/17
to Automate
Any error message?

If the device is rooted, try enabling the "Wi-Fi hotspot rooted" option Automate settings.

Fran T

unread,
Oct 21, 2017, 2:21:55 PM10/21/17
to Automate
No error messages, even with Debug logging enabled, from either my flow or the Show System Setting flow. Nothing logged at all with the latter when I manually enable the hotspot.

I'm not rooted, but given that I don't even see any permission errors, I'm not sure rooting would even help.

Fran T

unread,
Oct 21, 2017, 2:29:41 PM10/21/17
to Automate
By the way, Automate does have Modify System Settings permission.

Henrik "The Developer" Lindqvist

unread,
Oct 22, 2017, 3:09:21 PM10/22/17
to automa...@googlegroups.com
Enabling hotspot without using root on Nougat is known to cause DHCP connection issue due to Android bugs, or it's an intentional crippling by Google.
Sorry i didn't before, i just tested on my unrooted Oreo device, it doesn't work for me either so root is likely an requirement nowadays.

Fran T

unread,
Oct 22, 2017, 4:04:24 PM10/22/17
to Automate
I'm thinking that because there are no errors when enabling the hotspot and the setting is invisible to Show System Setting, there may be some hope that Oreo just has a different way of doing it.

...And I just did a little more research, and it appears that Oreo now has an actual public API to do this now!

https://stackoverflow.com/questions/45984345/how-to-turn-on-off-wifi-hotspot-programmatically-in-android-8-0-oreo

Fran T

unread,
Oct 22, 2017, 4:14:23 PM10/22/17
to Automate
BTW, since there appears to be a new hotspot API for Oreo, there's a good chance that as I suspected, rooting the device won't help the current version of Automate, either. If you're able to root your Oreo device, it might be very interesting to see if this is actually the case.

Henrik "The Developer" Lindqvist

unread,
Oct 22, 2017, 5:41:51 PM10/22/17
to Automate
Thanks for reporting your findings.
Interesting new feature, but it doesn't seem to enable the "real" hotspot, only a "local" one: "The network created by this method will not have Internet access".

Fran T

unread,
Oct 22, 2017, 5:58:34 PM10/22/17
to Automate
Perhaps not in an of itself, but the stackoverflow article says that the new API is a replacement for the old reflection technique and implies that it does what we'd want. The Google Javadoc API description also notes that the user may interrupt the local hotspot via the system setting, which is what we're using to manually enable it. I think it's worth a shot! 😊

Henrik "The Developer" Lindqvist

unread,
Oct 23, 2017, 2:27:46 PM10/23/17
to Automate
I'll investigate the new feature, but i highly doubt it starts the regular hotspot, it would be a major security issue.
IT likely used to for an app to communicate with other nearby device  running the same app.
Message has been deleted

Poengser

unread,
Nov 5, 2017, 1:25:21 PM11/5/17
to Automate
Are there any news related to starting the regular hotpot? It worked fine on my old mobile but not on the new one running with andoid 8.0. I also tried other apps but witout success.
Is there a chance to get a solution soon?

Henrik "The Developer" Lindqvist

unread,
Nov 5, 2017, 1:39:40 PM11/5/17
to Automate
The Wi-Fi hotspot set state block should still work on Android 8, but will likely require a rooted device and that the "Wi-Fi rooted" option in Automate settings are enabled..

guido...@googlemail.com

unread,
Nov 5, 2017, 2:35:18 PM11/5/17
to Automate
ok, is enabling the "Wi-Fi rooted" setting the only thing I have to do? How can I acitvate the option? Do I have to buy the premium version to activate this item in the setting?

Fran T

unread,
Nov 5, 2017, 2:49:36 PM11/5/17
to Automate
First, I'd suggest that Automate is well worth the modest price for Premium! 😊 I've actually sold a few of my friends on this amazing app as small additional recompense.

The theory on the new Oreo API is that due to enhanced security with Oreo, you will need to root your phone and then enable the corresponding Automate privilege Henrik referred to. I personally find Google's API documentation to be ambiguous on this point and am holding out hope that rooting won't be necessary. We'll find out when Henrik gets the chance to try it!

poengser

unread,
Nov 5, 2017, 3:09:54 PM11/5/17
to Automate
in that case I will also hope for Henrik's successful try. :o)
Thank's a lot for answering so quick!

Henrik "The Developer" Lindqvist

unread,
Nov 5, 2017, 7:09:58 PM11/5/17
to Automate
Your device has to be "rooted", when so, the "Wi-Fi rooted" option should be the only thing you need to enable.
Premium is not a requirement.

Fran T

unread,
Feb 4, 2018, 3:15:37 AM2/4/18
to Automate
There seems to be a another way that a Tasker plugin is using. While it requires root access for Oreo 8.0, users report that it works without root on Oreo 8.1, including on Pixel phones. The magic may be in a Tethering API and/or privilege:

https://www.reddit.com/r/tasker/comments/7d6lij/how_to_enable_tasker_to_control_wifi_hotspot_on/

I also checked the Pixel reviews for the plugin here:

https://play.google.com/store/apps/details?id=com.matejdro.taskertethercontrol

Henrik "The Developer" Lindqvist

unread,
Feb 4, 2018, 3:41:26 PM2/4/18
to Automate
Interesting, i'll investigate.

Henrik "The Developer" Lindqvist

unread,
Feb 4, 2018, 3:45:15 PM2/4/18
to Automate
Hmm, sadly not:

Prereqs
  • Must be rooted


On Sunday, February 4, 2018 at 9:15:37 AM UTC+1, Fran T wrote:

Fran T

unread,
Feb 4, 2018, 9:34:40 PM2/4/18
to Automate
Yes, but a little farther down, there are these user comments; and some Pixel user comments in the Play Store reviews seem to back them up:

motoridersd • 68d
I was able to make this work on my Pixel 2 XL with just the plug in, no root. Just gave the plugin permission to change system settings.

PedanticGod • 55d
I can confirm that this also works for me with 1st Gen Pixel without root or ADB

Fran T

unread,
Feb 4, 2018, 9:37:33 PM2/4/18
to Automate
P.S. Pixels are now running Oreo 8.1, whereas that article was written about Oreo 8.0 🙂

Henrik "The Developer" Lindqvist

unread,
Feb 5, 2018, 3:25:21 PM2/5/18
to Automate
If it works, then use the Plug-in.

Fran T

unread,
Feb 5, 2018, 7:45:55 PM2/5/18
to Automate
I tried using the Plug-in Action block, but I get this exception - but I also don't have Tasker installed, since I prefer Automate: 🙂

java.lang.IllegalStateException: Plug-in failed with result code: 2

(Enabling Debug logging didn't give me any more info.)

Henrik "The Developer" Lindqvist

unread,
Feb 5, 2018, 10:22:55 PM2/5/18
to Automate
You need to look in the log for the plug-in app, if possible.
Sadly the Tasker/Locale API doesn't allow for proper error descriptions.

Henrik "The Developer" Lindqvist

unread,
Feb 5, 2018, 10:41:38 PM2/5/18
to Automate
I've tried the hack used for rooted devices on an unrooted Android 8.1 device, and it does seem to be working!
Will be in next release.

Fran T

unread,
Feb 6, 2018, 2:35:55 AM2/6/18
to Automate
Awesome! You rock, sir.

It's moot now, but before seeing your latest reply, I just now found the source for the Tasker plugin for you:

https://github.com/matejdro/TaskerTetherControl

Message has been deleted

Fran T

unread,
Mar 1, 2018, 2:25:11 AM3/1/18
to Automate
Hi Henrik,

I just eagerly installed Automate v1.10.5 on my Pixel 2 XL, but am sad to report that although my research that found a way for Wi-Fi hotspot to be enabled on unrooted Oreo 8.1 seemed to work for you (and others), I get the following error:

java.lang.SecurityException: ConnectivityService: Neither user 10138 nor current process has android.permission.TETHER_PRIVILEGED.

I'm running Android 8.1.0, February 5 2018 security patch level. A check on the Automate Google+ group seems to indicate that other Oreo users are able to start the hotspot successfully during alpha testing, but I couldn't tell which version of Android they're running.

Any ideas?

Fran T

unread,
Mar 1, 2018, 2:40:18 AM3/1/18
to Automate
P.S. I tried uninstalling and reinstalling the relevant "modify system settings" and "access local network" permissions and rebooting, but no luck. No additional log messages were emitted when I enabled Debug logging, either.

Henrik "The Developer" Lindqvist

unread,
Mar 1, 2018, 6:51:45 AM3/1/18
to Automate
I think, the TETHER_PRIVILEGED permission requirement is in affect when the carrier has blocked tethering.
I can start tethering on my Nexus 5X running Android 8.1 without enabling the root workaround.

Fran T

unread,
Mar 1, 2018, 11:14:27 AM3/1/18
to Automate
I can manually start tethering just fine, so I don't think Verizon is blocking it. (Maybe it's a Pixel issue?)

Can that permission be added to Automate's manifest?

Henrik "The Developer" Lindqvist

unread,
Mar 3, 2018, 10:08:11 AM3/3/18
to Automate
The TETHER_PRIVILEGED permission is for system apps only.

Fran T

unread,
Apr 25, 2018, 3:57:59 AM4/25/18
to Automate
I came up with a non-root UI workaround for this, described here:

https://groups.google.com/forum/m/#!msg/automate-user/ymNjrewtODg/akJgitYtCAAJ

"By ensuring that my Bluetooth device is set up as a Trusted Device, I'm able to wake the screen, press the Unlock button, then press the Hotspot Quick Settings tile to turn the hotspot on and off.

I wrote this little flow which determines whether the block or UI method is required and does the right thing accordingly, so it'll work for all versions of Android:

http://llamalab.com/automate/community/flows/21295

Hope this helps!

Fran T

unread,
Sep 1, 2018, 1:40:44 AM9/1/18
to Automate
I'm running the alpha build of 1.14.0 on a Pixel 2 XL running Pie. With the Private Setting for the Wi-Fi hotspot workaround enabled, I now get this stack trace:

2018-08-31 22:31:20.062 INFO 36009@46: Wi-Fi hotspot set state
2018-08-31 22:31:20.064 FAIL 36009@46: android.os.RemoteException: Remote stack trace:
at android.app.ContextImpl.enforce(ContextImpl.java:1812)
at android.app.ContextImpl.enforceCallingOrSelfPermission(ContextImpl.java:1840)
at android.net.ConnectivityManager.enforceTetherChangePermission(ConnectivityManager.java:2011)
at com.android.server.ConnectivityService.stopTethering(ConnectivityService.java:3244)
at android.net.IConnectivityManager$Stub.onTransact(IConnectivityManager.java:392)

Henrik "The Developer" Lindqvist

unread,
Sep 1, 2018, 4:52:24 AM9/1/18
to Automate
Is the Settings add-on installed and granted the Write setting permission in system Apps settings?

Fran T

unread,
Sep 1, 2018, 10:28:46 AM9/1/18
to Automate
Yes,it looks like it:
Screenshot_20180901-072532.png

Henrik "The Developer" Lindqvist

unread,
Sep 1, 2018, 3:03:45 PM9/1/18
to Automate
Indeed. Please try the new "Extension" workaround.

On Saturday, September 1, 2018 at 4:28:46 PM UTC+2, Fran T wrote:
Yes,it looks like it:

Fran T

unread,
Sep 1, 2018, 4:02:05 PM9/1/18
to Automate
Yes, I've tried all the workarounds except 'root'.

Fran T

unread,
Sep 1, 2018, 11:07:09 PM9/1/18
to Automate
P.S. The Extension workaround yields the same stack trace for me as the Private Setting one.

Henrik "The Developer" Lindqvist

unread,
Sep 2, 2018, 3:46:31 PM9/2/18
to Automate
Must be some new Android 9 security restriction, maybe the hidden API access prevention. If so, then there's not much to do. I'll investigate.

oko...@gmail.com

unread,
Dec 22, 2018, 11:17:18 AM12/22/18
to Automate
The old Llama tool i use for automation can enable the hotspot feature based on a trigger on my Samsung S6 running android 7 without root.

i guess the same solution could work for Automate.

Toggling the hotspot is the last trigger i still have on my Llama setup.

Henrik "The Developer" Lindqvist

unread,
Dec 22, 2018, 2:42:23 PM12/22/18
to Automate
Which Workaround are you using?

turb...@gmail.com

unread,
Dec 25, 2018, 9:37:01 AM12/25/18
to Automate
I'm on 8.1 and with the 8.1 workaround enabled, the hotspot does get enabled, but then crashes with a "Master Error" and the flow stops so I can't get it to toggle.
Also it appears that the check if hotspot enabled doesn't seem to work.

Henrik "The Developer" Lindqvist

unread,
Dec 25, 2018, 2:43:34 PM12/25/18
to Automate
"Master error"? Please use the Help & feedback menu to send just after you get the error, to me the system log.

Henrik "The Developer" Lindqvist

unread,
Dec 26, 2018, 3:29:21 PM12/26/18
to Automate
Thanks for the log.
Okay, the "Master error" is caused by the system, so it's not an Automate issue, what it means nobody knows.
You could try using the Extension workaround, but it will/should produce the same result.


On Tuesday, December 25, 2018 at 3:37:01 PM UTC+1, turbo2ltr wrote:

oko...@gmail.com

unread,
Dec 27, 2018, 6:32:24 PM12/27/18
to Automate
There is and old Llama framework, not Automate based, and that one can still enable and disable the hotspot reliably without root. So yes, for those triggers i rely on another framework still.

I've tried all workarounds, accepted the one requiring root.

Perhaps the other app is using a different API to the hotspot feature.

Reply all
Reply to author
Forward
0 new messages