Avoid apps auto close

Hi, I flashed my old Nexus 4 (LG E960) with /e/OS to use this old smartphone as “IPCam” with eWelink Camera app.
This requires that the app remains open and running with display always on.
I enabled the always on setting un developers settings, installed an app do lower brightness to the minimum and installed also TeamViewer host.
After some hours the screen is still on (ok), but ewelink Camera and TeamViewer are not running.

How can I keep those app running?

Regain your privacy! Adopt /e/ the unGoogled mobile OS and online servicesphone

No one has the same issue?

Have you made sure that battery optimizations are off for those apps? Other than that I’m not too sure.

There could be memory issues involved whereby an app may get killed when memory runs low but again, not too sure. If that were the case, a kernel manager like SmartPack Kernel Manager could be used to adjust LMK (Low Memory Killer) settings. That would require root, though.

2 Likes

Battery optimizations are off for that app (eWeLink camera).
Memory I think is not an issue.
I flashed e/OS to have a lightweight os to use an old Nexus 4 as ipcam.
2GB of ram are not enought?

2GB is considered low in this age of 6/8/12GB phones.
I don’t really know much about Android memory management but I know it has a habit of keeping things in memory even when swiped away in recents. In some cases depending on what’s running, Low Memory Killer may close apps to regain free memory.
Different from Linux where they say “free memory is wasted memory”. :smile:

The OS and its services take up a certain amount of course. Not leaving much room on low memory devices.
Your phone is dedicated to the tasks you mentioned so I figure there’s not much extra running.
It may be a matter of the memory requirements of those two main tools and whether their memory usage grows when running for an extended period.

Again, I am not too versed on that stuff.

You’re 100% right.
Reading your message I recalled memory management concept of Android.
I will check with a tool the memory usage to verify iflow memory happens.

Do you know how I can monitor memory usage?
Because I need to check if it grows over time and Android cleans it up. With standard tool I can check the actual memory

Hmm, I think maybe we do have such a tool. In Developer Options.

Look for Running Services…


You’ll see a list of active apps and services…


Tap on the three-dot menu and select “Show cached processes” where you see other items…


One may be able to see if there are things rumning that they don’t ever need and maybe find a way to keep them from rumning. Something that controls auto starting.
LineageOS had Privacy Guard and AOSP usually had App-Ops. I think I’m lost because I can’t find anything like that in the 1.1-R at the moment.
I’m rooted anyway so I have App Manager if needed.

Teracube T2e, /e/OS 1.1-R.

Checking.

Rooting can be done with standard procedure? So same steps as with original android OS?

I can’t say as I don’t know what procedure you’ve used.
I’m lazy. So far I’ve had luck with the simple flashing of Magisk (knock on wood) but that is not recommended.

The steps here seem to be the official way…

Rooting LineageOS 18.1 with Magisk

I was looking up some info (about controlling run-at-boot/startup stuff) and didn’t realize that Privacy Guard wasn’t ported to Android 10 and, due to its connection, Lineage SU also. I haven’t checked to see if any non-root tools are available.
Being rooted might be the only way. Being a big NON-fan of Magisk I am not too happy that it’s pretty much the only root method available for modern Android (Pie+) but I digress.

EDIT: Some tools like App Manager support different methods (ADB, wireless debugging) so root isn’t a requirement.