Oeneplus 8 pro - Flashlight Permission / Wifi Tethering - Tasker Tips & Tricks

I want to use Tasker to switch on an off the flashlight LED. When I try to do so Tasker tells me that there is a missing permission: "To use Set Light Tasker need the permission to set light. Open settings now to grant this permission?" When I do so I'm unable to find a suitable permission. I've granted "camera" without success. How to fix this?
Toggling WiFi tethering does not work for me in Tasker. Is there a way to get it with the 8 pro without rooting?

Related

[Q] Auto airplane mode with Nougat (AutoTools or similar)?

Hi,
I noticed it's possible to grant special permissions using ADB to unlock AutoTools Secure Settings (see here).
I saw a demonstration of auto GPS on/off without root and without the "automatic click path" (as we see in Greenify and AutoInput actions), is it possible to have the same behaviour for airplane mode? A simple toast notification instead of the complex path, which needs screen on and unlocked phone.
I hope I've explained well what I want to say.
Look at http://forum.xda-developers.com/showpost.php?p=68495077&postcount=3 No Secure Settings, AutoTools etc.
For me - it works (on Nougat SlimRom 7 on HTC One 7).
It seems it needs root.
DeX1009 said:
It seems it needs root.
Click to expand...
Click to collapse
Of course... It can't be done without a root.
Unlocking AutoTools Secure Settings through ADB allows users to turn on/off GPS, and GPS can't be switched without root...

Mobile Data, GPS toggle [ROOT] no plug-ins

Hey there,
so after recent problems with toggle data plugin/magisk for switching mobile data i decided to get toggles for mobile data and gps without other tools than tasker.
After some readings here and on stackoverflow i managed to get solutions for both without 3rd party apps.
So here it goes:
Mobile data toggle
Type - > RUN SHELL (use root)
Command:
Code:
setenforce permissive;
svc data enable; (or disable for off)
setenforce enforcing;
GPS location provider toggle
Type - > RUN SHELL (use root)
Command:
(for high accuracy)
Code:
settings put secure location_providers_allowed +gps;
settings put secure location_providers_allowed +network;
(for batery saving from high accuracy)
Code:
settings put secure location_providers_allowed -gps;
(for completly off from high accuracy)
Code:
settings put secure location_providers_allowed -gps;
settings put secure location_providers_allowed -network;
the toggle of mobile data will probably work with other solution for 2g toggle posted around here.
Solution tested on HTC10 with Nougat 7.0.
Hope it helps.
Plomiwn said:
Hey there,
so after recent problems with toggle data plugin/magisk for switching mobile data i decided to get toggles for mobile data and gps without other tools than tasker.
After some readings here and on stackoverflow i managed to get solutions for both without 3rd party apps.
<text removed from quote>
Click to expand...
Click to collapse
You tested this in Android 7.0,in 2017. I can confirm this still works in 9.0, on my OP6 running OOS :good:
Nothing beats shell commands - so damn effective, love them :highfive:
Kind Regards
TwinAdk
Here is the XML file for toggling GPS :highfive:
Run the task when needed, it take the current GPS status into consideration. The XML should be imported into Tasker.
Errors are logged to the clipboard (respecting existing content), and a flashing message will provide you with the result of the shell commands.
Full location is enabled (triangulation via GPS, wifi networks and cell towers).
This draws the most power but gives you the best location fix.
The Autolocation app is recommended for GPS tricks, and Autolocation for location-aware tasker tricks. None of these two apps can flip the GPS switch though... Previously I used the Secure settings app (AWESOME app) - but sadly it crashes constantly on later android versions (8 and 9 in my experience) - and all alternatives costs money.
Now we can flip that GPS switch ourselves. Why didn't I look into this earlier :silly:
God I love Android! :victory:
Kind Regards
TwinAdk
This is awesome.
I've been searching for a solution for Android Pie and this works perfect for me.
Plomiwn said:
Hey there,
so after recent problems with toggle data plugin/magisk for switching mobile data i decided to get toggles for mobile data and gps without other tools than tasker.
After some readings here and on stackoverflow i managed to get solutions for both without 3rd party apps.
So here it goes:
Mobile data toggle
Type - > RUN SHELL (use root)
Command:
Code:
setenforce permissive;
svc data enable; (or disable for off)
setenforce enforcing;
When I made a task in Tasker with this code when task is run my phone are restart and the task is disappear. It is normal?
Click to expand...
Click to collapse
gonzolex said:
Plomiwn said:
Hey there,
so after recent problems with toggle data plugin/magisk for switching mobile data i decided to get toggles for mobile data and gps without other tools than tasker.
After some readings here and on stackoverflow i managed to get solutions for both without 3rd party apps.
So here it goes:
Mobile data toggle
Type - > RUN SHELL (use root)
Command:
Code:
setenforce permissive;
svc data enable; (or disable for off)
setenforce enforcing;
When I made a task in Tasker with this code when task is run my phone are restart and the task is disappear. It is normal?
Click to expand...
Click to collapse
You don't need root to do that.
Just give permission to task via adb:
adb shell pm grant net.dinglisch.android.taskerm android.permission.WRITE_SECURE_SETTINGS
and you can active/deactivate secure settings by native action of tasker.
Click to expand...
Click to collapse

Manually Power Toggles NFC toggle and Magisk

Samsung Galaxy S6: Wanted to update from Marshmellow (rooted with SU) to Nougat.
Unrooted, updated to Nougat and rooted with SU 2.78 and used Titanium Backup to re-install some stuff and mainly data back into Nougat.
Everything worked good but while reading a bit more i found that there was a newer version of SU then the one i had used (2.82 instead of 2.78).
So i uninstalled SU 2.78 and installed 2.82 instead.
Then i noticed that some stuff didn't work anymore, one thing was toggling NFC on or off through Tasker, it always came with an error that there was no root for System+ in Secure Settings.
But whatever i tried, i could not get System+ detecting root in Secure Settings, also not when trying a few fixes i found on the internet (ex: https://dammit.nl/20160406-how-to-f...oid-devices-with-supersu-systemless-root.html).
Went back to SU 2.78 but that didn't work our anymore either.
While gathering information (i don't follow the progress on rooting etc... because lack of time) i stumbled on Magisk for doing the root.
Unrooted SU and re-rooted with Magisk 14.2
Then System+ in Secure Setting could be enabled again and i could toggle NFC through Tasker again without issues.
But, tapping on the Power Toggles NFC symbol still brings me to the Nougat settings page to set NFC from there (and then the Power Toggle NFC status isn't updated) instead of toggling NFC direct like it used to do before with SU 2.78 (on Marshmellow and the first install of Nougat with SU 2.78).
Looking for a solution for this i found this on the Power Toggles website (http://powertoggles.com/help/?e=17).
It says that you always are directed to the phone's settings to set either GPS or NFC and only works directly if you have root.
Well, it works fine for GPS but for NFC. Power Toggles see's root for the GPS function but not for the NFC one... weird.
Removing Magisk and re-installing it doesn't help, nor does going back to whatever version of SuperUser so i'm still looking for a solution to toggle NFC directly from Power Toggles.
My Tasker Root Support module have been reported to make Secure Settings recognise root. You could give that a try...
Thx, i'll give it try but this then means i have to go back to SuperUser for root instead of Magisk?
The actual problem is that Secure Setting does detect root now when rooted with Magisk but that Power Toggles only partly thinks is not (works fine GPS toggle, not for NFC).
I guess the problem lies more on the Power Toggles part (but then that's a wild guess) which only seems to see half of a root so to say... LOL.
Toggling NFC with Power Toggles works fine for me. With Magisk.
And no... You'll have to stay on MagiskSU to use Magisk modules. SuperSU isn't compatible with Magisk.
Installed the module in Magisk (double checked if it's activated), unfortunaly no joy...
Confession: Far far away in my brain there is a small spark that says that's is't some sort of setting somewhere and that i had the same problem once in the past (long ago) but since my brain is getting rather old and that spark would refuce to become firework...yet.
I did make a small Tasker task to update the Power Toggles bar on changing NFC status. So i can already check on the PT bar in what status NFC is in even if i changed it through regular settings.
Found also this:
Note: starting with android 4.2, system access is no longer required for any functionality. Root should be enough.
If your device is rooted you could install the Power Toggles app as a system app. You can use apps like Titanium backup or /sys/app mover or any similar app for this purpose.
Installing the app as system app, enables protected functionalities like one-click GPS/NFC toggle or Airplane mode toggle.
Wondering if it could help i tried to installing Power Toggles as system app. However, this didn't work. First i used /sys/app mover but this came also up with error: could no remount/system.
Then i tried Titanium Backup but this kept on going in a loop. After stopping TB after +/- half an hour and a reboot the Power Toggles shortcut was gone but that was it. Retried a second a time and this time TB worked itself through the process quickly but Power Toggles wasn't moved and was not a system app. To be continued...
Noticed a second little glitch with Nougat for the Power Toggles, just a NFC now opens de setting instead of toggling, the same happens with the brightness slider toggle (didn't tried that before).
On Marshmellow this opened only the brightness slider, on Nougat is does the same as with the NFC, it opens the settings and goes to the brightness slider there.
After fiddling around with a bit i thought of reversing the firmware back to Marshmellow to try but this came with an error and de Galaxy S6 locked up. Tried a second time, same issue although the firmware should be valid and the checksum is OK (got it from SamMobile).
Re-installed Nougat (a 1st update now), but the Power Toggles still open settings for NFC and Brightness Slider.
Workaround for the Brightness Slider is using a widget to open a 3th party brightness slider. This works noce but the Power Toggles bar is not as nice (even icons) as before.
Are you sure that Power Toggles have been granted root access? Check the superuser section of the Manager...
Yes it has, just double checked on the SU settings in Magisk.
If it doesn't, tapping the GPS/Location or Mobile Data symbol on the Power Toggles bar also opens up the settings pages like with NFC and the brigthness slider.
And whan it has been granted root access, it doens't do that for GPS/Location or the Mobile Data toggle but still for the NFC and brightness slider. That's the big issue. Whay does it work only partially? It would be easier to solve it was the same for every toggle for which it needs root access.
Like I said previously, there are no such issues on my side with Power Toggles...
Toggling NFC and bringing up the brightness slider works without a hitch.
There must be something about your setup.
Didgeridoohan said:
There must be something about your setup.
Click to expand...
Click to collapse
That's what i'm still thinking too but can't pinpoint it (for now).
I'll keep on diggin'...
Managed to make the Power Toggles app a system (with Titanium Backup) but... no joy.
Unrooting makes every toggle that has no direct action go through the settings page as it is intended to do, rooting again still leaves the NFC and brightness slider in an unrooted action state.

[GUIDE] How to turn on your phone without using your hands [S8/S8+][Other devices]

[UPDATED]
Hello guys,
A little introduction:
I'm an XDA user for quite a while now, but never started an own thread. As I like playing with mods like Xposed, magisk or, in this case Tasker, I'd like to share my profile with those who find it handy too. Also I think there're way more advanced tasker guides and tricks and this is rather easy, but I'd love to share it anyways with you
What does this profile do?
It's pretty simple and basic. This profile lets you magically wake your phone with holding your hand (for example) close to the approximity sensor, but also (only on S8/S8+) trigger the Iris scanner, which would usually need to be tapped on, since Samsung doesn't allow 3rd-party apps to wake the phone! But we'll get this anyways But here's a video. You will see what I mean:
Click here for YT video (XDA embedding doesn't seem to work here)
Requirements:
Magisk (root) (*note: If you have rooted your phone with another method Secure Settings won't work, due to lack of development)
Secure Settings (*note: If you know another tasker plug-in, which can wake the device feel free to take that)
Tasker of course
Within Tasker you need to set proximity sensor (Under UI) to "yes". This ensures, that the sensor won't be killed from doze or anything else
And of course you need a working Secure Settings App. Make sure System+ module is active and granted root (Works very well with Magisk). Because it's enabled by default, it might be necessary to disable and re-enable it
If you meet all the requirements: Let's start
So step 1 : Create a new profile in Tasker with 3 status:
Sensor -> Proximity sensor
Display [Turned off]
Variable -> Variable value = %ONLYONCE to Undone (This is important, so the screen will be woken up only once after you turned off your device and not every time you put your hands to the sensor)
Name the executed task "Wake device" for example and let it run: (Go on in step 2)
Step 2: The executing task of the profile you just created should run this:
Task -> Wait = 350ms (adjustable to your needs)
Plug-In -> Secure Settings -> Configuration -> Wake device = Screen dim 15 seconds (adjustable)
Variable -> Set variable -> %ONLYONCE to Done
Code -> Run shell -> Command = "input tap 840 190" (No quotation marks) [Use root = yes] (*note: this creates a tap input, as if you were tapping on that specific spot, and triggers the Iris scanner. Also make sure that tasker has root privileges)
Step 3: Create a 2nd profile with the event Display -> Device unlocked
The executed task to this profile should be:
Task -> Wait = 3 seconds
Variable -> Set Variable -> %ONLYONCE to Undone
And that's about it Any time you wave your hand over the proximity sensor now or let's say pull it out of your pocket the screen goes on, the Iris scanner is triggered and your phone unlocks
Please hit the thanks button if you could find any benefit of this Guide and the profile and please feel free to leave some feedback You can also import the profile to your tasker. I attached it at the bottom
*Note: All iris scanner related tasks and profiles can be adjusted to devices without Iris scanners, but this profile isn't that handy on other devices apparently

S-pen auto switch IME

I'm not real keen on rooting my Note8 just yet but the only way I know how to change the IME with the Spen is with tasker, Secure settings and root access. Is there a way to get around needing root access to set the IME with secure settings? Orban alternative method? Thanks
So I finally figured out how to do this. It requires AutoTools (you also need to give it permission to write secure settings via adb). I'm sure you can configure this in Tasker but since I use Macrodroid, that's what I used.
Configure it to trigger based on an intent, com.samsung.pen.INSERT to be exact. Now in Macrodroid I set this up as 2 macros. For the removal I had it trigger on that intent with the extra of penInsert and a value of false. That means the pen was removed, the the reverse for when it was inserted.
It's the same intent, com.samsung.pen.INSERT and extra of penInsert but with a value of true. Then for each macro I used the AutoTools Secure Settings option then under services it lists input method.
You can then select an input method for each macro, one for when the pen is removed (like Google handwriting) and then when it's reinserted have it swap back to a normal keyboard.

Categories

Resources