GmsCore icon indicating copy to clipboard operation
GmsCore copied to clipboard

Checking deprecated permission.C2D_MESSAGE possibly breaking cloud messages

Open ghost opened this issue 4 years ago • 2 comments

Hi.

(Sorry for bad English)

User Dark Simpson asked interesting question in a microG thread on 4pda >> URL <<

He suggested that telegram app does not receive cloud messages correctly due to a missing deprecated C2D_MESSAGE permission check.

https://github.com/microg/GmsCore/blob/a830b5dd5de71fa53f9d037c210a81fb38ea3321/play-services-core/src/main/java/org/microg/gms/gcm/McsService.java#L535-L546

So do we really need to check this permission ? Migrating from Google Cloud Messaging (GCM) to Firebase Cloud Messaging (FCM)

And one more question from me: Is it normal that whitelisting doesn't happen for third party apps? https://github.com/microg/GmsCore/blob/a830b5dd5de71fa53f9d037c210a81fb38ea3321/play-services-core/src/main/java/org/microg/gms/gcm/McsService.java#L561-L570 Or have I misunderstood something?

Thanks.

ghost avatar May 19 '21 21:05 ghost

From what I saw, .permission.C2D_MESSAGE is not required to receive messages, but only used to allow 3rd party app to listen on cloud messaging, meaning the package asking for notification always receive the intent, whatever they have the permission or not.

This mean if Telegram register for cloud messaging (aka. GCM), Telegram will always receive the intent even without org.telegram.messenger.permission.C2D_MESSAGE, this check only affect apps that want to receive an intent they didn't register themselves.

Also you can check inside MicroG settings, you can see which apps have registered cloud messaging listeners, if you don't see telegram in the list this mean it's a registration issue, as any apps using GCM should appear here.

Fox2Code avatar Jul 26 '21 13:07 Fox2Code

Why aren't i receiving any messages to my device? I don't want any of my messages going into a cloud. Please release my data to my apps

ghost avatar Apr 26 '25 03:04 ghost