Recently I became a project member on a Windows Mobile project. The application has been designed here in The Netherlands and the development took place offshore. Currently the application is being tested onsite, but the test specialist ran into some issues which are difficult to solve. There is an issue that's irreproducible by the developers in India, but it's a showstopper for the tester. He can't continue testing when this isn't fixed.
Here we have a common issue with offshore software development. In this case it would be nice if the developer can walk to the tester, watch what he's doing and fix it right away. And because the problem occurs on a mobile device, this makes it even more difficult. Instead of letting somebody traveling 7.600km, they asked me to assist. I'm one of the few developers with Windows Mobile here onsite.
I opened the source code files (a Visual Studio 2005 solution) and tried to connect the development environment to the mobile device (which I borrowed from the tester, a HTC TyTN). But here I ran into a problem.
Pressing the 'Connect to Device' on the toolbar or from the Tools menu raises the error:
"Connection failed. The device security configuration disallowed the connection. Ensure that you have the appropriate certificates on your device for development."
This error shows up because some hardware vendors or telco's choose to lock the device and disallow the execution of non-signed applications. These devices allow only applications which are signed with a special certificate. And what Visual Studio is trying to do, is uploading some CAB files over the ActiveSync connection to the device and install them. Because these CAB's are unsigned, installation fails, and so does the connection.
But there is a workaround. Here is how:
- Install a registry editor on your mobile device. For example this one: http://blogs.conchango.com/stuartpreston/files/regeditSTG.zip. Copy the EXE to the device;
- Run the Registry Editor;
- Go to HKLM\Security\Policies\Policies;
- Press the 'Values' button
- Change "00001001" value to 1
- Change "00001005" value to 40
- Soft reset your device
Now try to connect again. You should see a balloon on your devices that asks you for permission to install a unsigned application. Say Yes to all the balloons that show up.
This are the balloons that I got.
After I installed these 5 applications on the device, the connection worked fine!
Now I can continue debugging the issue and I hope it can find it (read: fix) it :-)
Hope this helps,