yashsingh1/xdaforums huggingface dataset:
[Tasker Tips & Tricks] ktmom:
It always helps to post an export of the DESCRIPTION (not xml) of the problem task. Long press task (or profile) to select, 3-dot menu, export-> description to clipboard. Easier for people to view if pasted to pastebin.com it will up the forum from replacing characters with emoticons and allows easier manipulation of the data.

What does the tasker log say? And you could look at a logcat. It's always possible the selinux mode or something about the ROM is causing problems.

"Good judgment comes from experience, and a lot of that comes from bad judgment." - Will Rogers
[Tasker Tips & Tricks] lauralbaby:
For people who aren't rooted, Secure Settings, while no longer updated, works great for enabling/disabling Hotspot mode when Tasker's Wifi Tether seems flaky.
[Tasker Tips & Tricks] jsylvia007:
So I'm on a Stock Pixel 2XL with the latest security patch and neither Secure Settings nor Nouget+ Tether Toggle work for me.
[Tasker Tips & Tricks] ktmom:
That's always a automated tap on the quick settings tile or a more convoluted access to the settings menu as described on Stack Exchange.

"Good judgment comes from experience, and a lot of that comes from bad judgment." - Will Rogers
[Tasker Tips & Tricks] jsylvia007:
So... My primary reason for not rooting was that it would break Android Pay... It seems now that I look, the newest Magisk has everything working without issues... Can anyone confirm that root is in fact working and Android Pay also continues to function after rooting with Magisk? I haven't rooted since my Nexus 5X and I ran a custom rom on that phone. Don't see a need to do all that on this phone, as it works fine currently, but would love to get some root functionality back.
[Tasker Tips & Tricks] ktmom:
I haven't heard of any one having trouble with android pay, using Magisk and Magisk hide (or SuperSu with SuperSu hide). Though most of these functions can be done using AutoTools Et al. without rooting.

"Good judgment comes from experience, and a lot of that comes from bad judgment." - Will Rogers
[Tasker Tips & Tricks] drizzor:
Hey, guys. i got a similiar problem. I have a honor 8 and something is wrong with the current firmware. hotspot is disabling itself automatically from time to time. I'm using tasker and have build a task similar to the mentioned here in this thread.

I try to build a workaround to get rid of the problem with my hotspot. My idea is. If connected to XXX via BT switch Hotspot on. If disconnected to XXX via BT, turn hotspot of and Wifi on. This my current task. Now i would like to have a "check if connection to XXX via BT is active -> turn or keep hotspot on." So if tasker could check the bt connection from time to time and keep or switch hotspot on, i think i could get rid of my problem. Any ideas? Thx
[Tasker Tips & Tricks] sheon:
Here is easy, simple app

https://play.google.com/store/apps/details?id=com.carspot.wifi
[Tasker Tips & Tricks] MArtyChubbs:
I wish it worked on my Pixel 2 XL, but it didn't.

These steps worked on my rooted with Magisk Pixel 2 XL May Patch. One change is I am using the "Nougat+ Tasker Tethering Control" Magisk module. So, with that I didn't need to "Open setting buttons below -> Toggle Allow modify system settings ." I did need to toggle "Allow modify system settings " on for Taskr but not for Nougat+ Tasker Tethering Control
[Tasker Tips & Tricks] :
Hi. I use Nougat+ Tasker Tethering Control plugin which is working in oreo, note 8 without root.

So i have created 2 scripts. One enabling wifi tethering, and another disabling wifi tethering.

But i want to toggle the wifi tethering.

By running the script, if wifi tethering is of, enable it, otherwise disabe it.

I'm newbie here to tasker. How can i do just this? (no bluetooth, no anything, just run the script and toggle tethering.)

Thanks,
[Tasker Tips & Tricks] ktmom:
Assuming that what you're calling "scripts", Tasker refers to as "tasks", then one of many possible solutions is:

Create a task (make sure to name it) with the first action an IF action whose condition is "%Tethering not matches true"

The a second action (after the opening IF) sets the variable "Tethering" to "true"

Third action is an ElseIf

Fourth action is "variable clear %Tethering"

Fifth action close the IF statement with an "End IF"

Now use a Tasker widget on the desktop and link it to the named task you just created. When tapped, the logic will be executed in the task and the variable Tethering will get toggled between "true" and unset.

To take advantage of this, create a profile with a context "Variable Value" and configure it: "%Tethering matches true". When prompted for an entry task, select the task you previously created to enable WiFi tethering. Then link the task you previously created to disable WiFi tethering as the exit task for the same profile.

When the widget is tapped and the %Tethering variable is set to true, the profile fires and the task to enable WiFi tethering is executed. The next time the widget is tapped, the %Tethering variable clears turning off the profile which causes the exit task to run disabling WiFi tethering.

"Good judgment comes from experience, and a lot of that comes from bad judgment." - Will Rogers
[Tasker Tips & Tricks] :
Many many thanks for this man..

Didn't expected to succeed in doing this as i am almost newbie to tasker (didn't even know how to make an exit task :)), but with very few reading i made it work.

(Yes what i called scripts was actually tasks)

Didn't create a widget because i don't really need that. I just need an app (export to .apk) to just press the icon of the app and run.

I had two tasks:

EnableHotspot

DisableHotspot

(those two tasks i had export to app, installing them and had two icons. On for enable and one for disable.

Now after this i have another task called

Toggle

(i run this and toggling hot spot is working)

And I also have a profile called ToggleProfileTeather

Question :

How can i export to app (.apk)?

If i export to app, task Toggle, it creates application but doesn't do anything by pressing it's icon.

I'm sure i need something to include the profile?

How can i do this?

I just want to export this to an application. Press the icon and toggle hotspot.

Thanks again.

**edit** forget the above, i found the solution by reading.

All needed was create a "project", move there profile and tasks, and export as app the project (setting target the toggle task, and setting target os nougat and oreo..

Now i have what i needed, a standalone app, which calling it by pressing a button of the locked phone, to trigger mobile hotspot on/off.

In nougat i was doing this by a simole one line task. In oreo become much much complicated but it runs fine.

Many many thanks again!!
[Tasker Tips & Tricks] TT_Vert:
S8+ wifi toggle just doesn't work for me and many others. It never worked in nougat either. The various plugins also failed. I had tried to get this resolved over a year ago w/ no luck sadly. Here is the error on the newest tasker which is different than the older version error. I even tried playing w/ app factory and creating apks w/ no success. Secure settings doesn't work, nor does any other app that toggle hotspot. I can toggle it just fine from the toggle at the top of the screen.

Dave
[Tasker Tips & Tricks] ktmom:
I take it your not rooted. Most of these types of permissions are a problem, particularly un-rooted. You could try using ADB to give Tasker, WiFi Toggle and maybe Auto Tools the toggle permission that is flagged as missing in the error.

You might also explore the system setting command in the newest release of AutoTools Secure Task by seeing if the toggle settings feature can capture the manual toggle of the WiFi Tether quick setting.

"Good judgment comes from experience, and a lot of that comes from bad judgment." - Will Rogers
[Tasker Tips & Tricks] TT_Vert:
Correct not rooted. The snapdragon bootloader isn't unlocked and the only way to root nets me 80% battery. Anyway I did try to grant permission to tasker via ADB and I get the following (See code box below). I do recall doing this last year as well decompiling tasker and adding the permission as a test w/o luck but here is what I am seeing. Also, what do you mean by giving "WiFi Toggle" that permission? Can you elaborate what you mean by that? Another odd thing is that not only does auto tools not detect the process to toggle hotspot none of the settings (global, secure or system) show ANY change when toggling hotspot. They are 100% identical pre and post hotspot toggle which also baffles me. I noticed when I try to change settings via adb using settings nothing changes until reboot. IE, if I set wireless to 1 I have to reboot to see the change, it isn't in real time. I don't see any setting for the wifi tether under secure except one (wifi_hotspot20_enable=1) which does nothing when changing to 0/1 even when rebooting

pm grant net.dinglisch.android.taskerm android.permission.TETHER_PRIVILEGED
Operation not allowed: java.lang.SecurityException: Package net.dinglisch.android.taskerm has not requested permission android.permission.TETHER_PRIVILEGED
[Tasker Tips & Tricks] ktmom:
WiFi toggle is a Tasker plug-in that this thread has been about.

An un-rooted Samsung is pretty locked down. Samsung has a vested interest with the carriers so...

If issuing WiFi toggle also doesn't work, then I would contact takers developer directly and ask of he can add a work-around.

"Good judgment comes from experience, and a lot of that comes from bad judgment." - Will Rogers
[Tasker Tips & Tricks] TT_Vert:
yeah I did talk to him and he basically just blamed samsung and would not help. The wifi toggle you refer to is "Nougat+ Tasker Tethering Control"? I've seen references to a few different things in here. I run that and I get the same permissions error for android.permission.TETHER_PRIVILEGED and I cannot give the tasker tethering control app that permission. The error:

Operation not allowed: java.lang.SecurityException: Permission android.permission.TETHER_PRIVILEGED is not a changeable permission type

Dave
[Tasker Tips & Tricks] ktmom:
Tasker's developer is very agreeable so if he can't help, then it's probably because Samsung is blocking things. My best suggestion is to get a Google phone [emoji41]

"Good judgment comes from experience, and a lot of that comes from bad judgment." - Will Rogers
[Tasker Tips & Tricks] TT_Vert:
Yeah he didn't even try, just gave me a few suggestions about using app factory which didn't work sadly.

Dave
[Tasker Tips & Tricks] ktmom:
João Dias, Tasker's current developer and long time Auto Apps developer, is about as knowledgeable as there is on Android. If it appeared that he "didn't even try", I suspect that's because he is well aware of the issues getting past all things Samsung.

"Good judgment comes from experience, and a lot of that comes from bad judgment." - Will Rogers
[Tasker Tips & Tricks] TT_Vert:
That isn't who I dealt with last year. I am actually talking to him right now via email, he does seem interested in the problem.
[Tasker Tips & Tricks] ktmom:
No, last year it was Pent, and he's been rather ill. It's his illness that ultimately caused him to transfer development.

"Good judgment comes from experience, and a lot of that comes from bad judgment." - Will Rogers
[Tasker Tips & Tricks] TT_Vert:
Fair enough, perhaps one of you guys here has a bit of input. Still trying to find workarounds for this problem. I am at the point where I can use keyevents to make this work via adb but whenever trying to use shell commands it just isn't working. So I went ahead and tried to make an sh file to run but it does the same thing. Tasker gives an error 255 and my sh errors out at the same place that the error 255 is and says " }arting: Intent { cmp=com.android.settings/.TetherSettings

Error type 3

} does not exist.lass {com.android.settings/com.android.settings.TetherSettings

dream2qltesq:/mnt/sdcard $ cat hotspot.sh"

Regardless of this error, even the events prior to this do not run just like in tasker. The events are just basic keyevents before/after the am start command. I just don't understand by adb allows me to do all of this via USB ADB and tasker and a terminal on device do not. In a terminal on the device I get "failure calling service activity: failed transaction" in a terminal window.

This may be an Oreo issue as after some research others have the same issue and being unrootable basically (s8) I cannot have permissive SEL.

Dave
[Tasker Tips & Tricks] oceansoul:
Nougat+ Tasker Tethering Control works great with unrooted LG V30 H931 running 8.0
[Tasker Tips & Tricks] saspo59:
Thanks to [MENTION=3980555]surface13[/MENTION] for great explains,

Works great on rooted onepluse3t
[Tasker Tips & Tricks] mkanet:
Note 9 UNROOTED (Verizon)?

Has anyone been able to automatically turn on the mobile hotspot using ANY method at all on a Note 9? I know, it's impossible to ROOT a Verizon Note 9. I also know it's impossible to do this using the MacroDroid app with it's builtin profile.

I certainly don't want to have to manually turn on the hotspot every single time I get into my car. Surely, there has to be some reasonable way to automate this.

I even attempted to set the mobile hotspot to NEVER turn off automatically. However, it seems to still turn off under certain conditions.

The whole reason I got an Android instead of an iphone is to have more flexibility in the things I want to do on my phone.
[Tasker Tips & Tricks] ktmom:
I think without root, your best bet is to automate it using the AutoInput plug-in.

"find somebody that you think is undeserving of your compassion and give it to them" - Christian Picciolini
[Tasker Tips & Tricks] mkanet:
Thank you so much! At least, now I have a way to do it. Is there a good Android widget that has a separate ON/OFF buttons that someone here could suggest?

There's a Hotspot toggle in the notification bar, but since it's a toggle, it wouldn't be reliable every time.
[Tasker Tips & Tricks] ktmom:
What do you mean by saying the quick setting tile won't be reliable? If you're concerned about being in an indescriminate state, when you toggle the tile, have the task set a variable then on the next toggle, unset the variable. Then you can check the variable for the state.

"find somebody that you think is undeserving of your compassion and give it to them" - Christian Picciolini
[Tasker Tips & Tricks] mkanet:
Thanks so much for the excellent suggestions. I was able to get around both issues with both suggestions. I have one last hurdle...

My Tasker profiles won't execute until I open my Samsung S-View cover. I can't find any useful information on this anywhere except for posts asking the same question... with no solutions.

My profile can successfully unlock my phone using the Autoinput unlock feature. However nothing happens if my S-View cover is closed. Kinda lame.

I would be very grateful if someone has a useful suggestion... even if its definitively impossible for Tasker to do anything with the S-View cover closed. I just need to know if it's impossible or not.
[Tasker Tips & Tricks] ktmom:
Samsung TouchWiz ROMs are heavily modified versions of Android. The modifications are closed source so for those of us who don't use Samsung devices, there's not much we can do to sort out the differences. [emoji853]

I think it's safe to say, if the AutoInput screen unlock action can't help you, there's probably not much to do.

I'm guessing the S-View software in the ROM completely overrides other actions to ensure the screen is non-responsive when the cover is closed.

"find somebody that you think is undeserving of your compassion and give it to them" - Christian Picciolini
[Tasker Tips & Tricks] mkanet:
Is there any chance you or someone else could PLEASE show me how to store the state of my wifi tether in a variable I created? I thought I had done this correctly; however, I'm clearly doing something wrong. I found a post on Redit that also mentions this solution... but, I'm not familiar with Tasker enough yet to do this correctly.

(last post)

https://www.reddit.com/r/tasker/comments/6sr6dk/help_make_a_tethering_mode_profile/

I would be extremely grateful if someone would be kind enough to show the steps necessary in an example.
[Tasker Tips & Tricks] ktmom:
Hotspot (8)

A1: If [ %Hotspot ~ true ]

A2: WiFi Tether [

Set: Off Keep Wi-Fi when turning on: Off

A3: Variable Clear [

Name:%Hotspot

Pattern Matching: Off Local Variables Only: Off

A4: Else

A5: WiFi Tether [

Set: On Keep Wi-Fi when turning on: Off

A6: Variable Set [

Name:%Hotspot

To:true Recurse Variables: Off

Do Maths: Off

Append: Off

A7: End If

"find somebody that you think is undeserving of your compassion and give it to them" - Christian Picciolini
[Tasker Tips & Tricks] mkanet:
Thanks for the quick reply back. I understand the logic. Im just not sure where in Tasker specifically to do that. The only thing I know how to do that's related is creating the %Hotspot variable. Thanks again for your help.
[Tasker Tips & Tricks] ktmom:
That is an example of the Task I (used to) use to toggle my hotspot. I had a shortcut with that task assigned. Tap the shortcut once, it turned on, the second tap turned off. The talk could be assigned to one of takers quick settings tiles which are assigned in preferences.

If that is not what you are asking, I'm missing your question/problem.

"find somebody that you think is undeserving of your compassion and give it to them" - Christian Picciolini
[Tasker Tips & Tricks] mkanet:
It took me a while to understand the miscommunication we had. It looks like you were presuming the WiFi tether ON/OFF could be controlled on my phone using Tasker... just like yours. Tasker doesn't have this ability on my Note 9. It gives a bunch of permission-related errors (see attached image). That was the first thing I ever tried.

I can only toggle this setting using Autoinput plugin to select the Hotspot button toggle on my notification bar (as if I press that toggle button on the notification bar).. which isn't very reliable. I only have the hokie Autoinput task to "blindly press" the Hotspot button on the notification bar. So... my %Hotspot variable is only useful if I have a way of explicitly executing "Hotspot=ON" or "Hotspot=OFF".
[Tasker Tips & Tricks] ktmom:
My post with a task included was in response to your plea: "PLEASE show me how to store the state of my wifi tether in a variable I created?"

The task in the post I previously made does exactly that. While the actual action to toggle the hotspot is different between my task and your requirements, the storing of the state is identical.

I never implied you should change from the AutoInput method we had previously discussed to deal with your lack of root.

I used the AutoInput method to toggle NFC for a long time when other methods failed. It can, and will work reliably, you may need to tweak waits or something, you could always experiment with AutoInput UI query action.

"find somebody that you think is undeserving of your compassion and give it to them" - Christian Picciolini
[Tasker Tips & Tricks] Ludeape:
I just updated my unrooted unlocked Note 9 to pie, and my wifi tethering task to turn on thether when connected to car bluetooth is now failing with permission errors also :(

Is there any other way to get this working on an unrooted Note 9?

thanks!!
[Tasker Tips & Tricks] krasykp:
Hi there, I'm trying to use this and it works for me, but I have an issue - when the bletooth disconnect, the WiFi tethering stops immediately. I do not want this. I want to stop the wifi thethering with another task or just to wait until there is no connected clients and tethering stop after timeout. Do you have an option for this scenario?

I'm using tasker with Samsung J5 2017, and it works without additional plugins.

Thanksin advance :)
[Tasker Tips & Tricks] rubberchickenmob:
I just tried Nougat+ Tasker Tethering Control with Tasker on a stock non rooted Pixel 3xl with no success. Has anyone else got this to work on a non rooted pixel 3xl? I get the following error when testing the task with the play button:

12.01.37/E FIRE PLUGIN: Toggle Tethering / com.twofortyfouram.locale.intent.action.FIRE_SETTING: 3 bundle keys

12.01.37/E Toggle Tethering: plugin comp: com.matejdro.taskertethercontrol/com.matejdro.taskertethercontrol.TaskerReceiver

12.01.37/E add wait type Plugin1 time 7

12.01.37/E add wait type Plugin1 done

12.01.37/E add wait task

12.01.37/E Error: 2

12.01.37/E System install (ROOT) needed. Open config dialog.

java.lang.reflect.InvocationTargetException: null

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

android.os.RemoteException: Remote stack trace:

at android.app.ContextImpl.enforce(ContextImpl.java:1896)

at android.app.ContextImpl.enforceCallingOrSelfPermission(ContextImpl.java:1924)

at android.net.ConnectivityManager.enforceTetherChangePermission(ConnectivityManager.java:2292)

at com.android.server.ConnectivityService.startTethering(ConnectivityService.java:3995)

at android.net.IConnectivityManager$Stub.onTransact(IConnectivityManager.java:1098)
[Tasker Tips & Tricks] ktmom:
I have a Pixel 3XL, and although I'm rooted, I turned off root access for Tasker then used the inbuilt (net -> Wi-Fi tether) action and the hotspot toggled on and another device was able to connect to the internet. I'm on T-Mobile with hotspot as part of my service.

YMMV
[Tasker Tips & Tricks] rubberchickenmob:
That's odd with the inconsistency. Maybe it's because I'm on Sprint instead of t mobile. Are you on the latest Android 10? My hotspot definitely works with a manual toggle.

I tried with Tasker's normal Wifi Tether task as well with no success. Sounds like root is required with error i'm getting.

15.13.07/E current state: 1

15.13.07/E WiFi Tether: cur: false new: true

15.13.07/M lastWifiDisableAgoMS: 1570054387316

15.13.07/E check AP state

15.13.07/E AP state: 1

15.13.07/M lastWifiDisableAgoMS: 1570054387318

15.13.07/E current state: 1

15.13.07/E curval: 1

15.13.07/E WiFi: cur: false new: false

15.13.07/E wait for 200ms

15.13.07/E wait finished

15.13.07/E WiFi Tether: setWifiEnabled()

15.13.07/E WiFi Tether: Couldn't do with class com.joaomgcd.taskerm.tether.l: null

15.13.07/E Unfortunately your device is blocking you from using this function.

The only way to use it is if you have a rooted device and by making Tasker a system app:

To make Tasker a system app:

- Make a a backup of your Tasker setup

- Copy /data/app/net.dinglisch.android.taskerm folder to /system/priv-app

- Uninstall Tasker and reboot

- After the reboot Tasker should be installed as a System app.

- Restore Tasker data

15.13.07/E Action WiFi Tether failed.

15.13.07/E result: stop task (error)

15.13.07/E Error: 1

15.13.07/MacroEdit action finished exeID 1 action no 0 code 113 status: Err next 0
[Tasker Tips & Tricks] Sophos1:
I'm chiming in to say I've had ZERO luck with tasker auto launching wifi hotspot on my P3XL on Verizon. I tried for a long time before I gave up. The only confirmed cases I found for it working were all on rooted devices.
[Tasker Tips & Tricks] ktmom:
No, I'm still on Pie. I actually never go to a major update for weeks after release. I depend on my tasker setup and major updates tend to break things. I like time to adjust if needed ;)

Is there a reason you can't root?

You could use AutoInput to automate the taps ¯\_(ツ)_/¯
[Tasker Tips & Tricks] rubberchickenmob:
Work emails. Company security policy.