[GUIDE][Difficulty: Beginner]Switch phone on/off using a flipcase

Search This thread

kats17

Senior Member
Aug 1, 2008
150
28
Yeah this would be awesome! I'm really interested in why it isn't working, too :)
Use the Terminal emulator


well since secure settings has not been updated, you should run the following commands to get it to work:
adb shell
su
mount -o remount,rw /system
touch /sbin/su /system/bin/su /system/xbin/su
mount -o remount,ro /system
exit
reboot
[CREDIT goes to Ingenium13]
 
  • Like
Reactions: bichitrax

Top Liked Posts

  • There are no posts matching your filters.
  • 2
    Hello guys,

    I was totally stunned, when I saw that there's a member lead tasker forum. I love tasker and couldn't imagine a phone without it.
    As I want to spread my thoughts here are several profiles coming for you :)


    Requirements

    1. Secure Setting


    What does the script do?

    Simple. It turns on your phone, when you open your flip case (or e.g. take it out of your pocket) and turns it off, when you're on the lockscreen and approximity sensor is cover (e.g. put it back in your pocket and/or close your flip cover).

    Let's get started

    Profile 1

    Code:
    [B] 1. State -> Approximity Sensor[/B] [I]check reverse
    [/I] 2.[B] Enter task and name it[/B] [I]"turn display on"[/I] for example. Add the action[B] Plug-In --> Secure Settings --> Configuration --> Wake Device[/B].[I](Choose Wake Type Screen Bright; Duration 5 seconds)[/I]

    Now exit the task section and add to the contexts of this profile:

    - State --> Display State Off
    - App --> Dialer App [your phone's dialer app]; Check reverse

    Done


    Profile 2

    Set up a new profile

    Code:
    [B]State --> Approximity Sensor[/B]
    Enter a task and name it for example [I]"display off"[/I], go to plug-ins --> Secure Settings --> Lock device [I]You have to enable device adming and grant Secure setting Device admin privileges[/I]
    Exit the task and add to the contexts of this profile
    
    [B]- State --> Variable value[/B]: Conditions %DISPLAYOFF ~ 1
    -[B] App --> Dialer App[/B]; [I]Check reverse[/I]

    Done


    Profile 3


    Code:
    [B]Event --> Display --> Display on[/B]
    Add the task [B]Variables --> Set Variables[/B]: [I]Name %DISPLAYOFF to 1[/I]

    Done


    Last Profile

    Code:
    [B]Event --> Display --> Display Unlocked[/B]
    Add the task and name it "display unlocked" for example: [B]Variables --> Set variable;[/B] [I]%DISPLAYOFF to 0[/I]

    Done!

    Please don't forget to enable the proximity sensor under settings-->Display-->Proximity Sensor-->Yes, so the display can be turned on, when proximity sensor is triggered :)

    So that's it. Very simple but saves you a lot of time.

    Please feel free to post some imrpovement suggestions, thoughts or anything else that comes up your mind. I'd really be happy about it-

    Love follow
    1
    What's the reason of using phone app in this profile? Also it'll be better if you post screenshot as our tasker version looks to be different.

    I cannot find Plug-In --> Secure Settings on my Samsung S7, stock rom
    Install it from the Play Store.

    Sent from my "i9300/1+2" powered by Carbon/Temasek
    Fueled by 7000mAh ZeroLemon Battery
    1
    @svenvaeth
    First you shouldn't quote the whole op, it looks uglu. Second you already asked the same question just five hours ago, don't repeat your questions at least for 24 hours, that's the forum's ethics. Now wait patiently till someone answer you.

    Sent from my "i9300/1+2" powered by Carbon/Temasek
    Fueled by 7000mAh ZeroLemon Battery
    1
    I already did that several times. I even bought SuperSU.
    I also contacted the dev, so let's see what the response will be.
    I am gonna post the solution here, in case there is one

    Yeah this would be awesome! I'm really interested in why it isn't working, too :)
    1
    Yeah this would be awesome! I'm really interested in why it isn't working, too :)
    Use the Terminal emulator


    well since secure settings has not been updated, you should run the following commands to get it to work:
    adb shell
    su
    mount -o remount,rw /system
    touch /sbin/su /system/bin/su /system/xbin/su
    mount -o remount,ro /system
    exit
    reboot
    [CREDIT goes to Ingenium13]