SIGNATURE_INVALID when trying to install application on Samsung Gear 2

强颜欢笑 提交于 2019-12-14 01:14:38

问题


After registering with samsung for a developer certificate i can't install my application, i'm getting SIGNATURE_INVALID (code 22).

The application can be anything, including a hello world app from the IDE wizard.

What's interesting is that before getting an email back from Samsung and instaling the key, I have deployed a hello world app and it worked. Can't duplicate this no more.

Log from the IDE:

Launching the Tizen application...
# If you want to see the detailed information,
# please set the logging level to DEBUG in Preferences and check the log file in '(...)'.

[Initializing the launch environment...]
    RDS: On
    Target information: SM-R380
    Application information: Id(p8BYHTMfs6.Pilot), Package Name(p8BYHTMfs6), Project Name(Pilot)
[Transferring the package...]
    Repackaging is in progress before the package transfer.
    Transferred the package: (...)/tizen/Pilot.wgt -> /opt/usr/apps/tmp
[Stopping running application...]
[Installing the package...]
path is /opt/usr/apps/tmp/Pilot.wgt
start process (install)
....
error : 22

end process (fail)
processing result : SIGNATURE_INVALID [22] failed
spend time for pkgcmd is [1798]ms
cmd_ret:22
[Transferring the package...]
    Repackaging is in progress before the package transfer.
    Transferred the package: (...)/tizen/Pilot.wgt -> /opt/usr/apps/tmp
path is /opt/usr/apps/tmp/Pilot.wgt
start process (install)
....
error : 22

end process (fail)
processing result : SIGNATURE_INVALID [22] failed
spend time for pkgcmd is [1824]ms
cmd_ret:22
Unexpected stop progress...
(12.17 sec)

And when trying with sdb:

$ sdb install Pilot.wgt

pushed                      Pilot.wgt   100%          3MB
1 file(s) pushed. 0 file(s) skipped.
Pilot.wgt                        2813 KB/s (3512786 bytes in 1.219s)
path is /opt/usr/apps/tmp/Pilot.wgt
__return_cb req_id[1] pkg_type[wgt] pkgid[p8BYHTMfs6] key[start] val[install]
__return_cb req_id[1] pkg_type[wgt] pkgid[p8BYHTMfs6] key[install_percent] val[3]
__return_cb req_id[1] pkg_type[wgt] pkgid[p8BYHTMfs6] key[install_percent] val[22]
__return_cb req_id[1] pkg_type[wgt] pkgid[p8BYHTMfs6] key[install_percent] val[25]
__return_cb req_id[1] pkg_type[wgt] pkgid[p8BYHTMfs6] key[install_percent] val[33]
__return_cb req_id[1] pkg_type[wgt] pkgid[p8BYHTMfs6] key[error] val[22]
__return_cb req_id[1] pkg_type[wgt] pkgid[p8BYHTMfs6] key[end] val[fail]
processing result : SIGNATURE_INVALID [22] failed
spend time for pkgcmd is [1758]ms

Interesting things from the log:

[2014.09.02 16:53:58][WARN ] SignCommand.java(91) - Cannot remove a file. Path : (...)/tizen/.build/Result Resource Layer/author-signature.xml
[2014.09.02 16:53:58][WARN ] SignCommand.java(91) - Cannot remove a file. Path : (...)/tizen/.build/Result Resource Layer/signature1.xml

(...)

[2014.09.02 16:54:06][DEBUG] SdbCommand.java(203) - $ /usr/bin/pkgcmd -i -q -t wgt -p "/opt/usr/apps/tmp/Pilot.wgt"
[2014.09.02 16:54:08][DEBUG] SdbCommand.java(203) - $ rm -f /opt/usr/apps/tmp/Pilot.wgt
[2014.09.02 16:54:08][DEBUG] ZimLaunchDelegate.java(240) -
Error code: SIGNATURE_INVALID
Error message:
Command: /usr/bin/pkgcmd -i -q -t wgt -p "/opt/usr/apps/tmp/Pilot.wgt"
Management: Check author certificates in Preferences > Tizen SDK > Secure Profiles > Profile items.

[2014.09.02 16:54:08][DEBUG] LaunchesListener.java(187) - removed - project: Pilot, device serial: 529f31b34100626c
[2014.09.02 16:54:08][PERFORM_E] ZimLaunchDelegate.java(277) - [Category: web.launch] at 2014-09-02 16:54:08.967         [12170(ms)]

Some of the things i tried:

  • The certificate is for the correct device id, generated by the IDE. Tried two times to sign with Samsung.
  • The certificate is automaticaly copied to gear's /home/developer.
  • I can install the sample .wgt files using sdb.
  • The project was cleaned multiple times, IDE and Gear restarted, Gear has been reset.

My system:

  • OSX Mountain Lion
  • Tizen IDE from install manager tizen-wearable-sdk-2.2.151_macos64.bin (current)
  • Tizen SDK for Wearable, Version : 1.0.0b2, Build id : 20140411-1445 (current)
  • Samsung Gear 2 (SM-R380), firmware R380XXU0BNE5 (current)

Any idea on how to fix my setup to be able to develop again?


回答1:


Sigh.. now i know what i did not check - removing the workspace metadata fixed the setup. Great way to waste a day.

If anyone is interested, the workspace was not even used (projects remained in separate dirs)




回答2:


After registering your certificate you need to create a profile through winwows->preferences->Tizen sdk->Security profiles->add a new profile and import author.p12 and distributor.p12 file and set active the profile.If you are running the app on Real device then go to connection explorer->rightclick on device showing->click permit to install applications.




回答3:


It could be that the time is not set correctly. Please try setting the current date and time on your Gear S.

I've had this problem and this was the solution for 'Signature Invalid' errors that I had.




回答4:


Perhaps it's worthy to check for /home/developer/certificate-registration.xml file on your device and ensure that it contains your device's ID.

In last version of Tizen Wearable IDE there's an option in Connection Explorer (in popup for the device you're using for testing) that allow to "Permit to install application" that does exactly that thing - creates a proper certificate-registration.xml in /home/developer folder of the device.

At least, that helped me when I got brand new Gear S for testing (earlier I've tested with Gear 2).

PS: Personally I do not like the magic of "clearing metadata" and such. There's some exact reason that leads to failure. That's a pity no one explored what becomes wrong with metadata so that clearing it really helps.

PPS: If you have several profiles with different certs, this could be a reason as well when you (or Eclipse) switch from the one you really need to some default, faulty, one.




回答5:


Try checking the date on your watch.

I had this problem and discovered that when the battery died on the watch its clock would reset, then the developer certificate would no longer be valid.



来源:https://stackoverflow.com/questions/25626845/signature-invalid-when-trying-to-install-application-on-samsung-gear-2

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