I'm using SuperSU Pro 2.65, but this behavior has been around forever across multiple phones, versions of android, and versions of SuperSU. I have a PIN set. If an app requests root and I check "Ask again in 15 minutes", then press grant and type my PIN, the app gets "prompt" permissions instead of Grant+Time. Basically the only way to set Grant+Time is to go into the SuperSu app itself.
Ideally the default would be ask next time, but it would be possible to set Grant+Time from the prompt menu. (Moreover, even more ideal would be to allow the default time to be selected in the settings menu, so that I can chose between a default of Next Time and 5 minutes.)
Related
Dear Tasker-Masters,
My goal:
I want to limit the use of certain apps on my son's phone (running CM12.1) using tasker. Some apps (basically games) are time-limited, others shall not be accessible at all.
What I did (apart from deactivating the guest account):
I've defined a profile "No access" that activates when certain apps start (including play store and settings). This profile starts a task calling for a lock screen asking for a code. Locking settings is especially needed to deactivate the option to developer options and root access, access to other appstores, or the device admin section.
What my son did:
He found out, that the locked app appears in the app history. Clicking the locked app in the history immediatly brings up the lockscreen. However, there's a tiny time frame of maybe 0.1 seconds, where the locked app reacts to strokes on the display. This way, it's possible to scroll down the "setting" app until you get to the "security" and "device admin" section, and then to disable tasker from there. Now, profiles cannot read or react to whatever appears in the foreground of the display.
My question:
1. Can you think about a secure way to lock access to android settings? How would that be?
2. is it possible to deactivate the appearence of (only!) the android settings in the app history?
1. Create a profile -> Application -> Settings. This will trigger when someone goes into the settings app (yes even settings its an app).
In the task itself you can just "Go Home".
The task will trigger even if he goes to the settings from the recent app screen.
2. If your phone is rooted then just kill the settings app from running.
If not use AutoInput to press that "kill all" button (unfortunately).
Make sure also that tasker is a device administrator. You don't want your son to "accidentally" uninstall it.
You can't uninstall device admin apps without turning off that setting and he cant go into settings.
I hope these guidelines will help you.
Hey, I've been tinkering for a few days with Tasker (begginer here) and I finally managed to do what I wanted when I installed it, that is turning WiFi or mobile data on for a few seconds every few minutes when the screen is off. I tested the battery drain with this task and after a full charge on my Huawei P9 lite, I managed to obtain 48 hours of battery life with 10 hours of usage.
Before anything else, this profile only works with Nougat. Marshmallow apparently doesn't allow apps to wake the device when it enters doze, even If I excluded Tasker and all the other apps I needed from doze. Nougat has a softer doze and it works great.
So, before you start, there are several requirements:
1. Tasker
2. Secure Settings plugin (for gps disabling and other stuff) - optionally
3. Taskkill (for killing processes when you turn the display off) - optionally
3. A rooted Nougat running phone
If you don't know how to root Nougat, there are several tutorials out there. Here's a small one for Huawei P9 Lite(mine runs on VNS-L21C432B370):
1. Revolution Recovery
2. Elite Kernel v5.1
3. PHH's Superuser
4. Adb and Fastboot drivers
5. Bootloader unlock code from huawei site (Tutorial)
6. USB drivers for your phone (just install HiSuite)
How to root Huawei P9 Lite Nougat:
- install adb and faastboot drivers
- use one of the methods to reboot to bootloader (i just reboot the phone with usb connected and hold volume down key)
- shift+right click where you have downloaded the recovery image, click "Open command window here" and type: fastboot oem unlock *insert bootloader unlock code here* and press enter
- after you unlocked your bootloader, from the same command window type: fastboot flash recovery revo_recovery.img
- reboot phone to recovery and install EliteKernel, after that wipe cache
- install PHH's Superuser from playstore and give Tasker, Secure Settings and Taskkill root permisions
Now for the Tasker profiles, small description:
Basically there are three profiles, one activates when the display is off, one after you unlock the display, and the third one does the magic. All the links are below.
Display Off profile with the Locked task does several things after you turn off the display:
- Sets variable LCD to 0 (you will se why in a minute)
- Sets Auto-Sync to off
- Turns off GPS (via Secure Settings plugin)
- several Taskkill actions (you can disable those if you want)
Display On profile with the WiFi On task does:
- Sets variable LCD to 1
- Turns on WiFi
- Waits 10 seconds
- If WiFi isn't connected turns of Mobile Data
- Turns on Auto-Sync
On-Off profile with Do task does the following every 2 minutes (change the value if you want or even set the hours between you want it active)
- If LCD~0 then
- Turn on WiFI
- Turn on Auto-Sync
- Waits 10 seconds
- If WiFi isn't connected then
- Turn on mobile data
- Wait 10 seconds
- Turn Wifi, Mobile Data and Auto-Sync off
Now go to Settings->Battery->Close apps after screen lock and allow Tasker, Secure Settings and maybe Superuser to run after you turn the screen off.
After that go to Settings->Apps press on the Settings icon on the bottom, go to Special Access->Ignore battery optimisation, press on the small arrow and select All apps, find Tasker, Secure Settinsg and maybe Superuser and allow them to stay active after doze.
You can customize the profile and add as many tasks as you like or play with the timers but I recommend not to alter the conditions for the profiles because some things won't work. This works 100%. Also, when I was researching, I found out you can monitor network usage and restrict the task from running if you have downloads in progress. I haven't implemented that, feel free to do the research and post the results.
And that's it. After this, enable all profiles and profit. Like I said, my average battery life is 48 hours and as long as nobody sends me important notifications that can't wait 2 minutes until I receive them, it's the best battery save trick I know.
Tasker profiles&tasks
Extract the archive and paste the files wherever. After that long press the Profiles and Tasks tabs in Tasker and import the XML files.
Let me know if it works for you.
Cheers.
Hey man, I'm going to tell you right now, this was a great post. The content was ok, but your style, your step by step instructions WITH reasons... remarkable.
Keep it up and you will be the tasker man, just based on your dedication.
Now if I may tweak your content?
Adding wait actions inside tasks is a battery destroyer and is bad taskering in general. Plus doing checks, waiting, checking etc... just hard to debug, hard to enjoy when you're leaving battery juice you could be saving.
Set a time context DO profile that runs every.... switch to variable . And the variable...name it something like %synccheck
Then on your screen off profile, set %synccheck to %TIMES+360 (the current time in secs, plus 5 min) this only runs on screen off.
Create a SCREEN ON profile, set %synccheck to %TIMES+120 (the current time in secs, plus 2 min) this only runs on screen on. SO 2 MIN IF SCREEN ON. 5 MIN IF SCREEN OFF.
(NOTE: I WOULDN'T put too much effort into checking whether on data or Wi-Fi. Under Wi-Fi settings, just disable "keep wifi on during sleep " and that lets the system handle disabling and reenabling when the screen comes on.
(Build a tasker task that enables Wi-Fi based on location and disables on it when you leave the Wi-Fi area...)
he current time is %synccheck. Since the current time can never be null, it will never run if the variable was cleared
Since in this example, it's set 5 min from now, the timing profile will run. The timing profile is the one that enables auto sync and whatever else you want to at a given time.
So there's no checking at all. If we clear the variable %synccheck then the profile never runs. The profile is only enabling auto sync and disabling on the exit task.
Hey, thanks for the reply. I am aware that my tasker knowledge is limited. I will take your tips into consideration and update my guide.
Cheers!
Ahoi!
Finaly I installed Xposed, but now I'm facing a problem:
When I set my preferred MicrosoftLauncher, it shows only until I press Home or Backbutton from other apps or reboot.
Then again the launcher/homescreen falls back to stock Launcher3.
The dialog, asking for default launcher does not show.
Same Problem, when choosing Launcher from settings, as when starting MicrosoftLauncher by app icon.
The dialog however shows, when I choose the "set-default" option in the MicrosoftLauncher settings – but the setting only persists until reboot.
Any suggestions how to set and keep my launcher settings?
problem persists
kai-dj said:
Ahoi!
Finaly I installed Xposed, but now I'm facing a problem:
When I set my preferred MicrosoftLauncher, it shows only until I press Home or Backbutton from other apps or reboot.
Then again the launcher/homescreen falls back to stock Launcher3.
The dialog, asking for default launcher does not show.
Same Problem, when choosing Launcher from settings, as when starting MicrosoftLauncher by app icon.
The dialog however shows, when I choose the "set-default" option in the MicrosoftLauncher settings – but the setting only persists until reboot.
Any suggestions how to set and keep my launcher settings?
Click to expand...
Click to collapse
Problem is still there – any solution or hint?
I'm almost about to write some kind of script, that manualy switches to MS-Launcher after boot – does any1 know, where default launcher is stored in config-files – maybe it'd be enough to just insert the right value while init at boot…
bump…
I "disabled" bloatwares via ADB or rather "uninstall" it and was using Package disabler before the dev ran away rendering the app unusable.
Recently, I factory-reset my mobile and the bloatwares came back which was expected but I had problem accessing some of the options to customize such as AOD. I wanted to customize my AOD and whenever I hit the AOD's settings in the menu it had a couple of second of freeze time and display "Always on Display has stopped" There are 1 or 2 more apps/settings that do that. Not sure how to fix that anyone?
This little drop-down toggle menu saves a few taps for routine WiFi connection and also adds the utility of the WiFi Settings app without actually having it installed.
The first option (see screenshot below) is a simple toggle that bypasses the stock Quick Settings dialog for WiFi. If WiFi is off, it turns it on. If it's on, it turns it off. No questions asked.
The second option is for those times when you are away from a known WiFi network (Library, Coffee Shop, etc.) and will need to select a network and enter a password. Selecting this option turns on the WiFi radio and takes you directly to the Settings page for WiFi where you can choose a network and sign in. To disconnect you can use the first option.
The best use of this app is to use NookTouch ModManager to assign this app to "clock", which is where the stock WiFi dialog hides. You'll find "clock" at the very end of the list of buttons that can be reassigned with NTTM. If you tap the clock area accidentally, you can dismiss the menu by tapping there again.
Requirements
--As this is a Tasker-generated app (but does not require Tasker to run!) there is a dependency on two library files normally installed with GApps. If you do not have GApps installed on your device, you can still use this app by copying the two attached files into the locations shown below:
/system/etc/permissions/com.google.android.maps.xml
/system/framework/com.google.android.maps.jar
Set permissions for both files to rw-r--r-- and reboot. Without these files resident, the app will not install. If you already have one of my other Tasker-generated apps, you can skip this.
To install:
Download and unzip the file attached below. If you don't need the maps library files, discard them. Otherwise treat as above. Copy the app to your SD card and install or install via ADB from your PC.
Enjoy!