Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Push notification: How does Google Play Services Connect to Google Server

I am trying to understand the Android push notifications in deep.

As per this question, How does push notification technology work on Android?

There is an active TCP connection maintained by Google Play Services to Google servers. I am not able to find out this TCP connection.

I used an app called NetStat Plus to enumerate the TCP connections and this is what I came up with:

I have lots of GCM enabled apps but none of the connection here seems to be to Google servers.

enter image description here

like image 399
Madhur Ahuja Avatar asked Jul 31 '14 04:07

Madhur Ahuja


1 Answers

Ok, first don't choose tab "ALL", choose "ESTABLISHED" to get rid of not currently available connections. Here is a screenshot from my device: Screenshot

There is an entry called "system" which adresses IP 173.194.65.95. If you execute a whois-query like the following whois

you will see that this is a Google server. Try to enter the IP in your browser (SO doesn't allow to set links on IP-Adresses).

But the system connection is not always there. When you look at u0_a19 you will also see a Google server. This connection is always there and might have a different name on your system. On your screen shot I see u0_a7 which points to a Google server.

When I execute ps | grep u0_a19 in a terminal window I get:

  • com.google.process.location
  • com.google.process.gapps
  • com.google.android.gms

com.google.android.gms are the Google Play Services so it seems that there is one connection shared for different purposes and one of them might be the push notification.

like image 199
ChrLipp Avatar answered Oct 13 '22 01:10

ChrLipp