-
Notifications
You must be signed in to change notification settings - Fork 285
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PixelPropUtils: Fix GMS drain triggered by an outdated ROM build date #1026
Conversation
If the build date exceeds a month, GMS, thinking the device is Pixel, attempts a system update, which unexpectedly fails. This goes into an endless cycle which drains battery very quickly and generates a lot of heat. Let's fix it by spoofing the build date to something always fresh.
@@ -272,6 +272,7 @@ public static void setProps(String packageName) { | |||
setPropValue(key, value); | |||
} | |||
if (packageName.equals("com.google.android.gms")) { | |||
setPropValue("TIME", System.currentTimeMillis()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move it to spoofBuildGms().
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's there where it should be. It's not specific to SafetyNet, but to GMS in general. The draining thread INSTALL_UPDATE runs in 'com.google.android.gms' process.
Could this maybe get a bit more attention? I see the useless pixel system update very often as well in the last time. |
Thanks😊 |
Could you tell me if this actually fixes your issues on the F3 |
Yes I will, when @raystef66 releases a new ROM for our device, I will come back again. |
The now-squashed commit "PixelPropsUtils: Allow devices to opt out gms/gapps" crdroidandroid@8baa018 changed behavior to actually require explicitly setting props to true. Change logic to function the way it did before for this block of functions, and allow automatically benefiting from SPOOF_PIXEL_GMS (like avoiding GMS battery drain when Pixel udate is available but device has not been updated to new ASB yet, see crdroidandroid#1026 ) and require explicit commits by maintainers to opt-out per device.
The now-squashed commit "PixelPropsUtils: Allow devices to opt out gms/gapps" crdroidandroid@8baa018 changed behavior to actually require explicitly setting props to true. Change logic to function the way it did before for this block of functions, and allow automatically benefiting from SPOOF_PIXEL_GMS (like avoiding GMS battery drain when Pixel udate is available but device has not been updated to new ASB yet, see crdroidandroid#1026 ) and require explicit commits by maintainers to opt-out per device.
The now-squashed commit "PixelPropsUtils: Allow devices to opt out gms/gapps" crdroidandroid@8baa018 changed behavior to actually require explicitly setting props to true. Change logic to function the way it did before for this block of functions, and allow automatically benefiting from SPOOF_PIXEL_GMS (like avoiding GMS battery drain when Pixel udate is available but device has not been updated to new ASB yet, see crdroidandroid#1026 ) and require explicit commits by maintainers to opt-out per device.
The now-squashed commit "PixelPropsUtils: Allow devices to opt out gms/gapps" crdroidandroid@8baa018 changed behavior to actually require explicitly setting props to true. Change logic to function the way it did before for this block of functions, and allow automatically benefiting from SPOOF_PIXEL_GMS (like avoiding GMS battery drain when Pixel udate is available but device has not been updated to new ASB yet, see crdroidandroid#1026 ) and require explicit commits by maintainers to opt-out per device.
The now-squashed commit "PixelPropsUtils: Allow devices to opt out gms/gapps" crdroidandroid@8baa018 changed behavior to actually require explicitly setting props to true. Change logic to function the way it did before for this block of functions, and allow automatically benefiting from SPOOF_PIXEL_GMS (like avoiding GMS battery drain when Pixel udate is available but device has not been updated to new ASB yet, see crdroidandroid#1026 ) and require explicit commits by maintainers to opt-out per device.
If the build date exceeds a month, GMS, thinking the device is Pixel, attempts a system update, which unexpectedly fails. This goes into an endless cycle, which drains battery very quickly and generates a lot of heat. Let's fix it by spoofing the build date to something always fresh.