Can I create a .jar file on FFS? | Telit Cinterion IoT Developer Community
September 8, 2015 - 11:01am, 7642 views
I try to open a jar file using following code:
FileConnection fconn = (FileConnection) Connector.open("file:///a:/test.jar", Connector.READ_WRITE);
However it always return
"Application not authorized to access the restricted API:javax.microedition.io.Connector.file.manufacturer"
How can I access a jar file without security?
The jar files as they contain the userware application are extra protected. For example you can't rename, read or copy this file to external data source.
Why would you like to open it for reading and writing from your MIDlet application?
Thanks for your reply.
Normally I want to update firmware. From document, the new firmware must be a usf file. But how to create it? and where is the
"Application Note 16: Updating EHS6 Firmware" ?
It seems that change READ_WRITE to WRITE can fix my problem.
In general scenario for remote firmware update your application downloads the firmware file (usf) from server and stores it in the file system as any other file. This scenario is described in AN 17 "Over-the-Air Firmware Update".
I'll send you the documents.
Now I can upload Jad/Jar file, and save them on FFS. and then I want stop/delete and then install new Midlet file. but now I get a preoblem, when I send [AT^SJAM=2,"a:/test.jad",""] in current midlet, the thread is stopped and all follewing command can't execute.
So are there any methods to update midlet file while the old midlet still is running? or I must use other midlet to control update progress?
I think that you have probably mixed up two things - Firmware Over The Air Update and Application Over The Air Update.
For module's firmware you need the usf file which contains the firmware released by Gemalto. You need to download this file to the module's file system and then trigger the update with the AT command.
For the userware java application remote download you don't need to implement anything. All the solution is provided by Gemalto and described in the Java User's Guide document. You cofigure and trigger this update by AT command and SMS. The files are automatically downloaded from the server, the running appas are terminated, module is restarted and the new app is started.
I am having the same issue. The same error message is returned when my FotaMIDlet tried to read a:/JRC-1.56.30.jar, I am trying to read the file into a string; then calculate/verify the CRC after download. Is there a way for the MIDlet to read the jar files, which contain the userware application? Any workaround?
The workaround could be to download the file with the different extension (not jar), read it and rename after that.
Thanks! it works!
In my application, the firmware upgrade is done by a proprietary protocol. So the firmware is received via this protocol. After received, the old firmware is replaced for the new firmware. Before to replace, the application copies the old firmware to backup directory. However, when the firmware tries to copy the jar file to a backup directory, I got this exception:
java.lang.SecurityException: Application not authorized to access the restricted API:javax.microedition.io.Connector.file.manufacturer
Is there a way that a can give the rights for this upgrade application to copy the jar file?