0

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?

Community
  • 1
  • 1
Matin Kh
  • 5,192
  • 6
  • 53
  • 77

2 Answers2

2

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.

Matin Kh
  • 5,192
  • 6
  • 53
  • 77
Vykthur D .
  • 351
  • 2
  • 7
  • I could not check your solution so far, because they have not responded my email yet (for the new certificate). As soon as I get a new one, I will update here. – Matin Kh Jun 01 '15 at 20:34
  • Normally, you should get your certificate within 10 mins. I have also found that some email servers (especially shared hosts .. in my case) automatically delete emails with Samsung certificates because it contains the author.crt file which is flagged as malicious. You might want to request your certificates with a different email (yahoo works for me) if you dont get your certificates. – Vykthur D . Jun 02 '15 at 01:04
  • Yes, after a while they requested for another email address and they were able to send it to my Gmail account. I still do not know why, but new certificate was the solution! – Matin Kh Jun 03 '15 at 16:06
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.

Eric Cloninger
  • 2,260
  • 2
  • 21
  • 26
  • Three things here: first, I got the project from someone else, and imported it into my Tizen IDE (I am not sure if his signature is included anywhere in the project itself). Second, the watch had not been used by anyone before that, so there was no certificate in it. Last, I got my certificate as described above. I do not know if that was OK, but at each step it gave me successful message. – Matin Kh Jun 01 '15 at 20:30