[Q] Theoretical question regarding partial wakelocks - Android Q&A, Help & Troubleshooting

Hello people!
I often use my phone all-day to listen to music on my XSP, while the device is in my pocket.
The music player requires a wakelock to be able to work, which is understandable.
The downside however is that a single wakelock from the music player allows everything else on the phone to execute at the moment too.
So here's my question: would it be possible in any way (OS, Xposed, kernel mod) to create a new special kind of wakelock that allows only the caller app (or selected apps) to execute?
Like, trick every other app or system itself into thinking that there is no wakelock being held?

You could check if your phone has the latest CM support, or try and get a third party Privacy Guard app, this should allow you to wake/disable wake locks or keep awake status for select or all apps. Using the built in CM privacy guard to disable wake lock on Google play services since it drains the battery a lot

Aditya Srinidhi said:
You could check if your phone has the latest CM support, or try and get a third party Privacy Guard app, this should allow you to wake/disable wake locks or keep awake status for select or all apps. Using the built in CM privacy guard to disable wake lock on Google play services since it drains the battery a lot
Click to expand...
Click to collapse
You didn't understand me. I don't want to disable wakelocks. I want to control which parts of the system they actually wake.
I probably posted this in wrong section. This is more of a developer question.

XspeedPL said:
You didn't understand me. I don't want to disable wakelocks. I want to control which parts of the system they actually wake.
I probably posted this in wrong section. This is more of a developer question.
Click to expand...
Click to collapse
Ahh my bad, yes it's better if posted in the developer section or Q&A of a developer thread

This post is in the correct section.

Related

Which apps to whitelist for aggressive doze?

Hey guys. I used to use aggressive doze, but it seemed like I was having a problem getting alarm/timer notifications. To make sure I don't miss important notifications are there other services I need to be sure to whitelist besides the clock app, phone app, etc.?
acts4:12 said:
Hey guys. I used to use aggressive doze, but it seemed like I was having a problem getting alarm/timer notifications. To make sure I don't miss important notifications are there other services I need to be sure to whitelist besides the clock app, phone app, etc.?
Click to expand...
Click to collapse
Normally you don't have to whitelist anything except those apps from which you need notifications. Google Play Services which is required for notifications, is already whitelisted.
Apps which are made compatible to MM's Doze function need not specifically be whitelisted. So even the phone app and clock app need not be whitelisted if they are Google's. Only third party apps which have not been made compatible (from which you need notifications) need to be whitelisted.
I've noticed that if you navigate with the screen off, whatever app you are using to navigate will get Dozed until you wake the device, so I'd whitelist whatever navigation app you use if you navigate with your screen off. Otherwise, as tnsmani said, I haven't found a good reason to whitelist any other apps.
Sent from my Nexus 6P using Tapatalk
Yes, the whitelist option isn't working properly. It doesn't matter which 3rd party app you are trying to be in a whitelist, it won't show any notification until you turn your screen ON.
Shayan.Ali said:
Yes, the whitelist option isn't working properly. It doesn't matter which 3rd party app you are trying to be in a whitelist, it won't show any notification until you turn your screen ON.
Click to expand...
Click to collapse
https://forum.xda-developers.com/apps/greenify/affect-proximity-sensor-t3632444/post73776780

Add feature(Very deep sleep)

Hello everybody,
I have Mi Max 32GB+Magisk+greeny donation package
I use my phone for games and wifi +no sims
Greenify is good for battery saving,but It allows apps to sync in background.I need to prevent that.
Please,Can you add this feature ( very deep sleep) that can do the following:
-Blocking all system and third party apps wakelocks and notifications
-Block sync
-Disabling wifi and bluetooth
-Lowest brightness
-make cpu deep sleep
Purpose:Achieve the best battery backup
Please help me
leprince2007 said:
Hello everybody,
I have Mi Max 32GB+Magisk+greeny donation package
I use my phone for games and wifi +no sims
Greenify is good for battery saving,but It allows apps to sync in background.I need to prevent that.
Please,Can you add this feature ( very deep sleep) that can do the following:
-Blocking all system and third party apps wakelocks and notifications
-Block sync
-Disabling wifi and bluetooth
-Lowest brightness
-make cpu deep sleep
Purpose:Achieve the best battery backup
Please help me
Click to expand...
Click to collapse
Unnecessary. Simply place device in 'airplane/flight' mode when not in use. This action can be automated using a variety of tools (eg: Xposed Edge, MacroDroid, Tasker, etc). That said, battery saving using this strategy will be minimal as modern ROMs and hardware conduct background tasks quickly/efficiently during doze maintenance windows.
Davey126 said:
Unnecessary. Simply place device in 'airplane/flight' mode when not in use. This action can be automated using a variety of tools (eg: Xposed Edge, MacroDroid, Tasker, etc). That said, battery saving using this strategy will be minimal as modern ROMs and hardware conduct background tasks quickly/efficiently during doze maintenance windows.
Click to expand...
Click to collapse
I turn on airplane mode all the time
Please help me accomplish one of these tweaks:
1-Doze mode:It has maintenance windows that allows apps to sync.How to disable this sync completely?
2-Greenify:It contains an option called "Wakeup Timer Coalescing" that allows apps to sync in specific time instead of app syncing all the time.How to disable this sync completely?
In few words:I need an option to disable apps sync completely,please.
Please help me
leprince2007 said:
I turn on airplane mode all the time
Please help me accomplish one of these tweaks:
1-Doze mode:It has maintenance windows that allows apps to sync.How to disable this sync completely?
2-Greenify:It contains an option called "Wakeup Timer Coalescing" that allows apps to sync in specific time instead of app syncing all the time.How to disable this sync completely?
In few words:I need an option to disable apps sync completely,please.
Please help me
Click to expand...
Click to collapse
As previously stated in at least two other forums the proposed actions are unnecessary and counterproductive. If you want to disable sync do so in Android settings. Wakeup Timer Coalescing works to your advantage to extend battery endurance. However, if you believe it to be evil (??) simply disable in Greenify settings. If you don't want any form of network activity use airplane mode. Putting your device into a comma ("very deep sleep") is counterproductive as any savings obtained while sleeping will be offset my a burst of activity and sluggish response when manually woken. That's what the power button is for.

Help! Background services getting killed.

I have a problem where background services getting killed when recent are cleared.
Apps on question run at boot without visible windows eg. KinScreen, lux, fluid gesture
I have disable miui optimization in developer options, selected no restriction on battery saver and set apps to autostart.
problem still persist if recent are cleared all these services get killed.
Any way to prevent background services being killed??
I have root and open to suggestion but prefer to stay on miui.
i have same question,,
I have this issue too. What I did was lock my apps in recents. Not a clean way to do it, but it works.
NOTE: I posted this same issue in MIUI forums and seems that we're not alone and the issue is MIUI RAM management itself. I hope it gets fixed in future MIUI versions but for now the workaround I gave is our best shot. Hope this helps and enjoy your Poco, I know I am
First, in app info sections, you turn on autostart for each required app.
Secondly, in battery settings, give each required app >no restrictions policy.
Thirdly, lock them in recent menu.
Done.
You need to do these steps for apps such as alarm, email clients and the ones you mentioned. I had to do this with Google photos as well so that it could sync on its own.
lockhrt999 said:
First, in app info sections, you turn on autostart for each required app.
Secondly, in battery settings, give each required app >no restrictions policy.
Thirdly, lock them in recent menu.
Done.
You need to do these steps for apps such as alarm, email clients and the ones you mentioned. I had to do this with Google photos as well so that it could sync on its own.
Click to expand...
Click to collapse
yes ive done all this but the problem with this is
1. my recent mennu is filled with locked apps
2. some apps start as purely service no visible window
i have to launch it manually so the window appears in recents. eg lux and kinscreen.
any solution to make miui to treat apps and services like stock android. No other OS does this. This is ridiculous
I'm out of ideas now.:laugh:
Check if disabling cleaning of cache memory in battery settings changes anything for you.
Same here. Tried this all, but apps still getting killed. I can't use my gear fit 2 pro app in background. Everytime I clear the recent menu gear got disconnected. Someone please help!
POCO F1 - No root - Locked bootloader - Fully stock
This is the most annoying thing about MIUI. I use Blokada and I need to keep it locked on recents which I hate the most. If I don't lock it and clear recets, Blokada gets killed and VPN gets turned OFF. Can't use live wallpaper for the same reason. On AOSP based ROMs, this problem doesn't exist. It smartly understands which apps need to run in the background and which apps can be killed. Hence, no need to keep an app on the recents. I don't understand what's the necessity of being so aggressive about RAM management when we have 6/8 GB of RAM. Due to this pathetic RAM management, I always see almost 3.9/4 GB free RAM out of 6 GB. And as we know, free RAM is wasted RAM.

I need to keep an app running in background and make it not visible in recent apps tab

Hello dear developers. I'm newbie here. I mean I took lots of information from XDA but it's my first time to post a question (i just made an account to ask this question)
MY PROBLEM IS :
As a MIUI user I'm having too much problems with it's powerfull but annoying Battery Optimisation. I have bought and installed an app to Customize my volume control panel and MIUI has a bug in Accessibility Settings. Unfortunately this app requires it and I'm having trouble with it.
The app must be running constantly to avoid triggering the bug. For the ones who don't know the bug it is happening when You enable an accessibility setting for an app and if the app ever gets killed by MIUI's complicated optimisation then "Enable" button in Accessibility tab is being always active but doesn't works. I'll provide some screenshots at the bottom.
I have enabled autostart, Pinned the app in Recently Used apps tab, Removed Battery optimisation but none of them helps.

Question Consistently get notifications Find N2?

New here. Any help would be appreciated. I have followed videos and other posts but still can't consistently get notifications unless the app is open in the background. Any way around that besides locking it? Are we just limited to 5 apps that get consistent notifications by locking them in the background?
There are 10 apps (can't change the apps) that Oppo gives you the option to auto launch. If enabled these 10 apps will always display notifications. You can then select another 5 from all your other apps.
Before I got rid of the phone I downloaded an app to autolaunch a bunch of my apps so it's running in the background.
any way to set NOVA Launcher or other third party launcher as default here ?
Dear OPPO if you are reading here: Please release OTA to fix this problem as you just made on Android 13 and Find N1 ....
wolfgart said:
any way to set NOVA Launcher or other third party launcher as default here ?
Dear OPPO if you are reading here: Please release OTA to fix this problem as you just made on Android 13 and Find N1 ....
Click to expand...
Click to collapse
There are threads on this already.
raymondotango said:
There are threads on this already.
Click to expand...
Click to collapse
ok but 0 solutions atm
raymondotango said:
There are 10 apps (can't change the apps) that Oppo gives you the option to auto launch. If enabled these 10 apps will always display notifications. You can then select another 5 from all your other apps.
Before I got rid of the phone I downloaded an app to autolaunch a bunch of my apps so it's running in the background.
Click to expand...
Click to collapse
You can further lock 5 apps in the recent apps so that the system doesn't kill them and you'll get the notifications. In addition I would suggest to deactivate all battery optimisations for the apps you wish to receive the notifications:
Settings - apps - app management - you choose the desired app - battery usage - activate allow background activity.
Then you go to App - associated launch ( this is valid for the apps for which you DIDN'T allow auto launch) and enable it for the apps you wish to get the notifications for.
Lastly go to Battery - more settings - optimize battery use and for the apps you wish to get the notifications you need to choose "don't optimise".
Hope it helps
Abies78 said:
You can further lock 5 apps in the recent apps so that the system doesn't kill them and you'll get the notifications. In addition I would suggest to deactivate all battery optimisations for the apps you wish to receive the notifications:
Settings - apps - app management - you choose the desired app - battery usage - activate allow background activity.
Then you go to App - associated launch ( this is valid for the apps for which you DIDN'T allow auto launch) and enable it for the apps you wish to get the notifications for.
Lastly go to Battery - more settings - optimize battery use and for the apps you wish to get the notifications you need to choose "don't optimise".
Hope it helps
Click to expand...
Click to collapse
Unless the apps are running in the background (excluding the ones that you set to autolaunch), even with battery optimisation disabled etc you will not get timely notifications.
raymondotango said:
Unless the apps are running in the background (excluding the ones that you set to autolaunch), even with battery optimisation disabled etc you will not get timely notifications.
Click to expand...
Click to collapse
Yeah that's what I have noticed. I'm toying with the idea to use a secondary phone to get my notifications. Don't want to go through the hassle of sending it back.
I've had mine a week now and I'm getting used to only getting limited notifications. I just can't get my head around why they prioritise battery life over receiving notifications in China? I've always kept notifications to a minimum on my phones but 5 apps just isn't enough. You need a couple of messaging apps, maybe social media, banking etc to alert you to suspicious activity, they soon add up.

Categories

Resources