wince 手机联机调试

 
1 ,wince smartphone 5 手机联机调试

i-mate SP5 Smartphone (Windows Mobile 5.0) is developer locked by default

Tonight I had my first opportunity to try out Visual Studio 2005 and the Windows Mobile 5.0 SDK to see what I could tinker with on my i-Mate SP5.  I can only say my first experience was a disappointment and a real waste of an evening - I thought it was meant to be easier to develop for these devices than before?  Apparently not.

After loading the SDK and creating a new "Windows Mobile 5.0 Smartphone" project, I was a bit stunned to see that on pressing F5 that I couldn't deploy to my device, with the following error:

The device security configuration disallowed the connection. Ensure that you have the appropriate certificates on your device for development. Review your SDK documentation for proper security settings for connecting to this device.


After looking at this document http://msdn.microsoft.com/smartclient/default.aspx?pull=/library/en-us/dnppcgen/html/wmsecurity.asp - it suggested that my device was application locked.  Simple I thought, I'll just install the certificates from the SdkCerts.cab file in the SDK and off we go.  Unfortunately not - I got an error:

"Installation was unsuccessful. The program or setting cannot be installed because it does not have sufficient system permissions".


So I tried the rapiconfig tool, also in the SDK:

C:/Program Files/Windows CE Tools/wce500/Windows Mobile 5.0 Smartphone SDK/Tools>rapiconfig /p SdkCerts.xml
Config failed (0x80070005): Access is denied.


It turns out that the phone is application locked by default, and the only way to unlock it is to edit the policy by editing the registry. 

1.  Enable RAPI and user provided certificates:

You must use a registry editor signed by something the phone trusts already!  RegEditSTG http://blogs.conchango.com/stuartpreston/files/regeditSTG.zip will do the trick as it is already signed by HTC.

Copy the exe onto the device, launch it and change the policies as follows:

      Navigate to HKLM/Security/Policies/Policies/ 
      Click "Values" soft-key 
      Change "00001001" value to 1 (decimal) (recovery note: default is 2)
      Change "00001005" value to 40 (decimal) (recovery note: default is 16)
      Reboot device.

At this point, you could probably import the certificates as above and deploy applications from Visual Studio 2005.  However, I decided to go the whole way and completely unlock my device.

2. Run SDA Security Unlocker to trust all applications (use this with caution):

Available from http://blogs.conchango.com/stuartpreston/files/SDA_ApplicationUnlock.zip

      With the device connected by ActiveSync, run the program on your desktop machine.
      Click Remove-Lock.
      Reboot device.

Now you should be able to deploy successfully directly from within Visual Studio 2005.

  
2 .Wince4 sp4.2 手机联机调试
 
连接到设备上时需要注意的问题:
The security features of Smartphone devices make it necessary to sign 
certain files that are used to support the development and debugging 
process. During the installation of the Smartphone SDK, this process is 
performed automatically for the files that the device emulator uses. 
However, when you want to enable a real Smartphone device for testing and 
debugging, you will need to complete this file-signing process manually. 

For SmartPhone 2002 the "sp2002dps.exe", found on standard path: 

"C:/Windows CE Tools/wce300/Smartphone 2002/tools/sp2002dps.exe" /create 
/device 

Or for SmartPhone 2003 SDK spdps.exe, maybe under: 

"C:/Programme/Windows CE Tools/wce420/SMARTPHONE 2003/Tools/spdps.exe" 
/create /device (only do this once)
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

brew2003

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值