Up until I got my Pixel XL, I have always used Secure Settings to change my GPS, NFC, and other settings that I need and want to be able to adjust on an automatic basis.
Now however, Secure Settings doesn't even detect that I have root. Based upon some reading, the reason for this is 2 fold. First, Secure Settings hasn't been updated in a long time. Second, because of the first fact, that means that Secure Settings cannot detect systemless root.
Is there a way to make Secure Settings work, while retaining all the functionality I want?
Or alternatively, is there a way to turn NFC on & off within tasker, without using the Secure Settings plugin? Thanks!
It looks like autotools by joaomgcd has taken over for the secure settings app. Most of the features and more are in there. I'm not sure about NFC but the dev has an area for requests.
Sent from my Pixel XL using Tapatalk
Check this out.
https://www.reddit.com/r/tasker/comments/4zsi0e/project_share_toggle_settings_eg_location_mobile/
I just managed to get tasker to toggle gps between device only and battery saver. The examples listed don't include nfc but it might be possible as well.
Related
One of the things that I wanted to use Tasker for was enable the pattern lock when I was away from home and then disable it at home. Unfortunately due to recent changes in the Android SDK that is no longer possible with Tasker directly.
With a bit of searching I discovered the Secure Settings plugin which can be installed to /system/app and thereby provide Tasker with the functionality. However, it seems that Secure Settings does not work on the Galaxy S2 because Samsung have their own pattern lock and method of controlling it.
I started doing a bit of digging (mainly using logcat to see what the system was doing when the pattern lock was enabled/disabled via the Location and security settings menu). I discovered that the Samsung lock system is controlled by some files in /efs and with a bit of experimentation I was able to enable/disable the pattern lock via a root shell. I contacted the author of Secure Settings who suggested I use the Locale Execute plugin to run shell commands via Tasker.
So I present here the commands I am now using on my phone and hopefully they will be of some use to others. The commands include a check that should ensure that it does not attempt to enable the pattern lock when no pattern has been set, but this has not been fully tested!
WARNING: These commands require root access and you use them at your own risk!
Make sure to install the Locale Execute plugin first and then to enable the pattern lock with a task simply add a new "Plugin/Execute" action and set the contents to:
Code:
@! if [ "`cat /efs/cryptprop_lockscreen.patterneverchosen`" = "true" ]; then echo -n true > /efs/cryptprop_lock_pattern_autolock; fi
To disable the pattern lock create an Execute action with the following contents:
Code:
@! if [ "`cat /efs/cryptprop_lockscreen.patterneverchosen`" = "true" ]; then echo -n false > /efs/cryptprop_lock_pattern_autolock; fi
These have been tested on rooted stock KE7 firmware.
Enjoy,
Dan
Sorry for sounding stupid (I probably will)
But could you make a tasker-noob-proof-tutorial?
I couldn't find where to change, if it should be active inside or outside the given area (home or not home)..
Thanks in advance
mljjlm said:
Sorry for sounding stupid (I probably will)
But could you make a tasker-noob-proof-tutorial?
I couldn't find where to change, if it should be active inside or outside the given area (home or not home)..
Thanks in advance
Click to expand...
Click to collapse
He described the command action so you can apply your own rule... Google for tasker and you'll find a lot of howto
Sent from my Galaxy SII
If you find this post usefull please press the "Thanks" button
Great!
Is there a way to toggle 2G/3G and GPS via tasker on the galaxy s2?
great thread, thank you!
could you please export your tasker profile and upload it somewhere? i'm a tasker noob
@mljjlm
I'm sorry but this is not a tutorial for Tasker, it simply provides the information necessary to configure your own profiles for toggling the pattern lock. Although the information at the end of this post may prove useful.
@bgx
No idea I'm afraid, I've not had a chance to look into those although I'm pretty sure it's not possible to switch 2G/3G or GPS in the same way that the pattern lock is toggled here.
@js931
My profile is based on location (using the "Cell Near" state) and so will not be much use for anyone else. However I basically configured the following:
Create profile called "Home".
Add a "Cell Near" state and configure for my local towers.
Add a task called "Home" and include the "Execute" action described above for disabling the pattern lock (I also turn off mobile data and turn on wifi here).
Add an exit task called "Away" which includes the "Execute" action to enable the pattern lock (I also turn on mobile data here).
In your code for disabling the pattern, should the code read 'patternneverchosen' rather than 'patterneverchosen' as you have written? I haven't tested, but the spelling seemed odd.
If it's correct, ignore me
Major_Sarcasm said:
In your code for disabling the pattern, should the code read 'patternneverchosen' rather than 'patterneverchosen' as you have written? I haven't tested, but the spelling seemed odd.
If it's correct, ignore me
Click to expand...
Click to collapse
It is actually correct (I double checked the first time I tested it out since it was an ambiguous name), it is supposed to be:
pattern-ever-chosen
which is why I check for it being true in my command since we want a pattern to have been set.
Edit:
It has actually been properly tested today, I was away from home and the pattern lock was enabled, when I got back home the pattern lock was disabled.
One thing to be aware of, when setting up the Tasker profile, is that each "Execute" command requires its own root permission, so you have to make sure that these have been allowed before it will work quietly in the background (you should be able to trigger them by testing the task).
It works . Thanks !!!
It works great, however when the Lock Pattern is disabled, I still get the "slide to unlock" type of screen when waking the phone up. Any command for that?
I am running the stock SGS2 ROM (rooted obviously)
Thanks !
I am new to tasker and would like some help/advice
I want to save power a bit so want my gps to only turn on in certain cell tower locations (in order to aid more specific tasks when in those cell locations). my issue is not setting this up, it is in the fact that taskers default gps toggle settings do not work on the sgs2. Can anyone help with this, rather than me having to keep it checking gps all the time (which I have currently delayed to 10 minute checking slots).
Edit: Also not sure if it is me just being dumb, but I cannot see that plugin on that link in the OP..?
Excellent work, do you know if this will work with the original Galaxy S as well?
@julien.me
The slide to unlock keyguard is handled differently to the pattern lock, but you should be able to enable/disable it using Tasker without any hacking. I use Tasker to disable the keyguard when it is plugged in.
@Lennyuk
I mentioned in an earlier post that I have no idea how the 3G or GPS is enabled disabled, but I am fairly sure it cannot be achieved using a method like this.
@m.shafik
The original Galaxy S handles the pattern lock differently so this solution will not work, but the Secure Settings plugin may be of use.
Regards,
Dan
m.shafik said:
Excellent work, do you know if this will work with the original Galaxy S as well?
Click to expand...
Click to collapse
I used Tasker to do the same thing on my Galaxy S last night coincidentally - only in a somewhat more simplistic way as I am not as technically strong as most people here.
I have a simple Tasker profile that checks my location and if I am at home it executes an action to turn "Keyguard Off". Keyguard is under "Display" in the Action categories. Setting Keyguard to Off disables both the pattern lock and the slide lock.
My case is actually a little more complex because I want to disable the keyguard in two situations, when I am at home or when I am driving in the car. I did this by creating two profiles, the first of which checks to see if the GS is connected to my home wifi, and the second of which checks whether I am connected to my car Bluetooth. If either case is found to be true the relevant profile sets a variable. When the case become untrue (ie. I leave the house or turn the car off) the profile will clear the variable (via an exit action). I then have a third profile that simply turns off the keyguard when the variable is set.
I appreciate that there are probably cleverer and better ways to achieve the objective but I only installed Tasker last night so I am only just lifting the lid.
Hi terranim, I was using your script several days and it worked like a charm, but now I updated to 2.3.4 and it does not work anymore. Any advice ?
Sent from my GT-I9100 using Tapatalk
@hotsync100
I have not gotten around to updating my phone to 2.3.4 yet. As soon as I have I will try to figure out what is going on with my pattern lock hack.
Regards,
Dan
I'm now running Lite'ning v2.2 and the tasker fix still seems to work.
Which ROM for 2.3.4 have you upgraded to?
Dan
terranim said:
I'm now running Lite'ning v2.2 and the tasker fix still seems to work.
Which ROM for 2.3.4 have you upgraded to?
Dan
Click to expand...
Click to collapse
Stock kg1
Sent from my GT-P1000N using Tapatalk
Tried again and worked. I do not know what did I changed, may be the kernel . Thanks anyway .
Sent from my GT-I9100 using Tapatalk
I can't get it to work well on my SGS2 2.3.3 stock unrooted. I enabled admin and set Tasker to disable the keylock in a profile (when I'm at home and the wifi ssid is visible). The profile activates but I always get the lock.
And I mean the stock lock screen with the pin (not the pattern one which I read that requires rooting and the method explained in this thread)
Missing something?
Does any one know how to make an app that can auto on/off connectivity functions?
For 3g,Bluetooth, airplane battery saver??
That would have been perfect. I don't like to have to go into an app to do that, it should have been possible to do it just from a tile.
i don't think the api's necessary are available to developers for that, but i agree it would be a killer app to have.
have it timed auto/on/off
At least for unjailbroken devices I can assure you that this can't be done with the current APIs. Otherwise Apps like Connectivity Shortcuts and Network Dashboard would use this instead of linking to the settings pages.
It might be possible with a jailbreak but as of today i have no App that managed to change those settings programmatically.
What would be killer is to have the phone toggle "ON" wifi when you are at home based on your GPS location. And automatically turn it "OFF" when you were no longer within range.
Its really frustrating as this should be simple for MSFT to implement and this functionality works really well on Android.
I love it that my phone turns the bluetooth on for me to drive to work and BT off and the Wifi on when I get home.....
Hi,
Some specific questions about the GNex:
1. WiFi Tethering: I use WiFi tethering regularly for sharing internet. And I change passwords frequently. Is there a way to know how many users are connected to my device tether? I noticed this features in some non Samsung devices. Is there any app or mod for this?
2. Update status: Does the System update service (Settings -> About Phone -> System Updates) affect the battery in any way? Is there a way to disable this?
3. Security Lock + Notifications: Using slide lock, we can pull down the notification drawer and enter apps. However this is restricted when we have security locks (Pattern, Pin etc) i realize this is for security reasons, but is there any way to have the security lock and atleast pull down the notifications but not enter any app. Any locker app that supports this feature?
Regards,
Neeraj
Paranoid GNex
Regarding number two, the drain is minimal, almost negligible in most cases, it's a push based notification, so unless the server push out information, you won't be bothered by it. And yes you can disable it by turning off sync, you won't gain any significant increase in battery life though.
reysonance said:
Regarding number two, the drain is minimal, almost negligible in most cases, it's a push based notification, so unless the server push out information, you won't be bothered by it. And yes you can disable it by turning off sync, you won't gain any significant increase in battery life though.
Click to expand...
Click to collapse
Thank you very much for the info. Didn't know the update service was linked with Sync.
anyone with solution for Wifi and Lockscreen issues?
I've been using Tasker for years and the Secure Settings app is an awesome addition to it. That being said recent changes to Android have hampered some of the options these great apps provide for us end users. One that bothered me the most is that if you use one of these apps to turn off the keyguard, any notification click (which may or may not include otherwise entering apps that have an active notification since that would clear the notification) would turn the keyguard right back on.
This is annoying and I googled some workarounds that didn't really work for me. I went digging and found a few links about getevent and sendevent for simulating input code that Android recieves when you do something. I realized that removing the S-pen always triggers the display to be unlocked (I'm not sure about pin or pattern because I don't use those). So anytime you want the effect of the keyguard being off, just setup the code for the S-pen being removed anytime the display turns on in addition to whatever variables you have setup.
In my case I wanted the keyguard to be off when I am home and connected to my WiFi. I created a profile with the context being connected to my specific SSID and made the task a variable set %HOME to 1. I made another profile With the context being variable set %HOME matches 1 and a display on event. For the task I went to plugins > secure settings > edit > run command enter the command
sendevent /dev/input/event12 5 14 1
sendevent /dev/input/event12 0 0 0sendevent /dev/input/event12 5 14 0
sendevent /dev/input/event12 0 0 0
I'm not sure if root is necessary, but I checked the Root checkbox. Give your command a name, save the profile and you should be good to go. Any questions about this or anything else about Tasker I would be happy to try to assist. Hope you guys enjoy.
will this work for the galaxy S3? it didn't have the S-Pen
klau1 said:
will this work for the galaxy S3? it didn't have the S-Pen
Click to expand...
Click to collapse
I'm not sure about that. I do know that sometimes different models in the same company may share code and since Tasker's Dpad up and down work for phones that don't have keyboards it's worth trying. I don't see any harm in trying it out, but since the S3 doesn't have the sensor I can't guarantee that it will work.
jadoe05 said:
I've been using Tasker for years and the Secure Settings app is an awesome addition to it. That being said recent changes to Android have hampered some of the options these great apps provide for us end users. One that bothered me the most is that if you use one of these apps to turn off the keyguard, any notification click (which may or may not include otherwise entering apps that have an active notification since that would clear the notification) would turn the keyguard right back on.
This is annoying and I googled some workarounds that didn't really work for me. I went digging and found a few links about getevent and sendevent for simulating input code that Android recieves when you do something. I realized that removing the S-pen always triggers the display to be unlocked (I'm not sure about pin or pattern because I don't use those). So anytime you want the effect of the keyguard being off, just setup the code for the S-pen being removed anytime the display turns on in addition to whatever variables you have setup.
In my case I wanted the keyguard to be off when I am home and connected to my WiFi. I created a profile with the context being connected to my specific SSID and made the task a variable set %HOME to 1. I made another profile With the context being variable set %HOME matches 1 and a display on event. For the task I went to plugins > secure settings > edit > run command enter the command
sendevent /dev/input/event12 5 14 1
sendevent /dev/input/event12 0 0 0sendevent /dev/input/event12 5 14 0
sendevent /dev/input/event12 0 0 0
I'm not sure if root is necessary, but I checked the Root checkbox. Give your command a name, save the profile and you should be good to go. Any questions about this or anything else about Tasker I would be happy to try to assist. Hope you guys enjoy.
Click to expand...
Click to collapse
Can you explain the command a little more? I copy / pasted, removed formatting code...and get 2 responses when running. Are there two commands there, one for S-pen in and one for out? Pretend you're explaining it to a special needs 3rd grader.
Tasker is a newer app for me, and still don't understand the variables, scenes, etc.
Thanks for any help you're willing to provide, and sharing your idea.
-- Note II, TapaTalk II--
JVogler said:
Can you explain the command a little more? I copy / pasted, removed formatting code...and get 2 responses when running. Are there two commands there, one for S-pen in and one for out? Pretend you're explaining it to a special needs 3rd grader.
Tasker is a newer app for me, and still don't understand the variables, scenes, etc.
Thanks for any help you're willing to provide, and sharing your idea.
-- Note II, TapaTalk II--
Click to expand...
Click to collapse
Yes there are two commands. Two lines to a command. The 0 0 0 parts are required kind of like telling the system that the command is complete (as best as I can explain it right now). The first two lines simulate s-pen removed. This is what we really need as it will automatically unlock the screen. I have not tested to see if the second command is necessary, but with my experience in programming I always follow the rule of thumb to set everything back to normal. The easiest way in my opinion is to use the Secure Settings app in addition to Tasker rather than just Tasker.
What other questions did you have about Tasker? Maybe I could help out.
jadoe05 said:
Yes there are two commands. Two lines to a command. The 0 0 0 parts are required kind of like telling the system that the command is complete (as best as I can explain it right now). The first two lines simulate s-pen removed. This is what we really need as it will automatically unlock the screen. I have not tested to see if the second command is necessary, but with my experience in programming I always follow the rule of thumb to set everything back to normal. The easiest way in my opinion is to use the Secure Settings app in addition to Tasker rather than just Tasker.
What other questions did you have about Tasker? Maybe I could help out.
Click to expand...
Click to collapse
TapaTalk didn't notify me of any updates in this thread...just happened to be browsing through. I never did get it working though. I'll have to go have a look at my Tasker profiles to see what part I got stuck at.
-- Note II, TapaTalk II--
JVogler said:
TapaTalk didn't notify me of any updates in this thread...just happened to be browsing through. I never did get it working though. I'll have to go have a look at my Tasker profiles to see what part I got stuck at.
-- Note II, TapaTalk II--
Click to expand...
Click to collapse
How are you trying to set it up?
Off topic, but I'm still confused on exactly what secure settings actually does on top on tasker?
Sent from my SPH-L900 using xda premium
Subiegsr said:
Off topic, but I'm still confused on exactly what secure settings actually does on top on tasker?
Sent from my SPH-L900 using xda premium
Click to expand...
Click to collapse
Secure settings is basically a plugin that can do things that Tasker either hasn't implemented yet or just can't do
jadoe05 said:
Secure settings is basically a plugin that can do things that Tasker either hasn't implemented yet or just can't do
Click to expand...
Click to collapse
I don't want to hijack your thread, but I was just wondering if you've found a way to detect the removal of the pen from within Tasker? Pent has basically stated that he can't/won't do it here: Google Groups
Back on topic, I've just been using the "PatternLock" enable/disable in Secure Settings to turn on/off the keyguard when I'm home/away. Works most of the time, but I'm using "wifi connected" to determine if I'm at home, and occasionally I lose the wifi connection at home when the phone sleeps, turning the pattern lock back on. Still it works enough to keep me happy.
bkimbel said:
I don't want to hijack your thread, but I was just wondering if you've found a way to detect the removal of the pen from within Tasker? Pent has basically stated that he can't/won't do it here: Google Groups
Back on topic, I've just been using the "PatternLock" enable/disable in Secure Settings to turn on/off the keyguard when I'm home/away. Works most of the time, but I'm using "wifi connected" to determine if I'm at home, and occasionally I lose the wifi connection at home when the phone sleeps, turning the pattern lock back on. Still it works enough to keep me happy.
Click to expand...
Click to collapse
There is an app called s-pen helper that i believe is either on XDA or on the market it is compatible with Tasker you can detect the pen that way.
jadoe05 said:
There is an app called s-pen helper that i believe is either on XDA or on the market it is compatible with Tasker you can detect the pen that way.
Click to expand...
Click to collapse
Excellent! Thank you very much, that's exactly what I was looking for!
Just a heads up. Tasker is on sale now for $1.99 right now. (I think it was originally $6.50)
Sent from my SPH-L900 using xda premium
Hi all,
I'm experimenting with the Smart settings feature to see if it's something I would use. So far it's working fine, but what I find annoying is that they are too much oriented towards home. Is there a way to define Work location for example, where the sound will change to vibrate and the wifi will turn on and so on.. Somewhere in the forum I noticed that there might be alternatives to the Smart Settings app, but I would prefer to use the build-in features (for now atleast )
Based on the lack of responses I guess that there's no way to add additional locations to the smart settings... Do you know of alternatives, that can be used to turn on/off different settings/applications based on location?