6

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

3
  • I installed this application also, and I do see lot's of connections made from google play process, so I don't know why you don't see them from your device.. anyway - you can be sure that such connection exists. there is no "hidden magic" that push without any connection a message to the device.
    – Tal Kanel
    Aug 6, 2014 at 9:34
  • I understand. I just want to see such connection existing. Aug 6, 2014 at 9:40
  • this may not be the answer your looking for but just look and see. Actually im referring to your question : How does push notification technology work on Android?
    – Spurdow
    Aug 8, 2014 at 9:26

2 Answers 2

7
+50

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.

2

Set up a "lab" like this:

Internet <--> your router <--> your pc <--> your Android device.

Create an "ad-hoc" wi-fi connection, so your pc will act as an access point and will be connected to internet.

Connect the Android device to the new connection, not directly to the router.

Use a tool like TcpDump or Wireshark to monitor the messages passing from Google Play and your phone.

More options are listed here, if you want to root your phone.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.