Sample Header Ad - 728x90

Android Enthusiasts

Q&A for enthusiasts and power users of the Android operating system

Latest Questions

3 votes
2 answers
7953 views
Disable service permanently
I would like to disable some services/apps on Android. I do not want some of them to run. I do not want to stop the service every time I turn off the phone for obvious reasons. I used Titanium Backup to freeze the apps. Not optimal, but I didn't have that many to do.
I would like to disable some services/apps on Android. I do not want some of them to run. I do not want to stop the service every time I turn off the phone for obvious reasons. I used Titanium Backup to freeze the apps. Not optimal, but I didn't have that many to do.
Archival (171 rep)
Mar 20, 2013, 10:12 AM • Last activity: Apr 15, 2025, 01:39 PM
0 votes
0 answers
95 views
Is there an utility to keep certain apps from closing ? (with or without root)
Any external clock alarm app I have tried on my Android 11 phone shuts down automatically at a certain period of time (some hours), so I cannot use it as an alarm clock. I have tried to set those apps not battery optimized, of course, with no luck. Can it be achieved with some utility ? I have tried...
Any external clock alarm app I have tried on my Android 11 phone shuts down automatically at a certain period of time (some hours), so I cannot use it as an alarm clock. I have tried to set those apps not battery optimized, of course, with no luck. Can it be achieved with some utility ? I have tried "auto memory manager" but it crashes at startup, and it's too old. Maybe with Tasker ? how ?... Some apps like termux or IRC for Android already implement it but e.g. Alarm clock for Heavy Sleepers shuts down, and I love this app because you can snooze it by turning upside down the phone, and also it can play radio streams...
Roger (111 rep)
May 15, 2024, 09:18 AM • Last activity: Jun 20, 2024, 06:48 AM
1 votes
1 answers
171 views
Touchscreen inputs without user interaction?
Consider the following system: - Stock Android 9, unrooted - USB and wireless debugging unavailable - screen permanently turned off So basically a headless Android device. **Question:** Is it possible to programmatically execute touchscreen inputs without any user interaction, e.g. in order to autom...
Consider the following system: - Stock Android 9, unrooted - USB and wireless debugging unavailable - screen permanently turned off So basically a headless Android device. **Question:** Is it possible to programmatically execute touchscreen inputs without any user interaction, e.g. in order to automatically force-stop selected apps? **Example:** The default method to do this manually is from the app info menu, i.e. Force-closing active apps by user input Similarly, inactive/background apps can be closed from the developer settings: Force-closing inactive apps by user input **Note:** A purely programmatic solution is required. Connection to a debugging device is allowed only once for initial setup, otherwise: No external devices.
srhslvmn (299 rep)
Mar 12, 2024, 04:40 AM • Last activity: Mar 23, 2024, 01:47 PM
3 votes
1 answers
1221 views
How to (brute-)force-kill selected background apps?
I need an **automatic brute-force method** for unrooted Android devices to kill selected apps that keep restarting in the background, i.e. an appropriate "automatic task killer". Ideally, such method entails a kill command running inside an indefinite loop. Two illustrative examples: 1. In Windows,...
I need an **automatic brute-force method** for unrooted Android devices to kill selected apps that keep restarting in the background, i.e. an appropriate "automatic task killer". Ideally, such method entails a kill command running inside an indefinite loop. Two illustrative examples: 1. In Windows, you can run the following batch script from the command prompt: > :start > taskkill /f /im "process_name" > goto start 2. In Linux, you can run the following bash script from the terminal: > while true > do > pkill -f process_name > done What I need is an equivalent for Android, but unfortunately, I do not have any experience with programming Android applications yet. I have tested several "task killer" apps such as [SuperFreezZ](https://f-droid.org/packages/superfreeze.tool.android/) , but you can only terminate processes manually with those. If Android decides to restart a terminated or frozen process against your will, the new instance is not automatically terminated, rendering all these apps useless. Are there any apps out there that can get the job done? If not, is there a simple way to implement a background script for Android and have it run permanently? IMPORTANT NOTE: I do not - I repeat - **I do not** care about CPU/memory/battery usage or any overhead caused by the task-killing app. The sole purpose is to kill selected background apps as soon as they get (re)started, be it by Android or user action. A small app or script that just keeps sending appropriate kill commands every few milliseconds would do the job (hence "brute force"). The assumption here is that one cannot prevent Android from restarting apps in the background without rooting the device, but one can keep force-closing them the moment they are launched. For better motivation, one (out of several) use cases for me is terminating Samsung's infamous [Game Optimizing Service (GOS)](https://arstechnica.com/gadgets/2022/03/samsung-says-app-throttling-is-for-heat-management-will-let-users-disable-it/) , which cannot be uninstalled even via adb as it gets immediately reinstalled (reminiscent to malware). When terminated by the user, it gets restarted after several minutes. An appropriate task killing app would automate the termination process for the user and ensure that GOS is running only for a miniscule fraction of system run time. There are several more reasons for me to desire such solution, which I do not want to get into here as it is irrelevant to the question.
srhslvmn (299 rep)
Jan 22, 2024, 08:43 PM • Last activity: Feb 14, 2024, 10:09 PM
7 votes
4 answers
18517 views
Is there a way to list all Intents and all processes associated with them?
Is there a way to list all Intents and all processes associated with them? Specifics: Droid X, 2.2 stock ROM, rooted. I'm perfectly fine with any approach, as long as it gets a guaranteed **complete** list: - A script or a series of commands in Terminal Emulator is fine. No limitation on supposed re...
Is there a way to list all Intents and all processes associated with them? Specifics: Droid X, 2.2 stock ROM, rooted. I'm perfectly fine with any approach, as long as it gets a guaranteed **complete** list: - A script or a series of commands in Terminal Emulator is fine. No limitation on supposed required technical proficiency (assume that the reader is a qualified long-term Unix power user). As noted, the phone is rooted. - An app is OK (ideally, it should be able to export the list, but even Autostarts-like GUI display is OK) Caveat: if you recommend an app (e.g. Autostarts ), I would request some assurance that it does, indeed, list **all** registered Intent receivers, not merely some sub-set - either as documentation/statement from the author or some other evidence (e.g. analysis of which APIs the code uses). - Worst case scenario, I'll take an API specifics
DVK (2099 rep)
May 18, 2011, 06:06 PM • Last activity: Oct 29, 2023, 02:49 PM
2 votes
0 answers
190 views
Does "app lock" on the recents list keep an app alive?
I can't find a clear answer as to what "Lock app" on the recent apps list actually does, other than prevent apps from being killed or swiped away from the recent apps list. Does it also prevent an app from being killed by Android? I.e. if I lock an app, will it be running indefinitely in the backgro...
I can't find a clear answer as to what "Lock app" on the recent apps list actually does, other than prevent apps from being killed or swiped away from the recent apps list. Does it also prevent an app from being killed by Android? I.e. if I lock an app, will it be running indefinitely in the background, no matter what? Or could it still be killed by Android, just not by using "Clear all" on the recent apps list?
Magnus (631 rep)
Aug 17, 2023, 07:55 AM
3 votes
1 answers
851 views
Realtime task activity viewer for Android
There are many times when an app just stops responding and I'm not sure whether it's still working on something, or has just gone dead. Titanium Backup has done this on a number of occasions. If I could just see a list of apps and what memory and CPU percentage each is using, I'd have a better idea...
There are many times when an app just stops responding and I'm not sure whether it's still working on something, or has just gone dead. Titanium Backup has done this on a number of occasions. If I could just see a list of apps and what memory and CPU percentage each is using, I'd have a better idea of whether to wait or kill the app. Is there any way to show the nature of the activity going on with running apps, something like Windows [Task Manager](https://en.wikipedia.org/wiki/Task_Manager_(Windows)) ? BTW, I do not like the Android's "Wait/Force Close" dialog since it usually comes up prematurely.
KalenGi (289 rep)
Nov 18, 2011, 09:55 AM • Last activity: Apr 4, 2023, 06:09 PM
1 votes
1 answers
138 views
How can the power saving feature on Android phones be set not to kill tracking apps?
Those who choose a simpler cyclometer consisting of only a speedometer and distance display, but that does not include a GPS tracker can use their Android smartphone quite nicely with one of many tracker apps. At the limit a smartphone + suitable mount can act as a cyclometer. If you leave one such...
Those who choose a simpler cyclometer consisting of only a speedometer and distance display, but that does not include a GPS tracker can use their Android smartphone quite nicely with one of many tracker apps. At the limit a smartphone + suitable mount can act as a cyclometer. If you leave one such app, Strava, running on iOS/iPhone, "out-of-the-box" and without any special adjustments iOS will not kill the app, despite that it uses an unusual amount of power for the GPS sensor. But some Android phones, in particular Samsung Galaxy phones, reportedly kill Strava after a few minutes, which precludes tracking rides. How can the power saving feature on Android phones—specifically on Samsung Galaxy phones—be set not to kill tracking apps?
Sam7919 (113 rep)
Feb 10, 2023, 04:46 AM • Last activity: Feb 21, 2023, 06:56 PM
15 votes
1 answers
3831 views
How do I identify apps or settings that cause performance problems?
If I am having performance problems, what tools can I use to identify where my performance lags are coming from? I have used a [System Panel Task Manager][1], [Android System Info][2], [System Manager Free][3] and some others but none of them have really identified the problem children. System Panel...
If I am having performance problems, what tools can I use to identify where my performance lags are coming from? I have used a System Panel Task Manager , Android System Info , System Manager Free and some others but none of them have really identified the problem children. System Panel Task Manager came the closest with it's historical look at CPU and memory usage but it didn't let me look at *which apps* were using how much resources over time.
Matt (19401 rep)
Sep 14, 2010, 04:22 AM • Last activity: Nov 20, 2022, 09:57 PM
5 votes
2 answers
8480 views
How can I increase the maximum number of background apps on Android 10+?
The way Android works, there are two cases in which an app is killed. 1. The device is low on RAM. This is kind of self-explanatory, there is generally no page file on Android, and RAM is finite. 2. The maximum number of cached processes is reached. To quote a comment in the AOSP source code: > The...
The way Android works, there are two cases in which an app is killed. 1. The device is low on RAM. This is kind of self-explanatory, there is generally no page file on Android, and RAM is finite. 2. The maximum number of cached processes is reached. To quote a comment in the AOSP source code: > The maximum number of cached processes we will keep around before killing them. NOTE: this constant is *only* a control to not let us go too crazy with keeping around processes on devices with large amounts of RAM. For devices that are tighter on RAM, the out of memory killer is responsible for killing background processes as RAM is needed, and we should *never* be relying on this limit to kill them. Also note that this limit only applies to cached background processes; we have no limit on the number of service, visible, foreground, or other such processes and the number of those processes does not count against the cached process limit. I've noticed that it's not quite that simple, though. Time especially seems to be a factor. I can open 10, 20 apps and it's not a problem. Let the phone sit overnight, and it will only be 4 apps in my case. In the first case, the solution is fairly obvious: somehow increase the amount of usable RAM, whether that's by reducing the number of services running, using zRAM, using a device with a lot of RAM, etc. My device (SHIFT6mq) has 8GB of RAM, and usually only about half of that is being used, so that's obviously not the restriction in my case. Which leads us to 2. The solution here is less obvious. The most promising bit I found is this: https://github.com/crok/crokrammgmtfix , and the accompanying blog post here: https://telegra.ph/Fine-tuning-an-Android-system-04-20 . I've tried the magisk module, and tried what's listed on the blog post. Doesn't matter, when I execute su -c dumpsys activity settings the results stay the same, and when I wake up, there are still only 4 apps running, whereas there were many more before I went to bed. I also found this thread on XDA: https://forum.xda-developers.com/t/how-to-disable-adjust-the-background-task-limit.3886743/ , which has very similar measures. Problem is, this all seems to apply to Android versions under 10 - and I definitely couldn't get it to work on Android 10. Now, some would say, that's the way it should work. You know what? If I wanted the app closed, I wouldn't have left it open. Now leave it open. I have 8GB of RAM, which has shown to be more than enough for that. And it closes the apps overnight... which is specifically when I have the phone plugged in. So, how do I tweak the settings of the activity manager (or anything else for that matter) so that it stops killing apps I explicitly left open, when there's more than enough RAM available? Note: I realize there are some devices (e.g. Samsung, Huawei) with overly aggressive battery saving measures on top of that in AOSP. This is not what I'm referring to. The stock ROM on the SHIFT6mq is very close to AOSP.
trainman261 (209 rep)
Sep 29, 2021, 01:06 PM • Last activity: Oct 25, 2022, 08:23 AM
69 votes
2 answers
305916 views
How can I stop applications and services from running?
When my phone starts up there are several application/services running in the background that I would rather not. And when I press the Home button while using an app, that app usually goes into the background without exiting. How can I stop these apps from running?
When my phone starts up there are several application/services running in the background that I would rather not. And when I press the Home button while using an app, that app usually goes into the background without exiting. How can I stop these apps from running?
Matthew Read (50797 rep)
Oct 3, 2012, 11:09 PM • Last activity: Aug 31, 2022, 11:39 AM
1 votes
1 answers
2718 views
WhatsApp MessageService is always killed shortly after exiting the app
A couple of days ago I noticed that I no longer receive WhatsApp messages until I manually start the app, which is when the pending messages get delivered all at once. I started my investigation by monitoring the `com.whatsapp.messaging.MessageService` in the Application Manager. Here's what it look...
A couple of days ago I noticed that I no longer receive WhatsApp messages until I manually start the app, which is when the pending messages get delivered all at once. I started my investigation by monitoring the com.whatsapp.messaging.MessageService in the Application Manager. Here's what it looks like at first, after I exit WhatsApp: enter image description here And here's what it looks like a few minutes later: enter image description here It looks like the MessageService either quit, or it was terminated. To verify this, I checked with adb. I can see the service at first: $ adb shell dumpsys activity services | grep wh * ServiceRecord{43deec28 u0 com.whatsapp/.messaging.MessageService} intent={act=com.whatsapp.messaging.MessageService.START cmp=com.whatsapp/.messaging.MessageService} packageName=com.whatsapp processName=com.whatsapp baseDir=/data/app/com.whatsapp-1.apk dataDir=/data/data/com.whatsapp app=ProcessRecord{42d19f90 10037:com.whatsapp/u0a10187} But then this service disappears, even though the main process is still running: $ adb shell ps | grep wh u0_a187 10037 215 988084 78996 ffffffff 00000000 S com.whatsapp The service does not get terminated at the same time. I have seen it killed as early as 6 minutes after exiting WhatsApp, and as late at 11 minutes. But in the vast majority of cases, it is terminated some time on the 8th minute. I have carefully examined the logcat during the moment of service termination with the following logcat query, which I believe silences only the stuff I don't care about: adb logcat -v time LightSensor:s LightsService:s SensorService:s SensorManager:s STATUSBAR-BatteryController:s BatteryService:s HeadsetStateMachine:s android.widget.GridLayout:s MP-Decision:s SignalStrength:s McClient:s McDaemon:s QcrilMsgTunnelSocket:s | grep -v ss_tz_mobicore | grep -v ss_daemon I was not able to see anything in the logs that would hint at what happened to the service. Did it quit? Did something kill it? How can I find out? I thought that maybe the service was terminated b/c the OS was low on RAM, but this does not appear to be so. Here's the RAM at the moment of termination: $ adb shell free -m total used free shared buffers Mem: 1821 1587 234 0 75 -/+ buffers: 1511 310 Swap: 399 134 265 While working on this issue, I have used Titanium Backup to freeze all apps that might interfere with normal operation of WhatsApp, so these are the apps I froze: - Greenify - Amplify - XPrivacy I also turned off "Per App Hacking", which is an Xposed Module. Any ideas on how I can learn more about why MessageService is being terminated? **EDIT 1**: Is it possible that MessageService is supposed to get terminated, and that WhatsApp relies on GCM to be notified when there are new messages?
Val Blant (153 rep)
Sep 28, 2016, 10:42 PM • Last activity: Mar 5, 2022, 12:04 PM
0 votes
1 answers
1433 views
Show all running services on Samsung Galaxy S3
How can one show all running services on Samsung Galaxy S3? In system-menu Tinder service for example wasn't shown.
How can one show all running services on Samsung Galaxy S3? In system-menu Tinder service for example wasn't shown.
chris (101 rep)
May 23, 2016, 06:29 PM • Last activity: Mar 5, 2022, 07:07 AM
0 votes
0 answers
157 views
How to monitor log app wise usage report RAM CPU Battery and stop RAM resident apps from starting at boot
How to monitor log app wise usage report RAM CPU Battery and stop RAM resident apps from starting at boot Many time my Android 5.0 & 6.0 mobile become slow while working i checked it In process stat in developer mode that there are many of apps running and using RAM even after closing the app it mea...
How to monitor log app wise usage report RAM CPU Battery and stop RAM resident apps from starting at boot Many time my Android 5.0 & 6.0 mobile become slow while working i checked it In process stat in developer mode that there are many of apps running and using RAM even after closing the app it means they are memory resident may be for notification and running in background. We can force stop from app or kill process but it's for time being now my queries 1. Any App to.Record whole day log report for all apps how much total RAM CPU battery it's using while working on app and after closing the app means RAM using statistics app wise for whole day weak or.month 2. How to kill running apps proccess forcefully stop for temp running and freeing the ram urgently. 3. How to permanently stop (not uninstalling app) the apps or background services from.startup or disable from memory resident as and whenever we boot or start those apps run in background. Is there any way in Android to stop from.running in startup or resident memory RAM after closing app.
Androidquery (477 rep)
Jul 27, 2021, 07:52 PM
0 votes
1 answers
2804 views
How to kill an app in LineageOS 18 (Android 11) by holding the back button
How can I kill an app by holding the back button in Lineage OS 18? One of the first things I've always done when installing a new Android was to enable developer options, then scroll down to the very bottom and enable the toggle for `Kill app back button" > Kill the foreground app by long-pressing t...
How can I kill an app by holding the back button in Lineage OS 18? One of the first things I've always done when installing a new Android was to enable developer options, then scroll down to the very bottom and enable the toggle for `Kill app back button" > Kill the foreground app by long-pressing the back button I just upgraded to LineageOS 18, and I was very sad to discover that this option is missing! How can I replace this functionality on LineageOS 18 so that I can force-close misbehaving apps by holding down the back button?
Michael Altfield (526 rep)
Jul 4, 2021, 12:48 PM • Last activity: Jul 9, 2021, 07:48 PM
0 votes
0 answers
118 views
Is it possible to fully restrict/disable apps when they are closed?
I would love to have more control over when apps can run on my Android: I wish that apps can't run in background, unless I whitelist them, or unless I am using them. "Background Restriction" offers something similar. But it kills the restricted apps when they're placed in background: I can't simply...
I would love to have more control over when apps can run on my Android: I wish that apps can't run in background, unless I whitelist them, or unless I am using them. "Background Restriction" offers something similar. But it kills the restricted apps when they're placed in background: I can't simply leave them open, running in the background, until I close them. For example, I want my music player to be fully dead when I'm not using it: I don't want it to run processes in the background. But when I'm using it, it should stay alive until I close it, even if its activity is not in the foreground. This experience is very natural on desktop computers: most programs work while you leave their window open (background or foreground doesn't matter) and die as soon as you close it. I wish to have it on Android too, but Background Restriction doesn't quite offer it. The "Recents Screen" seems like the perfect tool for what I need: only the apps in the Recents Screen (and those whitelisted) should be allowed to run. As soon as I remove one from the Recents Screen, it should get killed and become fully restricted. - Can I obtain my desired behavior by tweaking some configuration or by installing some software? - Otherwise, would it be possible to implement it myself? I think it'd be enough to have a tiny script listening to/polling the Recents Screen and toggling the Background Restriction setting for apps as they are added to/removed from the Recents Screen. Are there any APIs to do this available from e.g. bash or python, without needing to create a full fledged app? I'm using rooted phones with Android 11 and the stock ROM (I have a Pixel 3XL and a Nexus 5X). A rootless solution would be better of course. I'm willing to change ROM, if that's a solution.
peoro (199 rep)
May 31, 2021, 11:30 PM • Last activity: Jun 2, 2021, 10:41 AM
4 votes
2 answers
8188 views
Phone is killing important background/sync processes (Wiko Lenny 3) – what to do?
My friend recently bought a [Wiko “Lenny 3”](http://de.wikomobile.com/m1205-lenny3), which runs Android 6.0. 1 After a short while of using it, it seems that this phone is configured by the manufacturer to very aggressively kill background apps, even ones that *should* be left running. For example:...
My friend recently bought a [Wiko “Lenny 3”](http://de.wikomobile.com/m1205-lenny3) , which runs Android 6.0.1 After a short while of using it, it seems that this phone is configured by the manufacturer to very aggressively kill background apps, even ones that *should* be left running. For example: - Apps that should be running in the background and syncing/polling for messages, such as [K9-Mail (email client)](https://play.google.com/store/apps/details?id=com.fsck.k9) or the [Signal messenger](https://play.google.com/store/apps/details?id=org.thoughtcrime.securesms) , apparently aren’t left running. Often, when opening K9-Mail or Signal, 10 or more emails/messages/texts will suddenly “arrive” all at once, many of which are hours old by then, so those apps clearly weren’t working in the background like they should’ve been and only got the chance to poll when they were manually (re-)opened by the user. This means that even basic availability and message reception (part of the whole point of a phone, one would think) is not working reliably! - We put a calendar widget (belonging to [Google Calendar](https://play.google.com/store/apps/details?id=com.google.android.calendar)) and a news app’s widget ([SPIEGEL ONLINE](https://play.google.com/store/apps/details?id=de.spiegel.android.app.spon)) on the home screen, both of which are just blank after the phone is started and are only “resurrected” by fiddling with them manually (still haven’t figured out a reliable procedure). blank calendar widget #1 blank calendar widget #2 blank news widget - If a live wallpaper is set, then after some time of using the phone (filling the RAM with other apps, presumably) or after rebooting, the phone’s wallpaper will be reset to the default, static one (Wiko logo). This also depends on whether the live wallpaper is set from the home screen (where it already disappears e.g. just from opening the “recent apps” screen) or from the settings (where it lasts longer, but still not permanently). Curiously, this only seems to affect live wallpapers that aren’t pre-installed (Phase Beam etc.), such as [Galactic Core](https://play.google.com/store/apps/details?id=fishnoodle.spacescapewallpaper_free) or [Pixel Rain](https://play.google.com/store/apps/details?id=gilleland.software.pixelrain) . Videos: [Live wallpaper cleared by “recent apps”](https://sendvid.com/lyr0ptpl) [Live wallpaper cleared by opening Firefox](https://sendvid.com/9iqz44rh) A large part of the marketing/“bonus features” for this phone seems to revolve around battery life and “optimizing” performance. It includes a pre-installed “Phone Assistant” app (cannot be disabled!) where different levels of battery saving can be set up, background apps can be killed and so on. This app also puts a “One Clean” icon on the “all apps” screen whose function seems to be killing all currently-running user apps (it plays an animation and announces having freed XXX MB of memory). Tapping this “One Clean” icon always resets the wallpaper to the static default if a (non-pre-installed) live wallpaper was set, which is why I think all this has to do with an overly aggressive background app policy (even the live wallpaper process gets killed). [Demonstration of “One Clean” (clearing live wallpaper again)](https://sendvid.com/o4wp8az7) Unfortunately, even whitelisting everything in the “Phone Assistant” and disabling as many battery saving/“optimizing” features as possible didn’t alleviate the problem. (I haven’t tested this, but I suspect that the built-in email, calendar etc. apps pushed on you by the manufacturer, most of which can’t even be disabled, are spared this violent treatment, so many people owning the phone might not really notice these issues. Just an idea.) Because of these issues with the manufacturer-provided setup, I’m very eager to install a custom ROM on the phone. However, none of the popular ones (e.g. [Cyanogenmod](https://www.cyanogenmod.org/devices) or [Paranoid Android](http://get.aospa.co/)) seem to support this phone and I certainly don’t want to brick it! Does anyone have any experience with a phone that behaves like this? What would be the best course of action? Is there a (comparatively) risk-free way to try a custom ROM or can I do anything from within the manufacturer-provided installation? --- 1 Apologies for linking the German page; for some reason the page seems to be available in every language *except* English. If you find an English version, do tell me. --- _Edit (2016-12-27):_ It seems that these issues with Wiko phones are becoming more well-known and affect an entire line of models (Wiko phones on Android 6 (Marshmallow) with only 1 GB of RAM). Even those low-tier Wiko models which came with Android 4 on release and were only later updated to Android 6 seem to then exhibit the problems I described (non-functional widgets, background/synchronization issues etc.) due to Wiko’s messed-up implementation – even though there were no issues before the update. See, for example: http://ludditus.com/2016/08/10/the-verdict-on-wiko-robby-two-weeks-later/
Socob (254 rep)
Aug 21, 2016, 04:58 PM • Last activity: Jan 8, 2021, 03:03 AM
0 votes
0 answers
136 views
Can I kill wifi on my Android, similar to how kill -9 would work on a desktop, to force restart it?
Since I upgraded to Android 10, wifi on my phone frequently "dies" and forces me to restart the phone. Is there a way to achieve something similar to what `kill -9` does on a desktop system on the processes responsible for wifi to force it to restart? The problem is that wifi is turned of and can't...
Since I upgraded to Android 10, wifi on my phone frequently "dies" and forces me to restart the phone. Is there a way to achieve something similar to what kill -9 does on a desktop system on the processes responsible for wifi to force it to restart? The problem is that wifi is turned of and can't be turned on again. If I tap the wifi switch in system preferences it briefly goes to on but then immediately reverts to off. The device is rooted.
d-b (275 rep)
Jul 26, 2020, 10:29 AM
1 votes
0 answers
1778 views
How shall I prevent an app from being killed without using third party tools?
Contrary to the traditional computing world, where programs won't quit without the user asking for it, in the mobile world (and Android in particular), it's generally considered up to the system to decide which app to quit and when, to the point where many if not most apps don't even have a quit opt...
Contrary to the traditional computing world, where programs won't quit without the user asking for it, in the mobile world (and Android in particular), it's generally considered up to the system to decide which app to quit and when, to the point where many if not most apps don't even have a quit option. Up to some extent, it's justified due to : 1. The limited amount of RAM available (contrary to the PC/Mac world where we've gone too far in the other direction, and the system by default considers a program can ask for as much virtual memory as it wants, which is a security problem, but that's another subject) 2. The devices being for the general public, in a context where people don't necessarily have the knowledge/will/time to manage their phone usage on an app by app basis 3. The apps are often designed to be used for short periods of time (which is linked to the previous point somehow) However, there are cases where one doesn't want a given app to quit unless it's asked to explicitly by the end user. The reality of that need seems to have been taken into account by some mobile phone manufacturers (if I'm not mistaken, Samsung has been providing such an option for some time now). **So my question is :** how shall I tell the system to not kill a given app ? I know there are apps that pretend to achieve this, but how shall I do that myself, without resorting to third party tools, only the stock Android command line tools and APIs ? Afaik, there seem to be three criteria to decide to kill an app : 1. Memory usage (the LMK daemon being in charge, unless a specific driver is present, in my case I have lmkd running) 2. A limit on the number of running processes 3. Battery optimisation, but there's already an option to disable that per-app, so I don't consider it a problem So basically, only points 1 and 2 remain to be solved. You advices are welcome ! For what it's worth, I run Android x86 9.0 on an emulator (qemu). **EDIT :** I checked the code of a program that's called *App Settings *, that's part of the *Xposed* framework. The program pretends to be able to set a program to stay resident in memory. After checking the code, it seems it modifies some application process attributes that are defined in the
class, namely
,
,
,
and
, setting those to the value of
-12
. I wasn't able to test the program since my x86_64 Android 9.0 doesn't seem compatible with the framework, but I found this page , explaining in more detail how the activity manager service updates OOM values according to the app status, and communicates with LMK. It explains what the OOM values can be and what they mean. So clearly, trying to change the OOM values in
/proc
is useless, as the activity manager will change them, and probably LMK doesn't even read them anyway, and only takes what the activity manager transmits. Is there any way to hint the Activity Manager into giving chosen OOM values to an app ? I could for example set the value to
, or even no more than
at all times. Or maybe passing those parameters through a specially crafted intent ? **REEDIT :** for those interested, the stop lmkd command should stop the _LMK_ daemon until next reboot at least, which leaves only the OOM killer from Linux in charge. I didn't test it so I can't say for sure, but that should do it for some people. Beware of the consequences, however, if you continue using many apps at the same time, as a performance hit can be expected.
NovHak (146 rep)
Apr 16, 2020, 03:58 PM • Last activity: Apr 25, 2020, 02:30 PM
1 votes
1 answers
1339 views
How to log/record system events or phone vibrations - Problem with Huawei Mate 20 Pro
I have a Huawei Mate 20 Pro. Awesome phone, I love it. I live in Canada, and have the model LYA-L0C. My phone is set to vibrate, so anytime I get a text or a FB message or messages from other apps my phone vibrates, and I check and I have a notification from xyz app. My phone has started to vibrate...
I have a Huawei Mate 20 Pro. Awesome phone, I love it. I live in Canada, and have the model LYA-L0C. My phone is set to vibrate, so anytime I get a text or a FB message or messages from other apps my phone vibrates, and I check and I have a notification from xyz app. My phone has started to vibrate arbitrarily, for no apparent reason. It will vibrate, I will look and check my phone and there is no notification from any app. It will vibrate again and I will check and there is nothing there. I will check through my apps and there are no new messages or anything in any of my apps. Notifications are turned on for all apps, nothing turned off in the settings of the phone. I don't know how to track down where this is coming from or what app is causing this. Is there some kind of app I can install that will monitor and log system events like vibrations and log where it came from? Or does anyone have any other better solution to this problem? Thanks in advance for the thought and suggestions!!
Konrad (11 rep)
Jan 18, 2019, 12:12 AM • Last activity: Jan 18, 2019, 05:20 PM
Showing page 1 of 20 total questions