×

Discussion Board

Results 1 to 9 of 9
  1. #1
    Regular Contributor
    Join Date
    Mar 2008
    Posts
    107

    Problem installing application that uses shared DLL

    Hi all,

    I am not able to install a Symbian C++ application to my phone (Symbian 3rd ED FP 1). The application uses a shared DLL.

    Both the application (program) and the dll have UIDs from the symbian site (registered).
    I've read more than 10 different topics in this forum and I've tried all the possibilities without success.

    I create a .sisx file from my application and when I try to install it I get the following error:
    "Unable to install a protected application from an untrusted application supplier"

    First I've tried without embedding the sis file of my DLL into the application sis file. It didn't work.

    Secondly, I've tried to make a sis separately only for the DLL. After many failed attempts and modifications it worked. I was able to install the dll from a signed .sisx file. The problem is how do I use that installed dll into an application that I want to install?

    Thirdly I've tried to embed the DLL (as a signed sis file) into the application signed sis file. It doesn't work. Application + DLL work fine in emulator. Please help me install my application + DLL into the phone. I have a developer certificate and I've signed the sis files.

    .mmp of DLL:
    Code:
    TARGET		 ARlib.dll
    TARGETTYPE	 DLL
    UID 0x00000000 0x20021D4B
    
    //Old UID allocated is 0x20021D4B
    
    USERINCLUDE	 .
    SYSTEMINCLUDE	 . \epoc32\include \epoc32\include\libc
    
    SOURCEPATH ..
    SOURCE arLib.cpp
    
    nostrictdef
    
    LIBRARY		 euser.lib
    LIBRARY		 estlib.lib
    
    #ifdef ENABLE_ABIV2_MODE
      DEBUGGABLE
    #endif
    
    //#if defined(WINS)
    //    deffile .\ARLibWINS.def
    //#else if defined(ARM)
    //    deffile .\ARLibARM.def
    //#endif
    
    
    EXPORTUNFROZEN
    
    CAPABILITY CommDD DiskAdmin LocalServices Location MultimediaDD NetworkControl NetworkServices PowerMgmt ProtServ ReadDeviceData ReadUserData SurroundingsDD SwEvent TrustedUI UserEnvironment WriteDeviceData WriteUserData
    .pkg of DLL
    Code:
    #{"ARLib DLL"},(0x20021D4B),1,0,0
    
    
    ;Localised Vendor name
    %{"Vendor-EN"}
    
    ;Unique Vendor name
    :"Vendor"
    
    "$(EPOCROOT)Epoc32\release\$(PLATFORM)\$(TARGET)\ARLib.dll"		  -"!:\sys\bin\ARLib.dll"
    .mmp file for application
    Code:
    TARGET			MobileAR_0x20021D4C.exe
    TARGETTYPE		exe
    UID		  0x100039CE 0x20021D4C
    
    EPOCSTACKSIZE	0x5000  				//20Kb  (max is 80KB)
    EPOCHEAPSIZE 	0x1000000 0x2000000  	// 16Mb - 32Mb ; Default minimum 4 kB, maximum 1 MB that is 0x1000 - 0x10000
    
    
    SOURCEPATH		..\src
    SOURCE			MobileAR.cpp
    SOURCE			MobileARApplication.cpp
    SOURCE			MobileARAppView.cpp
    SOURCE			MobileARAppUi.cpp
    SOURCE			MobileARDocument.cpp
    
    SOURCEPATH		..\data
    
    START RESOURCE	MobileAR.rss
    HEADER
    TARGET MobileAR_0x20021D4C
    TARGETPATH resource\apps
    END //RESOURCE
    
    START RESOURCE	MobileAR_reg.rss
    TARGET MobileAR_0x20021D4C_reg
    TARGETPATH 	  \private\10003a3f\apps
    END //RESOURCE
    
    
    
    USERINCLUDE	   ..\inc
    USERINCLUDE    ..\help \symbian_carbide_cpp\ARlib\group \symbian_carbide_cpp\ARlib \symbian_carbide_cpp\ARlib\AR
    
    SYSTEMINCLUDE	 \epoc32\include
    SYSTEMINCLUDE	 \epoc32\include\libc +\release\winscw\udeb
    
    LIBRARY		   euser.lib
    LIBRARY		   apparc.lib
    LIBRARY		   cone.lib
    LIBRARY		   eikcore.lib
    LIBRARY		   avkon.lib
    LIBRARY		   commonengine.lib
    LIBRARY		   efsrv.lib 
    LIBRARY		   estor.lib
    LIBRARY        aknnotify.lib
    LIBRARY        hlplch.lib
    LIBRARY        ARlib.lib 
    
    LANG SC
    
    VENDORID	  	  0
    SECUREID		  0x20021D4C
    CAPABILITY	  	  ReadUserData
    
    #ifdef ENABLE_ABIV2_MODE
      DEBUGGABLE
    #endif
    // End of File
    .pkg file of application
    Code:
    ;Language - standard language definitions
    &EN
    
    ; standard SIS file header
    #{"MobileAR"},(0x20021D4C),1,0,0
    
    ;Localised Vendor name
    %{"Vendor-EN"}
    
    ;Unique Vendor name
    :"Vendor"
    
    ;Supports Series 60 v 3.0
    [0x101F7961], 0, 0, 0, {"Series60ProductID"}
    
    ;Files to install
    ;You should change the source paths to match that of your environment
    ;<source> <destination>
    "$(EPOCROOT)Epoc32\release\$(PLATFORM)\$(TARGET)\MobileAR_0x20021D4C.exe"		-"!:\sys\bin\MobileAR_0x20021D4C.exe"
    "$(EPOCROOT)Epoc32\data\z\resource\apps\MobileAR_0x20021D4C.rsc"		-"!:\resource\apps\MobileAR_0x20021D4C.rsc"
    "$(EPOCROOT)Epoc32\data\z\private\10003a3f\apps\MobileAR_0x20021D4C_reg.rsc"	-"!:\private\10003a3f\import\apps\MobileAR_0x20021D4C_reg.rsc"
    "$(EPOCROOT)Epoc32\data\z\resource\apps\MobileAR_0x20021D4C.mif" -"!:\resource\apps\MobileAR_0x20021D4C.mif"
    "..\help\MobileAR_0x20021D4C.hlp"							 -"!:\resource\help\MobileAR_0x20021D4C.hlp"
    
    @"C:\symbian_carbide_cpp\ARlib\sis\ARLib_EKA2.sisx", (0x20021D4B)
    
    ; Add any installation notes if applicable
    ;"MobileAR.txt"		-"!:\private\20021D4C\MobileAR.txt"
    
    ;required for application to be covered by backup/restore facility 
    "..\sis\backup_registration.xml"		-"!:\private\20021D4C\backup_registration.xml"
    Observations:
    • I've tried with same UID3 for both app and DLL and nothing
    • In my phone's application manager "All" setting is enabled


    Thanks,
    Omar

  2. #2
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,740

    Re: Problem installing application that uses shared DLL

    0x2xxxxxxx-range UID-s/PkgID-s are from the protected range, you can not use self-signing with them. Check Open Signed Online on http://www.symbiansigned.com

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

    Re: Problem installing application that uses shared DLL

    THE poster said they have a devcert already.

    What are the capabilities assigned to the devcert?

    Basically you create a sis file with the dll and then create another application that can use the DLL. The application must reside in a seperate sis file if it is going to be used by a number of dll's.

    Also remember to set the devcert in the carbide confiuration, otherwise carbide.c++ will selfsign the sis file.
    Download Symbian OS now! [url]http://developer.symbian.org[/url]

  4. #4
    Nokia Developer Moderator
    Join Date
    Sep 2004
    Location
    Tampere, Finland
    Posts
    11,359

    Re: Problem installing application that uses shared DLL

    Here's my analysis of the content:
    • A dll's UID2 could be different things but should not be 0x00000000
      Quote Originally Posted by [URL="http://www.symbian.com/developer/techlib/v9.1docs/doc_source/N10356/BuildTools/build-dll/index.html"]How to build DLLs[/URL] >> Static interface DLLs
      In Symbian OS, all static interface DLLs must have a uid2 of 0x1000008d. The particular static interface DLL is then identified by name and by uid3.
    • Overall for the DLL there are plenty of capabilities used and protected UID3/SID -> signing with developer certificate and finaly certification is required.
    • DLL PKG file ok although using *_20021D4B.dll could be a good idea
    • Adding backup support to the DLL's SIS is also highly recommended
    • Why have you declared that many capabilities for the DLL when the process is not actualy having/using them? Could be OK as long as you know what you have done.
    • The UID3/SID of the app is in protected range too so the application's sis must be also signed with developer certificate and eventualy certified.


    The error messages suggests that you are installing the app as self-signed and that would be indeed a problem.
    -- Lucian

    If you are not yet a DVLUP member it is time to correct that mistake :) Click here to join: http://www.dvlup.com/lucian/Invite

  5. #5
    Regular Contributor
    Join Date
    Mar 2008
    Posts
    107

    Re: Problem installing application that uses shared DLL

    Hi all,

    Thanks for the replies.

    To be clear:
    • I am using a developer certificate for the dll and the application
    • I have signed both the app and the dll with that certificate
    • the certificate has all the capabilities except those that require manufacturer approval
    • I've put all the capabilities except for manufacturer approval in the DLL because of symbian requests
    • I will use the DLL with applications requiring many capabilities, not just with this one


    Reading your answers there are several things that are not clear to me:
    • What means "Adding backup support to the DLL's SIS"
    • From this: "Basically you create a sis file with the dll and then create another application that can use the DLL". I've created and (the phone said it was ok) successfully installed the signed sis file with the DLL. How do I install also the application that uses the DLL?


    I am not new to Symbian but I've never (successfully) used DLLs or in this case static/shared DLLs.

    This is what I've done (please tell me where I am wrong or what should I do because it is clear I don't understand the process well):
    • Create DLL project
    • Create Application project
    • Add "LIBRARY ARLib.lib" line to the application .mmp file
    • Include "ARLib.h" (ARLib is the DLL) in the application include file
    • Set Developer Certificate for signing in the phone build stage in both the DLL and the Application
    • Frozen Exports and build the statc DLL project (ARLib) -> ARLib.dll and ARLib.lib were created as well as ARLib.dso, .sis and .sisx files in the Phone Build
    • Add a reference to the ARLib.mmp file in the bld.inf file of the application project
    • Build the application project -> .sis and .sisx (signed) files created
    • Try to install the application -> failed (error mentioned: Unable to install a protected application from an untrusted application supplier)
    • Try to install the .sisx file of the DLL and finally succedded but with this message during install : "Application not compatible with phone. Continue anyway?". Is this ok? The DLL is using openC. After installation phone said: "Installation Complete", no errors
    • Try to install again the application (without any reference to the .sisx file of the DLL in the .pkg file) -> failed
    • Add a reference in the application .pkg file to the DLL .sisx file to create embedded sis
    • Try again to install the application .sisx file (which has embedded the DLL .sisx file) -> still the same error



    If you could describe the clear steps or tell me where do you think I am doing it wrong it would help a lot.

    Thanks,
    Omar

  6. #6
    Nokia Developer Moderator
    Join Date
    Sep 2004
    Location
    Tampere, Finland
    Posts
    11,359

    Re: Problem installing application that uses shared DLL

    "Adding backup support to the DLL's SIS" means that since your DLL is installed as a separate package it will need to register itself with the backup server (have a backup_registration.xml file) otherwise after a backup-restore sequence you will end up with the appication restored but unable to run because the DLL it needs hasn't been backed-up.

    "'Application not compatible with phone. Continue anyway?'. Is this ok?" No, it is not OK. The message is caused by incorrect/missing platform dependency statement in the PKG file of the DLL, i.e. a line like this: [0x101F7961], 0, 0, 0, {"Series60ProductID"} where the UID reflect the targeted platform(s).

    "Try to install again the application (without any reference to the .sisx file of the DLL in the .pkg file) -> failed " Your problem thus seems to be related to the application sis only since we have now your confirmation that although with some issues the DLL installation works. Your problem is not related in fact in any way to the DLL at all.

    "Try to install the application -> failed (error mentioned: Unable to install a protected application from an untrusted application supplier)" Very suspicious indeed. Can you send the signed SIS file (with the embedded DLL sis) to fn.support@nokia.com, I'll try to have a look at it.
    -- Lucian

    If you are not yet a DVLUP member it is time to correct that mistake :) Click here to join: http://www.dvlup.com/lucian/Invite

  7. #7
    Regular Contributor
    Join Date
    Mar 2008
    Posts
    107

    Re: Problem installing application that uses shared DLL

    Problem solved.

    My mistake at some point I don't know why the application project wasn't signing with the dev certificate anymore but self-signing. I've signed the application with the dev certificate and I didn't get the error anymore.

    Regarding my .pkg file and the UID2 that was chosen for the DLL I've just put the same information that Carbide fills in when you create a Symbian DLL project. That is: UID2 = 0x00000000 and in the .pkg file no reference of the line with Series60ProductID. Anyways I've added the modifications.

    I've added also this line to the .pkg file of the DLL:
    "..\sis\backup_registration.xml" -"!:\private\20021D4B\backup_registration.xml"

    Now I get "Unable to install error". I've removed the backup_registration line and everything works great.
    Does anyone know what is the problem witht he backup registration for the DLL? I guess the private directory is not good for DLLs, but I am not sure what is the good one... \sys\bin?


    Thanks for all the help and sorry for my mistakes,
    Omar

  8. #8
    Nokia Developer Moderator
    Join Date
    Sep 2004
    Location
    Tampere, Finland
    Posts
    11,359

    Re: Problem installing application that uses shared DLL

    Quote Originally Posted by omarfr View Post
    Problem solved.

    My mistake at some point I don't know why the application project wasn't signing with the dev certificate anymore but self-signing. I've signed the application with the dev certificate and I didn't get the error anymore.

    Regarding my .pkg file and the UID2 that was chosen for the DLL I've just put the same information that Carbide fills in when you create a Symbian DLL project. That is: UID2 = 0x00000000 and in the .pkg file no reference of the line with Series60ProductID. Anyways I've added the modifications.

    I've added also this line to the .pkg file of the DLL:
    "..\sis\backup_registration.xml" -"!:\private\20021D4B\backup_registration.xml"

    Now I get "Unable to install error". I've removed the backup_registration line and everything works great.
    Does anyone know what is the problem witht he backup registration for the DLL? I guess the private directory is not good for DLLs, but I am not sure what is the good one... \sys\bin?


    Thanks for all the help and sorry for my mistakes,
    Omar
    The datacage above does not exist, it is only processes (exes) that can have a data cage.
    From SDK's documentation or from TSS001073 - Backup of add-on DLLs you can find that for packages containing shared libraries the registration is to be done through "!:\private\10202D56\import\packages\<DLL1_UID>\backup_registration.xml" where 10202D56 is hardcoded and <DLL1_UID> is the Package UID (pUID) of your shared libraries package.
    -- Lucian

    If you are not yet a DVLUP member it is time to correct that mistake :) Click here to join: http://www.dvlup.com/lucian/Invite

  9. #9
    Regular Contributor
    Join Date
    Mar 2008
    Posts
    107

    Re: Problem installing application that uses shared DLL

    Thanks for the info, I've modified my .pkg

Similar Threads

  1. application and DLL problem
    By kfke in forum Symbian Signed Support, Application Packaging and Distribution and Security
    Replies: 1
    Last Post: 2008-05-13, 13:09
  2. Replies: 3
    Last Post: 2007-01-17, 06:12
  3. Replies: 1
    Last Post: 2006-12-07, 09:26
  4. Problem with Series 90 application icon
    By ManishPatil in forum Symbian
    Replies: 3
    Last Post: 2005-07-21, 11:49
  5. Replies: 0
    Last Post: 2004-03-14, 18:16

Posting Permissions

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