App to Defrost->Run->Freeze other apps?

Search This thread

the_rebel

Senior Member
Dec 14, 2007
279
49
Xiaomi Mi 11 Ultra
OnePlus Open
I have lots of apps that I use maybe once a month, lot of them like to boot with the system or keep running doing god knows what.

I'd like an app that'd (with a single homescreen shortcut) defrost a previously frozen app, run it, and freeze it back after it is exited (or when i turn the screen off). Simple. This'll hopefully make the phone run better and save battery too, and will definitely reduce clutter.

Is there anything like that available? I've tried multiple apps including Titanium Backup but none seem to offer this functionality.

Edit: Oh and I know of apps like Greenify or Deep Sleep Battery Saver, that's not what I'm looking for to keep the above apps in check.

Thanks

Sent from my Nexus 5 using XDA Free mobile app
 
Last edited:

danarama

Senior Member
Aug 22, 2010
31,277
18,811
Oxenhope, West Yorkshire, UK
Titanium just uses the built in packagemanager to freeze apps which can also be run in a terminal emulator.

ygu4agyv.jpg


So yeah with tasker for example you could create a shortcut that unfroze the app and then opened the app (although I haven't tested it) and you could set a task when a particular wasn't on screen it would be disabled. The problem would be if you navigated to another app, it would be killed so you might have to put a delay on the disable part ( say 10 minutes) then a clause that prevents it disabling it disabling if it's on screen. (in case you reopen the app)

Could be pretty tricky

Sent from my Nexus 5 using Tapatalk
 
  • Like
Reactions: the_rebel

the_rebel

Senior Member
Dec 14, 2007
279
49
Xiaomi Mi 11 Ultra
OnePlus Open
In absence of an easier alternative this surely is a great idea. Though a simpler app to create shortcuts for each individual target app would make things infinitely more straightforward, thank you for this suggestion. I'll try it now.

Sent from my Nexus 5 using XDA Free mobile app
 

Ben36

Senior Member
Jun 8, 2012
8,254
2,868
Y not just leave them running?

Sent from my Nexus 5 using Tapatalk
 

the_rebel

Senior Member
Dec 14, 2007
279
49
Xiaomi Mi 11 Ultra
OnePlus Open
Got it working! Though I must say it's a lot of work for setting up a task for each app, but as proof of concept it worked really well.
And instead of app exit I've set it up to close and disable on screen off.

Sent from my Nexus 5 using XDA Free mobile app
 

Attachments

  • 1404457640806.jpg
    1404457640806.jpg
    33.9 KB · Views: 320

the_rebel

Senior Member
Dec 14, 2007
279
49
Xiaomi Mi 11 Ultra
OnePlus Open
You're right again, I can bulk disable apps.

While trying to improve the task above I need a Tasker command that can run an app from a variable. I have the app's package name but apparently that's not enough and I also need a main activity class name that varies with each app... Is there a way to run an app with just it's package name available in a Tasker var?

Sent from my Nexus 5 using XDA Free mobile app
 

rancur3p1c

Senior Member
Jan 2, 2011
584
80
Atlanta
Got it working! Though I must say it's a lot of work for setting up a task for each app, but as proof of concept it worked really well.
And instead of app exit I've set it up to close and disable on screen off.

Sent from my Nexus 5 using XDA Free mobile app

sorry I couldn't help in time, I use app quarantine. Make a widget for app quarantine, then select the app. I use for facebook, instagram, etc. apps that like to datamine in the background when screen is off wasting battery. Tap to defrost, run, then tap again to refrost
 

danarama

Senior Member
Aug 22, 2010
31,277
18,811
Oxenhope, West Yorkshire, UK
You're right again, I can bulk disable apps.

While trying to improve the task above I need a Tasker command that can run an app from a variable. I have the app's package name but apparently that's not enough and I also need a main activity class name that varies with each app... Is there a way to run an app with just it's package name available in a Tasker var?

Sent from my Nexus 5 using XDA Free mobile app

What do you mean exactly? What are you trying to do with Variables?

All I would do is have a task that when lauched:

  1. enables package
  2. launches app


---------- Post added at 02:53 PM ---------- Previous post was at 02:53 PM ----------

sorry I couldn't help in time, I use app quarantine. Make a widget for app quarantine, then select the app. I use for facebook, instagram, etc. apps that like to datamine in the background when screen is off wasting battery. Tap to defrost, run, then tap again to refrost

Thats interesting
 

the_rebel

Senior Member
Dec 14, 2007
279
49
Xiaomi Mi 11 Ultra
OnePlus Open
sorry I couldn't help in time, I use app quarantine. Make a widget for app quarantine, then select the app. I use for facebook, instagram, etc. apps that like to datamine in the background when screen is off wasting battery. Tap to defrost, run, then tap again to refrost
Yeah, I've tried this and similar apps, and Titanium Backup can do the same thing (using labels and filters and creating a widget), but all these options bulk enable/disable apps. This is good for their own use cases, but when you want to launch one frozen app without jumping through hoops then they don't work so well. Like when I have lets say 50 apps frozen, then when I enable all I suddenly have 50 more apps in my app drawer and I can't keep a shortcut to the frozen app in a separate folder on homescreen either because they get deleted once you freeze an app.
The way I wanted was a single click shortcut that would unfreeze the app, launch it and then freeze it back when I'm done or screen turns off.

This way I can keep all such shortcuts in a single folder on my homescreen too, and they won't get deleted as they point to the monitor app.


What do you mean exactly? What are you trying to do with Variables?

All I would do is have a task that when lauched:

  1. enables package
  2. launches app

Yeah, I already achieved it, what I'm trying to do is minimize the effort needed to create such task for each app I want to freeze/unfreeze. So I figured I can just provide the task with the app package name in a variable and it does everything but without me needing to provide each command with app package name separately. Now the app freeze and unfreeze commands work fine with just the package name provided in a variable, but for the command that launches the app I'm facing the problem I mentioned - not sure if I was able to explain it any better this time :)
 

danarama

Senior Member
Aug 22, 2010
31,277
18,811
Oxenhope, West Yorkshire, UK
Yeah, I've tried this and similar apps, and Titanium Backup can do the same thing (using labels and filters and creating a widget), but all these options bulk enable/disable apps. This is good for their own use cases, but when you want to launch one frozen app without jumping through hoops then they don't work so well. Like when I have lets say 50 apps frozen, then when I enable all I suddenly have 50 more apps in my app drawer and I can't keep a shortcut to the frozen app in a separate folder on homescreen either because they get deleted once you freeze an app.
The way I wanted was a single click shortcut that would unfreeze the app, launch it and then freeze it back when I'm done or screen turns off.

This way I can keep all such shortcuts in a single folder on my homescreen too, and they won't get deleted as they point to the monitor app.




Yeah, I already achieved it, what I'm trying to do is minimize the effort needed to create such task for each app I want to freeze/unfreeze. So I figured I can just provide the task with the app package name in a variable and it does everything but without me needing to provide each command with app package name separately. Now the app freeze and unfreeze commands work fine with just the package name provided in a variable, but for the command that launches the app I'm facing the problem I mentioned - not sure if I was able to explain it any better this time :)

No I don't really get it. I dont get how it is minimising effort by using a variable. You still have to parse the package name in each variable.
 

the_rebel

Senior Member
Dec 14, 2007
279
49
Xiaomi Mi 11 Ultra
OnePlus Open
To put it simply it helps the same way variables work in any other programming language: you put the string (package name in this case) in a variable once and all the other commands just reference to the variable instead of putting the app package name in each unfreeze/launch/freeze command.
Now once that is done, I can either
1) make copies of the task for each app and just change the package name in one place and all commands will work just fine, or
2) keep a single task that displays a menu of all the app choices and the one I click will be parsed to the variable and the commands will work on it.

Either way, I wouldn't have to define the package or app at several places in the task/script.
 

Aerowinder

Senior Member
Aug 11, 2012
3,322
1,329
To put it simply it helps the same way variables work in any other programming language: you put the string (package name in this case) in a variable once and all the other commands just reference to the variable instead of putting the app package name in each unfreeze/launch/freeze command.
Now once that is done, I can either
1) make copies of the task for each app and just change the package name in one place and all commands will work just fine, or
2) keep a single task that displays a menu of all the app choices and the one I click will be parsed to the variable and the commands will work on it.

Either way, I wouldn't have to define the package or app at several places in the task/script.
I always love playing with Tasker. It is a truely phenomenal app.

But this is what Greenify was made to do. Why the refusal to use the proper tool for the job? The wheel has already been invented. Why make your own?

You can also use ROM Toolbox to disable the startup receivers of the apps you don't want running on boot. And you can clean out the widget list with it.
 

the_rebel

Senior Member
Dec 14, 2007
279
49
Xiaomi Mi 11 Ultra
OnePlus Open
Yup, another Tasker fan here :D

Greenify doesn't freeze apps, so their icon is is in app drawer, they start as they wish (Greenify snoozes them later, but that's different), and Greenify doesn't launch apps. I use Greenify, but it has a different purpose, it is good for everyday apps - the current requirement I have is for apps that are seldom used and I'd like them frozen/disabled till the time their use is needed.

And disabling startup is only part of the problem solved, some have hooks on net being connected etc and whatnot. And cleaning widget menu is worse, it just hides the problem behind the curtain.
 

danarama

Senior Member
Aug 22, 2010
31,277
18,811
Oxenhope, West Yorkshire, UK
Ah I getcha.

Yeah unfortunately you're not going to be able to do that easily. You'd probably have to get clever with grep and logcats, but you'll be puttin so much effort in to make hardly any reductions.

So even if you had variable:

%App1

and could launch it without activity, You have to:

  • copy the variable to %App2 and enter the package name
  • copy the task
  • change the variable reference in the first part of the task (that pm enables)
  • change the variable reference in the second part that launches the app

That last step is only slightly quicker than manually changing the app in a standard app launch task anyway
 

the_rebel

Senior Member
Dec 14, 2007
279
49
Xiaomi Mi 11 Ultra
OnePlus Open
You're kinda right, but I think I'll just have to provide the app once to the task, not at multiple places.

1404489277654.jpg
See the screenshot, as of now I'm just defining the app in first command, the rest work fine.
Command 4 and 5 is just me messing around with the current problem, no headway yet.

Sent from my Nexus 5 using XDA Free mobile app
 

danarama

Senior Member
Aug 22, 2010
31,277
18,811
Oxenhope, West Yorkshire, UK
You're kinda right, but I think I'll just have to provide the app once to the task, not at multiple places.

View attachment 2832618
See the screenshot, as of now I'm just defining the app in first command, the rest work fine.
Command 4 and 5 is just me messing around with the current problem, no headway yet.

Sent from my Nexus 5 using XDA Free mobile app

Oh I see. You're setting the variable as the package in the task so you just enter the package once in each task and only have one variable. Bit messy though if you wanted to run 2 apps

Scenario.

Run app1. Apptarget var set
Run app 2. Apptarget var set

Meanwhile task for app 1 is waiting to terminate app 1 but var has changed so will actually terminate app 2, possibly whilst in use.

Sent from my Nexus 5 using Tapatalk
 
Last edited:

the_rebel

Senior Member
Dec 14, 2007
279
49
Xiaomi Mi 11 Ultra
OnePlus Open
Oh I see. You're setting the variable as the package in the task so you just enter the package once in each task and only have one variable. Bit messy though if you wanted to run 2 apps

Scenario.

Run app1. Apptarget var set
Run app 2. Apptarget var set

Meanwhile task for app 1 is waiting to terminate app 1 but var has changed so will actually terminate app 2, possibly whilst in use.

Sent from my Nexus 5 using Tapatalk
Wouldn't the problem be solved if I change the variable to local instead of global? Change name to lowercase and the change is made.
Anyway, that is to be worried about later... the current roadblock is bothering me a lot more at the moment :(
I'd really welcome any ideas on it.
 

danarama

Senior Member
Aug 22, 2010
31,277
18,811
Oxenhope, West Yorkshire, UK
Maybe... You'd have to try it.

It's pointless wasting effort busting road blocks if you've run out of fuel though, sometimes it's simplest to check the tank first and work out your variables.

Sent from my Nexus 5 using Tapatalk
 

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    Titanium just uses the built in packagemanager to freeze apps which can also be run in a terminal emulator.

    ygu4agyv.jpg


    So yeah with tasker for example you could create a shortcut that unfroze the app and then opened the app (although I haven't tested it) and you could set a task when a particular wasn't on screen it would be disabled. The problem would be if you navigated to another app, it would be killed so you might have to put a delay on the disable part ( say 10 minutes) then a clause that prevents it disabling it disabling if it's on screen. (in case you reopen the app)

    Could be pretty tricky

    Sent from my Nexus 5 using Tapatalk
    1
    Ah that makes sense.

    Yes it is a pain to set up a task for each app.

    You would really only need one task that disables all the apps however,
    1
    Yeah, I've tried this and similar apps, and Titanium Backup can do the same thing (using labels and filters and creating a widget), but all these options bulk enable/disable apps. This is good for their own use cases, but when you want to launch one frozen app without jumping through hoops then they don't work so well. Like when I have lets say 50 apps frozen, then when I enable all I suddenly have 50 more apps in my app drawer and I can't keep a shortcut to the frozen app in a separate folder on homescreen either because they get deleted once you freeze an app.
    The way I wanted was a single click shortcut that would unfreeze the app, launch it and then freeze it back when I'm done or screen turns off.

    This way I can keep all such shortcuts in a single folder on my homescreen too, and they won't get deleted as they point to the monitor app.

    I don't think you understand....App Quarantine is not Titanium backup, it's tap and it unfreezes the single app. Tap again and it refreezes it and just it. It doesn't defrost 50 apps and it's a widget on the screen so you don't have to launch any other apps like titanium to manage it. (It doesn't freeze it back without a tap). It's an App Quarantine widget that looks like the app shortcut icon and doesn't disappear when the app is frozen
    1
    I don't think you understand....App Quarantine is not Titanium backup, it's tap and it unfreezes the single app. Tap again and it refreezes it and just it. It doesn't defrost 50 apps and it's a widget on the screen so you don't have to launch any other apps like titanium to manage it. (It doesn't freeze it back without a tap). It's an App Quarantine widget that looks like the app shortcut icon and doesn't disappear when the app is frozen
    Wow, THANK YOU! I think I had checked out App Quarantine earlier, but didn't see its powerful widget feature. I took it as just another app freeze/unfreeze application.
    The single app widget with its locked/unlocked overlay is great. It even launches the unfrozen app with that single click just like I wanted. Its perfect!
    @rootSU Like I said, I'm surprised something like this doesn't exist, turns out it does and I just had to find it, with rancur3p1c's help :D


    Consider this question answered.
    1
    I just use Cold launcher. this is for this purpose.