[Un]Install Symbian Applications Programmatically
| Wed, 2005-06-22 22:12 | |
|
Hello,
I would like to install/uninstall Symbian applications from a PC, to run unit/non-regression tests automatically. I am currently working on a Sony-Ericsson P900 but I am globally targeting UIQ20/UIQ21/Series60 devices. I have tried to use the recently released Connect QI SDK (2.4) (http://www.newlc.com/article.php3?id_article=360). With the SCOM API, I succeeded in browsing the remote filesystem which is useful to retrieve the tests reports. The SoftwareInstallEngine property of the ISCDevice2 interface is there also but I cannot make it work. The SCOM API documentation states that: Quote The ISCSWApplication interface is beyond the scope of this document. According to the related typelib, the ISCSWApplication exports: Code: virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE Install(/* [in] */ BSTR InstallFileName) = 0; But calling it returns nothing and do nothing either. I am not sure whether "InstallFileName" refers to a local or remote [.sis?] filename. I am probably missing something, maybe an event interface to be sinked somewhere... (ISCEvent does not seem to handle anything related to software installation). Did someone manage to make it work? Any advise about how I should proceed. Perhaps I should use another tool completely to install/uninstall applications remotely ? |
|






Forum posts: 1379
didster
Forum posts: 9
Well, it works sometimes. Sometimes, I can retrieve the SoftwareInstallEngine property from the connected device, sometimes the call fails. Everything is done in python using the pywin32 extension. It may be a cause of errors, especially since I never really used it with the COM Event notification system. However, sometimes the installation process runs completely and several event callbacks are called with success. Besides, I correctly receive the ISCEvent notifications upon device connections/disconnections.
I am currently trying to loop on the installation process to see whether or not the success or failures follow a regular time pattern. The thing to do would be to rewrite my code in C++, but as I said I am not really skilled with Events yet and I have not much time to spend on this. It is hard to know if the script fails because of my code or because the P900 communication interface has issues in itself. I will try with another phone too.
Forum posts: 9
Some news about my experience with Connect QI SDK.
I have run the previous script on a Nokia 6600 connected with Bluetooth (why the heck didn't they provide a wired-connection...). It quickly appeared my inability to retrieve the SoftwareInstallEngine component was caused by my poor skills with COM notification interfaces. In a few word, the python script did not UnAdvise the event interface upon termination which caused the remote component to hang when called afterwards. Unplugging the event interface cleanly improved the situation, and I now can get the SoftwareInstallEngine everytime.
However, things keep failing somewhere else. After calling the Install method, I get 2 notifications on the SWIEvent callback of ISCSWEvents, with Event types of 0 and 1. Then I sometimes get a progress notification, before my script try to retrieve a non-existing output file and exit. I clearly have a problem in the way I manage the notification interface, I should probably wait for a setup completion notification before trying to access the device filesystem. At this moment, I am clueless about the interaction of the python threading model and the way COM notification interfaces are handled.
To be continued...
Forum posts: 1379
Do you know what type of apartment pyton "threads" run in? More likeley STA's than MTA'a, but who knows - SCOM/BAL should work from either.
didster
Forum posts: 9
It was indeed a python-win32 related problem.
On the notification interface side, I have put an Event like primitive to synchronize the installer thread with the installation end notification (which I get from SWIEvent with ECompleted). After the Install method is called, it enters a polling loop (yuk!) on the notification Event with a timeout of 0.2s. The real trick is to insert a call to
inside the polling loop. This function appears almost everywhere in newsgroup posts related to event notification in python, as well as in most of pywin32 COM Events unit tests . Looking at the C++ code, it simply calls PeekMessages(). So, I clearly had an issue related to the python threading model relatively to the COM one. With it, the installation process works perfectly both on the Nokia 6600 and the P900.
Thank you very much for your help.
Forum posts: 1379
Must mean python is running it in a STA, and therefore needs messages pumped for the calls to be dispatched.
I'm still sticking to C++
didster
Forum posts: 5
Thanks
Forum posts: 214
"I only know that I know nothing." (Socrates)
Forum posts: 5
One site says:
"The problem with Symbian os 8.1 with series 60 2nd with feature pack 2 is that it won't act as a mass storage device. so it cannot be access with out the mRouter component."
In same time, one place i found that m-router used to connect N70 for internet sharing.
So, not clear which one is correct?
And i want to do application installation through PC for N70. Any idea for that?
Thanks
Forum posts: 12
I want to develop an application with Symbian Connect QI SDK for Series 60 2nd Edition (ie. Nokia 6680), but mRouter is not available in those phones. Can I use another connectivity software instead mRouter?? Any idea??
Thanks, Lucas
Forum posts: 1379
BAL (Bearer Abstraction Layer) supports multiple bearers, as it's name suggests, and mRouter is only one of them.
Techinally it would be perfectly possiable to use standard PPP, using NTRAS/Any other PPP server, the NTRAS bal plugin PC side, and, via CommDB modifiction, the phone just as is. But it's not really a simple "flick a switch and it will work with something other than mRouter" type thing
didster
Forum posts: 1
I want to know exactly how BAL communicates with mRouter.
What APIs of mRouter are involved in the task and how BAL calls them..?
Plz guide me...!! ThanX..!