SIGNATURE_INVALID when trying to run my project in Samsung Watch

旧巷老猫 提交于 2020-01-06 13:54:08

问题


I see there is a question here in SO, but the proposed answer (deleting .metadata folder) does not work for my case.

Here is what I did:

First, I had a certificate file (once I generated a certificate signing request file, and was given a certificate file for that). I used that .crt file, but since I had deleted other files in that folder, had to create another .csr file along with other required files (By generating another certificate signing request file).
Then I requested for a device profile, and used the given device-profile.xml and password for registering the certificate.
This process went through successfully, so I am assuming there is nothing wrong with the unusual way I took here for the certificate.

Then I imported a project I was given in Tizen IDE. Clicked 'Permit to install applications' on the device and it was successful.

Then I right-clicked on my project and selected > Run As Tizen Wearable Web Application. Here I am getting SIGNATURE_INVALID error. Any suggestions?


回答1:


I have also had some byzantine errors with the wearable sdk where many straightforward processes like this fail. I think the SIGNATURE_INVALID error normally suggests that you may not have added your gear device DUID or permitted to install application (which you have done). Are you testing with a real Gear device, and can you confirm if you added the device DUID whilst requesting your device profile ? Another thing I have found is that when you register the author.crt and device-profile.xml using the register certificate button on the tizen wearable sdk, it is important that the names of these files have NOT changed - e.g author(1).crt or device-profile(1).xml . Finally, if you have tried all of this, I would recommend you restart the process ...

  1. Make sure the watch's time is correct.
  2. Delete existing security profile .. winwows->preferences->Tizen sdk->Security profiles
  3. Close IDE
  4. Delete workspace metadata
  5. Relaunch IDE, Generate new keys, request new certificate, request new device profile, register certificates.
  6. Attempt to run your app again

    Good luck.




回答2:


The answer provided by @vykthur-d has some of the right answers, but for future reference, I'll point out the problem.

There are 4 pieces to the puzzle.

  1. The certificate signing request (.csr) in ~/tizen-sdk-data/keystore that you created, probably by filling out the form in the Tizen IDE.
  2. The approved author certificate (.crt) that comes from the Tizen Security email account
  3. The approved device profile (.xml) that comes from the Tizen Security email account, created from the DUID of the Gear watch
  4. The signed device profile that is copied to the device using the connection manager

Once you've signed the certificate and sent it to the device, you don't need the 2 pieces that came from email, but keep the files around in case you need to do this again. The ~/tizen-sdk-data/keystore folder is important to save, especially if you move to different development machines or re-install the Tizen SDK.

The error you saw is because a signed app you created was probably signed by a different certificate than the one that signed the device profile. This is the Tizen/embedded Linux security model and it's different from what you may be familiar with on Android.



来源:https://stackoverflow.com/questions/30540128/signature-invalid-when-trying-to-run-my-project-in-samsung-watch

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!