Friday, January 17, 2020

ram - Keeping an app in memory


I once read about an init.d tweak to keep an app in memory. I'm unable to find that tweak now. Does anyone have the link? An alternate method would also be welcome.



Edit : I'm using cyanogenmod 10.



Answer



You can do it according to this post on XDA:




  1. Make a file called 99applock.txt

  2. Insert code below and put you messaging service in where it says PPID (that usually can be found in data/data if your using aftermakrket sms app) remove the .txt extension and put file in ect/init.d and just give it 777 permissions, it works for me.



    #!/system/bin/sh


sleep 60

PPID=$(pidof com.your.app)
echo "-17" > /proc/$PPID/oom_adj
renice -18 $PPID

No comments:

Post a Comment

samsung galaxy s 2 - Cannot restore Kies backup after firmware upgrade

I backed up my Samsung Galaxy S2 on Kies before updating to Ice Cream Sandwich. After the upgrade I tried to restore, but the restore fails ...