r/AndroidNativePorts • • 6d ago

How can you prevent android from killing apps due to Ram usage?

Root is an option. Cannot for the life of me understand why android keeps nuking my apps when I'm only at 10/16GB usage. Even RAM savers aren't helping.

5 Upvotes

8 comments sorted by

1

u/ovoAlexx 6d ago

Following.

1

u/toolenane 5d ago

don't buy Xiaomi

0

u/Ill_Ad3671 6d ago

Go to dontkillmyapp[dot]com, search for your phone manufacturer,and try the solution listed there.

1

u/MustardSundae 6d ago

Doesn't help. Found a magisk module that might work.

1

u/BestRabbit4580 1d ago

They also dont

1

u/MustardSundae 1d ago

Damn

1

u/BestRabbit4580 23h ago

It's an Android system limitation. As soon as your RAM hits 90-92% usage, it has no choice BUT to kill the heaviest processes. That also means what's called "child processes", basically mini-processes inside the main process. That can freak the game or system out and hard crash everything including your SystemUI and Home app.

That 16gb RAM is shared with your VRAM. You also may have 1gb RAM reserved to the hardware which you will never see used or have access to. For instance my 8gb Galaxy S23 actually only ever adds up to 7gb usable (with some funky math and overlay readings.) Take 2gb for the VRAM, the Systems mandatory 10% and the rest for whatever foreground app fights for survival (GTAV for instance) and my system will hard crash at barely 6gb RAM total usage. This is even with "Don't kill child processes" enabled in Developer Options.

Your 10gb reading could be more like 14gb.

Or I'm talking out of my ass...Idk, this is just been my understanding while I've tested many heavy projects over the past 4-5 years. This has just been the pattern I've noticed and no amount of kernel-level profiling has helped either 🤷‍♂️

1

u/MustardSundae 22h ago

I feel like Droiddeck and Gamenative have some work around. I've had those apps eat enough ram to actually crash the system before.