1. Download our Official Android App: Forums for Android!

tasker - detect root access

Discussion in 'Android Apps & Games' started by nyydynasty, Jun 11, 2015.

  1. nyydynasty

    nyydynasty Android Expert
    Thread Starter
    Rank:
    None
    Points:
    103
    Posts:
    956
    Joined:
    Sep 13, 2010

    Sep 13, 2010
    956
    173
    103
    Male
    IT Manager
    NY
    I'm trying to create a task that will periodically detect if the phone has root access. Is there an intent or something else that I can use to do this?
     

    Advertisement

  2. Thom

    Thom  
    VIP Member
    Rank:
    None
    Points:
    1,618
    Posts:
    12,114
    Joined:
    Feb 16, 2011

    Feb 16, 2011
    12,114
    5,021
    1,618
    Male
    Software Developer
    Keene, NH USA
    I'm not root-ed. Apparently Tasker checks for the existence of Superuser.apk to make the determination. There is currently no "if exists" in Tasker so something like the following is apparently needed ...

    tlaRootTest
    A1: Read File [ File:/system/app/Superuser.apk To Var:%work ]
    A2: Flash [ Text:• Root-ed • Long:On ] If [ %work Set ]
    A3: Flash [ Text:• Not Root-ed • Long:On ] If [ %work !Set ]

    (final)

    ... Thom
     
    #2 Thom, Jun 11, 2015
    Last edited: Jun 13, 2015

Share This Page

Loading...