[APP][2.1+] Keep My Opera - Protect Opera from being killed (or any other browser)

15 posts
Thanks Meter: 26
By jetmarc, Junior Member on 8th May 2013, 07:02 PM
Post Reply Email Thread
Quick overview:

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?
Attached Thumbnails
Click image for larger version

Name:	screen_options.jpg
Views:	600
Size:	48.1 KB
ID:	1946161   Click image for larger version

Name:	screen_locked.jpg
Views:	569
Size:	20.6 KB
ID:	1946162  
Attached Files
File Type: apk Keep My Opera v0.52.apk - [Click for QR Code] (92.5 KB, 211 views)
File Type: apk Keep My Opera v0.58.apk - [Click for QR Code] (98.1 KB, 446 views)
File Type: apk Go To Homescreen v0.02.apk - [Click for QR Code] (16.3 KB, 129 views)
The Following 5 Users Say Thank You to jetmarc For This Useful Post: [ View ] Gift jetmarc Ad-Free
29th May 2013, 10:17 AM |#2  
OP Junior Member
Thanks Meter: 26
Keep My Opera v0.52 (bugfix)
The APK attached to the first post has been updated to version v0.52.

This is a bugfix release. The bug affects phones which do not turn the screen on after a phonecall ends. CM10.1 is an example for such a ROM (and Samsung stock is not). In the previous version, Opera would then not be brought to front. This is fixed in v0.52.
30th May 2013, 07:44 AM |#3  
Thanks Meter: 8
Can you add more apps, not just opera?
The Following User Says Thank You to petrea_86 For This Useful Post: [ View ] Gift petrea_86 Ad-Free
30th May 2013, 08:02 AM |#4  
PenguinxEnjoi's Avatar
Senior Member
Flag Carbondale
Thanks Meter: 140
Originally Posted by petrea_86

Can you add more apps, not just opera?


Also; Second
29th June 2013, 12:51 AM |#5  
Thanks Meter: 13
Great work Jetmarc, I'm an Opera hardliner too and have been waiting for a solution like this so thanks.
28th July 2013, 08:20 PM |#6  
OP Junior Member
Thanks Meter: 26
Keep My Opera v0.58 (enhancement)
The APK attached to the first post has been updated to Keep My Opera v0.58.

This is an enhancement release, responding to the requests made here in the thread.

You can now choose other flavors of Opera (such as Opera Classic or Opera Mini), as well as completely different browsers or e-book readers.

After you update, review the new configuration option to make sure that the correct app is selected for protection. Note that loading the list of installed apps takes a few seconds. You have to wait for this process to complete when you use Keep My Opera for the first time, and also when you want to change the protected app. Otherwise you can safely ignore it.

Let me know if this enhancement meets your needs, and if there is anything else that can be improved.
7th September 2013, 12:08 PM |#7  
Junior Member
Thanks Meter: 4
An alternative way to keep Opera running: a dummy service
Hello jetmarc and others, I also suffer from this problem a long time, and I was looking everywhere to get a solution. The best solution I previously found was a modded version of Opera Mobile with an added dummy service, which prevents Android from killing Opera, found in Opera forum. (I'm not allowed to post links yet, but the thread title is "Opera and Samsung Galaxy 3 a bunch of crap..." and the poster of the modification is "knumsole", you'll find it when you google it.)
Unfortunately, the moderators of the Opera forum removed that unofficial mod, but I was lucky enough to download it before. I attached it here. Use it at your own risk, it seems to cause no problems for me. Most important: It got NEVER killed.

But unfortunately again, that is an old version of Opera Mobile (11.5) which has problems to display some pages.

So I tried also this "Keep my Opera" (0.58) together with a new version of Opera Classic and I'm relativly happy with that: Opera got only killed one time in a day so far!

But anyway, the solution I would prefer, would be a new version of Opera with that added dummy service. As I said, it got NEVER killed on my android.

So does anyone know how to add a dummy service to a recent version of Opera? I tried to contact the previous author on Opera Forum, but wasn't succesful.
31st December 2013, 04:33 AM |#8  
Flag bogor
Thanks Meter: 3
Thumbs up
thanks work android 4.3
Post Reply Subscribe to Thread

app, free, memory, oom, opera

Guest Quick Reply (no urls or BBcode)
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes