3rd Edition and New Features

First S60 3rd edition device; Nokia 3250 is released some weeks ago. New edition promises better experience and more secure environment then its former versions. Although, there are not many compatible applications available to enjoy its advantages, developers have already started to port their existing applications to new edition or develop new ones to close this gap.

One of the new features of the new edition is Platform Security, which is a new enhanced platform-wide security framework introduced in Symbian OS v9. It offers greater protection for user, phone and network by restricting access to certain system APIs using a system called Capability Model. Please refer to symbiansigned.com documentations to get more detailed information about these concepts.

Test and Release

As many developers may realize, testing and releasing software for 3rd edition is another adventure than the development itself. While making the platform more secure, platform security makes life of developers more difficult. Some processes are not as easy as it was before, in order to keep system stable and secure. Especially new developers may have hard times and get lost in terms like capability, certificate, signature and key. Therefore, I decided to prepare this short tutorial about creating a simple HelloWorld SIS installation file for S60 3rd edition to test it on real hardware, including the points that I struggled to get through.

Requirements

I assume that you already have prerequisites for SDK and SDK installed, to compile 3rd edition code. If not, please visit Nokia Forum and obtain required tools and install them on your computer. Furthermore, I assume that you have a 3rd edition phone (i.e. Nokia 3250) for testing the installation file on real hardware. If you have these, you can go on with the tutorial.

Preparing Test Application

First step is to find a suitable HelloWorld application to test. A traditional HelloWorld example comes within the SDK package; however, it is not really what we want and does not seem to be prepared for real hardware testing, but for the emulator. It took a while for me to figure out, why it didn’t compile and how I could execute it on the phone. Therefore, I think it easier and more efficient to use the example given at symbianexample.com, which can be downloaded as a zip package and used both for 2nd and 3rd hardware. Just download it and extract to a folder where you can perform the compilation. After that, go to its group folder and execute “bldmake bldfiles” and “abld build armv5” consequently. If there are no errors mentioned, you have a compiled HelloWorld for your device.

Development UID

To proceed, a development UID should be acquired. To get a development UID, visit symbiansigned.com and register. After registering, login to your account and make a UID request from Request UIDs menu. Due that we have a simple application just for testing, we need an ID from Unprotected Range. Enter your information and get the UID. You can view your allocated UIDs from View UID menu whenever you want.

Developer Certificates

A Symbian signed Developer Certificate is required for Symbian OS v9, in order to develop and test applications on target devices. Our HelloWorld application is very simple and doesn’t require much capability; therefore a basic certificate will be enough. However, if we had more complex application requiring more capabilities than a basic certificate can handle, we needed get into another process with a cost of money and time. Check Developer Certificate FAQ to get more information about developer certificates and to check capability categories.

Developer Certificate Request

To request a developer certificate, Developer Certificate Request tool is needed for CSR file generation. Download the tool, install it on your system and run.

As the first step, it asks for your output file. Browse your HelloWorldgroup directory and choose name for your certificate (myCertificate.cer). Go to Next step and check “No” option for “ACS Pub ID available” part. Browse from “Private key file” input field to your HelloWorldgroup directory and choose your key file name (myCertificate.key). After entering your key name, choose a password and verify it (myPassword — do not forget your password, otherwise, you need to request another certificate).

Next screen is about your Personal Information. Fill the required fields with appropriate information and proceed further. Following step is Phones and Capabilities section and you have to click to “browse” button adding your device’s IMEI number (simply dial *#06# to get IMEI number). After adding the IMEI successfully, select all capabilities from “Application Capabilities” section and “Add” them to other side. It is not a problem when you get as much capability as you can get, but you can not install the application if you have less capabilities than it requires. Usually, capability requirements of applications are found in its MMP file. Therefore you can also check required capabilities and add only these.

After entering IMEI and selecting capabilities, confirmation of your details is required. Just confirm them by clicking “Finish“. It should tell you that your file is successfully created and should create required CSR file in HelloWorldgroup directory.

Final step for developer certificate is getting the certificate. Go to Request DevCert menu, upload your CSR file and send it. After a while you can get your certificate file and download it to HelloWorldgroup directory. You can also browse your existing certificates from View DevCerts menu.

Now we have our compiled HelloWorld Application with the certificate present in group directory. Next step is creating the package (PKG) file.

Package File

To create a PKG package file, create and edit HelloWorld.pkg file in HelloWorldgroup directory. We need a very basic PKG file, but if you want to create an extensive package file or get more information, check Symbian documentations.

The package file I created is below; you can paste it and modify the points mentioned in comments.

—–

;
; HelloWorld installation example by Kuneri
;

; Package header. Enter the UID you got from Symbian signed instead of “0×12345678”
#{“Hello World”},(0×12345678),0,1,0,TYPE=SA

; UID to specify your target device : 3rd edition. Dont alter this line
[0×101F7961], 3, 0, 0, {“S60ProductID”}

; Install files. You may need to give path for exe and rsc files. If you can not find them, simply seach. “!” is used to give the choice to choose target location (phone memory or memory card).
“HelloWorld.exe”-“!:sysbinHelloWorld.exe”
“HelloWorld_reg.rsc”-“!:private10003a3fimportappsHelloWorld_reg.rsc”
“HelloWorld.rsc”-“!:resourceappsHelloWorld.rsc”

—–

SIS File Preparation and Signing

Go to folder HelloWorldgroup. Now we need to prepare our SIS file. Actually, I tried createsis wrapper to sign my file. However, it always complained about encryption errors, and I left it not to loose much time. Simply take a command line and type “makesis HelloWorld.pkg” and “signsis -s HelloWorld.sis HelloWorld_signed.sis myCertificate.cer myCertificate.key myPassword” sequentially. If it doesn’t complain, now we have a signed SIS file, ready to transfer to our phone. Just send HelloWorld_signed.sis to your mobile phone using your favorite method (Bluetooth, cable, IR…), and execute the file. It should install the application after several warnings. Navigate and check your application under MyOwnHelloWorld.

Congratulations!

Please comment on any mistake you see or point you think different in order to make tutorial better. Its never perfect.

~Kuneri Bloggy