GrapheneOS / os-issue-tracker

Issue tracker for GrapheneOS Android Open Source Project hardening work. Standalone projects like Auditor, AttestationServer and hardened_malloc have their own dedicated trackers.
https://grapheneos.org/
359 stars 21 forks source link

Error in Google Services Framework #1653

Closed Gospodininzenjer closed 1 year ago

Gospodininzenjer commented 2 years ago
type: crash
osVersion: google/sunfish/sunfish:13/TP1A.221105.002/2022110800:user/release-keys
package: com.google.android.gsf:33
process: com.google.process.gservices

java.lang.RuntimeException: Unable to start receiver com.google.android.gsf.gservices.GservicesProvider$OverrideReceiver: java.lang.SecurityException: com.google.android.gsf was not granted  this permission: android.permission.WRITE_SETTINGS.
    at android.app.ActivityThread.handleReceiver(ActivityThread.java:4346)
    at android.app.ActivityThread.-$$Nest$mhandleReceiver(Unknown Source:0)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2155)
    at android.os.Handler.dispatchMessage(Handler.java:106)
    at android.os.Looper.loopOnce(Looper.java:201)
    at android.os.Looper.loop(Looper.java:288)
    at android.app.ActivityThread.main(ActivityThread.java:7904)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
    at com.android.internal.os.ExecInit.main(ExecInit.java:49)
    at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
    at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:355)
Caused by: java.lang.SecurityException: com.google.android.gsf was not granted  this permission: android.permission.WRITE_SETTINGS.
    at android.os.Parcel.createExceptionOrNull(Parcel.java:3021)
    at android.os.Parcel.createException(Parcel.java:3005)
    at android.os.Parcel.readException(Parcel.java:2981)
    at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:190)
    at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:142)
    at android.content.ContentProviderProxy.insert(ContentProviderNative.java:557)
    at android.content.ContentResolver.insert(ContentResolver.java:2216)
    at android.content.ContentResolver.insert(ContentResolver.java:2175)
    at com.google.android.gsf.gservices.GservicesProvider.syncSettingsFromGsfStorage(GservicesProvider.java:631)
    at com.google.android.gsf.gservices.GservicesProvider.syncAllSettingsFromGsfStorage(GservicesProvider.java:581)
    at com.google.android.gsf.gservices.GservicesProvider.updateGsfStorageOverridesTable(GservicesProvider.java:730)
    at com.google.android.gsf.gservices.GservicesProvider.updateOverride(GservicesProvider.java:425)
    at com.google.android.gsf.gservices.GservicesProvider.update(GservicesProvider.java:385)
    at android.content.ContentProvider.update(ContentProvider.java:1882)
    at android.content.ContentProvider$Transport.update(ContentProvider.java:465)
    at android.content.ContentResolver.update(ContentResolver.java:2423)
    at android.content.ContentResolver.update(ContentResolver.java:2385)
    at com.google.android.gsf.gservices.GservicesProvider$OverrideReceiver.onReceive(GservicesProvider.java:119)
    at android.app.ActivityThread.handleReceiver(ActivityThread.java:4337)
    ... 11 more
muhomorr commented 1 year ago

When does this crash happen? Does it happen once or many times?

muhomorr commented 1 year ago

It looks like you've granted the "Modify system settings" permission to Play services and it causes GSF to crash. If yes, revoke it.

gonzalo- commented 1 year ago

I have the same in my Pixel 5, and I didn't give any "Modify system settings" permission to Play services, for me it crashed 4 times in the past 2 or 3 hours.

type: crash
osVersion: google/redfin/redfin:13/TP1A.221105.002/2022110800:user/release-keys
package: com.google.android.gms:224113044
process: com.google.android.gms

dajs: rethrowing exception from lowpool[1]
    at zyb.run(:com.google.android.gms@224113044@22.41.13 (190400-480714934):4)
    at android.os.Handler.handleCallback(Handler.java:942)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at arnp.lv(:com.google.android.gms@224113044@22.41.13 (190400-480714934):0)
    at arnp.dispatchMessage(:com.google.android.gms@224113044@22.41.13 (190400-480714934):11)
    at android.os.Looper.loopOnce(Looper.java:201)
    at android.os.Looper.loop(Looper.java:288)
    at android.app.ActivityThread.main(ActivityThread.java:7904)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
    at com.android.internal.os.ExecInit.main(ExecInit.java:49)
    at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
    at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:355)
    Suppressed: cuij: 
        at tk_trace.ScheduledTaskImpl(Unknown Source:0)
        at tk_trace.security__nonwearable-TelecomTaskService_onRunTaskAsync(Unknown Source:0)
        at tk_trace.security__nonwearable-TelecomTaskService-IMessenger_0(Unknown Source:0)
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'java.util.List android.content.pm.ParceledListSlice.getList()' on a null object reference
    at android.telecom.TelecomManager.getAllPhoneAccountHandles(TelecomManager.java:1472)
    at brui.a(:com.google.android.gms@224113044@22.41.13 (190400-480714934):2)
    at com.google.android.gms.security.snet.TelecomTaskService.a(:com.google.android.gms@224113044@22.41.13 (190400-480714934):2)
    at arpb.call(:com.google.android.gms@224113044@22.41.13 (190400-480714934):4)
    at java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at zyr.c(:com.google.android.gms@224113044@22.41.13 (190400-480714934):6)
    at zyr.run(:com.google.android.gms@224113044@22.41.13 (190400-480714934):7)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637)
    at aadw.run(:com.google.android.gms@224113044@22.41.13 (190400-480714934):0)
    at java.lang.Thread.run(Thread.java:1012)

type: crash
osVersion: google/redfin/redfin:13/TP1A.221105.002/2022110800:user/release-keys
package: com.google.android.gms:224113044
process: com.google.android.gms

dajs: rethrowing exception from lowpool[2]
    at zyb.run(:com.google.android.gms@224113044@22.41.13 (190400-480714934):4)
    at android.os.Handler.handleCallback(Handler.java:942)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at arnp.lv(:com.google.android.gms@224113044@22.41.13 (190400-480714934):0)
    at arnp.dispatchMessage(:com.google.android.gms@224113044@22.41.13 (190400-480714934):11)
    at android.os.Looper.loopOnce(Looper.java:201)
    at android.os.Looper.loop(Looper.java:288)
    at android.app.ActivityThread.main(ActivityThread.java:7904)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
    at com.android.internal.os.ExecInit.main(ExecInit.java:49)
    at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
    at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:355)
    Suppressed: cuij: 
        at tk_trace.ScheduledTaskImpl(Unknown Source:0)
        at tk_trace.security__nonwearable-TelecomTaskService_onRunTaskAsync(Unknown Source:0)
        at tk_trace.security__nonwearable-TelecomTaskService-IMessenger_0(Unknown Source:0)
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'java.util.List android.content.pm.ParceledListSlice.getList()' on a null object reference
    at android.telecom.TelecomManager.getAllPhoneAccountHandles(TelecomManager.java:1472)
    at brui.a(:com.google.android.gms@224113044@22.41.13 (190400-480714934):2)
    at com.google.android.gms.security.snet.TelecomTaskService.a(:com.google.android.gms@224113044@22.41.13 (190400-480714934):2)
    at arpb.call(:com.google.android.gms@224113044@22.41.13 (190400-480714934):4)
    at java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at zyr.c(:com.google.android.gms@224113044@22.41.13 (190400-480714934):6)
    at zyr.run(:com.google.android.gms@224113044@22.41.13 (190400-480714934):7)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637)
    at aadw.run(:com.google.android.gms@224113044@22.41.13 (190400-480714934):0)
    at java.lang.Thread.run(Thread.java:1012)

``` `
muhomorr commented 1 year ago

@gonzalo- It's not the same issue. Crashes that you posted are fixed by GmsCompatConfig v15

gonzalo- commented 1 year ago

@muhomorr thanks!

Gospodininzenjer commented 1 year ago

type: crash
osVersion: google/sunfish/sunfish:13/TP1A.221105.002/2022113000:user/release-keys
package: com.google.android.gsf:33
process: com.google.process.gservices
processUptime: 3615338 + 2218 ms
GmsCompatConfig version: 17

java.lang.RuntimeException: Unable to start receiver com.google.android.gsf.gservices.GservicesProvider$OverrideReceiver: java.lang.SecurityException: com.google.android.gsf was not granted  this permission: android.permission.WRITE_SETTINGS.
    at android.app.ActivityThread.handleReceiver(ActivityThread.java:4346)
    at android.app.ActivityThread.-$$Nest$mhandleReceiver(Unknown Source:0)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2155)
    at android.os.Handler.dispatchMessage(Handler.java:106)
    at android.os.Looper.loopOnce(Looper.java:201)
    at android.os.Looper.loop(Looper.java:288)
    at android.app.ActivityThread.main(ActivityThread.java:7904)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
    at com.android.internal.os.ExecInit.main(ExecInit.java:49)
    at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
    at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:355)
Caused by: java.lang.SecurityException: com.google.android.gsf was not granted  this permission: android.permission.WRITE_SETTINGS.
    at android.os.Parcel.createExceptionOrNull(Parcel.java:3021)
    at android.os.Parcel.createException(Parcel.java:3005)
    at android.os.Parcel.readException(Parcel.java:2981)
    at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:190)
    at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:142)
    at android.content.ContentProviderProxy.insert(ContentProviderNative.java:557)
    at android.content.ContentResolver.insert(ContentResolver.java:2216)
    at android.content.ContentResolver.insert(ContentResolver.java:2175)
    at com.google.android.gsf.gservices.GservicesProvider.syncSettingsFromGsfStorage(GservicesProvider.java:631)
    at com.google.android.gsf.gservices.GservicesProvider.syncAllSettingsFromGsfStorage(GservicesProvider.java:581)
    at com.google.android.gsf.gservices.GservicesProvider.updateGsfStorageOverridesTable(GservicesProvider.java:730)
    at com.google.android.gsf.gservices.GservicesProvider.updateOverride(GservicesProvider.java:425)
    at com.google.android.gsf.gservices.GservicesProvider.update(GservicesProvider.java:385)
    at android.content.ContentProvider.update(ContentProvider.java:1882)
    at android.content.ContentProvider$Transport.update(ContentProvider.java:465)
    at android.content.ContentResolver.update(ContentResolver.java:2423)
    at android.content.ContentResolver.update(ContentResolver.java:2385)
    at com.google.android.gsf.gservices.GservicesProvider$OverrideReceiver.onReceive(GservicesProvider.java:119)
    at android.app.ActivityThread.handleReceiver(ActivityThread.java:4337)
    ... 11 more
Caused by: android.os.RemoteException: Remote stack trace:
    at android.provider.Settings.isCallingPackageAllowedToPerformAppOpsProtectedOperation(Settings.java:18589)
    at android.provider.Settings.checkAndNoteWriteSettingsOperation(Settings.java:18477)
    at com.android.providers.settings.SettingsProvider.mutateSystemSetting(SettingsProvider.java:1890)
    at com.android.providers.settings.SettingsProvider.insertSystemSetting(SettingsProvider.java:1856)
    at com.android.providers.settings.SettingsProvider.insert(SettingsProvider.java:700)

```![Screenshot_20221202-135955.png](https://user-images.githubusercontent.com/116552355/205298523-e22bcbe8-76b4-404d-a673-df2d2642cdb0.png)
muhomorr commented 1 year ago

@Gospodininzenjer Can you send me a full bugreport next time this crash happens? https://developer.android.com/studio/debug/bug-report#bugreportdevice

Gospodininzenjer commented 1 year ago

Yes i do, thank you

Gospodininzenjer commented 1 year ago

I can, thank you for your qiuck answer

Sent from Proton Mail for iOS

On Fri, Dec 2, 2022 at 14:30, muhomorr @.***> wrote:

@.***(https://github.com/Gospodininzenjer) Can you send me a full bugreport next time this crash happens? https://developer.android.com/studio/debug/bug-report#bugreportdevice

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

Gospodininzenjer commented 1 year ago
type: crash
osVersion: google/sunfish/sunfish:13/TP1A.221105.002/2022113000:user/release-keys
package: com.google.android.gsf:33
process: com.google.process.gservices
processUptime: 4300203 + 311 ms
GmsCompatConfig version: 17

java.lang.RuntimeException: Unable to start receiver com.google.android.gsf.gservices.GservicesProvider$OverrideReceiver: java.lang.SecurityException: com.google.android.gsf was not granted this permission: android.permission.WRITE_SETTINGS.
at android.app.ActivityThread.handleReceiver(ActivityThread.java:4346)
at android.app.ActivityThread.-$$Nest$mhandleReceiver(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2155)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:201)
at android.os.Looper.loop(Looper.java:288)
at android.app.ActivityThread.main(ActivityThread.java:7904)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
at com.android.internal.os.ExecInit.main(ExecInit.java:49)
at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:355)
Caused by: java.lang.SecurityException: com.google.android.gsf was not granted this permission: android.permission.WRITE_SETTINGS.
at android.os.Parcel.createExceptionOrNull(Parcel.java:3021)
at android.os.Parcel.createException(Parcel.java:3005)
at android.os.Parcel.readException(Parcel.java:2981)
at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:190)
at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:142)
at android.content.ContentProviderProxy.insert(ContentProviderNative.java:557)
at android.content.ContentResolver.insert(ContentResolver.java:2216)
at android.content.ContentResolver.insert(ContentResolver.java:2175)
at com.google.android.gsf.gservices.GservicesProvider.syncSettingsFromGsfStorage(GservicesProvider.java:631)
at com.google.android.gsf.gservices.GservicesProvider.syncAllSettingsFromGsfStorage(GservicesProvider.java:581)
at com.google.android.gsf.gservices.GservicesProvider.updateGsfStorageOverridesTable(GservicesProvider.java:730)
at com.google.android.gsf.gservices.GservicesProvider.updateOverride(GservicesProvider.java:425)
at com.google.android.gsf.gservices.GservicesProvider.update(GservicesProvider.java:385)
at android.content.ContentProvider.update(ContentProvider.java:1882)
at android.content.ContentProvider$Transport.update(ContentProvider.java:465)
at android.content.ContentResolver.update(ContentResolver.java:2423)
at android.content.ContentResolver.update(ContentResolver.java:2385)
at com.google.android.gsf.gservices.GservicesProvider$OverrideReceiver.onReceive(GservicesProvider.java:119)
at android.app.ActivityThread.handleReceiver(ActivityThread.java:4337)
... 11 more

Sent from Proton Mail mobile

-------- Original Message -------- On Dec 2, 2022, 14:30, muhomorr wrote:

@.***(https://github.com/Gospodininzenjer) Can you send me a full bugreport next time this crash happens? https://developer.android.com/studio/debug/bug-report#bugreportdevice

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

girlbossceo commented 1 year ago

Is this still reproducible?