Not able to record track: "Oruxmaps is optimized in energy use" on Android 14

Started by empanada, September 03, 2024, 09:24:51 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

empanada

Hi,
OruxMaps 10.7.3GP refuses to start track recording on Android 14 (LineageOS 21 on Redmi Note 7) complaining  "Oruxmaps is optimized in energy use...".

OruxMaps redirects perfectly to Android battery optimization settings when clicking on "go to settings" but the real problem is that Android doesn't let you turn off battery optimization on any app, not only OruxMaps.

Actually neither possible turn on battery optimization for the very few apps included on the whitelist (GooglePlay Services, Clock, Messages, calendar, Dolby Amos, Phone and Calendar).

The solution for me was turn off the battery optimization for OruxMaps from the command line with adb (NO ROOT REQUIRED).

1st) Install Google adb (Android Debug Bridge) on PC (available for most common OS (Windows/Linux/MacOS/*BSDs, etc))

2nd) Enable Developer options and USB debug on Android

3rd) Connect the phone with USB cable to the PC and execute this command on PC as regular user:
adb devicesand accept fingerprint notification on Android.

4th) And finally include OruxMaps on the deviceidle whitelist
adb shell dumpsys deviceidle whitelist +com.orux.oruxmapsDonate

Each new Android version it's worse than previous about battery and energy settings  >:(

On the other hand OruxMaps it's a great app!!

Cheers to everyone!

PD: extra info about battery optimization
-NO-ROOT-battery-optimization
Some adb commands to change setting for battery optimisation, start service, stop service, grant permission, revoke permission and etc.

LaurentG

I guess that not to be able "easily" to turn off battery optimization comes from Lineage OS version you are using, and is not "inherent" to Android 14.

On my Galaxy S23 (that is also running Android 14, but as provided by Samsung) when I go to Parameters / App, then click on OruxMaps (or any application I want to modify its battery optimization), then click on "Battery", I'm able to choose between "Unrestricted", "Optmized", or "Restricted"....

And if I set it again to optimized, next time I try to record a track on OM, it redirects me to another screen to manage optimization, that shows me by default all apps currently not optimized, but if I select "all apps" I'm able to turn off optimization of any optimized app, inc. OM.

The only apps I'm not able to change their status are NOT optimized apps that cannot be optimized. Never in the other sense : any optimized app can always be "not optimized"

empanada

Quote from: LaurentG on September 03, 2024, 10:21:25 PMI guess that not to be able "easily" to turn off battery optimization comes from Lineage OS version you are using, and is not "inherent" to Android 14.

Yeah, it could be the case. I thought in this possibility but as many other vendors customize Android to their own criteria, this information could be useful for anyone who has similar issues.

Anyway...thanks for the feedback!