[Galaxy S II General] leew1979:
Greetings. I am a new user to XDA but a longtime reader and geek who uses and is well familiar with multiple desktop and mobile OS's. I say this because the problem I am writing about is possibly the most confusing I have ever faced. In fact, if it wasn’t happening to me personally I would swear it was impossible, so please read on. I would be grateful for any – any – ideas. I will attempt to describe the problem and my troubleshooting steps as clearly and concisely as possible – but it’s a weird problem so needs some discussion.

PRECIS: Samsung Galaxy S II intermittently loses ability to connect to and sync with IMAP servers, BUT ONLY intermittently and ONLY on one particular mobile network. Much testing has been performed as detailed in this post.

HARDWARE / OS: Galaxy S II originally purchased on contract from Three UK, unlocked, and currently running Android 2.3.4, debranded to XXKG5 firmware and generic CSC XEU.

SIMs USED: Roshan (Afghanistan) pay-as-you-go and AT&T (USA) contract with unlimited international data.

SYNOPSIS: I have good data connectivity (slow EDGE, but generally reliable) from the local Afghan provider Roshan using my PAYG SIM. I am able to set up both of my IMAP accounts, have them log in, sync, send mail, etc, but after an indeterminate amount of time, routinely lose the ability to connect at all. However, all other data services and syncing continue to work fine (web browsing, Gmail, calendar, contacts etc) – only IMAP connectivity is broken. No errors appear, but mail just stops coming. Once this has occurred, the only thing that seems to correct the problem is time – it will eventually start working again, but is by no means reliable. Changing how often the accounts check for new mail has no effect. A change to Wi-Fi restores connectivity to the IMAP servers immediately, but then the problem returns over the Roshan mobile network. Yet, I can swap in my AT&T SIM and all works fine immediately, reliably, and never displays the problem. The IMAP connectivity issue exists only with my Roshan PAYG SIM, and only after some amount of time.

HARDWARE TROUBLESHOOTING: The phone and IMAP have worked fine on multiple networks in multiple countries. In the UK, on 3UK and Orange. In the UAE, on Etisalat and du – all with good HSDPA connections. In Afghanistan, the AT&T SIM connects usually to Etisalat but other networks as well, all with EDGE data where available. (Unfortunately for scientific testing, AT&T does not allow connection to Roshan.) And also in Afghanistan, my PAYG Roshan SIM works fine with everything EXCEPT the IMAP problem. Altogether, it seems the GS2 itself works as advertised.

MOBILE NETWORK (ROSHAN) TROUBLESHOOTING: The exact same PAYG Roshan SIM which causes the problem in the GS2 allows a reliably-syncing connection (and servers automatically detected, BTW) over the same mobile network to the same servers using my old iPhone 3G running iOS 4.2.1. Likewise, my boss has perfect service to these servers using this same network with his Roshan PAYG SIM in my old Nexus One on Android 2.3.4. And, my GS2 does fine on this network for all except IMAP.

ANDROID OS TROUBLESHOOTING: In an effort to troubleshoot a potential glitch in the OS, I have flashed multiple versions. The Roshan/IMAP problem exists on both the 3UK-branded H3GKF4 2.3.3 as well as generic XXKG5 2.3.4. And again, a Nexus One running 2.3.4 on the Roshan network does fine also – incidentally also in my office, so at least theoretically connected to the same cell path.

EMAIL CLIENT TROUBLESHOOTING: In an effort to isolate a fault with the Samsung email client, I purchased and installed Enhanced Email, with both 2.3.3 and 2.3.4 installed. Same results: fine on Wi-Fi, fine with AT&T, unreliable in both clients with Roshan PAYG SIM.

(LACK OF) CONCLUSION: Can it be possible that I have uncovered a ridiculously obscure bug? How can just one data service type (IMAP) be affected on just one network (Roshan) yet all other services are fine, and the IMAP problem does not exist with other SIM’s and/or networks? Is there anything something like a traceroute I could run to see what’s happening to my IMAP requests?

If you’re still reading, thanks for staying with me this far. I’m completely baffled, and frankly, more than a little frustrated that what is meant to be the best smartphone in the world can't reliably get my mail on the network I need it to, while a tired old iPhone and Nexus do so all day long. Any ideas?

Kind regards,

Adam