×

Discussion Board

Results 1 to 12 of 12
  1. #1
    Registered User
    Join Date
    Mar 2008
    Posts
    6

    PED and signing.

    Hi all,

    I've searched and searched but perhaps I don't know what to search for, so please forgive me if the answer to this is in an FAQ somewhere. I've really tried to get a grip on this but the more I look, the more confusing it gets.

    I'm totally new to Python, Symbian and the whole shebang. I stumbled across PyS60, found PED (which is an excellent utility, thanks y.a.k), and now I'm having lots of fun messing around with my N95 but I'm being frustrated by a permissions problem. Some example scripts I've found on the net run fine if I call them from the Python shell but get an access denied error when I try to run them from PED.

    Can anyone explain, in simple terms please, how I can grant PED sufficient access rights to allow me to run any scripts I care to try. I've seen references to Ensymble, but I get the impression that I need a dev certificate for that to work. Is Open Signed Online what I need? I just want to tinker with my own phone, not interested in creating distributable applications.

    Sorry if it's a dumb question. I've tried, failed, and now I want help.

  2. #2
    Regular Contributor
    Join Date
    Mar 2003
    Posts
    115

    Re: PED and signing.

    PED is written in python so can not do everything the script shell does as the shell is signed. This allows access to protected areas which PED can't.

    As for the whole Open signed and all that, I suggest a search here or via google as there are many guides that will explain it better than me

  3. #3
    Super Contributor
    Join Date
    May 2004
    Location
    Tampere, Finland
    Posts
    524

    Re: PED and signing.

    Quote Originally Posted by IX View Post
    Can anyone explain, in simple terms please, how I can grant PED sufficient access rights to allow me to run any scripts I care to try. I've seen references to Ensymble, but I get the impression that I need a dev certificate for that to work. Is Open Signed Online what I need?
    You used to be able to get a six month developer certificate for your own phone. This certificate enabled you to sign applications with upto 13 capabilities yourself. You could then sign your own private, fully functional versions of PED, the Script Shell and all the extension modules you would need.

    Unfortunately, this is no longer the case. Symbian has tightened its grip and unless you cough up 200 dollars per year for a Publisher ID, you cannot sign anything yourself. To further limit your options, the free signing procedure, Open Signed Online, does not accept SIS files made by someone else.

    To my understanding, PED is pure Python. You could re-create the PED SIS file using your own UID and then Open Signed Online would accept it. Applications that rely on parts written in C++ are out of luck.

    Quote Originally Posted by IX View Post
    I just want to tinker with my own phone, not interested in creating distributable applications.
    Open Signed Online was established to do just that. Pity it falls short.


    Quote Originally Posted by IX View Post
    Sorry if it's a dumb question. I've tried, failed, and now I want help.
    Not at all. Symbian Signed is a mess.

  4. #4
    Registered User
    Join Date
    Mar 2008
    Posts
    6

    Re: PED and signing.

    Thanks for the replies.

    Quote Originally Posted by jethro.fn View Post
    To my understanding, PED is pure Python. You could re-create the PED SIS file using your own UID and then Open Signed Online would accept it.
    Okay, that sounds promising. I've got the source for PED. Am I right in thinking I need to use Ensymble to make a sis file? Will I need anything other than Ensymble and the PED source?

    I think I can piece this together with a bit of searching but a helpful kick in the right direction would be much appreciated.

  5. #5
    Registered User
    Join Date
    Mar 2008
    Posts
    6

    Re: PED and signing.

    Well, I'm making some progress at least.

    I managed to make a sis file using the following:
    Code:
    python c:\ensymble\ensymble.py py2sis --uid=0xE0000004 --verbose c:\Ped_2.17_final_IX
    which gave the following output:
    ensymble.py: warning: no application version given, using 1.0.0
    ensymble.py: warning: no certificate given, using insecure built-in one

    Input file(s) compile.py default.py help.txt LICENSE make.py ped.py ped.rs
    c ped.rss ped_1stEd.app ped_1stEd.pkg ped_2ndEd.app ped_2ndEd.pkg ui.py file_bro
    wser_icons\Bitmap_0001.bmp file_browser_icons\Bitmap_0002.bmp file_browser_icons
    \Bitmap_0003.bmp file_browser_icons\Bitmap_0004.bmp file_browser_icons\Bitmap_00
    05.bmp file_browser_icons\Bitmap_0006.bmp file_browser_icons\Bitmap_0013.bmp fil
    e_browser_icons\Bitmap_0014.bmp file_browser_icons\Bitmap_0021.bmp file_browser_
    icons\Bitmap_0022.bmp file_browser_icons\Bitmap_0033.bmp file_browser_icons\Bitm
    ap_0034.bmp file_browser_icons\Bitmap_0039.bmp file_browser_icons\Bitmap_0040.bm
    p file_browser_icons\bmconv_input_file.txt icons\Bitmap_big.bmp icons\Bitmap_big
    _mask.bmp icons\Bitmap_small.bmp icons\Bitmap_small_mask.bmp icons\bmconv_input_
    file.txt
    Output SIS file Ped_2.17_final_IX_v1_0_0.sis
    UID 0xe0000004
    Application name Ped_2.17_final_IX
    Version 1.0.0
    Language(s) EN
    Icon <default>
    Short caption(s) Ped_2.17_final_IX
    Long caption(s) Ped_2.17_final_IX
    Install drive <any>
    Text file(s) <none>
    Certificate <default>
    Private key <default>
    Capabilities 0x0 (NONE)
    Vendor name(s) Ensymble
    Autostart on boot No
    Run after install No
    and produced a file called 'Ped_2.17_final_IX_v1_0_0.sis'

    I was quite happy at this point.

    However when I tried to install it, the progress meter gets half way then pauses for a few seconds after which I get a very (un)helpful message "Cannot Install!".

    I passed the sis to WhyTheFuckWontMySISFileInstall.com which just told me it was unsigned and warned me about this:

    Warning: Package UID is also used as a SID!

    One (or more!) of the executables this package contains has the same Secure ID as the package UID. While technically allowed, and commonly done this is a stylistic mistake. The package UID and executables Secure IDs are different things. A SIS file only has one package UID, but may have several executables, each with a unique SID.

    The offending executables are:

    * !:\sys\bin\Ped_2.17_final_IX_0xe0000004.exe
    I note that my sis is around 5k smaller than the genuine article, but obviously I have no idea why.

    I'm not worried about the signing or capabilities part yet. One step at a time!

    Anyone know why it won't install?

  6. #6
    Nokia Developer Champion
    Join Date
    Feb 2008
    Location
    Ahmedabad, Gujarat, India
    Posts
    3,852

    Re: PED and signing.

    hi XI
    the installation problem may be due to you may have used a UID which can be out of range.

  7. #7
    Super Contributor
    Join Date
    May 2004
    Location
    Tampere, Finland
    Posts
    524

    Re: PED and signing.

    Quote Originally Posted by IX View Post
    I managed to make a sis file using the following:
    Code:
    python c:\ensymble\ensymble.py py2sis --uid=0xE0000004 --verbose c:\Ped_2.17_final_IX
    Looks like when you do it like that, there's going to be a lot of extra stuff included in the SIS file. It's perhaps easier to unpack a 3rd Edition SIS file of PED using SISInfo and check out what the package structure should look like.

    The "Package UID is also used as a SID!" warning is not critical. Ensymble uses the same UID as Package UID and Application UID by default. Don't worry about it.

  8. #8
    Registered User
    Join Date
    Mar 2008
    Posts
    6

    Re: PED and signing.

    Quote Originally Posted by gaba88 View Post
    hi XI
    the installation problem may be due to you may have used a UID which can be out of range.
    It should be in the test range if I've understood correctly (which is by no means certain.)

    Quote Originally Posted by jethro.fn View Post
    It's perhaps easier to unpack a 3rd Edition SIS file of PED using SISInfo and check out what the package structure should look like.
    Thanks jethro.fn for not telling me how dumb I am for trying to do it how I did.

    After further fiddling and installing lots of stuff on my PC, I've managed to build a sis file that installs fine and is accepted for signing by OSO. The only problem is that it doesn't work . When I run it I get the following message:

    Code:
    Traceback(most recent call last):
      File "C:\private\e0000001\default.py", line 3 in ?
        import ped
      File "C:\resource\site.py", line 97, in platsec_import
        return_original_import(name,globals,locals,fromlist)
    ImportError: Bad magic number in C:\private\e0000001\ped.pyc
    At first I thought maybe it was the new uid screwing things up, so I made another sis using the original uid and that gives the same error. I got some errors when I ran make.py but I don't know what they mean and since I'm not that sure what most of the output means, I'll post the whole lot (with the errors in bold):

    C:\Ped_2.19_beta>python make.py
    > ped.pyo: making
    c:\python25\python -O compile.py ped.py
    copy ped.pyo system\apps\ped\ped.pyc
    1 file(s) copied.
    > ui.pyo: making
    c:\python25\python -O compile.py ui.py
    copy ui.pyo system\apps\ped\ui.pyc
    1 file(s) copied.
    > ped.mbm: making
    bmconv icons\bmconv_input_file.txt


    BMCONV version 112.
    Compiling...
    Multiple bitmap store type: File store
    Epoc file: ped.mbm

    Bitmap file 1 : icons\Bitmap_big.bmp
    Bitmap file 2 : icons\Bitmap_big_mask.bmp
    Bitmap file 3 : icons\Bitmap_small.bmp
    Bitmap file 4 : icons\Bitmap_small_mask.bmp
    Success.
    > ped.aif: making
    aiftool ped ped.mbm
    AIF tool - Unicode build
    Copyright (C) Symbian 2000
    Compiling AIF file
    * Source file: ped.RSS
    * Resource file: C:\DOCUME~1\IX\LOCALS~1\Temp\AIF.RSC
    * cpp -undef -C -I "." -I "epoc32\include" -I C:\Symbian\9.2\S60_3rd_FP1\Epoc32\
    Tools\..\include -D_UNICODE "ped.RSS" -o "C:\DOCUME~1\IX\LOCALS~1\Temp\ped.rpp"
    * merging text strings to C:\DOCUME~1\IX\LOCALS~1\Temp\ped.rpp
    * rcomp -u -:C:\DOCUME~1\IX\LOCALS~1\Temp\_dump_of_resource_ -o"C:\DOCUME~1\IX\L
    OCALS~1\Temp\AIF.RSC" -s"C:\DOCUME~1\IX\LOCALS~1\Temp\ped.rpp" -i"ped.RSS"

    ped.RSS(17) : Warning: (047) the STRUCT that this resource is based on contains
    a STRUCT[] data member which has not been used in this resource, the missing ele
    ment is: 'datatype_list'
    ped.RSS(17) : Warning: (047) the STRUCT that this resource is based on contains
    a STRUCT[] data member which has not been used in this resource, the missing ele
    ment is: 'view_list'
    ped.RSS(17) : Warning: (047) the STRUCT that this resource is based on contains
    a STRUCT[] data member which has not been used in this resource, the missing ele
    ment is: 'file_ownership_list'

    * deleting C:\DOCUME~1\IX\LOCALS~1\Temp\ped.rpp
    * copy ped.mbm C:\DOCUME~1\IX\LOCALS~1\Temp\AIF.MBM
    * uidcrc.exe 0x101fb032 0 0xe0000001 C:\DOCUME~1\IX\LOCALS~1\Temp\out.aif
    * Writing length of the RSC-block
    * Appending the RSC-block
    * Appending the MBM-block
    * copy C:\DOCUME~1\IX\LOCALS~1\Temp\out.aif ped.aif
    > file_browser_icons.mbm: making
    bmconv file_browser_icons\bmconv_input_file.txt


    BMCONV version 112.
    Compiling...
    Multiple bitmap store type: File store
    Epoc file: file_browser_icons.mbm

    Bitmap file 1 : file_browser_icons\Bitmap_0001.bmp
    Bitmap file 2 : file_browser_icons\Bitmap_0002.bmp
    Bitmap file 3 : file_browser_icons\Bitmap_0003.bmp
    Bitmap file 4 : file_browser_icons\Bitmap_0004.bmp
    Bitmap file 5 : file_browser_icons\Bitmap_0005.bmp
    Bitmap file 6 : file_browser_icons\Bitmap_0006.bmp
    Bitmap file 7 : file_browser_icons\Bitmap_0013.bmp
    Bitmap file 8 : file_browser_icons\Bitmap_0014.bmp
    Bitmap file 9 : file_browser_icons\Bitmap_0021.bmp
    Bitmap file 10 : file_browser_icons\Bitmap_0022.bmp
    Bitmap file 11 : file_browser_icons\Bitmap_0033.bmp
    Bitmap file 12 : file_browser_icons\Bitmap_0034.bmp
    Bitmap file 13 : file_browser_icons\Bitmap_0039.bmp
    Bitmap file 14 : file_browser_icons\Bitmap_0040.bmp
    Success.

    > Ped_2.19_beta_3rdEd.sis: making
    copy default.py build_3rdEd\
    1 file(s) copied.
    copy ped.pyo build_3rdEd\ped.pyc
    1 file(s) copied.
    copy ui.pyo build_3rdEd\ui.pyc
    1 file(s) copied.
    copy file_browser_icons.mbm build_3rdEd\
    1 file(s) copied.
    copy help.txt build_3rdEd\
    1 file(s) copied.
    copy LICENSE build_3rdEd\
    1 file(s) copied.
    ensymble.py py2sis --uid=0xE0000001 --appname=Ped --version=2.19 build_3rdEd Ped
    _2.19_beta_3rdEd.sis
    ensymble.py: warning: no certificate given, using insecure built-in one
    Press return to quit...
    Can you (or anyone) tell me where I'm going wrong?

    Thanks for your help so far.

  9. #9
    Super Contributor
    Join Date
    May 2004
    Location
    Tampere, Finland
    Posts
    524

    Re: PED and signing.

    Quote Originally Posted by IX View Post
    Code:
    ImportError: Bad magic number in C:\private\e0000001\ped.pyc
    Code:
    C:\Ped_2.19_beta>python make.py
    > ped.pyo: making
    c:\python25\python -O compile.py ped.py
    Can you (or anyone) tell me where I'm going wrong?
    Yes. You're compiling Python modules in Python v2.5, which is not bytecode compatible with the Python v2.2.2 interpreter in PyS60.

  10. #10
    Registered User
    Join Date
    Mar 2008
    Posts
    6

    Re: PED and signing.

    Quote Originally Posted by jethro.fn View Post
    Yes. You're compiling Python modules in Python v2.5, which is not bytecode compatible with the Python v2.2.2 interpreter in PyS60.
    Fantastic, that did the trick! I hadn't realised I needed a specific version of Python so I just grabbed the latest release. I now have an open-signed Ped!

    Thanks very much for your help. Now I can get back to crashing my phone!

  11. #11
    Super Contributor
    Join Date
    May 2004
    Location
    Tampere, Finland
    Posts
    524

    Re: PED and signing.

    Quote Originally Posted by IX View Post
    Fantastic, that did the trick! I hadn't realised I needed a specific version of Python so I just grabbed the latest release.
    Great!

    Bytecode format changes between major Python releases. That's why every time I release a new version of Ensymble I have to "squeeze" Ensymble for each major version of Python.

  12. #12
    Registered User
    Join Date
    Mar 2008
    Posts
    6

    Re: PED and signing.

    Quote Originally Posted by jethro.fn View Post
    Great!

    Bytecode format changes between major Python releases. That's why every time I release a new version of Ensymble I have to "squeeze" Ensymble for each major version of Python.
    Thanks for providing such a useful tool. I'm sure I'll grow to appreciate it more and more as time passes.

Similar Threads

  1. Ped - in-phone programmers editor
    By y.a.k in forum Symbian
    Replies: 239
    Last Post: 2008-08-25, 15:29

Posting Permissions

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