On XDA I found a post discussing how to PIN an app to not get killed by OOM. As your question indicates your device is rooted, this could be useful for you. The principle described there can be applied to your case as well by simply changing the
oom_adj value specified (the
-17 would permanently PIN it, highest prio -- so use a larger value to "weaken" that).
The script snipped posted there looks like this:
echo "-17" > /proc/$PPID/oom_adj
Now, as said, replace the
-17 by your chosen value. Also replace the app's package name (
com.estrongs.android.safer) by the package name of your target app. You can also lower the
sleep value, or even ommit the sleep at all.
Now you need a way to auto-execute this as soon as your app is running. For this part, you could e.g. use Tasker: Context would be "app running" (and your app selected), and the task "run shell", with above script as parameter. Then, as soon as you start your app (and it comes to foreground), Tasker would execute the script -- and the
oom_adj value should be applied.