Why multiple COD files?

Hello world

I have compiled a little test app for WebWorks 7.0 and I noticed that there are 6 COD and a JAD file in the OTAInstall. Why are there so many COD file? Should what files I try to install on my device 9900 7.1?

Kind regards

Alon

Hello Alon,

This has to do with the maximum file size of COD:

http://supportforums.BlackBerry.com/T5/testing-and-deployment/the-maximum-size-of-a-BlackBerry-smart...

Specifically, one COD file is limited to 64 KB of source code and 64 k of resources; These two pools of space cannot be shared (i.e. space unused resources not be used as the source code.)

When one of these limits are exceeded, a new COD file is created to contain the content remaining, to a maximum of 127 files brother COD.

If you look at the standard install COD file, you can actually open this COD file with an editor of the archive (WinRAR, WinZip, etc.) and you will actually find the same files from brother COD contained in the larger cod file. In reality, this large COD file is actually just a renamed ZIP file containing all the COD files.

So, why do this?

Well, when the biggest (archive) is installed via USB, Desktop Manager and command line tools know to provide each COD file in the sequence of the archive, and each is installed correctly.

However, when installing OTA, while some web servers know how to make this communication, often they do not, and if the full (archive) COD is attempted to be installed OTA, it will fail. Even in cases where the server is smart enough to perform this communication, he sends actually archive ENTIRE for each sibling. Meaning:

  • Brother of queries Device #1.
  • The server sends archive entire and device extracts / installs sibling #1.
  • Device queries brother #2.
  • The server sends archive entire and device extracts / installs sibling #2.
  • etc.

You can see that, to a very large archive with cod of brother a lot, this can cause a LOT of unnecessary traffic. Therefore, if you are hosting OTA, the recommendation is to host the ALX file and all brother COD files that are located in the OTAInstall folder.

Alternatively, you can DECOMPRESS the ARCHIVE COD and use these cod of brother (as well as the ALX file) as well, but you may NOT host the whole cod of online ARCHIVE.

All that being said, if you use JavaLoader to deploy, you can actually invoke the command on the JAD file to perform the installation:

JavaLoader u install myapp.jad

Similar to OTA, JAD file operation is just a descriptor of all the COD files required for the application text and JavaLoader can use this information to install each file as required.

There is some information up there, so please let me know if something makes no sense.

Tags: BlackBerry Developers

Similar Questions

  • multiple cod files appear at signing - app installs

    Hello.

    As shown in the picture below, when I connect my BB app, multiple cod files appear. I would like to know how I can remove additional cod files, since I'm not able to install the application to all the

    any help will be appreciated

    When you perform an OTA you must copy created cod and change the zip extension. Extract the cod shipped and download those individual on the server with the jad download.

  • Why the .cod files change download to download?

    I do some tests on my BlackBerry (Bold 9700) of security and when I use JavaLoader.exe to download the .cod files I noticed that some of them will be different from download to download.

    For example if I do the following:

    > JavaLoader.exe save Sudoku_v46_480x360

    > cp Sudoku_v46_480x360.cod Sudoku_v46_480x360.cod.1

    > JavaLoader.exe save Sudoku_v46_480x360

    > diff Sudoku_v46_480x360.cod Sudoku_v46_480x360.cod.1

    The files will be different.  I compared the in a hex editor and the differences are small (single-byte) and coherent (0x07 in 0x77) in 10 places in the file.  They seem to be divided as wel.

    -What is JavaLoader.exe done or there at - it something on the device itself that constantly updates the application?

    Thanks for any idea!

    Never mind, just found out why this is happening.  Some of the .cod files (if there is more than 64 k I think) will decompose in a zip format and zip headers may be slightly different (last modified time may change) then the global .cod file will be binary different.

  • Problems with CAP and multiple cod files

    Hello!

    I had a MIDlet that I'm trying to convert a cod file using the compiler CAP. The original jar file is 169 KB, maybe too big file a Cod. I use the following command:

    Import the "C:\Program Files (x 86) \Research 4.6.0\bin\rapc" = "C:\Program Files (x 86) \Research 4.6.0\lib\net_rim_api.jar" codename = xxx-midlet jad = yyy.jad yyy.jar

    The CAP program seems to work ok and produces the following 5 files:

    xxx.jar 18 kb, contains images, manifest etc.

    xxx. COD 147 KB

    xxx. CSO 1 KB

    xxx. Debug 127 KB

    XXX - 69 KB 1.debug

    Also, it changes my JAD file and adds the following:

    RIM-COD-Module-dependencies: net_rim_cldc
    RIM-COD-URL-1: xxx - 1.cod
    RIM-COD-SHA1-1: 52 83 e9 c7 6th a1 ad a6 5f bc 8 b 9 b 07 b1 04 53 49 ca 46 fd
    RIM-COD-size-1: 59208
    RIM-COD-Module-Name: xxx
    RIM-COD-size: 90108
    RIM-COD-creation-Time: 1231858243
    RIM-COD-URL: xxx.cod
    RIM-COD-SHA1: 2d 2 b 72 c5 a3 68 03 ed be 22 fa df 41 05 c0 0e 48 8 a 77 ec

    But it does not create a file xxx - 1.cod, or at least I can't. Of course it takes a... Looks like the xxx.cod file is too big also. This installation live does not work. Y at - it an option to indicate the CAP should create several files of cod? I cannot find a reference on CAP documentation, is there another way to create a cod to jad/jar file (s)?

    Erik

    Seems that CAP created a file of large cod with brothers and sisters inside.

    Rename the file zip cod.

    Unzip it. Remove this zip file.

    You have now all the cod files.

  • Distribution of 3 OTA cod files.

    Hi all

    I've set up BBM dependency checker, now I have 3 files of cod as MyApp.cod, MyAPPImpl (library) MyAppInterface (library).cod, .cod.

    Now I want to distribute the application during the OTA, I tried with "UpdateJad MyApp.jad MyAppImpl.jad" (because these two are dependent on MyAppInterface).

    But he can't, it's showing the required interface.

    How can I distribute my app on OTA?

    Additionally, assume that if I want to submit the app at AppWorld, do I have to submit three cod files?

    Please help me.

    Thanks in advance.

    You can add multiple cod files in a single jad.
    You can do the same thing with the alx to reference libraries for appworld. and Yes, you must submit all the cod I guess.

  • Renaming of Jad/Cod files without re-compilation

    Hello

    I'm about to publish an app through mobihand and the site requires that I provide different files for the trial version and the full version, even if my software includes everything in a version with the ability to unlock all the features with a key.

    To also provide a free trial version, I need to provide the software with different names. But the extent of my Java knowledge will that is not so easy. Just rename the files didn't work (especially if you have multiple cod files) and recompile it seems that a lot of efforts. (I need to change my classname as well, no?)

    Is there another, more convenient way to do so?

    Thanks for your help!

    a developer of rookie bb again

    Check JADTool task tools Ant BB:

    http://BB-Ant-tools.sourceforge.NET/docs#jadtool

    You can rename your files to cod via the Ant script, after that who perform this task to update the jad file and its properties.

  • Can you have multiple packages in a source code file, or you have several files?

    Can you have multiple packages in a source code file, or you have several files?

    ExampleClass must be saved in a directory as well as your main fla.

    This directory must have a subdirectory named samples containing SampleCode.

  • Problem files multiple cod

    Hello

    I have an application that is larger than 64K. Sign Tool sees two cod files - app.cod and 1.cod app. However, the app.jad indicates that it is 7 files, app.cod, 1.cod - app, app - 2.cod and so on. After the signing of the cod file, I put them on my Web server. However, when I tried to install it DIRECTLY on my phone, I got a download failure. Anyone know what is happening? Thnx.

    Problem solved. I already had a file vary to great graphics with the project. After that I remove it from this project, the compiler does not refresh the jad. I deleted and let it be regenerated and correct created jde.

  • Mismatch in number of brother COD files

    I'm developing an application of BB. Because my application size is more than 64 k, compiler generates a zipped file of COD. When I check the JAD file it has reference to 8 records of COD brother named in the order as "MyApp.COD", "MyApp - 1.COD '... "MyApp - 7.COD. "But using WinZip if I extract the zip COD file then I could see only 7 brother COD files named in the order as MyApp.COD", "MyApp - 1.COD '... "MyApp - 6.COD. At the same time for another test application, we found the County in the JAD file and extract the files of brother COD to be identical. Could someone please help me understand why this is so?

    Thank you

    Abees

    If your app * never * needed 8 files and you reduced to 7, the JAD will always reference this 8th file until it is deleted and recreated.

    A good practice, you should remove the JAD file before making your production build.

  • Regarding downloading Dropbox .cod files

    I used the drop down list to download my blackberry application

    I downloaded the version (IE more than one .cod file and .jad files)

    Now, if I want to download the application from path of jad

    It gives an Http Error 403 and no why cod?

    TRY THIS LINK How to deploy and distribute Applications

    HOPE THIS CAN HELP YOU

  • .cod file is not proceed with the installation correctly (programmatically)

    Hi BbExperts,

    I took a .cod as a resource file in my application and wants to install this .cod programmatically.

    My .cod file size is 429266 bytes, which is why I couldn't install it directly coz of size so I used the OTA (brothers and sisters of the main .cod) file in a table and install them one by one, by using CodeModuleManager.

    I post here my sample application:

    String [] codArr = {"" / MainApp.cod "," / MainApp - 1.cod ', ' / MainApp - 2.cod "," / MainApp - 3.cod "," / MainApp - 4.cod "," / MainApp - 5.cod ""};

    for (inti = 0; i)< codarr.length;="" i++)="">

    try {

    byte [] cod is IOUtilities.streamToBytes (getClass ().getResourceAsStream(codArr[i]));.

    create new module

    int newHandle = CodeModuleManager.createNewModule (cod.length, cod, cod.length);

    install the module

       if (newHandle! = 0) {

    int savecode = CodeModuleManager.saveNewModule (newHandle, true);

    if (savecode is CodeModuleManager.CMM_OK_MODULE_OVERWRITTEN)

    System.out.println ("operation completed successfully");

    }catch(IOException e) {}

    e.printStackTrace ();

    }

    It is installed but not able to run it.

    Is this approach is fair, or should I try another approach.

    Guidance in this regard will be highly appreciated.

    Thanks in advance...

    try to install the last cod first

  • Install problem COD file

    Hi all

    I know it's important to look for answers before posting and I spent several hours to do.  I found a few related messages, but the solutions did not resolve my problem.

    I have a J2ME application that is fully tested for the game.  It works fine when it is installed as a pair of jad/jar on each Simulator and device I've tried.  And the midlet icon appears in the interface of the phone, just as it should.

    The game uses no RIM specific libraries or modules.  As a jad/jar pair, the same build runs on dozens of non-blackberry devices.  The code in the jar detects that the phone is a blackberry using System properties and the game is its own minor configuration to look nice on a blackberry.

    The next step is to convert the application into a cod file and sign it.

    You use the JDE 6.0, I made a new project, imported the jad/jar and run the Build command.  The cod was created, and accordingly modified jad.  So far so good.

    I have my signature identification information, and once again, using the JDE, I ran request Signatures.  The interface reported success.  No problems.

    The cod file is 207 k and consists of 4 cod files.  I read the instructions for this case and unpacked the cod file in its 4 cod files.  App.COD, 1.cod - app, app - 2.cod, app3.cod.

    I've posted four cod files as well as the jad file on my server, the server apache even where I serve regularly jar/jad files.

    I have triple checked the mime types in the .httaccess file.  Mime types are correct for jar, jad and cod.

    I point the browser on the Blackberry 6.0.0.337 Simulator 9800 to the jad file.  I get the download window with the properties of jad and the download button.  I click Download.  If I do this a second time, I get the button replace, so the Simulator think that the file has been downloaded, in this case.

    It seems that the files are for download.  The watch cursor appears 4 times, probably once for each file in cod.  No errors.

    At the end of the download, I get a message "the application has been installed successfully" and an OK button.  But, no run button, as I get with the installation of the pot.  I click OK.

    I exit the browser and return to the main screen.  There is no download folder.  The game is not in the folder games or Applications.  If I go to Options/Applications, the game is not listed there.

    If I menu click the Options/Applications window, I get: JVM 104 Eception NullPointerException error.  However, I had not yet tried to run the application.  A stack trace turned up a few odd lines:
    UI - EUI no face is detected
    VM - BORK
    However, I do not know what generated those lines or when.

    By the way, I also tried to download the full 207 k cod or in this case, I get the 907 error expected because the jad file is referencing files of cod that the server could not find as separate files.

    I also tried to download other simulators, for example 5.0.0.54 5 9700.  As above, the files seem to download very well and I get the message: "the application has been installed successfully" and an OK button.  On this Simulator, there is a download folder, but it is empty.  The game is not in games or in the Applications folder.

    On this Simulator, I go in the Options/Applications, and there is an entry for my game.  The title of the game is OK, but there is no icon.  I opened the entry and get title properties and a delete button.  There is no run button.  It shows the installed date and another button for the properties of the Module.  It also shows the size correctly and the signatory IDs.

    I also tried this procedure on a physical device, the AT & T 8300.  I had the same behavior as the 9700 Simulator.  Again, there is no problem with installation of the jad/jar.  The problem is with the jad/cod/COD-1/cod-2/COD-3

    Why is - this game appearing to successfully download and install successfully but apparently not be installed can thus be run?

    Thank you for your time.
    Alan Weiler

    I think I found the problem.  I skipped a step during the cod using a jar of J2ME as a source of files.

    In the projectroperties:Application panel, I do not enter the name of my main class name of the Midlet main class field.  Apparently this area causes the main class to be the entry point.

    With the class entered into this field and re - build the cod file and new signing, I was able to download and run the game on a device.

  • Reverse Engineering - BlackBerry extract cod files java files

    I want to know if we can extract the files .java Blackberry since the .cod files? Is this possible?

    In the affirmative. How and what are the steps?

    And if not? Why? Because that would mean the violation of the security of the device blackberry app?

    I can't give a definitive answer to this.
    It is / was a decompiler of cod, but I don't know anyone who used it successfully to decompile a complex program.
    I gave a few hours test and never managed.

    even if you would be able to decompile a program, you would be a good step away from stealing stuff, but if you are concerned you can use of darkening additional layers or whatever.

    personally, I doubt that everyone would gain something by using the approach of decompilation and my experience shows that some decompiler exists does not work properly.

  • Problems of the JAD and COD file

    I was testing a blackberry app and it installed without any problems. I made some changes to code today and he stopped same download to the device correctly. After some digging around in the .jad file, I noticed it's all suddenly you're looking for a brother COD (NomMonProjet - 1.cod) file although this cod file is not created when I build the project. Now, I can't get the app to install at all (it works well in the emulator).

    Any ideas as to why this started happening and how I can fix this problem?

    Sorry guys, tried to search the forums for this and found nothing. Problem was I didn't know what to look for. I finally got the app to download and got an error 907 invalid COD . A search on that quickly gave me my answer. I added an image that made the application to big - brother COD file creation and makes it impossible to install over the air.

  • The optional .cod files sign very well but do not have those required?

    I am really baffled by this one. I installed signing keys, and it seems that something is wrong. First I tried to sign my .cod in Eclipse. I copied the file sigtool.csk to there and it seemed to work for the signing of some of them, but it failed for a handful of .cod files. Either way, I see no details why those failed, or no matter what newspaper.

    Then I tried in the JDE and got similar results. Is there anything else I should do differently? I would have posted a screenshot, but it seems that you can not attach files that are not urls here.

    NVM, I created a fresh workspace for other reasons and I can sign correctly in Eclipse now.

Maybe you are looking for