When you go through the setup procedure and enter all necessary info to setup a new account on the phone, the setup will eventually fail throwing a "Setup could not finish" "Unable to open connection to server." message.
On the server side, the following log is generated:
RequestBody : <?xml version="1.0" encoding="utf-8" ?> <FolderSync xmlns="FolderHierarchy:"> <SyncKey>0</SyncKey> </FolderSync> AccessState : Blocked AccessStateReason : Policy ResponseHeader : HTTP/1.1 449 Retry after sending a PROVISION command MS-Server-ActiveSync: 14.1
Google is aware of this (http://code.google.com/p/android/issues/detail?id=11177) and they calim to have fixed it but it is unknown when an update will be pushed.
The interesting thing though is that the Email application which is included with the 2.2 emulator seems to be working fine. So what we will do is extract the Email.apk from the emulator and install it on the phone.
Requirements: Rooted device, installed ADB and Android 2.2 Emulator.
Note: This will remove any improvements a ROM developer has included in Email.apk.
Disclaimer: I am not responsible if by doing this you damage your phone/data/life in an way. Backup your data first, preferably by making a Nandroid backup.
1. Make sure that any Android phones are unplugged from the computer.
2. Start the emulator using a 2.2 image.
3. After the emulator has finished loading, open a terminal and type:
this will download the Email.apk from the emulator and place it in your current directory.
adb -e pull /system/app/Email.apk
4. Close the emulator
5. Plug the problematic phone to your computer.
6. Make sure that USB debugging is enabled (Settings -> Applications -> Development -> USB debugging).
7. On the same terminal as before, enter the following:
This will temporarily remount the system partition as RW, make a backup copy of the original Email.apk to your hard drive (as Email.apk.bak), push the new APK to the device, remount the system partition as RO and finally reboot the device.
adb -d remount adb -d pull /system/app/Email.apk Email.apk.bak adb -d push Email.apk /system/app/ adb -d remount adb -d reboot
Now the phone should be able to communicate with the exchange server. If any problems persist, delete and recreate the account from the phone and remove the pairing from your exchange profile. Also, delete the Dalvik cache.
The original Email application will be in your home directory as "Email.apk.bak".