Android issue 8636 - "Can't establish a reliable data connection to the server"Posted on 30 August, 2010 by maximinus
If you've found this post, chances are you're suffering from Android issue 8636 - you're trying to add a Google Account to your Android device, but you're receiving an error stating "Can't establish a reliable data connection to the server" every time you attempt to add it.
There are several suggested fixes or workarounds for this issue - but many don't work, and the main one involves performing a hard reset, which wipes your data... and doesn't always seem to help. This post aims to compile workarounds, since Google doesn't seem to want to acknowledge the issue and resolve the underlying problem.
The YouTube Workaround
This is the most recent workaround I've come across. It also seems to perhaps be the most reliable workaround, and has no negative side-effects. I have personally used this workaround successfully.
- Go to youtube.com and sign up for a new account, using the email address you want to add to your phone
- Open the YouTube app on your phone, sign out of your account if you're currently signed in (menu button -> sign out)
- Sign in - menu button -> my account, log in with your EMAIL ADDRESS (not your YouTube username)
- You're all done - you can sign out of the account in the YouTube app again if desired. Go to Settings -> Accounts and you should see your account in the list. Sync will be disabled (both Contacts and Mail) - open the account's settings and enable one or both if desired.
The Hosts File Fix
The first time I struck this issue, I first attempted the setings.db workaround, and, when that didn't help, I performed this one. This allowed me to add an account, but a couple of weeks later, I had the issue again and was unable to get this to work. Your mileage may vary. This fix requires your phone to be rooted. If you don't know what that means, don't try this fix. Perform the following on a local terminal, after using "su" to gain root privileges.
- Remount your /system partition read-write. This will vary slightly based on your particular phone, but for a Motorola Milestone, the command is as follows:
mount -t yaffs2 -o remount,rw /dev/block/mtdblock6 /system
- On your computer, run "nslookup android.clients.google.com" in a terminal / command prompt to obtain an IP address for it.
- On your phone, open the /etc/hosts file for editing:
- Press "a" to enter editing mode, and add a new entry (where x.x.x.x is an IP found using nslookup above, or you can try 220.127.116.11 if you can't get one that works): x.x.x.x android.clients.google.com
- Press escape (how to do this depends on your terminal - ConnectBot uses a double-click on the center button or trackball on phones with such buttons), then type ":wq" and hit enter to save the file
- Either restart or run the mount command again with -o remount,ro rather than -o remount,rw to make the /system partition read-only again
- You should now be able to add your account. If not, and you didn't restart before, try a restart to flush the DNS cache.
The settings.db fix
This fix also requires your phone to be rooted. It will also result in the restoration of some settings to default values - I found that I was discovering reverted settings for a few days after attempting this fix.
- Using a root file explorer or a shell that you've used "su" to gain root in, delete the file /data/data/com.android.providers.settings/databases/settings.db - or the whole /data/data/com.android.providers.settings directory if you prefer.
- You should now be able to add your account. If not, a restart may help.
Please note that this post is intended to chronicle my experience dealing with this issue. It may not be entirely accurate, and your mileage may vary. I take no responsibility for anything you do to your phone. If you wish to root your phone, please make sure you familiarise yourself with the consequences of doing so before you begin. I would suggest starting with the YouTube workaround, and, if that fails, trying the /etc/hosts fix and then the settings.db fix as a last resort, as the YouTube approach is safest, followed by /etc/hosts and then settings.db - and this also seems to be the order of most likely to work to least likely to work. The YouTube workaround also does not require root, so anybody can do this.