SDK
Contents
- 1 Tizen SDK Project
- 2 Sign app with Certificates
- 3 Issues / Trouble shooting
- 3.1 error 12 :
- 3.2 error 22 : Issues : SIGNATURE_INVALID
- 3.3 error 23 : SIGNATURE_VERIFICATION_FAILED
- 3.4 error 32 : No author certificates
- 3.5 error 33
- 3.6 error : 34 : CERTIFICATE_EXPIRED
- 3.7 error 61
- 3.8 processing result : ARGUMENT_INVALID [64] failed
- 3.9 error 75 : SIGNATURE_INVALID_DEVICE_UNIQUE_ID
- 3.10 error 77 : SIGNATURE_INVALID_NO_HASH_FILE
- 3.11 error 78
- 3.12 error 81
- 3.13 error 117
- 3.14 Fail to debug
- 3.15 Cannot install application.
- 3.16 Management: Installation or uninstallation is not working temporarily.
- 3.17 failed to build package
- 3.18 java.nio.file.FileAlreadyExistsException
- 3.19 java.lang.NoClassDefFoundError: org/tizen/core/gputil/XMLUtil
- 3.20 /usr/bin/pkgcmd: invalid option -- 'G'
- 3.21 "Cannot provide a package function to this project"
- 3.22 other application is currently in launch.
- 3.23 Exception in thread "main" java.lang.NoClassDefFoundError: org/tizen/sbilib/for_cli/SbiData
- 3.24 Certificate file not found :
- 4 Resources
Tizen SDK Project
Welcome to the Tizen SDK Project wiki.
The Tizen SDK wiki is used for collaborating on documentation related to the Tizen SDK Project
Installation of Tizen SDK
Previous version
Tizen SDK Milestone
Credits
Projects pages
Tizen SDK development
Links
Sign app with Certificates
On commercialized products you need to setup certificates manually using IDE :(
rm -rf .sign Release Debug # we will rebuild it using IDE :( ~/tizen-studio/tools/sdb devices # observe your device SN, to replace instead of ${user} List of devices attached # 0000FFFF0000FFFF device SM-Z200F
~/tizen-studio/ide/TizenStudio.sh # * Help / about # 1.0.1 here * (problem to be solved) at https://wiki.tizen.org/wiki/SDK * Tools / Certificate manager / "+" / "Samsung" certificate type * "Mobile/Wearable" / Next / Create new certificate profile / ${user} (replace with yours) * create new author certificate / Name, Password, confirm / Apply same for dist * log in Samsung account * Backup path ~/tizen-studio-data/keystore/${user} * New distributor * Add DUID of your connected devices, see previous step how
If lucky you'll get ~/SamsungCertificate/${user}/ with author.p12, distributor.csr, distributor.p12, distributor.pri, author.crt, distributor.crt, author.pri, author.pub, author.csr
And backup ~/tizen-studio-data/keystore/author.p12 is same to ~/SamsungCertificate/user/author.p12
A file like this one, will be used to store password and sign your tpk
cat /home/user/workspace/.metadata/.plugins/org.tizen.common.sign/profiles.xml
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<profiles version="3.0">
<profile name="user">
<profileitem ca="" distributor="0" key="/home/user/SamsungCertificate/user/author.p12" password="${password}" rootca=""/>
<profileitem ca="" distributor="1" key="/home/user/tizen-studio/tools/certificate-generator/certificates/distributor/tizen-distributor-signer.p12" password="${password}" rootca=""/>
<profileitem ca="" distributor="2" key="" password="${password}" rootca=""/>
</profile>
</profiles>
Issues / Trouble shooting
On issues you can look for traces in :
${HOME}/workspace/.metadata/.log
error 12 :
Q:
Undefined error(-1)processing result : Undefined Error [-999] failed __return_cb req_id[1] pkg_type[wgt] pkgid[fIfMVIOydh] key[error] val[-12] error message: :Invalid file reference. An unsinged file was found.:<-5> processing result : Check certificate error [-12] failed
A:
rm -rf .manifest.tmp author-signature.xml signature1.xml
Some files are not being ignored in the "tizen build-web" step ?
Q:
~/tizen-studio/tools/ide/bin/tizen install -n *.wgt -- . path is /home/owner/share/tmp/sdk_tools/tmp/*.wgt __return_cb req_id[1] pkg_type[wgt] pkgid[*] key[start] val[install] __return_cb req_id[1] pkg_type[wgt] pkgid[*] key[error] val[-12] error message: :Invalid signature. Signed with wrong key, changed signature file or changed package file.:<-4> __return_cb req_id[1] pkg_type[wgt] pkgid[*] key[end] val[fail] processing result : Check certificate error [-12] failed spend time for pkgcmd is [1287]ms
error 22 : Issues : SIGNATURE_INVALID
Q:
processing result : SIGNATURE_INVALID [22] failed
A:
rm author-signature.xml signature1.xml
And sign again with approved certificate
Observed on TM1 ReferenceDevices
- https://lists.tizen.org/pipermail/dev/2014-September/004355.html
- https://developer.tizen.org/ko/forums/sdk-ide/signature-invalid
- http://stackoverflow.com/questions/25626845/signature-invalid-when-trying-to-install-application-on-samsung-gear-2
error 23 : SIGNATURE_VERIFICATION_FAILED
Q: on tizen-studio CLI ?
error : 23 end process (fail) processing result : SIGNATURE_VERIFICATION_FAILED [23] failed spend time for pkgcmd is [3822]ms cmd_ret:23
or IDE
Error code: SIGNATURE_VERIFICATION_FAILED Error message: SIGNATURE_VERIFICATION_FAILED Command: /usr/bin/pkgcmd -q -i -t tpk -p "/opt/usr/apps/tmp/org.example.*-arm.tpk" Management: Check whether the package is modified illegally. If there is an installed package which has same name and different signature with your package, you can receive this error return also.
A:
Select / an other certificate from IDE
Check privileges with "sdb dlog" or certificates issues
sdb dlog | grep signature E/PKGMGR_PARSER( 9735): pkgmgr_parser_signature.c: __ps_check_mdm_policy_by_pkgid(1056) > (ret != MDM_RESULT_SUCCESS) can not connect mdm server W/CERT_SVC( 9834): SignatureValidator.cpp: check(432) > signature1.xml has got unrecognized Root CA certificate. Signature will be disregarded. E/rpm-installer( 9834): coretpk-signature-validator.cpp: _coretpk_signature_validator_validate_signatures(148) > (valRes != ValidationCore::SignatureValidator::SIGNATURE_VERIFIED) validator.check() is failed, valRes=[-34] E/rpm-installer( 9834): installer-util.c: _installer_util_get_configuration_value(600) > [signature]=[on] E/rpm-installer( 9834): coretpk-installer.c: _coretpk_installer_install_package(3654) > _coretpk_signature_validator_validate_signatures(/opt/usr/data/pkgmgr/org.example.*/, org.example.*) failed. ret=[-34]
Related:
error 32 : No author certificates
~/tizen-studio/tools/ide/bin/tizen install -n main.wgt -- . (...) __return_cb req_id[12590002] pkg_type[wgt] pkgid[ComExample] key[error] val[32] error message: No author certificates (...) processing result : CERTIFICATE_INVALID [32] failed
Make sure to have valid "author-signature.xml"
error 33
start process (install) . error : 33
end process (fail) processing result : CERTIFICATE_CHAIN_VERIFICATION_FAILED [33] failed
On TM1, install Extras
error : 34 : CERTIFICATE_EXPIRED
Q:
end process (fail) processing result : CERTIFICATE_EXPIRED [34] failed spend time for pkgcmd is [4434]ms
A: Update date on device
Context: On TizenStudio 1.1.1, SamsungZ2
error 61
Cannot install application. Error code: FATAL_ERROR Error message: FATAL_ERROR Command: /usr/bin/pkgcmd -q -i -t tpk -p "/opt/usr/apps/tmp/org.example.*-1.0.0-arm.tpk" Management: Installation or uninstallation is not working temporarily. Transferring the package... Transferred the package: *.tpk -> /opt/usr/apps/tmp Installing the package... -------------------- Platform log view -------------------- path is /opt/usr/apps/tmp/*.tpk __return_cb req_id[88280002] pkg_type[invalid] pkgid[Invalid package] key[start] val[install] __return_cb req_id[88280002] pkg_type[invalid] pkgid[Invalid package] key[end] val[fail] processing result : FATAL_ERROR [61] failed spend time for pkgcmd is [1422]ms Failed to install Tizen application. Total time: 00:00:04.742
start process (install) end process (fail) processing result : FATAL_ERROR [61] failed spend time for pkgcmd is [2124]ms cmd_ret:61
sdb dlog CERT_SVC_ERR_IN_AUTHOR_CASE_DISTRIBUTOR_CERT
1/ Check date
2/ or press the cert icon on top bar on left if you press ok it will register cert again
3/ Or Cert issue, regenerate cert and before deploying to device
Hope that help
processing result : ARGUMENT_INVALID [64] failed
TBD
error 75 : SIGNATURE_INVALID_DEVICE_UNIQUE_ID
Q:
tizen-studio/tools/ide/bin/tizen install -n org.example.*-1.0.0-arm.tpk -- $(PWD)/Release (...) path is /opt/usr/apps/tmp/org.example.*-1.0.0-arm.tpk __return_cb req_id[54070002] pkg_type[tpk] pkgid[org.example.*] key[start] val[install] __return_cb req_id[54070002] pkg_type[tpk] pkgid[org.example.*] key[install_percent] val[30] __return_cb req_id[54070002] pkg_type[tpk] pkgid[org.example.*] key[error] val[75] error message: Device id for this device is not registered __return_cb req_id[54070002] pkg_type[tpk] pkgid[org.example.*] key[end] val[fail] processing result : SIGNATURE_INVALID_DEVICE_UNIQUE_ID [75] failed spend time for pkgcmd is [4835]ms Failed to install Tizen application.
A:
sdb shell cat /home/developer/certificate-registration.xml sdb shell /opt/etc/duid-gadget
References:
error 77 : SIGNATURE_INVALID_NO_HASH_FILE
Q:
val[77] error message: Invalid package - No Hash file __return_cb req_id[267420002] pkg_type[wgt] pkgid[OrgMatrix0] key[end] val[fail] processing result : SIGNATURE_INVALID_NO_HASH_FILE [77] failed
A:
- uninstall app from device
- rm all files but sources and repack, redeploy
References:
- http://stackoverflow.com/questions/30540128/signature-invalid-when-trying-to-run-my-project-in-samsung-watch
- http://stackoverflow.com/questions/25626845/signature-invalid-when-trying-to-install-application-on-samsung-gear-2
error 78
Cannot install application. SIGNATURE_NO_DEVICE_PROFILE [78]
Regen certificate and upload it to device check the file is present in :
sdb shell cat /home/developer/certificate-registration.xml
error 81
- http://stackoverflow.com/questions/37222812/error-81-when-launching-web-app-on-gear-s2-device
- http://stackoverflow.com/questions/40790473/deploying-tizen-app-to-gear-s2-non-trusted-certificate-is-used
- http://stackoverflow.com/questions/40742515/how-to-install-app-on-gear-s2-via-tizen-studio
error 117
The application ID (*) is already registered. To launch the project(*) again, please change the application ID of the project(*) in the manifest editor.
Fail to debug
Problem Message :
Cannot launch application with GDBClient. Error in final launch sequence Failed to execute MI command: -break-insert -t -f main Error message from debugger back end: Cannot access memory at address 0x10cc
Solution : Uninstall application from SamsungZ1 homescreen
Cannot install application.
Tizen SDK (Version : 2.4.0_Rev5, Build id : 20151223-1450) :
Cannot install application.
Solution: Connection explorer / Permit to install applications
It happened after OS upgrade
Cannot install application.
Management: Installation or uninstallation is not working temporarily.
On deploy :
Error code: FATAL_ERROR Error message: Command: /usr/bin/pkgcmd -G -q -i -t tpk -p "/opt/usr/apps/tmp/*-arm.tpk" Management: Installation or uninstallation is not working temporarily.
sdb dlog E/rpm-installer( 2522): installer-util.c: _installer_util_get_configuration_value(566) > [signature]=[on] E/CERT_SVC_VCORE( 2522): DUID.cpp: checkAppBindUsingEmail(93) > Failed to get email tag. invalid E/rpm-installer( 2522): rpm-installer.c: _ri_get_visibility_from_signature_file(1789) > cert_svc_verify_package_certificate() failed. E/rpm-installer( 2522): coretpk-installer.c: _coretpk_installer_get_pkgfile_info(1891) > Couldnt get visiblity [0], ret: 117 E/rpm-installer( 2522): coretpk-installer.c: _coretpk_installer_prepare_package_install(3957) > (pkg_file_info == NULL) _coretpk_installer_get_pkgfile_info(/opt/usr/apps/tmp/*-arm.tpk) failed. I/Tizen::App( 1538): (1894) > PackageEventHandler - req: 15380002, pkg_type: invalid, pkg_name: Invalid package, key: start, val: install I/Tizen::App( 1538): (1913) > Invalid type - pkg_type: invalid
Solution : update date on device
Invalid tep file name!!
sdb dlog E/PKGMGR ( 2537): pkgmgr.c: pkgmgr_client_install(1605) > install pkg start. E/PKGMGR_SERVER( 2541): pkgmgr-server.c: main(2414) > package manager server start E/PKGMGR_SERVER( 2541): pkgmgr-server-internal.c: _zone_set_type_and_backend(180) > tep_filepath [/opt/usr/apps/tmp/*-arm.tpk] E/PKGMGR_INFO( 2541): pkgmgrinfo_pkginfo.c: pkgmgrinfo_pkginfo_get_unmounted_pkginfo(778) > (exist == 0) pkgid[/opt/usr/apps/tmp/*arm.tpk] not found in DB E/PKGMGR_SERVER( 2541): pkgmgr-server-internal.c: __get_installed_pkg_type(103) > [__get_installed_pkg_type(): 103]((_pkg_type == NULL || strcmp(_pkg_type, "tep") != 0)) Invalid tep file[/opt/usr/apps/tmp/*-arm.tpk] E/PKGMGR_SERVER( 2541): pkgmgr-server-internal.c: _zone_set_type_and_backend(325) > Invalid tep file name!!
Solution: make sure file ".package-stamp" is present with content = "TPK"
can not connect mdm server
After a firwmare upgrade
sdb dlog PKGMGR_INFO(11093): pkgmgrinfo_pkginfo.c: pkgmgrinfo_pkginfo_get_unmounted_pkginfo(778) > (exist == 0) pkgid[/opt/usr/apps/tmp/*.tpk] not found in DB E/BACKEND_LIB(11093): librpm.c: __installer_util_delete_dir(179) > opendir(/tmp/coretpk-unzip) failed. [2][No such file or directory] E/PKGMGR_SERVER(11093): pm-mdm.c: _pm_check_mdm_policy(75) > [_pm_check_mdm_policy(): 75](ret != MDM_RESULT_SUCCESS) can not connect mdm server E/PKGMGR_SERVER(11093): pkgmgr-server.c: __set_recovery_mode(234) > rev_file[/opt/share/packages/.recovery/pkgmgr/*.tpk] is null
Solution: Permit to install application
cannot be cast to java.lang.Double
Errors occurred during the build
- http://developer.samsung.com/forum/thread/sdk-24-rev4--errors-in-run-working-project-/201/290481#
- http://stackoverflow.com/questions/35903829/tizen-sdk-for-samsung-tv-web-app-throws-java-lang-integer-cannot-be-cast-to-java
- http://www.codegur.net/35903829/tizen-sdk-for-samsung-tv-web-app-throws-java-lang-integer-cannot-be-cast-to-java
Copying files...
On Project / Buildpackage :
If it get stuck and not printing OK,
Solution:
remove project from workspace and import it again, then on building package it should print :
Initialize... OK Copying files... OK Signing... OK
failed to build package
Packaging:
Start... < Options > -Build directory = /*/Debug -Architecture = armel -Package name = org.example.* -Package version = * -Package type = TPK -Project name = * -Artifact name = * Initialize... OK Copying files...
java.nio.file.FileAlreadyExistsException
SdK : On Project / Run :
Cannot create package. Failed to package the project. Packaging failed java.nio.file.FileAlreadyExistsException:*/workspace/*/Debug/.tpk/lib/lib*.so
# cat ~/workspace/.metadata/.log !ENTRY org.tizen.nativecommon 4 0 2016-05-11 16:15:18.394 !MESSAGE Cannot create package. !STACK 0 org.tizen.nativecommon.build.exception.SBIException: Failed to package the project. at org.tizen.nativecore.build.NativeCoreProjectDependentPackager.buildPackage(NativeCoreProjectDependentPackager.java:432) at org.tizen.nativecore.build.NativeCoreProjectDependentPackager.buildPackage(NativeCoreProjectDependentPackager.java:439) at org.tizen.nativecore.build.NativeCoreProjectDependentPackager.buildPackage(NativeCoreProjectDependentPackager.java:261) at org.tizen.nativecore.build.NativeCoreProjectDependentPackager.buildPackage(NativeCoreProjectDependentPackager.java:695) at org.tizen.nativecommon.launch.TizenLaunchDelegate2.createPackage(TizenLaunchDelegate2.java:1027) at org.tizen.nativecommon.launch.TizenLaunchDelegate2.normalDeploy(TizenLaunchDelegate2.java:984) at org.tizen.nativecommon.launch.TizenLaunchDelegate2.deployApplication(TizenLaunchDelegate2.java:931) at org.tizen.nativecommon.launch.TizenLaunchDelegate2.launchApplicationForRun(TizenLaunchDelegate2.java:616) at org.tizen.nativecommon.launch.TizenLaunchDelegate2.launch(TizenLaunchDelegate2.java:273) at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:858) at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:707) at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:1018) at org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1222) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)
Solution :
Avoid symlink, move project to other dir, remove it from workspace and then import it again
Note :
Check if no lib overlaping in platform's one, for instance on SamsungZ1 :
sdb shell ls /usr/lib/libuuid* /usr/lib/libuuid.so.1 /usr/lib/libuuid.so.1.3.0
Resource is out of sync with the file system:
From "workspace/.metata/.log"
!ENTRY org.tizen.common.externals 4 0 2016-04-16 14:31:04.680 !MESSAGE Resource is out of sync with the file system:
Move and Import ?
Management: Installation or uninstallation is not working temporarily.
Cannot install application.
Error code: FATAL_ERROR Error message: Command: /usr/bin/pkgcmd -G -q -i -t tpk -p "/opt/usr/apps/tmp/*arm.tpk" Management: Installation or uninstallation is not working temporarily.
sdb dlog E/rpm-installer(23981): coretpk-parser.c: _coretpk_parser_is_svc_app(1225) > (ret == 1) NodeSet is empty. (//*[name() = 'manifest']/*[name()='service-application']) E/rpm-installer(23981): coretpk-parser.c: __coretpk_parser_get_value(1341) > (result_value == NULL) [install-location] is empty. E/rpm-installer(23981): coretpk-parser.c: __coretpk_parser_is_theme(39) > (ret == 1) metadata(watchface) is empty. E/rpm-installer(23981): coretpk-parser.c: _coretpk_parser_is_widget(1191) > (ret == 1) NodeSet is empty. (//*[name() = 'manifest']/*[name()='widget-application']) E/rpm-installer(23981): installer-util.c: _installer_util_get_configuration_value(566) > [signature]=[on] E/rpm-installer(23981): rpm-installer.c: _ri_get_visibility_from_signature_file(1789) > cert_svc_verify_package_certificate() failed. E/rpm-installer(23981): coretpk-installer.c: _coretpk_installer_get_pkgfile_info(1891) > Couldnt get visiblity [0], ret: 117 E/rpm-installer(23981): coretpk-installer.c: _coretpk_installer_prepare_package_install(3957) > (pkg_file_info == NULL) _coretpk_installer_get_pkgfile_info(/opt/usr/apps/tmp/*-arm.tpk) failed. I/Tizen::App( 1404): (1894) > PackageEventHandler - req: 14040002, pkg_type: invalid, pkg_name: Invalid package, key: start, val: install I/Tizen::App( 1404): (1913) > Invalid type - pkg_type: invalid I/CAPI_APPFW_APPLICATION( 871): app_main.c: _ui_app_appcore_rotation_event(485) > _ui_app_appcore_rotation_event E/rpm-installer(23981): rpm-cmdline.c: _ri_cmdline_process(518) > __ri_process_request: Error E/rpm-installer(23981): rpm-appcore-intf.c: main(260) > ------------------------------------------------ E/rpm-installer(23981): rpm-appcore-intf.c: main(261) > [END] installer: result=[3] E/rpm-installer(23981): rpm-appcore-intf.c: main(262) > ------------------------------------------------ I/Tizen::App( 1404): (1894) > PackageEventHandler - req: 14040002, pkg_type: invalid, pkg_name: Invalid package, key: end, val: fail I/Tizen::App( 1404): (1913) > Invalid type - pkg_type: invalid
Solution: Set device's date
java.lang.NoClassDefFoundError: org/tizen/core/gputil/XMLUtil
~/tizen-studio/tools/ide/bin/tizen create web-project
Exception in thread "main" java.lang.NoClassDefFoundError: org/tizen/core/gputil/XMLUtil at org.tizen.ncli.subcommands.createweb.CreateWebProjectCommand.generateFileFromRegenTemplate(CreateWebProjectCommand.java:597)
Tizen CLI 1.3.5
Installing NativeCLI package workarounds it
/usr/bin/pkgcmd: invalid option -- 'G'
Observed with eclipse from : http://download.tizen.org/sdk/Installer/tizen-studio_1.0/web-cli_Tizen_Studio_1.0_ubuntu-64.bin
Launching the Tizen application...
(...)
[Deploying the package...]
(...)
[Installing the package...]
Uninstalling the package...
/usr/bin/pkgcmd: invalid option -- 'G' Package Manager Tool Version: 0.1
Fallback use sdb :
sdb install Debug/*-arm.tpk
"Cannot provide a package function to this project"
Using: TizenStudio 1.0
- https://developer.tizen.org/zh-hans/forums/sdk-ide/sdk-2.4r7-unable-create-package-cli
- https://developer.tizen.org/taxonomy/term/23?page=3
other application is currently in launch.
Could not launch the * application because the other application is currently in launch.
TizenStudio 1.0
Exception in thread "main" java.lang.NoClassDefFoundError: org/tizen/sbilib/for_cli/SbiData
TizenStudio 1.0.1
Certificate file not found :
Initialize... OK Copying files... OK Signing... java.io.IOException: Certificate file not found :
Change certificate from IDE