Keep My Opera is an app that protects the Opera browser from being killed without reason.
- compatible with Android version 2.1+ (tested on 4.x)
- benefits from root access (but can be used without)
- just an app, does not depend on custom rom or kernel versions
- risk free (makes no patches to kernel or system partition)
- consumes very few resources
- free and ad-free
- Opera Mobile can still be killed if truly necessary for other apps to run
- makes no sense unless you are an Opera poweruser
Importance notice about update to v0.58 (28th July 2013):
Keep My Opera can now protect any app, not just Opera Mobile.
The documentation below has not (yet) been updated. It is for the old version v0.52 (which is still available as attachment).
With the new version you can choose which app you want to be protected. It is useful to protect another flavor of Opera, such as Opera Classic (for those of you who hate the new blink-based Opera Mobile).
Note that you can now choose any app of your liking, including other browsers or e-book readers!
What Keep My Opera tries to solve:
Android proactively terminates memory hogs soon after you stop using them. The Opera Mobile web browser is one such memory hog. Web pages are ever increasing in complexity and thus lots of memory is needed to display them.
If you use Opera Mobile a lot, you may like it to stay in memory even while you use other apps. After all, once force-terminated, it takes time and connectivity and bandwidth to reload all those web pages.
When another app needs memory, Android recovers it with the "out of memory" killer (OOM). Opera Mobile is one of the first victims to be killed, ecause of the high memory footprint.
Opera Mobile can also be terminated when Android thinks that you don't use it anymore, for example after you have left it in the background for a while. This happens without actually needing the memory, it's rather just preparing free memory already now for when someone might use it later.
I don't like this behaviour of Android, and so I created Keep My Opera. It tells Android that I'm using Opera (even while I'm not), and it gets killed less
How to use Keep My Opera:
Once installed, you get to review some options and then you activate it. A notification item will appear indicating that Keep My Opera is running.
Touch the notificaton if you want to further change the options, or when you want to stop Keep My Opera.
Enabling everything listed under "Functional Options" achieves the most complete protection.
Note that after rebooting your phone, you have to start Keep My Opera again.
Method #1: Protect process memory (root)
With "Protect process memory" enabled, Keep My Opera will reset the OOM data of Opera Mobile every few seconds.
This helps against the first type of killing (see above) because it makes Opera Mobile a less attractive victim. The OOM killer doesn't notice the real memory usage and decides to kill other things first. If that doesn't help to satisfy the pressing memory needs, of course Opera Mobile can still be killed - it's just not highest on the list. This ensures that you can use your other apps and games normally, without fear of them closing underneath your finger.
This feature requires root access, and also a working installation of BusyBox. It won't do anything without those two, in fact it could even hang and force-close if you enable the option but do not have root or busybox.
The reset action is performed in the /proc filesystem which resides in RAM. There are no permanent changes of any kind, and you can get rid of it simply by stopping Keep My Opera or disabling the option.
Method #2: Move Opera to front (without root)
The other important functionality is "Move Opera to front". It helps against the second type of killing, where Android thinks that you are not using it anymore. Whenever you put your phone to sleep, Opera Mobile will be moved in front of all other apps. When you unlock your phone, it will be the first thing you see. Android will not kill it "just because" - after all, it is the last thing you have "used".
It helps quite a bit to keep Opera Mobile running, and it works without root. However, it is may only be for Opera hardliners like me. I want my web pages to always be cached in RAM, so I can read during the few seconds of an elevator ride etc.
If you don't want Opera Mobile in your face everytime you unlock your phone, you may still be able to use this feature. Read on:
Companion app: Go to Homescreen
This app makes the "Move Opera to front" feature somewhat more tolerable. It pulls the homescreen to front whenever it is activated, and its icon looks like a lock.
Pin it to your lockscreen (provided that your phone supports lockscreen shortcuts), and it drops you off at your homescreen instead of Opera. You can benefit from "Move Opera to front", yet get fewer strange looks from other people when you hand them your phone.
Update 28-Jul-2013: v0.58 lets you choose which app to protect (FIXME: documentation doesnt reflect this change)
Please post feedback here on XDA. Do you like it? Does it work for you? What would you improve?