termux-app icon indicating copy to clipboard operation
termux-app copied to clipboard

[Bug]: Termux randomly starts itself

Open Ryu945 opened this issue 2 years ago • 5 comments

Problem description

The program will randomly launch itself in the background and take up battery power. I am not sure if turning on the work profile is related to this though Termux is not installed in the work profile. I only mention this because I have seen a bug with other programs where launching the work profile will cause a program to randomly start itself.

Steps to reproduce the behavior.

Install the program and don't ever launch it. Your find it just randomly starts itself in the background. Even if you force stop it, your find it running again.

What is the expected behavior?

A program should never start itself unless the user starts it.

System information

  • Termux application version: 0.118.0
  • Android OS version: Android 11 (Lineage OS)
  • Device model: LG V20 H910

Ryu945 avatar May 25 '22 17:05 Ryu945

Also happens on Huawei Matepad T8, Google-less Android 10

  • sorry but I am not able to run a log to troubleshoot reasons

ChiefMikeK avatar May 26 '22 08:05 ChiefMikeK

A program should never start itself unless the user starts it.

That's technically incorrect. Many apps will do this. Android allows it and gives the official ability to do so in various ways. You'd be surprised how many apps can run as much of their code in the background without your involvement as they want. (Well, technically all but how many actually do would probably surprise you.)

But, Termux does have a few receivers and can obviously start when using Termux boot. There might be something happening where the code starts things unexpectedly but that might need more info. Otherwise, it would be the user device at fault or its also possible for Google or Android to have the problem on their side for certain devices as can be seen with certain problems.

I don't see WorkManager or an older use for bg alarm in use here so I don't think the app is being started by itself anyway. Though I forget what the 2nd one was anymore out of the Android API changes.

Xavron avatar Jun 03 '22 11:06 Xavron

A program should never start itself unless the user starts it.

That's technically incorrect. Many apps will do this. Android allows it and gives the official ability to do so in various ways. You'd be surprised how many apps can run as much of their code in the background without your involvement as they want. (Well, technically all but how many actually do would probably surprise you.)

But, Termux does have a few receivers and can obviously start when using Termux boot. There might be something happening where the code starts things unexpectedly but that might need more info. Otherwise, it would be the user device at fault or its also possible for Google or Android to have the problem on their side for certain devices as can be seen with certain problems.

I don't see WorkManager or an older use for bg alarm in use here so I don't think the app is being started by itself anyway. Though I forget what the 2nd one was anymore out of the Android API changes.

I am not talking about apps working in the background once they are already started. I am talking about a completely stopped app starting itself up in the background. There is no reason this app needs this. After stopping the app, I find it running again some time later on. Phone was not rebooted. There are many apps on this same device that do not start themself up. Something in this app is causing it to be started up.

Ryu945 avatar Jun 19 '22 15:06 Ryu945

This is still not fixed.

Ryu945 avatar Sep 23 '22 18:09 Ryu945

When app magically starts itself, immediately grab full system logcat dump with adb logcat -d > logcat.txt from pc or su -c "logcat -d > /sdcard/logcat.txt" with root and post it here after removing private info or email me at [email protected]

And by running, what do you mean? What happens exactly, How many sessions are tasks are running?

agnostic-apollo avatar Sep 23 '22 18:09 agnostic-apollo