11-20-2012 11:57 AM
I compiled a small test app for WebWorks 7.0 and I noticed that in the OTAInstall there are 6 COD files and a JAD file. Why are there so many COD files? Which files should I try to install on my 9900 7.1 device?
Solved! Go to Solution.
11-22-2012 12:05 PM
This has to do with the maximum COD file size:
Specifically, one COD file is limited to 64kb of source code and 64kb of resources; these two pools of space can not be shared (i.e. unused resource space can not be used as source code space.)
When one of those limits are exceeded, a new COD file is created to hold the remaining content, up to a maximum of 127 sibling COD files.
If you look at the Standard install COD file, you can actually open that COD file with an archive editor (WinRAR, WinZip, etc.) and you'll actually find the same sibling COD files contained inside the larger COD file. In reality, that large COD file is actually just a renamed ZIP file that houses all the COD files.
So why do this?
Well, when the larger (archive) is installed through USB, Desktop Manager and the command-line tools know to provide each COD file in sequence from the archive, and each is installed properly.
However, when installing OTA, while some web servers know how to perform this communication, often times they do not, and if the full (archive) COD is attempted to be installed OTA, it will fail. Even in those cases where the server is smart enough to perform this communication, it actually sends the ENTIRE archive for each sibling. Meaning:
You can see that, for a very large archive with many sibling CODs, this can result in a LOT of unnecessary traffic. Therefore, when hosting OTA, the recommendation is to host the ALX file, and ALL sibling COD files that are found in the OTAInstall folder.
Alternatively, you could UNZIP the ARCHIVE COD and use those sibling CODs (along with the ALX file) as well, but you should NOT host the entire ARCHIVE COD online.
All of that being said, if you are using JavaLoader to deploy, you can actually call the command on the JAD file to perform the install:
javaloader -u install myapp.jad
Similar to how it works OTA, the JAD file is a text descriptor of all the required COD files for the application and JavaLoader can use that information to install each file as required.
There's quite a bit of information up there, so please let me know if something doesn't make sense.