Just spent an age dealing with a phone (Samsung Galaxy S2, I9100, on the UK network 3) running a custom 4.2 android build which, despite having perfect signal and nothing having been changed, steadfastly refused to even attempt to establish a data connection.
Things I tried included
- Repeatedly toggling airplane mode and all the various 'data enabled'-type settings knocking around in the menus.
- Pulling the battery and SIM out for a bit.
- Changing the APN settings, including resetting them to default, trying my own ones, removing the "APN type", changing the "APN type" to "default", ...
- Dialing *#*#4636#*#* (that's "info" in the middle there) and tweaking the preferred network type, toggling the radio, using menu -> "Enable data connection"...
- Updating the ROM.
Literally none of these did anything. Then, later, when I ran "logcat" in a terminal emulator in desperation to stare at the output as I toggled data and airplane mode, it immediately worked. Coincidence?
Yes, it turns out my carrier network was down. Siiiigh.
PS: the *#*#4636#*#* thing was quite interesting. The relevant bits were "GRPS service: Disconnected", "GSM Disconnects: ========DATA========", "PPP sent: 0 pkts, 0 bytes / PPP received: 0 pkts, 0 bytes". I note that even though it's all working fine now, the "Data attempts: 0 / Data successes: 0" still look a bit odd.