urbandroid-team / dont-kill-my-app

Android vendors, don't kill my app!
Creative Commons Attribution 4.0 International
1.29k stars 2.99k forks source link

351F-B04 update for Nokia SDM63x/660 devices seems disabled Power Saver G3 by default #55

Closed HikariCalyx closed 5 years ago

HikariCalyx commented 5 years ago

Recently HMD pushed 351F update (March 2019) for Nokia 6.1/6.1Plus/7.1/7Plus and disabled Power Saver G3 from system, although they didn't remove it.

Power Saver G3 was originally designed for handling Chinese bloatwares, such as WeChat, Alipay, Taobao, TikTok, Kuaishou, etc. China variant uses "Whitelist" policy instead of "Blacklist". For some reason, looks like they didn't realize Power Saver G3 is unnecessary for Global release until now. Power Saver G3 will always exist in China Variant Nokia Phones.

Following URLs are Full OTA for both Nokia 6.1 and Nokia 7 Plus Global, if you want to analyze:

https://android.googleapis.com/packages/ota-api/nokia_pl2sprout_plate200ww/3601a351ff7577ed5a013d6f4fe5fdd64d32355c.zip

https://android.googleapis.com/packages/ota-api/nokia_b2nsprout_onyx00ww/5255f45225061bdc1c3525a32cf7361480e45ea3.zip

If you want to know your current Firmware Build, you can either dial # #227 # # to check "Version" in BBox app, or use command "fastboot oem getversions" under Fastboot/Download mode if BBox app displays nothing. Expected build version looks like this: B2N-351F-0-00WW-B04, which is stored at systeminfo partition or /proc/fver .

petrnalevka commented 5 years ago

Incredible, big thanks for sharing this! We will check the resources and hopefully test the update soon on the Nokia 6.1 we have around @Artaud

IvanFrederiks commented 5 years ago

I installed the update, but known power saver apps are not disabled. Maybe their behavior was changed? @petrnalevka, is there any way to test it?

petrnalevka commented 5 years ago

@IvanFrederiks good question. In Sleep as Andoid we already have a screen always on hack for Nokia.. so it is not that easy, maybe we could prepare a test case APK but I do not have the time now..

It could be tested with one of the older APKs of Sleep as Android from here - e.g. version 20181212 did not do the hack: https://sleep.urbandroid.org/wp-content/uploads/release/sleep-20181212-prod-release.apk

@Artaud did you get an update on your Nokia 6.1?

Artaud commented 5 years ago

I did get the March update but it did not disable the Power Saver for me on my Nokia 6.1. My build version is PL2-351F-0-00WW-B04

IvanFrederiks commented 5 years ago

@petrnalevka, I installed the old build, hope I will test it this weekend on updated Nokia 6.1. Any suggestions on test conditions?

petrnalevka commented 5 years ago

@IvanFrederiks I guess you can simply start sleep tracking and leave it for few hours.. if you get a complete data from the sensor all is fine, i fyou see any red areas in the result - this means the service was killed..

Artaud commented 5 years ago

We had the sleep tracking service stopped after about 20 minutes. Also if you set up an alarm for the morning, it only rang very rarely.

IvanFrederiks commented 5 years ago

@petrnalevka @Artaud This night everything worked well: tracking completed successfully, Amazfit data was collected. The only thing I tweaked before tracking was to disable battery optimization in app settings.

IvanFrederiks commented 5 years ago

@petrnalevka @Artaud 3 nights in a row, everything works fine! Even smart alarm.

petrnalevka commented 5 years ago

@IvanFrederiks very interesting, maybe @Artaud can confirm it om his Nokia 6.1?

HikariCalyx commented 5 years ago

Thanks you for replying.

A friend of mine @luzhnan , who is using a Nokia 7 Plus with B2N-351F-0-00WW-B04 build installed found a secret about Power Saver G3. The interface of Power Saver G3 is actually controlled by the overlay placed at "/system/product/overlay/com.evenwell.powersaving.g3.overlay.base.[SKUID].apk".

Where [SKUID] need to be replaced to your actual SKUID, like 600WW.

If you attempt to disable the overlay package, the Power Saver G3 will become into the "Whitelist" Policy like CN releases.

Also, the overlay for SKUID=600CN is attached here. com.evenwell.powersaving.g3.overlay.base.600CN.apk.zip

IvanFrederiks commented 5 years ago

@HikariCalyx do you mean that after 351F update Power Saver G3 uses "Blacklist" policy (which is correct for most cases) and disabling overlay package would be harmful (because "Whitelist" policy does not honor most of apps)?

HikariCalyx commented 5 years ago

@HikariCalyx do you mean that after 351F update Power Saver G3 uses "Blacklist" policy (which is correct for most cases) and disabling overlay package would be harmful (because "Whitelist" policy does not honor most of apps)?

If you disable the overlay instead of the power saver, you'll get Whitelist Policy.

IvanFrederiks commented 5 years ago

@petrnalevka, I would like to switch back to most recent version of the app without increasing battery consumption. Is it possible to disable the screen always on hack?

BTW, old version worked well all nights since 351F update.

petrnalevka commented 5 years ago

@IvanFrederiks many thanks. I did check now and in fact you can do it in settings - misc - disable experimental features.. a side effect it it will also disable some of the latest features of the app.. but hopefully this will help and we will hind something better for the later releases..

petrnalevka commented 5 years ago

@HikariCalyx many thanks for the further details we try now to verify it on our Nokia 6.1.. it seems promising, this would be a great news really...

I'm wondering what is the penetration of this update if dev could already rely on it and revert any workarounds they did..

Artaud commented 5 years ago

I can confirm that it worked for me on Nokia 6.1 March update, after I again enabled the powersaving.g3.overlay.

hb0 commented 5 years ago

We have a sensor and location capturing SDK (background process/ForegroundService) and I checked all reviews since May 2019:

I haven't seen any Nokia Users reporting background tracking problems.

Last year there were quite a few Nokia user, too. Since May 2019 I only saw Huawai, Xiaomi and some Samsung and OnePlus users report tracking problems, so it seems like Nokia really did something here in Europe.

Fingers crossed, that other vendors might follow.

petrnalevka commented 5 years ago

Hello, we are also seeing a lot less Nokia issues reported so I'm confirming this on our end. In our apps we have started disabling the hacks we did on Nokia devices.

I did removed one crap of the Nokia crap score for now and we can improve this further as we see the issue got fully resolved.

So far I did add a caution text which is explaining this briefly and links to this thread for details.

Big thanks to everyone and especially to @HikariCalyx for the details on this..

See https://dontkillmyapp.com/nokia

homerobse commented 5 years ago

I am using Nokia 6 with build PLE-617G-0-00WW-B01 and still have the problem.

I disabled optimization using these steps:

But the built-in Clock once in a while still does not sound the alarm.

I have had similar problems with Sleep cycle app, but the steps above had worked for sometime and I haven't tested again as I have been using the built-in Clock app.

Any idea on how to solve this for me on the user side?

progmars commented 5 years ago

I"m curious about Nokia 8.1 - is it free from this broken Evenwell whitelist/blacklist issue?

QXD-me commented 4 years ago

@homerobse See https://www.reddit.com/r/Nokia/comments/di6nqm/nokia_61_psa_if_your_timers_are_going_off_late/

Maybe it's the issue you're having.

"Settings -> Apps & Notifications -> Advanced -> Special app access -> Battery optimization -> pulldown menu "Not optimized" change to "All apps" -> Clock -> "Don't optimize"

This fixed a problem where a 5 minute timer wouldn't go off until 7-8 minutes had passed."