×

Discussion Board

Results 1 to 11 of 11
  1. #1
    Regular Contributor
    Join Date
    Nov 2006
    Posts
    71

    Unhappy Unable to execute file for security reasons

    I have developed an application and generated a sis/sisx files, when I build the application using the 3rd SDK with the proper developer certificate it gets installed and runs normally on my e51 device.
    While on the other hand, when I build the same application using 3rd_FP1 sdk and use the same developer certificate the application gets installed in my e51 phone but it gives me the message "Unable to execute file for security reasons".

    Am I missing thing, shouldn't the capabilities used be the same between 3rd & 3rd_FP1 sdks

    FYI:
    I'm using Carbide v1.3
    Required Capabilities by the application are LOCATION NETWORKSERVICES READUSERDATA
    SDKs 3rd, 3rd_MR, 3rd_FP1

  2. #2
    Registered User
    Join Date
    Jun 2006
    Location
    India
    Posts
    1,043

    Re: Unable to execute file for security reasons

    Hi,
    I think the capabilities should be same and also you mentioned that you have the required developer certificate. Can you figure out through logs which particular API is giving issues while executing.
    Maximus
    S60 Developer
    Impossible is nothing

  3. #3
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,567

    Re: Unable to execute file for security reasons

    There are no such miracles, since the security checks are done by the device (which has not changed I guess). Make sure that the capabilities are really set in your executable (petran -dump s your.exe can show the capabilities of the compiled+built executable).

  4. #4
    Super Contributor
    Join Date
    Nov 2004
    Location
    Wiltshire, UK
    Posts
    3,644

    Re: Unable to execute file for security reasons

    Are you using any partnering SDK's/API's/Components in your project?
    Download Symbian OS now! [url]http://developer.symbian.org[/url]

  5. #5
    Regular Contributor
    Join Date
    Nov 2006
    Posts
    71

    Re: Unable to execute file for security reasons

    Quote Originally Posted by yogpan View Post
    Hi,
    Can you figure out through logs which particular API is giving issues while executing.
    I checked the epocwind.out file, unfortunately it is not straight forward to interpret the contents of this file to detect if something went wrong or not, but I came across these few lines

    Code:
     47.255	HandleRx Called
        47.445	CHCTLBcspReceiver::RunL() iStatus = 0
        47.445	CHCTLBcspReceiver::RunL() iStatus = 0
        47.445	CHCTLBcsp::HandleRx()
        47.445	HandleRx Called
        47.505	HTTPPLUGIN:[1f9259f0] created
        47.520	*PlatSec* WARNING - Capability check would have failed - Process GPSMonitor was checked by Thread MyApp::MyApp and was found to be missing the capabilities: WriteDeviceData .  Additional diagnostic message: Checked whilst trying to Set a Publish and Subscribe Property
        47.655	CHCTLBcspReceiver::RunL() iStatus = 0
        47.655	CHCTLBcspReceiver::RunL() iStatus = 0
        47.660	CHCTLBcsp::HandleRx()
        47.660	HandleRx Called
        47.855	CHCTLBcspReceiver::RunL() iStatus = 0
        47.900	CHCTLBcspReceiver::RunL() iStatus = 0
        47.900	CHCTLBcsp::HandleRx()
        47.900	HandleRx Called
        47.945	content size: 28.0000x32.0000
        47.945	content size: 20.0000x32.0000
        47.950	content size: 28.0000x32.0000
        47.965	content size: 27.9990x32.0000
        47.970	content size: 20.0000x32.0000
    This suggests that I might be missing WriteDeviceData capability but I don't remember exactly if I used any function that requires this capability in the first place. How is it possible to pin point the functions of this capability in my application. The strange thing compiling and running using 3rd edition sdk works fine with no problems

  6. #6
    Regular Contributor
    Join Date
    Nov 2006
    Posts
    71

    Re: Unable to execute file for security reasons

    Quote Originally Posted by wizard_hu_ View Post
    Make sure that the capabilities are really set in your executable (petran -dump s your.exe can show the capabilities of the compiled+built executable).
    I have checked my application exe using the petran command and I got the following result:
    Code:
    PETRAN - PE file preprocessor V02.01 (Build 549)
    Copyright (c) 1996-2005 Symbian Software Ltd.
    
    E32ImageFile 'MyApp.exe'
    Secure ID: xxxxxxxx
    Vendor ID: 00000000
    Capabilities: 00000000 0002a000
                  NetworkServices
                  ReadUserData
                  Location
    Which suggest that everything is fine in terms of setting the required capabilities in the application exes

  7. #7
    Registered User
    Join Date
    Dec 2006
    Posts
    2,280

    Re: Unable to execute file for security reasons

    Hi,

    The only way this makes sense (if it isn't just a human error) is if you have something statically linked into your project that has changed between SDKs so that it uses a different API internally.

    According to the PlatSec diagnostic message you are trying to set a publish and subscribe property. If you aren't doing that directly in your code then one of the APIs you are using must be.

    It seems the solution is simply to add the WriteDeviceData capability to your project - I don't think it's user-grantable though so that might bring up signing issues.

    It would be nice if you can find out which API is causing this so it can be properly documented.

    Sorcery

  8. #8
    Regular Contributor
    Join Date
    Nov 2006
    Posts
    71

    Re: Unable to execute file for security reasons

    Quote Originally Posted by Paul.Todd View Post
    Are you using any partnering SDK's/API's/Components in your project?
    No I'm not using any partnering items in my project.

    On another note, I tried to use your DevCertList tool, and I was having the following problem when trying to check my certificate:
    Code:
    C:\Developer Certificate Listing>devcertlist.exe /c /b my.cer
    Failed to parse certificate data (-2146881269)
    What is the meaning of the error? and was that the proper way to execute the command?

  9. #9
    Super Contributor
    Join Date
    Nov 2004
    Location
    Wiltshire, UK
    Posts
    3,644

    Re: Unable to execute file for security reasons

    According to the error code:
    0x8009310B CRYPT_E_ASN1_BADTAG

    Your DevCert is corrupt because it could not read one of the ASN fields.

    If you think the devcert is ok, send it to me (email me using the email functionality on the forum and I will send my private email address) and I will run it through the debugger in case there are a lot of IMEIs or something else unexpected in there.
    Download Symbian OS now! [url]http://developer.symbian.org[/url]

  10. #10
    Regular Contributor
    Join Date
    Nov 2006
    Posts
    71

    Smile Re: Unable to execute file for security reasons

    At last I was able to run the application on the device, apparently the problem occurred because I was using the __SERIES60_30__ macro to "initialize some parameters" once the application runs, and this wouldn't work for s60 3rd FP1, once I changed the macros to __SERIES60_3X__ it stopped giving the error and I was able to run the application

  11. #11
    Registered User
    Join Date
    Jun 2006
    Location
    India
    Posts
    1,043

    Re: Unable to execute file for security reasons

    Hi,
    Good that you were able to resolve the issue with MACRO but using a generic MACRO like __SERIES60_3X__ can also result in some issue .If suppose you are using any API which is present in 3rd edition but is deprecated in FP1 then putting such an API under a generic macro will work in 3rd edition but will fail in FP1. So you can put the code under edition specific MACRO like
    #ifdef __SERIES60_30__
    API
    #else __SERIES60_31__
    other API.
    #endif
    Maximus
    S60 Developer
    Impossible is nothing

Similar Threads

  1. Unable to create file
    By Ajmal in forum Symbian Media (Closed)
    Replies: 4
    Last Post: 2008-06-05, 04:39
  2. Unable to execute file for security reasons for bluetooth
    By manjunaths in forum Symbian Networking & Messaging (Closed)
    Replies: 4
    Last Post: 2008-05-23, 10:10
  3. unable to execute file for security reasons (-46)
    By sp_resh in forum Symbian C++
    Replies: 2
    Last Post: 2008-05-08, 19:50
  4. problem when importing from carbide c++ to vs 2003!
    By misfit.physics in forum Symbian Tools & SDKs
    Replies: 12
    Last Post: 2008-02-19, 09:45
  5. Replies: 1
    Last Post: 2005-05-26, 14:22

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •