Prevent the standard Task Killer from unloading the applications you need. All devices. | Your favorite apps will always remain in the device’s memory.



Rep: (384)
Prevent the standard Task Killer from unloading the applications you need.
The program will make the device instantly respond to your actions and make it more economical!
The first and only program of this type, which really works!
The priority changes to -17, or any other, and is not reset when exiting the program.

The program is in the mode of testing and refining the way in which the app is kept in memory.

Last update of the program in the header:07.12.2012
AutoOOMmanager
Version: 0.95
Attached Image


Description and algorithm
Like any android owner, who knows at least a little about his work, I know that the standard taskkiller kills applications when there is a shortage of memory.
I was faced with the question of how to get the android to start and keep in memory ALWAYS applications that I use all the time (for example, a dialer).
On the forum I found suggestions for increasing priority through renice or editing a build. Prop indicating that such applications do not kill.
But these methods do not work !!!
Having studied the question, I found programs likeВ® AutoKillerwho can do priority oom killer -17
But! These programs do not know how to keep the priority and it is necessary to set in it, switch to the application itself and everything, the priority is reset.

This is where the topic came from. We want to make a program that will still work.
It seems to work out;)
The meaning of this program is to execute 4 commands.
pidof - to find out in which daddy to look for a file with priority
cat - read what is in it now
and if this file is NOT -17, then
echo - write -17
Well, prompted to fix all this teamchmod and values ​​of 444

Development team and testers:
RubberBigPepper
asuslava
Black_BG

I express my deep gratitudeRubberBigPepper for assistance in implementing the program, as well as asuslava for a simple and ingenious idea with the rights !!! Thank you very much! : thank_you:

purpose
Necessary applications are always in memory, instantly open, instant transition between applications and battery saving (you don’t need to load data and load percents / raise frequency)

The program requires superuser rights!
Download: AutoOOMmanager version 0.95 (fully working version)
Past versions

Useful addition - В® Autostarts

Theme motto
Nothing is impossible!)


Post has been editedBlack_BG - 25.01.13, 21:57
Reason for editing: stable version appeared



Rep: (384)
asked a question on the merits: D in the topicsScripts, tweaks, collect them allandВ® AutoKiller



Rep: (212)
Black_BG I found out that if you minimize the application, then this setting goes astray, i.e. AutoKiller simply changes the oom_adj process (I described this in more detail in the topic about tweaks). Probably, there is no adequate solution to the problem (except to perform these commands every minute or even more often), because Android changes these values ​​when the application state changes (minimized, foreground, background, ...). How to catch these events "outside" the application of interest, I do not know.

Post has been editedGalamar - 17.10.12, 23:55



Rep: (384)
Looking for a programmer who can write a simple program

details in the topic header.



Rep: (212)
It seems that xda has a similar application. It is under development. To read,starting from here.
There on the 6th page islinkon the registration form for testing.
I never got the file. Maybe you are lucky?



Rep: (384)
thank! saw. similar approach. but if they are stupid to put in it. it will not work. but even with my crooked English, I realized that they were also looking for a developer to do a prog.
Comrades, let's zapil. just all ...

Posted on 10/23/2012, 08:07:

can pimp may tspu remake. it is similar, it only writes at a different address ...



Rep: (1320)
Black_BG
You can write in a quick way.



Rep: (384)
you can) all the tests on me if needed.

Posted on 10/23/2012, 08:34:

If it helps, then you can disassemble this prog. It seems to me that the meaning is similar, but simply writes to another file. although I could be wrong ...
В® Pimp My CPU



Rep: (1320)
Version 0.1 betta.
Damp and a lot of things from the interface is not completed.
At startup, shows a list of applications, all installed on the system.
For running applications, OOM Value will be different from "-".
A long tap on the desired element changes the set OOM (in the program it says "OOM Set to") between -17 and what the system will supply (in the program "-")
When you exit, the service starts, which every 5 seconds (you can more often eat more battery) checks what is running on the screen.
When a running application changes, it updates with all specified OOM at -17.
I listen to criticism
Attached fileAutoOOMmanager.apk(30.42 KB)



Rep: (212)
RubberBigPepper, you are our savior! : happy:
Gone test.

UPD
When I start, I get "Reading apps" for 1 second, disappears - that's all. Black screen with the name of the program.
There are no errors in the log.

Post has been editedGalamar - 24.10.12, 00:28



Rep: (1320)
Galamar @ 10.24.2012, 02:51*
When I start, I get "Reading apps" for 1 second, disappears - that's all. Black screen with the name of the program.
There are no errors in the log.

Strange. And in what log?



Rep: (1320)
I checked on SGS3, Sensation XE, Desire S - it normally starts up at all and shows a list of applications.



Rep: (384)
Everything starts with me on a sensation on CM9 with android 4.0
RubberBigPepper @ 10/23/2012, 9:41 PM*
Damp and a lot of things from the interface is not completed.

normal interface - nothing superfluous)
There is a garbage that the application does not pick up and does not do -17, although it hangs with a priority of 10-12 ... perhaps because of fast transitions.
RubberBigPepper @ 10/23/2012, 9:41 PM*
I listen to criticism


not a criticism. I just wanted to talk about the logic of the application.
Now, as I understand it, every 5 seconds the service checks that the window is open. if the window is different than 5 seconds back, re-assigns -17 to the necessary applications. So?

I will consider 2 situations, I have already stumbled upon both.

1) I sit and read a book for 2 hours. Nothing happens. Why is there a new window every 5 seconds?
2) I went into the application and in the same second I left it. It turns out the service missed this moment ...

I propose the following logic. If the service still does a check every 5 seconds to a new window, then let's better every 10 seconds / minutes it will be stupid to put -17 in all the necessary places.

And the most important thing!
Such programs asВ® Pimp My CPUandВ® SetCPUalso tied to launch the application.
I am sure that they do not monitor every n seconds what is on the screen. Why? because the frequency change they do instantly. either they monitor every 0.5 second (then the battery would die quickly, and this is not so), or they wait for some kind of event.
I think that they react to some event - “application launch” / “application change” / / window has changed (I don’t know how to correctly name it). an event occurred, they responded instantly, rather than monitor every n seconds.


Ideally, I present the following program logic.


  1. We made the necessary applications in the program unkillable.
  2. left the program and started the service
  3. the service does NOT monitor every n seconds, but waits for the event "application launch" / "application change" / "window has changed"
  4. As soon as an event has occurred, he changes to -17 in the right places and waits for the next. developments.
  5. The timer also works once every n minutes (just minutes, this is for the situation with reading a book) forcibly stuffs -17 into the right places, without looking at what is already there.



Please see how the pending event is implemented.В® Pimp My CPUandВ® SetCPU
if we manage to implement it in exactly the same way, it would be great, because it seems to me that this is the best implementation, as it doesn’t give you any failures even with a quick transition through the house (long press)

Version 0.1 beta added to the header

Post has been editedBlack_BG - 24.10.12, 08:41



Rep: (1320)
Black_BG @ 10.24.2012, 11:39*
Now, as I understand it, every 5 seconds the service checks that the window is open. if the window is different than 5 seconds back, re-assigns -17 to the necessary applications. So?

Exactly
Black_BG @ 10.24.2012, 11:39*
1) I sit and read a book for 2 hours. Nothing happens. Why is there a new window every 5 seconds?
2) I went into the application and in the same second I left it. It turns out the service missed this moment ...

there seems to be no way to track the launch of the application, or rather I don’t know it.
Black_BG @ 10.24.2012, 11:39*
Please see how the wait for the event is implemented in the В® Pimp My CPU and В® SetCPU

I will have a look.



Rep: (501)
Black_BG
I do not know this possibility, what is it like ???

I assume that due to the introduction of additional activations into the program, for some frequently occurring event.
Or still use the features of the utility nohup ...
Although, as I see the problem is almost solved.

RubberBigPepper,
your child works on both 4 and 2.3



Rep: (384)
RubberBigPepper , thank!

Just the same tasker, for example, of course it works crookedly with scripts, but somehow it tracks the events of the application launch and changes the brightness for me instantly.
I have done both in it? so that when you start the backgammon, the auto brightness is turned off and the brightness is turned on 40% (initial task) and as soon as I exit the backgammon (no matter how, the exit button or the home button), the auto brightness turns on again (the final task) and all this happens instantly as in pimpe and setpu
Similarly, I have done on the contacts, only the brightness is 100%
At the opera, I have done to turn on the auto-rotate, and when turned off, turned off.
I don’t say about the profile on the call and there on the connection of the charger, these events are probably easy to track down, and we don’t need them.

Post has been editedBlack_BG - 24.10.12, 08:57



Rep: (1320)
I looked.
The code is from pimp, the program is well done, but crashes on my phones right away.
Obfuscator walked-gut.
package fr.mydedibox.pimpmycpu.utility;

import android.app.ActivityManager;
import android.app.ActivityManager.RunningTaskInfo;
import android.content.ComponentName;
import android.os.Handler;
import fr.mydedibox.pimpmycpu.a.e;
import java.util.List;

final class v
implements runnable
{
v (UtilityScalingService paramUtilityScalingService)
{
}

public final void run ()
{
UtilityScalingService.a (this.a);
boolean bool = UtilityScalingService.b (this.a);
String str = ((ActivityManager.RunningTaskInfo) UtilityScalingService.c (this.a) .getRunningTasks (1) .get (0)). TopActivity.getPackageName ();
Object localObject = UtilityScalingService.d (this.a) .a (str);
if (! ((String) localObject) .contentEquals ("none"))
{
if (UtilityScalingService.e (this.a) .a.contentEquals ((CharSequence) localObject))
break label244;
localObject = UtilityScalingService.f (this.a) .a ((String) localObject);
if (localObject == null)
{
new StringBuilder (String.valueOf (str)). append (": unable to load profile (null)"). toString ();
UtilityScalingService.d (this.a) .b (str);
}
else
{
if (((e) localObject) .b.contentEquals (c.d ()))
break label185;
new StringBuilder (String.valueOf (str)). append (": unable to load profile (kernel missmatch)"). toString ();
UtilityScalingService.d (this.a) .b (str);
}
}
UtilityScalingService.a (this.a, false);
break label244;
label185: new StringBuilder (String.valueOf (str)). append ("profile found:"). append (((e) localObject) .a). append (", applying"). toString ();
UtilityScalingService.a (this.a, (e) localObject);
((e) localObject) .c ();
UtilityScalingService.g (this.a);
UtilityScalingService.a (this.a, true);
label244: if ((bool) && (! UtilityScalingService.b (this.a)))
this.a.a (true);
UtilityScalingService.h (this.a) .postDelayed (this, 1000L);
}
}

That is done like mine, only once a second is checking the running application

how have i done
private Runnable m_cTaskRunnable = new Runnable ()
{
public void run ()
{
m_cHandler.removeCallbacks (m_cTaskRunnable);
List cArTasks = m_cAM.getRunningTasks (1);
if (cArTasks! = null && cArTasks.size ()> 0)
{
ActivityManager.RunningTaskInfo cCurTask = cArTasks.get (0);
if (cCurTask.id! = m_nLastTaskID)
{// another application is running
m_nLastTaskID = cCurTask.id;
UpdateAllOOM ();
}
else
{// the application is also running, we check by name
if (cCurTask.topActivity! = null)
{
if (! cCurTask.topActivity.getClassName (). equals (m_strLastRunningActivity))
{
m_strLastRunningActivity = cCurTask.topActivity.getClassName ();
UpdateAllOOM ();
}
}
}
}
m_cHandler.postDelayed (m_cTaskRunnable, 5000); // once in 5 seconds check
}
};


Post has been editedRubberBigPepper - 24.10.12, 09:02



Rep: (384)
the problem is almost solved


Sometimes a priority flies, which is set on a timer, even 5 seconds ...
the truth is, I have already installed 7 applications ...
It is necessary to find a universal moment of changing the priority, so that the program works like a clock.
but for today it is certainly more convenient than a tasker and works better!



RubberBigPepper,

I forgot...
You need to make a delay on the record -17, well, for example, 0.5-1 seconds, so that the situation does not happen that the program changed the priority before the killer, and then the killer dropped ...
it seems to me that it worked so well with the tusker, but I definitely have no chance to burn it, but I have a strong feeling of it

Posted on 10/24/2012, 09:04 AM:

RubberBigPepper @ 10/24/2012, 10:00*
That is done like mine

why pimp does not eat a battery at all?
what does setpu say?



Rep: (501)
RubberBigPepper,
And is the implementation of running the script in the background script with the given variables applicable in this case?



Rep: (1320)
And is the implementation of running the script in the background script with the given variables applicable in this case?

my mosk is broken by such a question
Black_BG @ 10.24.2012, 12:04*
why pimp does not eat a battery at all?

Is it also possible because it does not work when the screen is turned off? Rather, it stops tracking applications that are launched.
Black_BG @ 10.24.2012, 12:04*
I forgot...
You need to make a delay on the record -17, well, for example, 0.5-1 seconds, so that the situation does not happen that the program changed the priority before the killer, and then the killer dropped ...

It's possible. But I think, nevertheless, to do this: once a second, a check that is launched and once every 30 seconds-minute is a forced change of OOM.



Rep: (212)
RubberBigPepper, in the system log (logcat)


Full version    

Help     rules

Now: 07/31/19, 04:55