Disable Doze function entirely - Android Q&A, Help & Troubleshooting

I have tried now on two newer Android phones (Huawei Mate 20 with Android 10, Samsung Galaxy A7 2018 with Android 9) what happens if I track my position with GPS and then stop for 30+ minutes.
The result is every time, on both devices, that the GPS signal is lost after stopping for 10-30 minutes, and it is not regained without manually waking up the phone (wakeup Apps don't work, moving again doesn't work).
This happens with all tracking apps I've tried (about 10); I tried the different location modes; I have turned off ALL options which are for power saving, for all apps; I even deinstalled PowerGenie and the SystemManager on the Huawei device via ADB. Therefore, this is definitely NOT a problem of settings, nor of a specific firmware.
I now suspect that the aggressive "Doze" feature that was introduced in Android 6 is responsible for this. So is there any way to completely disable it?
I want that GPS tracking will continue regardless of whether I move or not, will always try to reconnect when signal is lost, until the battery is at 5% or less - without me touching the phone even once after starting the tracking app.

Related

GPS position locking on Androids for days

Hello everyone!
We have an fleet management app that runs continuous background updates every 1 minute using an Android service. We are seeing that sometimes the devices are failing to receive new GPS locations, and continuously report that they are at one location, when they are actually somewhere else. You can imagine this doesn't work well for a fleet management app. Rebooting the device seems to rectify the problem in the short-term. It also doesn't happen on every phone, even if they are the same model with same fw.
Any ideas? Thanks!

Tasker profile becomes inactive after phone is idle for 10 minutes

Hi all,
I have an AT&T Samsung Note 3 SM-N900A running Android 4.3 (baseband version N900AUCUBMJ5, kernel v3.4.0-1625098). I rooted it using Kingo, installed Tasker (with Secure Settings plugin), and created 2 profiles: one with a 'Home' location context, and one with a 'Work' location context. In the 'Location Edit' map screen for each, I set a pinned location w/ a radius of 200m. I also de-select 'GPS' (leaving only 'NET'), since I don't want GPS enabled all the time (to extend battery life). I confirm that these work when I'm actively using the phone.. the profile becomes active when I'm at the specified location (as expected). I know it's active because it's displayed in the Notification Panel (and it's also shown in green in the Tasker profiles list).
The issue I'm having is that after ~10 minutes of idle time (i.e. when the display is off and I'm not using the phone), I find that the profile is no longer active when I turn the display back on and start using the phone again. I confirmed that this *doesn't* happen after 1 minute, 2 minutes, nor 5 minutes… only > 10. I also confirmed that it happens for both profiles consistently. However, as soon as I start Tasker again from the Apps Drawer (or from Recent Apps screen), the profile is immediately activated again, and my Enter task is re-run.
I enabled the run log in Tasker prefs, but it basically shows a clean activation of the profile (with no warnings or anything that looks weird to me).
I know there's a 10-minute timeout in the Display Off Monitoring prefs, but that doesn't seem to be related to my issue. I tried reducing the All Checks Seconds from 600 to 90, rebooted the phone, and it still took ~10 minutes before the profile would become inactive after the phone being idle.
Any thoughts as to what the culprit might be? Are there any system logs I can look at that might shed some light here? I'm new to Android, and this seemed like the place to ask..
Thanks.
Ok, not solved..
Alright, bumping this, as the problem is back again after some time.
Has anyone ever seen Tasker exhibit the behavior I described? Again, I start the phone and Tasker profile is active, let the phone go idle for >10 minutes, the profile is no longer active and I need to restart Tasker manually to make it active again.
Still trying to figure out what logs are best to look at..

Using Llama App on Marshmallow

I have a question about using Llama on Marshmallow. I wrote a basic script that enables airplane mode every 10 minutes and queues another task called disable airplane mode that has a delayed start of 9 minutes. So basically every 10 minutes my device turns off airplane mode for a minute then turns it back on. I left the script running over night, with my phone plugged in and it worked perfect. When I run the script without the phone plugged in, it only works for about 60 to 90 minutes. Sometimes it says conditions no longer true so repeating event canceled and sometimes I see nothing indicating why the repeating event stopped. My initial thought is that when plugged in, Marshmallow does not use Doze. Could Doze be causing a problem and preventing the task from running? I have whitelisted Llama along with 30 or 40 other apps and I am continuing testing. If you have any thoughts, I would greatly appreciate it!
Llama on Marshmallow
Not sure if anyone else is still trying to use llama on Marshmallow, but I found a work around. Polling wouldn't work at all for me so I started using WiFi connections and deleting out the entering / exiting location conditions. Wifi is everywhere now a days. This seems to work well unless you were trying to turn your WiFi off and on based on location. I'd tried e-robot for the same thing and it worked sometimes but not others. Couldn't figure what was going wrong there. Llama is still way easier to set up and more reliable than the alternatives I've tried.

Android (various versions) – Delayed push notifications on mobile data

I have a phone with Nougat 7.1.1, but also older phones (eg with Lollipop and Gingerbread): the common trouble on all phones is that I have an annoying issue when connected using mobile data:
all the apps which relies on push notifications (eg whatsapp, facebook messenger, Hangouts and Gmail) doesn’t receive push notifications in realtime or in a acceptable time: I mean that I receive notifications - delayed - also after 30 minutes or i receive them only when I turn on the screen. On all these phones I use a SIM card of same carrier.
When I am connected using Wifi (so without mobile data) I receive notifications in realtime (in about 1 or 2 seconds).
What I checked is that all these apps have background data always enabled and I don’t use any battery saver app.
Is like if the mobile data, after some minutes of inactivity, falls in a sort of idle status, and needs to be kept awake: in facts, if I use a method to run a ping command every X minutes, the notifications are received in an acceptable time (in few seconds).
Not all of my phones are rooted: on the phones which are rooted I solved by installing the app called “Push Notification Fixer”; I am aware of the fact that there’s also available the “NO ROOT” version of such app, but doesn’t works for me.
I said “if I use a method to run a ping command every X minutes, the notifications are received in an acceptable time (in few seconds)”: I noticed that mobile data of my carrier falls in a “sleep” state after about 7 minutes: so I setup the following command in a Terminal Emulator:
Code:
ping -i 420 www.google.com
420 is the time in seconds, which is equal to 7 minutes.
The ping method, however, cause other issues: it cause a lot of wakeups (as I can see from Better Battery Stats) and sometimes I notice that it hangs: I excluded the Terminal Emulator from battery optimization and from data saver (and I enabled the option “Wake Lock” (to keeps phone from sleeping while running a command) , but this doesn’t help: I also excluded Google Play Services from battery optimization/Doze and I ensured that background data is not restricted
Obviously I’ve also tried to wipe applications cache and uninstall and reinstall applications: however, since with Wifi I don’t have any trouble, seems not a fault of the phone or apps, since I faced this issue on all phones and different versions of Android: always occurs with mobile data but not with Wifi.
Is sure the fact that when I am on mobile data the phone needs to be awake to receive the notifications. I repeat that when I am connected using wifi, the notifications are instant.
I don’t think that Doze is the culprit: as I’ve said I excluded apps and Google Services from battery optimization/Doze.
I also disabled the data saver option. I have notifications delay issue only when connected with mobile data: furthermore the signal strenght of my carrier (4G) is good.
What can I do (a robust and reliable method) to keep the mobile data connection always active?
I also tried by using “Connection Stabilizer” from the Play Store: this app, also have a method to run a ping command every X seconds or minutes, but also this app suffer from the same issue: after a while the ping command no longer works.
I heard of the fact that this issue could be related to fast dormancy: unfortunately, since the phone is not rooted, I can't disable fast dormancy.
I installed this app: https://play.google.com/store/apps/details?id=eu.thedarken.wl (Wake Lock - PowerManager): This app implemented a Partial Wakelock: in this way the notifications arrives in 1 - 2 seconds, but the downside (due the Partial wake Lock) is a battery drain.
No one else, here, faced the issue of delayed notifications when connected with mobile data?
As I've said, with Wifi I don't have any issue with notifications; furthermore I am not "forced" to rely on wakelocks.
Kind regards.
were you able to fix this ? i am having the exact same problem on my note 8 running pie with no solution so far

Mate 10 Pro - GPS issues

Hi,
as soon as I bought this phone I am struggling with making the GPS receiver working properly in app such as Starava and Endomondo. Mate constantly drops the signal for couple of seconds. I tried different solutions such as:
apps->ignore battery optimization
manage the apps (running in the background) manually
Strava works without autopause
last used apps -> padlock is set to locked
Below you will see a compare of a proper signal (red) and Mate's (blue) with a lot of losses.
Please help as it is very annoying 'feature'.
Nobody?
Huawei Mate 10 GPS performance is poor
Cameyo said:
Nobody?
Click to expand...
Click to collapse
I have exactly the same experience. My (new) Mate 10 Pro has far worse GPS accuracy than my (previous) Galaxy S7 Edge.
Tried many possible solutions, nothing helps. Shame on you, Huawei!! :crying:
I don't use these apps but I remember the same complaints about Mate 9. A joke that it hasn't been sorted out yet!
Mate 10 lite garbage gps
Same issues with endomondo amd my huawei mate 10 lite.... Gps loosing signal when running in the park, but no issues with gps driving applications... Instead of 3.14 km it shows me only 2 km, it is loosing signal every 5 mins.
Same thing here, bought mate 10 pro (bla-l29) 3 weeks ago and besides its great camera and other stuff, this problem with gps and strava is so annoying.
Here are two pics, first from a bike ride, with numerous spikes, and other, walking, where red line is gps track from the mate and cyan is actual track that I was walking.
I have sent a question today to the official croatian huawei forum, but I don't expect some remedy. Maybe a new Android Pie and EMUI 9,which is scheduled to arrive in my country on 14 December fixes that issue, otherwise I'm thinking on selling the thing, because I'm quite often on my bike and trekking in nature.
Edit: Since I'm a new member, can't post external links to pics, sorry.
My mate 10 works great with GPS.. In the car or walking. Even in the train..
Is GPS dropping only while the screen is off (or app in background)? If rooted, the solution is to disable the Power Genius app using either Titanium Backup or Service Disabler (and then reboot). If not rooted, you can try via ADB but I'm not sure it will work.
"Ignore Battery Optimization" affects Android's built-in battery optimization. Power Genius is responsible for Huawei's built-in battery optimization features - which don't increase your battery life but do cause issues with GPS, music playback, screen brightness, etc.
thref23 said:
Is GPS dropping only while the screen is off (or app in background)? If rooted, the solution is to disable the Power Genius app using either Titanium Backup or Service Disabler (and then reboot). If not rooted, you can try via ADB but I'm not sure it will work.
"Ignore Battery Optimization" affects Android's built-in battery optimization. Power Genius is responsible for Huawei's built-in battery optimization features - which don't increase your battery life but do cause issues with GPS, music playback, screen brightness, etc.
Click to expand...
Click to collapse
There are two things which can be done, one is to manage apps manually (via battery settings) and other with that "Ignore Battery Optimization".
So you are saying both are standard android features, nothing to do with Power Genius service?
Yesterday I've allowed "Ignore Battery Optimization" for Strava, restarted the phone (as suggested on many places after this), and went for a short test ride. It seems that there are definitely less spikes than before, but still there were two of them on a 5km trip. And the GPS accuracy is still not satisfying. The screen was locked, as was always on my previous Samsung A5 and all iPhones before that.
I've tried disabling the lock screen few days before, but during walking. Half trip the screen was on, half off. I didn't notice any difference. During walking there were no spikes, but the accuracy was very bad, the track had two very strange off-paths in order of 40-50 meters.
Static accuracy of GPS is always ok, in several apps. But dinamic gps tracking is bad.
I'll try Endomondo, other app for the same purpose and post results here.
"Ignore Battery Optimization" is an Android feature.
"Launch" (manage apps manually) is an EMUI feature.
"Power Genius" is a separate EMUI feature. Amongst other things, it uses an algorithm to determine what apps and processes should be killed off when they are in the background. But it is artificial intelligence that is not intelligent - when you are streaming music, it kills processes necessary for bluetooth music playback. If you use an app like Google Maps, it gets killed off like clockwork after so many minutes in the background.
There are sometimes ways to manipulate it, i.e. I think it looks at how long a process has been running, how many apps are running in the background, whether the phone is being charged. But generally, there is no downside to disabling it if you are rooted.
I am relatively new to Huawei, Power Genius is the main reason I would never be inclined to recommend a Huawei device to a lay person who did not intend to root it, or what not.
Oh, bummer.
Well, I'll test some more, with Strava and Endomondo, and if nothing improves, I'll see whether to consider rooting, or that ADB thing, or replacing it for Samsung S8.
I don't have experience with rooting, but I jailbreaked every iPhone I had, my occupation is software developer, recently changed the firm and now beginning to develop under Android studio, so i think I could do that. But I'm afraid it could be pure GPS problem, either hardware or software, I'm not sure.
If I leave the screen on during the ride, and problems persist, can we exclude Power Genius and blame GPS receiver or code responsible for it?
The phone has a problem with the GPS, thats for sure. Even after the Pie update, nothing changed. I personally had no issues with killing apps, but overall GPS accuracy is very poor. For example, Im walking down the road on a left sidewalk, google maps says Im on the right side of the road. Thats about 10 meters away ! And in a open space with no obsticles. Definitely a HW issue

Categories

Resources