×

Discussion Board

Results 1 to 7 of 7
  1. #1
    Registered User
    Join Date
    Mar 2009
    Posts
    9

    Question "Unable to execute file for security reasons" with protected UID

    hi,

    My app consists of two exes, one is XXXSrv.exe which runs in background with mobile starting, another is XXX.exe.

    Previously I tested the app with two unprotected UID, in range 0xA..., assigned to two exes seperately. The app worked on emulator, no *PlatSec* warning. And it also worked on mobile with my Developer Certificate signing.

    Last week we were going to Express Sign the app, and protected UID needed. So I replaced two unprotected UID with two protected UID, in range 0x2...

    When I signed the app with the same Developer Certificate, the app can be installed on mobile without error. And the backgroud exe XXXSrv.exe runs as expected. But XXX.exe throw an error msg "Unable to execute file for security reasons" when starting.

    Could someone kind to explain why it's OKAY with unprotected UID, but failed with protected UID?

    Some backgroud:

    1. I'm sure I replaced every UID correctly, because I've replaced with another two unprocted UIDs and it worked.
    2. On emulator there are no PlatSec warning.
    3. I searched the forum and googled it, but no help. Many of them said it's because of using some capability not specified in mmp files. But it's weird here that it actullay worked with unprotected UIDs.
    4. my developer certificate is valid.


    Any help is greatly appreciated.

  2. #2
    Nokia Developer Expert
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,142

    Re: "Unable to execute file for security reasons" with protected UID

    that error should come only when there is a capability missing, so do re-check your codes and the mmp file. Also it could help if you could check (maybe with logging) which line is giving this particular error when you execute your application in the device.

  3. #3
    Registered User
    Join Date
    Mar 2009
    Posts
    9

    Re: "Unable to execute file for security reasons" with protected UID

    Thank you, symbianyucca.

    Quote Originally Posted by symbianyucca View Post
    that error should come only when there is a capability missing, so do re-check your codes and the mmp file.
    But symbian does not check capability of the apps with unprotected UIDs?

    Quote Originally Posted by symbianyucca View Post
    Also it could help if you could check (maybe with logging) which line is giving this particular error when you execute your application in the device.
    I am going to see where it stops with logging. It seems to be the last action I could take

  4. #4
    Nokia Developer Expert
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,142

    Re: "Unable to execute file for security reasons" with protected UID

    Capabilities are always checked, also with self-signed applications, thus I'm assuming that you did some other change which you just didin't notice on causing the problem..

  5. #5
    Registered User
    Join Date
    Mar 2009
    Posts
    9

    Re: "Unable to execute file for security reasons" with protected UID

    Yes, there's a bug I did not notice. It was found with very verbose logging.

    the following code will result different string with UIDs which are larger than 0X80000000 and with UIDs smaller than 0x80000000, because the first arg of AppendNum is interpreted as TUInt64. And unprotected UIDs happen to be following into the former case and protected UIDs the later.
    TBuf<32> tmp;
    tmp.AppendNum(KAppUid.iUid, EHex);
    path.Append(tmp.Mid(8));
    Changed to the following code, and the problem resolved.
    TBuf<32> tmp;
    tmp.Format(_L("%x"), KAppUid.iUid);
    Thanks

  6. #6
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Budapest, Hungary
    Posts
    28,567

    Re: "Unable to execute file for security reasons" with protected UID

    I doubt that contents of descriptors (obviously created in runtime) could really affect if the application can be started at all.
    Anyway, because of your variable 'path', you may want to check RFs::PrivatePath.

  7. #7
    Registered User
    Join Date
    Mar 2009
    Posts
    9

    Re: "Unable to execute file for security reasons" with protected UID

    My original implementation will result to a wrong path c:\private, and accessing it is forbidden. c:\private\2000AAAA is what I want.

    RFs::PrivatePath is much better. Thank you.

Similar Threads

  1. Replies: 12
    Last Post: 2009-03-26, 08:04
  2. Help needed with a 3gp file...
    By joedoe_1981 in forum Streaming and Video
    Replies: 0
    Last Post: 2007-07-18, 18:58
  3. Replies: 1
    Last Post: 2005-05-26, 14:22
  4. nokia 7210 modem via IR doesn't work !
    By oussamaaiadi in forum PC Suite API and PC Connectivity SDK
    Replies: 1
    Last Post: 2003-03-06, 10:46
  5. Replies: 0
    Last Post: 2002-06-10, 12:24

Posting Permissions

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