Guest Chadski Posted July 27, 2010 Report Posted July 27, 2010 Hi, I am just using phone and handsetsms most of the time. When I press Home key from the application, it shows the home screen and when I choose the app again, it display the app immediately. I know that Android manages the memory automatically and kill apps when needed. Hence, at some point of time, when I choos the app again, the app needs to reload. My question: Is there any way any app stay at the memory such that it will load immediately? Or any way to let android know that this app should not be killed at any case? Thanks.
Guest phhusson Posted July 27, 2010 Report Posted July 27, 2010 (edited) Hi, I am just using phone and handsetsms most of the time. When I press Home key from the application, it shows the home screen and when I choose the app again, it display the app immediately. I know that Android manages the memory automatically and kill apps when needed. Hence, at some point of time, when I choos the app again, the app needs to reload. My question: Is there any way any app stay at the memory such that it will load immediately? Or any way to let android know that this app should not be killed at any case? Thanks. All that I'll describe can be scripted, and perhaps has already been, but I don't know it, so here is the way "by hand": Firt, get the pid of the application, do ps |grep <name of application> but the name is the ""java"" name, like com.google.android.gallery3d or com.spotify.mobile.android.ui. Most of the times these names are quite explicit so finding an app in the ps list should be easy. The PID of the application is the second column. Now do, as root, echo 0 > /proc/<PID>/oom_adj And the app shouldn't be killed again for low memory :-) Or, for something a bit more automated, but it can't be added in an init script, because it needs the app to be started. echo 0 > /proc/$(ps|grep com.android.phone |awk -F ' ' '{print $2}')/oom_adj I've a background program that can do that automatically, if someone makes a gui for it, I might add it in my ROMs. Edited July 27, 2010 by phhusson
Guest Chadski Posted July 27, 2010 Report Posted July 27, 2010 mhm.. thanks phhusson.. your advise above worked.. i just wished that the back button did not close the application.. better than nothin actually.. saves me some waiting time for sms.. thanks so mucn..
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now