@dobey At least WRT the Android-ish kernel underneath, networking is a capability which can be held back. It is not benign to hand out your networking stack to every app; they can use it to slave to a botnet, contribute to DDoS, track your location, pull down and try exploits after communicating your system's apparen config.
which, once you pull it and "xzcat device-e3* | tar -xvf -" will give you boot, recovery, and system img files. I booted just to the bootloader and fastboot flash'ed those partitions, and my phone still boots OK. So I guess I'm at least sorta on the right track....
Well that is great to hear! I'm going to post a couple "deep" questions with a prefix of "Ubuntu AMA:", these will be questions about basic system organization and flow of control. Hope we can start to fill this forum with some answers which will be referred to again and again in the coming years!
The final part is a daemon running on my phone, and its counterpart on that webXMPP server. When my phone's active, it just does a popup notification with sound. When the phone's off, it also gets the LED's blinking. They turn back off when you unlock the phone. The server remembers the client, and as soon as new messages arrive, it does a notification push.
I guess I'm telling you that I don't see how an email client gives you push notifications. The best it can do is try to run in the background and poll an imap account. But Touch SIGSTOP's apps as soon as they lose focus (delta that UI tweak utility) which will fight you, and it's a waste of battery and data anyway. imap IDLE really isn't a great fit for a mobile platform.
During my trip, I had to switch back to my old phone due to a bug in the Python3 notification2 library. _closed_callback() was using an "nid" which wasn't in the notifications_registry any more. I coded some defensive logic and logging, and will see what's going on.
But with that workaround, I have been able to daily drive my Nexus 5 for the second day now. I'm able to keep real time notifications with one 150 byte packet sent and received every 2.5 minutes. It lives fine behind NAT, and also seems fine with the transition from Wifi to mobile data and back.