drupal hit counter
Jerry Huang | HD2 Mango: error during registering with your developer account

Jerry Huang apps and developing apps

HD2 Mango: error during registering with your developer account

9. July 2011 19:45 by Jerry in Windows Phone Development

If you are a WP7 marketplace paid developer like me who is not working on a "real" WP7 handset, instead, using HD2. You will find VS2010 cannot debug with your phone after freshing the custom ROM for HD2. The VS2010 compaint that:

The application could not be launched for debugging. Ensure that the target device screen is unlocked and that the application is installed

And then you probably will try to register your phone since you had paid for the 3 developer unlock quota from App Hub. However, the registration program will also throw an error "Error communicating with the developer portal" with error code 0x64. You will know 0x64 is because the phone cannot connect the App Hub registration services after google.

 So what now? Give it up? After some thinking, I suspect the problem is due to the ROM embeded with the "prevent relock" patch which causing the phone cannot connect the registration services. The so-called "prevent unlock" patch is actualy a Registry hack to remove the URL of developer portal which will causing the phone to be relock when connecting with Zune. If so, what I need to do is update the URL back.

[code language=XML]

<!-- *** COMMENTO *** -->
   <characteristic type="Registry">
      <characteristic type="HKLM\Comm\Security\LVMod">
         <parm name="DeveloperUnlockState" value="0" datatype="integer" />
      <characteristic type="HKLM\Software\Microsoft\DeviceReg">
         <parm name="PortalUrlProd" value="https://developerservices.windowsphone.com/Services/WindowsPhoneRegistration.svc/01/2010" datatype="string" />
         <parm name="PortalUrlInt" value="https://developerservices.windowsphone-int.com/Services/WindowsPhoneRegistration.svc/01/2010" datatype="string" />
      <characteristic type="HKLM\Software\Microsoft\DeviceReg\Install">
         <parm name="MaxUnsignedApp" value="2147483647" datatype="integer" />

so I made a relock XAP base on above setup, run on my HD2, reboot (must reboot, otherwise won't take effect), register again, done!

The relock XAP could be downlod here (rename to .xap after download), deploy to your phone, tap "HTC-ProvXml-Deploy", click the green icon, your HD2 will be relock again.