×

Discussion Board

Results 1 to 8 of 8
  1. #1
    Regular Contributor
    Join Date
    Mar 2005
    Posts
    77

    App not loading without WriteDeviceData

    Hi all,

    My app installs OK, and runs OK if I give it the capabilities :-

    CAPABILITY NetworkServices ReadDeviceData ReadUserData WriteUserData WriteDeviceData

    I do not need the WriteDeviceData capability, so I cannot explain it's use for CHECK-06 in the Symbian Signed Test Criteria. I would really like NOT to use it, therefore.

    Unfortunately, if I remove WriteDeviceData from the MMP file, and the Certificate, my app installs OK, but does not run.

    Under on-device debug, the debug run terminates before the E32Main() call, so I cannot give any further guesses as to what is wrong. There is no error message from Symbian, but I have come to expect no help from that direction...

    The only reason to use ReadDeviceData is to get the IMEI from the phone hardware.

    How do I get this app through CHECK-06?

    Richard

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

    Re: App not loading without WriteDeviceData

    Is this a standard GUI application? Have you tried to run it on the emulator to see if there are any *PlatSec* warnings caused by the lack of WriteDeviceData? Have you run the Capability Scanner Tool on your application to see which capabilities are really needed?
    -- 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

  3. #3
    Regular Contributor
    Join Date
    Mar 2005
    Posts
    77

    Re: App not loading without WriteDeviceData

    Hi,

    It is a standard GUI app, the 'bare bones' were produced with UI Designer.

    I tried it on the emulator, a thing I have neglected since 3rd Edition on-device debugging arrived, and it did give a PlatSec error.The Capability Scanner Tool is something I do not have, as I use Carbide 1.2.2.

    Is it true that I cannot produce 2nd Edition code with Carbide 1.3?

    I would like to swap to 1.3, to keep up to date, but I need to preserve 2nd Edition capability.

    Perhaps the Scanner would tell me why I need WriteDeviceData...

    The only two routines that I use are GetPhoneId(), and GetSubscriberId(), from the CTelephony class.
    GetSubscriberId() is given in "Security policies for component: ETEL3RDPARTY" as needing ReadDeviceData capability, but GetPhoneId() is not mentioned, as far as I can find by searching the 9.1 help system. WriteDeviceData is not mentioned in that policy document.

    I have to assume that the GetPhoneID() is the problem.The IsvTelInfoApp Example in the 9.1 SDK uses WriteDeviceData, although it does not seem to set any information, only get it. Perhaps that should tell me something...

    At this point I give up, I will try to make a case for the test house as to why I need WriteDeviceData capability, and just hope for the best.

    Richard

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

    Re: App not loading without WriteDeviceData

    What phone are you using for testing? Which firmware version?
    -- 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 2005
    Posts
    77

    Re: App not loading without WriteDeviceData

    Hi Lucian,

    Problem occurs on two phones tested so far:-

    V15.0.015
    11-12-07
    RM-320
    Nokia N95 (60.01)

    and

    1.0633.18.02
    26-01-07
    RM-208
    Nokia E65 207.04

    The code I use is very much a copy of the SDK example:-
    #ifdef EKA2
    #include <etel3rdparty.h>
    CGetIMEI* CGetIMEI::NewL(/*TDes& aIMEI*/)
    {
    CGetIMEI* self = new (ELeave) CGetIMEI(/*aIMEI*/);
    CleanupStack::PushL(self);
    self->ConstructL();
    CleanupStack::Pop(self);

    return self;
    }

    CGetIMEI::CGetIMEI() : CActive(EPriorityHigh) // HIGH priority
    /*,iIMEI(aIMEI)*/
    {
    iIMEI.Zero();
    iState = EStart;
    }

    void CGetIMEI::ConstructL()
    {
    iTelephony = CTelephony::NewL();
    CActiveScheduler::Add(this); // Add to scheduler
    }

    CGetIMEI::~CGetIMEI()
    {
    Cancel(); // Cancel any request, if outstanding
    // Delete instance variables if any
    delete iTelephony;
    iTelephony = NULL;
    }

    void CGetIMEI:oCancel()
    {
    iTelephony->CancelAsync(CTelephony::EGetPhoneIdCancel);
    }

    void CGetIMEI::StartL()
    {
    Cancel(); // Cancel any request, just to be sure
    iState = EGetPhoneInfo;
    CTelephony::TPhoneIdV1Pckg phoneIdPckg( iPhoneId );
    iTelephony->GetPhoneId(iStatus, phoneIdPckg);
    SetActive(); // Tell scheduler a request is active
    iActiveSchedulerWait.Start();
    }

    void CGetIMEI::RunL()
    {
    iState = EDone;
    if ( iActiveSchedulerWait.IsStarted() )
    {
    iActiveSchedulerWait.AsyncStop();
    if(iStatus == KErrNone)
    {
    iIMEI.Append(iPhoneId.iSerialNumber);
    //iAppUi->iIMEI.Append(iPhoneId.iSerialNumber);
    }
    else
    {
    TBuf<64> buf;
    buf.Num(iStatus.Int());
    _LIT(KE,"Get Phone Info error:");
    CEikonEnv::Static()->InfoWinL(KE(),buf);
    }
    }
    }

    const TPtrC CGetIMEI::GetIMEI()
    {
    StartL();
    TPtrC ptr(iIMEI.Ptr());
    return ptr;
    }


    void CIMSIApp::GetIMSI(TDes& aIMSI)
    {
    CIMSIApp* self= new (ELeave) CIMSIApp(aIMSI);
    CleanupStack::PushL(self);
    self->ConstructL();
    CleanupStack::PopAndDestroy(self);
    }

    void CIMSIApp::ConstructL()
    {
    iTelephony = CTelephony::NewL();
    CActiveScheduler::Add(this);

    iTelephony->GetSubscriberId(iStatus,iSubscriberIdV1Pckg);
    SetActive();
    CActiveScheduler::Start();
    }

    CIMSIApp:: CIMSIApp(TDes& imsi): CActive(EPriorityStandard),IMSI(imsi), iSubscriberIdV1Pckg(iSubscriberIdV1)
    {
    //default constructor
    }

    void CIMSIApp::RunL()
    {
    if(iStatus==KErrNone)
    {
    IMSI = iSubscriberIdV1.iSubscriberId;
    CActiveScheduler::Stop();
    }
    }

    void CIMSIApp:oCancel()
    {
    iTelephony->CancelAsync(CTelephony::EGetSubscriberIdCancel);
    }


    #endif





    Richard
    Last edited by 76Richard76; 2008-06-06 at 12:53. Reason: added code extract

  6. #6
    Nokia Developer Champion
    Join Date
    Mar 2006
    Location
    Helsinki, Finland
    Posts
    8,344

    Re: App not loading without WriteDeviceData

    It is apparent that you do not need WriteDeviceData capability as you are just acquiring IMEI and IMSI(as per the SDK document). By the way you can test your application on RDA on multiple devices for free and trace the behavior. Finally you can try with upgrading firmware of the devices you mentioned.

    * Remote Device Access

    Kiran.
    Nokia Developer Wiki Moderation team

  7. #7
    Regular Contributor
    Join Date
    Mar 2005
    Posts
    77

    Re: App not loading without WriteDeviceData

    Hi Kiran,

    The mystery is solved!

    Because I am only a Developer, not a Symbian programming manager, I failed to realise that the use of the Phonebook APIs required Read/WriteDeviceData (as well as Read/WriteUserData), and I use those interfaces. I now have a reason for having the WriteDeviceData Capability in my app.

    I found this gem of information in item #30 of the discussion "What S60 APIs in your view should require lower capability than currently?" in this forum.

    I apologise for my lack of intuition and/or gestalt reasoning.

    Richard

  8. #8
    Nokia Developer Champion
    Join Date
    Mar 2006
    Location
    Helsinki, Finland
    Posts
    8,344

    Smile Re: App not loading without WriteDeviceData

    Using "Epocwind.out" approach might have revealed this before a long time.

    But finally it worked and you should go for party!!!

    Cheers,
    Kiran.
    Nokia Developer Wiki Moderation team

Similar Threads

  1. DestroyDocument() is closing the calling app
    By shmoove in forum Symbian
    Replies: 2
    Last Post: 2008-05-22, 08:41
  2. Problems with signing app S60 with Netbeans 6
    By xchewy in forum Mobile Java General
    Replies: 3
    Last Post: 2008-03-13, 23:00
  3. OpenGL ES app is not trusted
    By mribble in forum Symbian Signed Support, Application Packaging and Distribution and Security
    Replies: 7
    Last Post: 2006-11-03, 22:48
  4. Dialog's clipping area (again). Nokia experts, please help
    By synov in forum Symbian User Interface
    Replies: 0
    Last Post: 2004-06-26, 14:35
  5. 7650 - go back, close my app not closing the container app
    By geran in forum Digital Rights Management & Content Downloading
    Replies: 1
    Last Post: 2002-12-05, 09:58

Posting Permissions

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