언어 설정

Menu
Sites
Language
IDE will not properly sign, but manually from command line will

I am on Kubuntu using Tizen for Wearable IDE.

I have the certs registered and installed in the IDE, AFAIK. They are set as the active profile, etc.

When I generate a .wgt file using "Build Project" from the IDE, I get a .wgt file that will not deploy to my device:

gcohen@brick:~/tizen-wearable-sdk/tools$ ./sdb -d install /home/gcohen/workspace/myTestApp/myTestApp.wgt
pushed                  myTestApp.wgt   100%         32KB
1 file(s) pushed. 0 file(s) skipped.

/home/gcohen/workspace/myTestApp/myTestApp.wgt   179 KB/s (33403 bytes in 0.181s)
path is /opt/usr/apps/tmp/myTestApp.wgt
__return_cb req_id[1] pkg_type[wgt] pkgid[fUhAZM7hJJ] key[start] val[install]
...
__return_cb req_id[1] pkg_type[wgt] pkgid[fUhAZM7hJJ] key[error] val[22]
__return_cb req_id[1] pkg_type[wgt] pkgid[fUhAZM7hJJ] key[end] val[fail]
processing result : SIGNATURE_INVALID [22] failed

When instead I followed the directions here: https://developer.tizen.org/dev-guide/2.2.0/?topic=%2Forg.tizen.web.appprogramming%2Fhtml%2Fide_sdk_tools%2Fcommand_line_interface.htm, specifically

the "Creating and Using a Sign Profile" and "Packaging the Project" steps, it will deploy to the device:

/home/gcohen/workspace/myTestApp/ta3.wgt   144 KB/s (27437 bytes in 0.185s)
path is /opt/usr/apps/tmp/ta3.wgt
...
__return_cb req_id[1] pkg_type[wgt] pkgid[fUhAZM7hJJ] key[end] val[ok]
spend time for pkgcmd is [4667]ms

This same .wgt can be put into the HelloAccessoryProvider, and also be installed from there.

Why doesn't "Build Project" from the IDE create the properly signed .wgt file?  Another observation:

When I open up the improperly created .wgt (created by the IDE) which will not deploy to the device, I get the following contents:

gcohen@brick:~/workspace/myTestApp/myTestApp$ ls -al
total 108
drwxrwxr-x 4 gcohen gcohen  4096 May  9 22:06 .
drwxrwxr-x 8 gcohen gcohen  4096 May  9 22:06 ..
-rw-rw-r-- 1 gcohen gcohen  5131 May  9 21:19 author-signature.xml
-rw-rw-r-- 1 gcohen gcohen   452 May  9 21:19 config.xml
drwxrwxr-x 2 gcohen gcohen  4096 May  9 22:06 css
-rw-rw-r-- 1 gcohen gcohen 25897 May  9 21:19 icon.png
-rw-rw-r-- 1 gcohen gcohen   620 May  9 21:19 index.html
drwxrwxr-x 2 gcohen gcohen  4096 May  9 22:06 js
-rw-rw-r-- 1 gcohen gcohen  5556 May  9 21:19 signature1.xml

When I open up the properly created, installable .wgt, contents are:

gcohen@brick:~/workspace/myTestApp/ta3$ ls -al
total 76
drwxrwxr-x 4 gcohen gcohen  4096 May  9 22:06 .
drwxrwxr-x 8 gcohen gcohen  4096 May  9 22:06 ..
-rw-rw-r-- 1 gcohen gcohen   452 May  9 21:50 config.xml
drwxrwxr-x 2 gcohen gcohen  4096 May  9 22:06 css
-rw-rw-r-- 1 gcohen gcohen 25897 May  9 21:50 icon.png
-rw-rw-r-- 1 gcohen gcohen   620 May  9 21:50 index.html
drwxrwxr-x 2 gcohen gcohen  4096 May  9 22:06 js

This seems counter-intuitive, because the one that works is missing the signature and author-signature files, whereas the broken contains them (but gives me the error 22 when I try to install it).

Can someone make sense of these two issues?

TIA

 

Responses

3 댓글
dutch slab

Not even the people who make the IDE can tell me whats happening :) ?

Michael Schloh von Bennewitz

Hi Mr. Slab,

Unfortunately, those in charge of Samsung CA (signing) and developing the IDE seem ignorant of the community or incompetent regarding cryptography. In either case, it seems even the little progress you made with the Wearable SDK beta release doesn't work on the Tizen SDK 2.3a release. Here's what I tried:

user@ubu1204:~/workspace/Pedometer$ $HOME/tizen-sdk/tools/ide/bin/web-signing -profile default:../.metadata/.plugins/org.tizen.common.sign/profiles.xml
Author certficate: $HOME/tizen-sdk-data/keystore/author.p12
Distributor1 certificate : $HOME/tizen-sdk-data/keystore/distributor.p12

user@ubu1204:~/workspace/Pedometer$ $HOME/tizen-sdk/tools/ide/bin/web-packaging ../Pedometer.wgt
Widget( $HOME/workspace/Pedometer/Pedometer.wgt ) is created successfully.

user@ubu1204:~/workspace/Pedometer$ $HOME/tizen-sdk/tools/ide/bin/web-install -w ../Pedometer.wgt
Selected device: <Device Serial> (SM-R380)
'Pedometer.wgt' file transfer successful.
'<App ID>.Pedometer' install failed.
Check author certificates in Preferences > Tizen SDK > Secure Profiles > Profile items.

My conclusion is that you didn't actually solve the signature problem at all. If you look in your 'successful' WGT file, there is no signature. Your execution of web-signing(1) did not sign the package in fact, and that's what allowed it to install.

The kludge to correct this SDK flaw for now, is to set USB debugging on the device (not sure if this is needed) and proceed to strip all privileges from an application:

user@ubu1204:~/workspace/Pedometer$ grep -v '<tizen:privilege' config.xml >temp.tmp && mv temp.tmp config.xml

Then package without signing and the kludgy WGT abomination should install.

Regards,

Michael

Zafar Ansari

It was great reading your comment. It is as if after finally sifting through sludge, I finally came across cool grass. I have also been trying to sort out my SIGNATURE_INVALID error. After signing my app with the certificate Samsung provided me with, I have not been able to deploy it on the emulator. When I submitted it, they rejected the app with the same error. I am at my wits' end. It seems all the hard work I put into my app is now going to got to waste.