Hi everybody,
I have an LG G3 Andoid 6 - rooted.
I want to make a flow for Waze to freeze it/unfreeze it (using Execute root comand: pm enable / disable) but I want to check it's status (if is enabled/unfreezed or disabled/freezed in that moment).
It's a method for that?
Thank you!
How to check enabled/disabled status for apps?
Moderator: Martin
Re: How to check enabled/disabled status for apps?
I'd not bother. If you want it disabled, you want it disabled regardless of current state. Therefore just disable it. Disabling an already disabled package is fine, and doesn't produce an error. Same is true for enabling.
if you really need to know, pm dump <package> can produce that information, through a line containing "enabled=1" or "enabled=2" for enabled and disabled.
if you really need to know, pm dump <package> can produce that information, through a line containing "enabled=1" or "enabled=2" for enabled and disabled.
-
- Posts: 19
- Joined: 20 Jul 2016 09:32
Re: How to check enabled/disabled status for apps?
Like your first replay (edited now), your answers are useless. Incomplete, generic, patronizing.Bushmills wrote:I'd not bother. If you want it disabled, you want it disabled regardless of current state. Therefore just disable it. Disabling an already disabled package is fine, and doesn't produce an error. Same is true for enabling.
if you really need to know, pm dump <package> can produce that information, through a line containing "enabled=1" or "enabled=2" for enabled and disabled.
Please don't bother to write in this topic again.
If there are users with knowledge and common sense I will receive an clear answer from them.
Re: How to check enabled/disabled status for apps?
You might want to reconsider, before giving this kind of comments here from now on. Lets keep things either civilized or out of here.Bushmills wrote:Have you considered consulting a doctor who can help you with your affliction?
How that answer is useless or incomplete? Or what kind of specifics you'd like to have, so the answer wouldn't be generic? That actually is a valid answer, so keep that kind of accusations out of here and use only the report tool instead, if something bothers you.viorel.rusu wrote:Like your first replay (edited now), your answers are useless. Incomplete, generic, patronizing
Are we settled?
Re: How to check enabled/disabled status for apps?
I can't lock this topic, because the case can still be considered open and making a new topic won't serve any further purpose, but I will keep deleting any off-topic comments from here.
Re: How to check enabled/disabled status for apps?
Hi,
You could use action Init Variable Package Info (options all unchecked) to get some basic information about the app. The structure application_info contains a flag "enabled" that should be true/false depending on the state of the app.
A flow could look like this:
-...
-action Init Variable Package Info: your.app
-condition Expression: package_info["your.app"]["application_info"]["enabled"]
--> true: -actions ...
--> false: -actions ...
If you're interested to see the output stored in the variable package_info, I recommend following procedure:
-action Init Variable Package Info: your.app
-action Script: text = toJSON(package_info);
-condition Debug Dialog
Click the line with the variable text in the debug dialog and use Show value in text editor to see the JSON representation of the result.
Maybe I'll include an option like Show as JSON in the debug dialog in a future version, since this would simplify debugging such stuff quite a lot.
Regards,
Martin
You could use action Init Variable Package Info (options all unchecked) to get some basic information about the app. The structure application_info contains a flag "enabled" that should be true/false depending on the state of the app.
A flow could look like this:
-...
-action Init Variable Package Info: your.app
-condition Expression: package_info["your.app"]["application_info"]["enabled"]
--> true: -actions ...
--> false: -actions ...
If you're interested to see the output stored in the variable package_info, I recommend following procedure:
-action Init Variable Package Info: your.app
-action Script: text = toJSON(package_info);
-condition Debug Dialog
Click the line with the variable text in the debug dialog and use Show value in text editor to see the JSON representation of the result.
Maybe I'll include an option like Show as JSON in the debug dialog in a future version, since this would simplify debugging such stuff quite a lot.
Regards,
Martin
-
- Posts: 19
- Joined: 20 Jul 2016 09:32
Re: How to check enabled/disabled status for apps?
Thank you, Martin!Martin wrote:Hi,
You could use action Init Variable Package Info (options all unchecked) to get some basic information about the app. The structure application_info contains a flag "enabled" that should be true/false depending on the state of the app.
A flow could look like this:
-...
-action Init Variable Package Info: your.app
-condition Expression: package_info["your.app"]["application_info"]["enabled"]
--> true: -actions ...
--> false: -actions ...
If you're interested to see the output stored in the variable package_info, I recommend following procedure:
-action Init Variable Package Info: your.app
-action Script: text = toJSON(package_info);
-condition Debug Dialog
Click the line with the variable text in the debug dialog and use Show value in text editor to see the JSON representation of the result.
Maybe I'll include an option like Show as JSON in the debug dialog in a future version, since this would simplify debugging such stuff quite a lot.
Regards,
Martin