FIXED | Whatsapp calls not coming when screen locked - Xiaomi Mi A1 Questions & Answers

I cannot receive any whatsapp call when the screen is locked, calls do come only when screen is on. This is not the case with other similar apps such as Line or Viber.
-Do not disturb mode is off.
-Battery optimization is set to 'unrestricted'
-Data saver is off
-Unlimited data usage is on
...
I tried literally every possible setting but no success. As if the phone somehow puts whatsapp calls to silent or restricts them when screen is off.
I'm rooted on Pixel Experience ROM but it is not ROM related because on other ROMs same problem occured.... could this be a kernel problem?
What might cause it?
What other possible solutions are there besides changing settings?
Hope someone could help.
---
EDIT: Managed to fix it through universal GMS doze module.
GitHub - gloeyisk/universal-gms-doze: Patches Google Play services app and its background processes to be able using battery optimization
Patches Google Play services app and its background processes to be able using battery optimization - GitHub - gloeyisk/universal-gms-doze: Patches Google Play services app and its background proce...
github.com

Related

Whitelisting Background Apps in Battery Saver mode

Hey guys,
Today I installed Lollipop 5.0.2 in my XT1068 and so far I'm really happy with it.
I'm testing the Battery Saver mode, one of the features of Lollipop that I was really intriged for. When it's on it seems to stop all background data from Whatsapp, an app that's more important than SMS for me. You don't receive any data while the phone screen is off, and you have to go specifically to the app to receive a message.
The problem here is that I don't see the option to add this app to any "whitelist" of background data and receive messages even when sleeping, as usual.
Is there any way to set that up? It's hard to believe Google would let that feature out, so I'm asking here first because I don't see any info in the Internet about this.
Thanks!
Currently you cannot whitelist apps on the Stock Lollipop Battey Saver mode. Hope Google comes out with that feature in the next L release.
Meanwhile you can download Greenify app from Playstore. It works similarly, you select the apps which you want to hibernate and then click hibernate. The apps which are running in the background will get force closed thereby reducing CPU and RAM consumption. It saves battery tremendously. If you are rooted then Greenify will auto-hibernate the apps after your screen turns off.
Hope this helped
Yes, I have Greenify Donation Package, but as of now Greenify support in Lollipop is not at 100%, because the lack of Xposed in this version. Without Xposed Framework you don't access all features I'd like to have.
I already seen some incomplete work from Google in Lollipop, like the not-so-polished notifications profiles, and RAM problems are not solved by any means.
Anyways thank you!

Disable phone system update check/notification?

I'm running a rooted 6P with TWRP and a custom kernel. Just got a notification for an OTA. Obviously, I can't run this update. How can I disable the update check? I have ROM Manager and know how to disable apps, but don't see any obvious update check system app.
Sent from my Nexus 6P using Tapatalk
I use disable services for this purpose. Download this https://play.google.com/store/apps/details?id=cn.wq.disableservice
Open and click on the system tab, then Google's play services, then scroll down to bottom and un check system update service and then reboot phone. Just don't go around disabling other things unless you know what you're doing .
Won't this create the dreaded systemupdate wakelock?
EDIT:
The tool doesn't work at all. It may be due to the fact that Amplify is installed and is blocking due to having similar functionality. I tried disabling it in amplify instead and it does remove the notification but adds a wakelock that keeps the phone awake from systemupdate. The only way of getting rid of it right now that I know if is:
A) Hold notification and choose block all notifications from google play framework but this will also block other potentially useful and relevant notifications coming from there. All notifications regarding your watch probably, plus update notifications for the framework when it's outdated etc. Disabling it all is probably not a good idea at all.
B) Using Notifyclean xposed module. Feels like an overkill for this one job but it works I guess.
NOT working methods:
A) Disabling the service: leaves a wakelock that keeps your device awake. Some says it's not "active" but showing up in bbs but that's not right, I've noted the count from screen off to screen on again and it does indeed increase when screen is off. Tried in Amplify, service disable won't work for me when Amplify is installed anyway.
B) Disabling 3 service receivers. First of all autostarts won't work on 6.0, rom toolbox lite says it works although won't show the entries unticked after reboot. It seems to work in the sense that the notification is removed. Same result here though: wakelock.
C) Combining A and B: same result.
Untried methods:
Combining A with also disabling the wakelock in Amplify.
Let me know if anyone has better/other ideas. I went for solution number B. I worry that notifyclean might cause some other issue but I'm trying it out for now. Only thing I've noticed so far is a notification synced by mighttext that is empty from notifyclean which I blocked.

Battery Saving Techniques

There's a lot of threads out there regarding battery saving techniques, but I didn't really see anything that went into a lot of detail on the OP3t. I own both an OP3t and an OP5T, and after running into some issues with the battery I have finally gotten my phone to idle fairly well on the devices and figured I would share my techniques.
Anyone that reads this and finds this useful, I encourage you to let me know the outcome of your battery after following this guide. Also if you have any suggestions/recommendations, please share them with me on here. I can update the original post and include your suggestions so that it can be helpful for other users as well.
The wakelocks category can be pretty intimiating because it's different for all users based on applications they have, but if you have some custom regex wakelocks or just standard wakelocks that you would like to share, please let me know.
Now to the guide...
Phone Specs:
OnePlus 3T - 64Gb
OxygenOS 5.0.3 (stock) & rooted with Magisk
Kernel - Bane Kernel https://forum.xda-developers.com/on...e-development/kernel-bane-kernel-r-1-t3801778
Recovery - https://androidfilehost.com/?fid=890129502657595792
Developer Options:
Developer - On
OEM Unlocking - Enabled
Advanced Reboot - Enabled
* Doze mode * - Disabled
-I need to highlight this, because I usually enable this option, and I know many others do as well. I'm not sure if my situation is an anomaly, however I must highlight if you use 3rd party battery saving apps such as naptime, forcedoze, leandroid, you should disable this mode. If you don't use these apps, then you should be okay to enable the option. I had this option enabled initially while using the 3rd party apps, and they were conflicting with my phone and my battery was draining very rapidly. It wasn't until after I disabled this option that I noticed a significant improvement with the battery.
USB Debugging - Enabled
Verify apps over USB - Enabled
Tools I use:
Amplify - https://forum.xda-developers.com/xposed/modules/mod-nlpunbounce-reduce-nlp-wakelocks-t2853874
Better Battery Stats - https://forum.xda-developers.com/showthread.php?t=1179809
ForceDoze - https://forum.xda-developers.com/android/apps-games/app-forcedoze-force-doze-mode-screen-t3377694
LeanDroid - https://forum.xda-developers.com/showthread.php?t=2743316
Magisk v16.0\5.8.3 - https://forum.xda-developers.com/apps/magisk/official-magisk-v7-universal-systemless-t3473445
Nova Launcher - https://forum.xda-developers.com/showthread.php?t=1389071
Xposed Framework v90 beta3 - https://dl-xda.xposed.info/framework/sdk26/arm64/xposed-v90-sdk26-arm64-beta3.zip
OOS Debloater v5 - https://forum.xda-developers.com/on...hemes-apps--mods/aroma-oos-debloater-t3615828
Amplify Settings:
WakeLocks:
Wakelocks(Allow every 900 seconds)
WakefulIntentService[GCoreUlr-LocationReportingService]
NetworkStats
Wakelocks(Allow every 3600 seconds)
WeatherUpdateService
Wakelocks(Allow every 10800 seconds)
SyncLoopWakeLock(delays sync)
*net_scheduler*
GCoreFlp
Icing
Wakeful StateMachine: GeofencerStateMachine
NfcService:mRoutingWakeLock
wake:com.pushbullet.android/.gcm.GcmService
SyncService(Package: Push Bullet)
ai(Package: Push Bullet)
ae(Package: Push Bullet)
AsyncService
Wakelocks(Allow every 41400 seconds)
NlpWakeLock
NlpCollectorWakeLock
LocationManagerService
Config Service Fetch
Wakelock regex:
*gms* 900 seconds
*facebook* 9999999 seconds (if you use facebook)
Alarms:
Alarms(Allow every 600 seconds)
com.android.internal.telephony.data-stall
Alarms(Allow every 1800 seconds)
com.oasisfeng.greenify.CLEAN_NOW (If you use greenify)
Alarms(Allow every 3600 seconds)
android.appwidget.action.APPWIDGET_UPDATE
Alarms(Allow every 7200 seconds)
android.content.syncmanager.SYNC_ALARM(delays sync
Alarms(Allow every 10800 seconds)
android.net.ConnectivityService.action.PKT_CNT_SAM PLE_INTERVAL_ELAPSED
com.facebook.common.executors.WakingExecutorServic e.ACTION.ALARM.com.facebook.katana
com.google.android.apps.hangouts.CLEANUP_DB
com.pushbullet.android/.gcm.GcmFixReceiver
com.android.server.action.NETWORK_STATS_POLL
com.diune.pictures.intent.action.MEDIA_CHECK
LocationManagerService
Alarms[LOCATION](Allow every 41400 seconds)
ALARM_WAKEUP_LOCATOR(com.google.android.gms.nlp.AL ARM_WAKEUP_LOCATOR)
ALARM_WAKEUP_CACHE_UPDATER
ALARM_WAKEUP_BURST_COLLECTOR(com.google.android.gm s.nlp.ALARM_WAKEUP_BURST_COLLECTOR)
com.google.android.gms.location.fused.GPS_ALARM_BA LANCED_ACCURACY
ALARM_WAKEUP_ACTIVE_COLLECTOR
ALARM_WAKEUP_PASSIVE_COLLECTOR
ALARM_WAKEUP_BURST_COLLECTION_TRIGGER
com.google.android.intent.action.SEND_IDLE
ALARM_WAKEUP_ACTIVITY_DETECTION
com.google.android.location.reporting.ACTION_UPDATE_WORLD
Alarms(Allow every 93600 seconds)
android.app.backup.intent.RUN
com.google.android.gms/.checkin.EventLogService$Receiver
com.google.android.gms/.checkinCheckinService%Receiver
Alarms regex:
ALARM_WAKEUP[0-9]+ 9999999 seconds
ForceDoze
These are the options I have checked in Forcedoze settings. Everything else is unchecked.
Turn off while charging - checked
Show persistent notification - checked
Ignore lockscreen timeout - checked
Disable motion sensing for Doze - checked
LeanDroid
Disable​Wi-Fi - checked
Cellular data - checked
Cellular Radio - unchecked
Bluetooth - checked
Network location - checked
GPS location - checked
Switch​Cellular network mode to 2G - unchecked
5 min after screen off except (click except to add exceptions)
The only options I have checked under the exceptions are the following:
Except if tethering - checked
except if charging (AC) - checked
except if charging (USB/wireless) - checked
Disable (Under Exceptions settings)​The only options I have checked are
Under (wi-fi, data, network mode)
Except if active: limit 3KB/s - checked
Under Bluetooth
Except if connected - checked
Under Location
Except if GPS in use - checked
Now back to the Leandroid home screen the following settings under "Restore"
I have selected "After screen unlocked"
Every 60 min for 60 seconds after screen off - checked
except 11PM - 6AM - checked
Except below 15% - checked
Magisk
The only module I use in Magisk is "Sysconfig Patcher" - This is supposed to help with optimizing battery for the google services (that are normally exempt from battery optimizations)
Xposed
The modules I have enabled are:
Amplify
ForceDoze
No Device Check (this is a xposed module you can download from the app that helps make SafetyNet check pass)
Now in Android Settings --> Data usage
Click on the cellular data usage as well as the wifi data usage, you can click on an app that shows up in that list that uses up a lot of data and when you click on it, there is an option to toggle off the option "Background data"
I'm not sure if this is really needed, but what I did is I went through the apps that used the most data (including google play store and google play services) and I toggled the background data off
Android Settings --> Battery
Click "Battery Optimization" --> click the ellipses (top right corner) --> Advanced optimization --> turn this on
Android Settings --> Apps --> Special Access --> Usage Access
Turned off for google play store and google play services
Android Settings --> Apps --> Special Access --> Unrestricted data access
All apps are turned off
These are all my custom settings. If you would like to share any, let me know!
Probably you didn't search enough.
There are many helpful topics here or at Oneplus forum for Amplify, Betterbatterystats or with guides for increased battery.
Sent from my ONEPLUS A3003 using Tapatalk
RASTAVIPER said:
Probably you didn't search enough.
There are many helpful topics here or at Oneplus forum for Amplify, Betterbatterystats or with guides for increased battery.
Sent from my ONEPLUS A3003 using Tapatalk
Click to expand...
Click to collapse
There are several very useful posts each individually spread around these forums; the purpose of this thread is to have a unified source so people don't have to look all over like I did. I know you initially posted on my thread when I had terrible battery drain issues; and after I posted the information you requested, I haven't heard anything from anyone so I had to troubleshoot and fix it on my own. I guess what I'm saying is, I just want to help others in case they run into a similar situation because it can be frustrating when you're seeking guidance or help and no one responds.
I use Naptime and also had enabled the Doze mode in the settings, so like you say i disabled doze mode now and kept naptime running , ill update this post with my findings
manohar3787 said:
I use Naptime and also had enabled the Doze mode in the settings, so like you say i disabled doze mode now and kept naptime running , ill update this post with my findings
Click to expand...
Click to collapse
Yeah, keep me posted. I'd be interested to see if your results are similar to mine. Were you also having a lot of battery drain despite using naptime and doze mode?
manohar3787 said:
I use Naptime and also had enabled the Doze mode in the settings, so like you say i disabled doze mode now and kept naptime running , ill update this post with my findings
Click to expand...
Click to collapse
@manohar3787 - curious to hear about your phone after turning off doze. Any updates?
Leandroid app is responsible of a severe wakelock, I think is almost better not to have it? Any opinion?
Also, what about RILJ And RILJ_ACW_WL wakelocks? Are these safe to block?
Sent from my ONEPLUS A3003 using Tapatalk
RILJ was safe to block on nougat and below, but in Oreo+ it will actually cause a lot of trouble with the system. The other wakelock you mentioned "RILJ_ACW_WL", I'm not familiar with. What I woudl recommend is do a full backup in your recovery, then make the change to observe what happens. If it messes things up you can recover from your backup.
Regarding Leandroid, I haven't really heard any concerns with it. There have been some responses of users that didn't find it to help any, but I haven't heard of it having an adverse affect.
Another app I haven't tried, but am tempted to try at some point is called Island: https://play.google.com/store/apps/details?id=com.oasisfeng.island
Also a thread about it here: http://forum.xda-developers.com/android/-t3366295
@xNAPx - how is your SOT and your idle battery like? DO you use any 3rd party apps/tools to help with battery drain?
m0d hipp¥ said:
RILJ was safe to block on nougat and below, but in Oreo+ it will actually cause a lot of trouble with the system. The other wakelock you mentioned "RILJ_ACW_WL", I'm not familiar with. What I woudl recommend is do a full backup in your recovery, then make the change to observe what happens. If it messes things up you can recover from your backup.
Regarding Leandroid, I haven't really heard any concerns with it. There have been some responses of users that didn't find it to help any, but I haven't heard of it having an adverse affect.
Another app I haven't tried, but am tempted to try at some point is called Island: https://play.google.com/store/apps/details?id=com.oasisfeng.island
Also a thread about it here: http://forum.xda-developers.com/android/-t3366295
@xNAPx - how is your SOT and your idle battery like? DO you use any 3rd party apps/tools to help with battery drain?
Click to expand...
Click to collapse
My SoT is dependent on the usage, night drain is less than 1% a hour even 0% sometimes, SoT is between 7 and 5 h
About those wakelock I've heard the same about RILJ on Oreo, about the other one I don't know but is heavy as well.
About Leandroid I'm not very convinced. It messes up with notification and now I have another big wakelock to worry about
Sent from my ONEPLUS A3003 using Tapatalk
Unable to End Google play services
i am unable to doze google play services since am already running doze mode+magisk modules(sysconfig patcher + enable doze moe for gms )
Still i can see play services in Running services
Kind help needed
@xNAPx - do you have any custom settings or tools you use? Do you use Greenify?
What are the big wakelock issues that you have trouble with? Is it the one you mentioned "RILJ_ACW_WL" or other ones?
@Anusha Rao - Are you using doze mode within the Android system or 3rd party tools like I posted?
I don't think you want to use both magisk modules. As I mentioned in my post, I only use the sysconfig patcher. And make sure you reboot the phone after enabling that.
To check and see if google play services is being optimized for battery try going here:
Settings --> Apps --> Application List--> Google Play Services --> Battery
When I look at mine it shows 0m in use
0% battery usage
Battery Optimization:
Optimizing battery use
EDIT:
I'm posting screenshots of my googple play store and the google play services having battery optimization enabled and using 0% battery.
BTW, just so we're on the same page, you shouldn't completely "stop" google play services because it's essentially what drives the OS. Those services are important for letting your phone operate correctly. My thread is about optimizing those services not disabling/stopping them.
If you want to completely "freeze" certain apps and services you can try out that application I posted in my previous post called "Island". I'd be curious to hear how it works out.
That one plus "RILJ" plus "LEANDROID service" (which I un installed) , and also "AudioMix" and "xalarmx"
Sent from my ONEPLUS A3003 using Tapatalk
Amplify tells me I need to root my device but I have Magisk installed...?
I'm not familiar with the rom that you have "Dirty Unicorns". I use the stock ROM.
Most custom roms have root built in though so you might not even need to use magisk or super SU. You can check to see if there are any custom rom settings o maybe go into developer settings and see if you see a "Root" option.
Face unlock is not supported in the "Bane Kernel".
Does Lean Droid caused more battery Drain?
m0d hipp¥ said:
@Anusha Rao - Are you using doze mode within the Android system or 3rd party tools like I posted?
I don't think you want to use both magisk modules. As I mentioned in my post, I only use the sysconfig patcher. And make sure you reboot the phone after enabling that.
To check and see if google play services is being optimized for battery try going here:
Settings --> Apps --> Application List--> Google Play Services --> Battery
When I look at mine it shows 0m in use
0% battery usage
Battery Optimization:
Optimizing battery use
EDIT:
I'm posting screenshots of my googple play store and the google play services having battery optimization enabled and using 0% battery.
BTW, just so we're on the same page, you shouldn't completely "stop" google play services because it's essentially what drives the OS. Those services are important for letting your phone operate correctly. My thread is about optimizing those services not disabling/stopping them.
If you want to completely "freeze" certain apps and services you can try out that application I posted in my previous post called "Island". I'd be curious to hear how it works out.
Click to expand...
Click to collapse
Disable background data in Play Store and Play service will not disabling them right?
@Bintang Ksatria - Leandroid should be using less battery. @Rvl7 - No it won't disable them. I still use them, but it's on manual load, and not in the back ground. At least that has been my experience.
m0d hipp¥ said:
@Bintang Ksatria - Leandroid should be using less battery. @Rvl7 - No it won't disable them. I still use them, but it's on manual load, and not in the back ground. At least that has been my experience.
Click to expand...
Click to collapse
A good post , it helps us a lot .

How can i fix heartbeat_alarm drain issue?

Hello everybody.On my phone miui 12.6 by xiaomi.eu
I have a problem about battery drain because of Google play services.On better Battery stats i see "com.google.android.gms.gcm.HEARTBEAT_ALARM" causes too much battery drain by alarms.
So i found Database.db file which is responsable the alarm intervals and i can change the intervals by a sql database app.But after the restart i found out that, (probably another service or app or the system), the intervals are reset to the default ones.So i can not fix that problem.Every time i try to fix it resets again.Can i fix this issue by some way?Or is there another way to modify the app to prevent it to wake up the phone too much and cause battery drain?
Thank you.
stranger_88 said:
Hello everybody.On my phone miui 12.6 by xiaomi.eu
I have a problem about battery drain because of Google play services.On better Battery stats i see "com.google.android.gms.gcm.HEARTBEAT_ALARM" causes too much battery drain by alarms.
So i found Database.db file which is responsable the alarm intervals and i can change the intervals by a sql database app.But after the restart i found out that, (probably another service or app or the system), the intervals are reset to the default ones.So i can not fix that problem.Every time i try to fix it resets again.Can i fix this issue by some way?Or is there another way to modify the app to prevent it to wake up the phone too much and cause battery drain?
Thank you.
Click to expand...
Click to collapse
Test this magisk module
[MODULE] Universal GMS Doze
Universal GMS Doze Overview - Patches Google Play services app and certain processes/services to be able to use battery optimization - Support API 23 or later Download Links (Archives): - GitHub Releases - Mediafire - MEGA - SourceForge -...
forum.xda-developers.com
joke19 said:
Test this magisk module
[MODULE] Universal GMS Doze
Universal GMS Doze Overview - Patches Google Play services app and certain processes/services to be able to use battery optimization - Support API 23 or later Download Links (Archives): - GitHub Releases - Mediafire - MEGA - SourceForge -...
forum.xda-developers.com
Click to expand...
Click to collapse
Thank you very much.I already know that and i did not mention it because i already installed that module.But when i saw your response, i tried to check it and figured it out that it was not active.Then i tried to activate it again and now it works.Thank you again.

Getting through Doze mode with outgoing network operations

Still quite new with Android, looking for recommendation!
I'm working on an application for the elderly with neurodegenerative aging and I'm looking to implement a solution for geofencing, alerts, SOS, and general location tracking when the participant is out of his residence. That said, with the recent restrictions on apps and services for battery and resources optimizations, I have not been able to get through with the location logging functionality.
Basically the requirement for this component (app/service) is simply to launch every 5~ minutes and log the location data in a remote database. The data is currently sent correctly while the watch is awake. Maybe I tried something wrong or this is just impossible in the end.
Here is what I tried and why it doesn't work:
- Full app with activity -> Requires user interaction and gets killed/delayed/paused by the OS
- Background / Foreground Service, launching a repeating job-> Gets delayed by Doze mode
- Alarm with setExactAndAllowWhileIdle() -> Fires through Doze, but still doesn't have network access
- Disable Doze mode with adb -> doesn't stick through watch restart and doesn't actually work with '"./adb shell dumpsys deviceidle disable"
- Request app permission to not be affected by battery optimization -> Doesn't seem to work either as the data isn't sent
Here are some possible solutions:
- OS mod to disable Doze or completely allow an app through it. Is it even possible ?
- Possible to change wake sensitivity ?(doesn't seem to wake with minimal elderly movement/walking speed)
- Somehow receive a FCM alert and pray the app has enough of 10 sec to get and send the data (there is also a limited amount on those messages)
What would you recommend, or have done in another project to get through Doze?
Links for reference:
Optimize for Doze and App Standby | App quality | Android Developers
Test and optimize your app for the power-saving features in Android 6.0.
developer.android.com
Power management restrictions | App quality | Android Developers
Understand system-imposed power restrictions.
developer.android.com
Platform Power Management | Android Open Source Project
source.android.com

Categories

Resources