Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Contributor
Amatocianmonk
Posts: 21
Registered: ‎07-26-2010
My Device: Not Specified

Something Interesting in the .cod file

[ Edited ]

This isn't a question, just a little post on some interesting stuff I found

 

Rummaging through my .cod file, don't ask why, I found something that I thought was a little odd.

 

I noticed that every single System.out.print (or ln) line was written out, in alphabetical order, in the .cod file.

&#0;¿¸øë&#0;À&#0;ÀBuff &#0;ÉsWh&#0;ÏdCmd&#0;ÏdV@iab~&#0;ÏdViÙ&#0;Ïd‚¿&#0;àa&#0;àol&#0;ã&#0;òŸ&#0;ö]LookÏ&#0;÷&#0;&#0;$Ø &#0;&#0;&#0;&#0;$Ø &#0;&#0;&#0;$Ø (Panel Empty)&#0; &#0;$Ø EMPTY&#0;&#0;$Ø ContentPanel &#0;&#0;&#0;$Ø SCREEN &#0;&#0;&#0;&#0;&#0;$Ø &#0;&#0;&#0;&#0;$Ø (View Empty)&#0;&#0;&#0;$Ø ~ &#0;&#0;$Ø &#0;&#0;&#0;&#0;$Ø - About&#0;&#0;&#0;&#0; &#0;$Ø - Home&#0;&#0;$Ø - Login&#0;&#0;&#0;&#0;&#0;$Ø : &#0; &#0;$Ø == END ==&#0;&#0; &#0;$Ø is allowed.&#0;&#0;&#0;&#0;&#0;$Ø view(s)&#0;&#0;&#0;&#0;&#0;$Ø)&#0;&#0;&#0;&#0;$Ø1.0.0&#0;5.0.0.535&#0;&#0;$Ø<&#0;&#0;&#0; &#0;$ØAdd Field&#0;&#0;&#0; &#0;$ØAdded item: &#0;&#0;&#0;&#0;&#0;$ØAdding Buttons&#0;&#0; &#0;$ØAdding Error&#0;&#0;&#0;&#0; &#0;$ØAdding Item: &#0;&#0;&#0; &#0;$ØAdding Menu&#0;&#0;$ØAdding element: &#0;&#0;&#0;&#0; &#0;$ØAdding item: &#0;&#0;&#0;&#0;$ØAn error has occured &#0;&#0;&#0;&#0;$ØAnswer: &#0;&#0;&#0;&#0; &#0;$ØApplication&#0;&#0;$ØApplication Start&#0;&#0;&#0;&#0;$ØApplication help&#0;&#0;&#0;&#0;-&#0;$ØAre you sure you want to exit?&#0;&#0;&#0;$ØAsking to hid current&#0;&#0;&#0;,&#0;$ØAttemping to retrieve location of variable: &#0;&#0;&#0;&#0;+&#0;$ØAttempt to reference MAIN before being set!&#0;6&#0;$ØAttempt to reference command invoker before being set!&#0;&#0;,&#0;$ØAttempt to reference model before being set!&#0;&#0;&#0;&#0;6&#0;$ØAttempt to reference view controller before being set!&#0;&#0;&#0;$ØAttempting to get next field&#0;&#0;&#0;&#0;&#0;$ØBuilding&#0;&#0;&#0;&#0;&#0;$ØBuilding Title Area&#0;&#0;$ØBuilding login display&#0;&#0; &#0;$ØBuilding...&#0;&#0;$ØBuilt&#0;&#0;&#0; &#0;$ØChanging Text&#0;&#0;&#0;&#0;$ØChecking for empty vector&#0;&#0;&#0;&#0;$ØChecking for errors&#0;$&#0;$ØChecking for existance of variable: &#0;&#0;&#0;&#0; &#0;$ØChecking if &#0;&#0;&#0;&#0;&#0;$ØChecking panel:&#0;&#0;$ØChris&#0;&#0;&#0;&#0;$ØClear Error List&#0;&#0;&#0;&#0;&#0;$ØCmd_LoadDisplay&#0;&#0;$ØCommand Queue not empty, &#0;&#0;&#0;$ØConstructing View&#0;CoreLibrary&#0;&#0;&#0; &#0;$ØCreated&#0; &#0;$ØCreating View&#0;&#0;&#0;&#0;$ØCurabitur fermentum urna blandit sem fermentum non vulputate enim imperdiet. Ut vel diam at metus varius tempus ullamcorper nec elit. Nullam rutrum mollis tortor in egestas.&#0;&#0;&#0;&#0;$ØCurrent Screen Restoring&#0;&#0;&#0;&#0;&#0;$ØCurrent screen saved&#0;&#0;&#0;&#0; &#0;$ØData saved&#0;&#0; &#0;$ØDefaultValue:&#0;&#0;&#0; &#0;$ØDeleting all registered tools...&#0;&#0;&#0;&#0;&#0;$ØDone&#0;&#0;&#0;&#0;&#0;$ØEmpty Stack Exception&#0;&#0;&#0;&#0;$ØError List Reset.&#0;&#0;&#0; &#0;$ØExecuting&#0;&#0;&#0;&#0;$ØExecuting Command: &#0;&#0;$ØExit&#0;&#0;&#0;&#0; &#0;$ØField Changed&#0;&#0;&#0; &#0;$ØGet Field&#0;&#0;&#0;&#0;$ØGetting Errors&#0;&#0;&#0;$ØGetting Extras&#0;&#0;&#0;$ØGetting standard footer&#0;&#0;$ØGetting tool command array&#0;&#0;&#0;$ØGetting tool names array&#0;&#0;&#0;&#0;&#0;$ØGetting tool names vector&#0;&#0;&#0;&#0;$ØGetting tool view vector&#0;&#0;&#0;&#0;&#0;$ØGetting tool views vector&#0;&#0;&#0;-&#0;$ØGivaudan Mobile Administration app. Version: &#0;&#0;&#0; &#0;$ØGivaudan Mobile Adminstration&#0;&#0;&#0;&#0;$ØGivaudan-logo.gif&#0;&#0;&#0;&#0;$ØGivaudan-logo_small.gif&#0; &#0;$ØHelp/About&#0;&#0; &#0;$ØHide View&#0;&#0;&#0;&#0;$ØHiding other screens&#0;&#0;&#0;&#0;&#0;$ØIllegal argument Exception&#0;&#0;&#0;$ØInitializing new panel&#0;&#0; &#0;$ØInvalid Login&#0;&#0;&#0;!&#0;$ØInvalid screen being pushed View:&#0;&#0;&#0;&#0;$ØLoading Resources&#0;&#0;&#0; &#0;$ØLocated at &#0;&#0;$ØLogin&#0;&#0;&#0;3$ØLorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam ullamcorper purus a nisl imperdiet in mollis est vehicula. Sed vestibulum vestibulum odio in dignissim. Suspendisse et tincidunt magna. Nullam felis risus, semper scelerisque suscipit in, sodales quis augue. Nullam sed augue sed felis venenatis iaculis vitae ut libero. Curabitur molestie ornare sagittis. Morbi rutrum, orci at laoreet dictum, enim nulla ornare velit, a dignissim libero diam et est. Morbi tortor eros, condimentum vitae elementum vel, facilisis nec neque. Aliquam viverra vulputate ipsum et gravida. Etiam laoreet ligula aliquam nunc luctus malesuada. Suspendisse et velit eu nisi vulputate hendrerit ut quis dui. In commodo sapien eget nisl ullamcorper eget ornare mauris tincidunt. Quisque hendrerit malesuada magna placerat placerat.&#0;r$ØLorem ipsum dolor sit amet, consectetur adipiscing elit. Sed elit nulla, aliquam vitae congue vitae, ullamcorper commodo nibh. Nam suscipit, lorem eu consectetur accumsan, turpis eros molestie tortor, in scelerisque lectus lacus quis arcu. Nulla ornare, dui vitae dictum tristique, dui augue commodo urna, vel pharetra sapien nisi in nisl. Pellentesque accumsan sem vitae nibh tristique scelerisque. Curabitur eu velit lectus, vehicula convallis est. Quisque sit amet dolor ac ante dapibus consequat accumsan vel magna. Sed sagittis, lorem in dapibus ullamcorper, dui tortor faucibus neque, sit amet luctus risus nibh a erat. &#0;&#0; &#0;$ØMaking Body&#0; &#0;$ØMaking Footer&#0;&#0;&#0; &#0;$ØMaking Header&#0;&#0;&#0;&#0;$ØMessage:&#0;&#0;&#0;&#0; &#0;$ØMissing Field&#0;&#0;&#0;&#0;$ØNo&#0;&#0;0&#0;$ØNo variable specified, unable to udpate variable&#0;&#0;&#0;&#0;&#0;$ØPassword&#0;&#0;&#0;&#0;&#0;$ØPopping &#0;&#0;&#0;&#0;&#0;$ØPopping View {default call}&#0;&#0;$ØPopping all but current view&#0;&#0;&#0;&#0; &#0;$ØRegistering &#0;&#0;&#0;&#0;&#0;$ØRegistering Tool: &#0;&#0;&#0;$ØRemoving Screen&#0; &#0;$ØRendering&#0;&#0;&#0;&#0;$ØReturning Errors&#0;&#0;&#0;&#0;&#0;$ØReturning Field Observer&#0;&#0;&#0;&#0;&#0;$ØReturning View&#0;&#0;&#0;$ØReturning data storage&#0;&#0;&#0;$ØReturning errors&#0;&#0;&#0;&#0;&#0;$ØReturning finished panel&#0;&#0;&#0;&#0;&#0;$ØReturning session&#0;&#0;&#0;&#0;$ØReturning variable: &#0;&#0;&#0;&#0;&#0;$ØRunning Commands&#0;&#0;&#0;&#0; &#0;$ØSaving Inputs&#0;&#0;&#0; &#0;$ØSaving data&#0;&#0;$ØScheduling Command: &#0;&#0;&#0;&#0;&#0;$ØSet viewbuilder: &#0;&#0;&#0;&#0;$ØSetting builder: &#0;&#0;&#0;&#0;$ØSetting filter&#0;&#0; &#0;$ØShow View: &#0;&#0;$ØSome errors exist&#0;&#0;&#0;&#0;$ØStarting&#0;&#0;&#0;&#0; &#0;$ØStaticLookup&#0;&#0;&#0;&#0; &#0;$ØTech help&#0;&#0;&#0; &#0;$ØTechnical&#0;&#0;&#0;$&#0;$ØTechnical details about appplication&#0;&#0;&#0;&#0;&#0;$ØTools:&#0;&#0;&#0;$ØUnable to remove loading screen&#0; &#0;$ØUpdate Field&#0;&#0;&#0;&#0;&#0;$ØUpdating variable: &#0; &#0;$ØUser selected navigation item&#0;&#0;&#0;&#0;$ØUsername&#0;&#0;&#0;&#0;&#0;$ØVariable not found&#0;&#0;&#0;$ØVariables updated, commiting&#0;&#0;&#0;&#0; &#0;$ØVariables: &#0;&#0;$ØVector is empty!&#0;&#0;&#0;&#0; &#0;$ØVersion&#0; &#0;$ØView size: &#0; &#0;$ØVis stack: &#0;&#0;&#0;ú$ØVivamus sagittis erat aliquet nibh tempus eget eleifend velit ultricies. Vivamus id justo nec mauris semper venenatis. Suspendisse dolor risus, euismod at egestas vel, placerat ac tortor. Praesent nisl turpis, lacinia dictum sodales nec, blandit in mi. Nam molestie aliquet blandit. In lectus elit, mollis in porttitor eget, blandit vel velit. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla sit amet mattis turpis. Quisque congue turpis ac diam consequat elementum. Duis pulvinar pulvinar est, id porta tellus posuere a. Praesent molestie congue tincidunt. In faucibus, lorem vel rutrum condimentum, odio sem malesuada mauris, ut porta turpis felis in elit. Nam aliquam rutrum nulla, sed elementum velit rutrum eget. Suspendisse a augue sem. Aliquam erat volutpat. Vestibulum pellentesque rutrum euismod. **bleep** sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Cras facilisis felis a purus rutrum sed dictum dolor hendrerit. Pellentesque et ligula neque, et porttitor est.&#0;&#0;&#0;$ØWarning!&#0;&#0;&#0;&#0;&#0;$ØYes&#0;&#0;$Ø] &#0; &#0;$ØbuttonStatus&#0;&#0;&#0;&#0; &#0;$Øcancel.png&#0;&#0;4&#0;$Øcom/givaudan/mobileadmin/uI/images/Givaudan-logo.gif&#0;&#0;&#0;&#0;:&#0;$Øcom/givaudan/mobileadmin/uI/images/Givaudan-logo_small.gif&#0;&#0;-&#0;$Øcom/givaudan/mobileadmin/uI/images/cancel.png&#0;&#0;&#0;2&#0;$Øcom/givaudan/mobileadmin/uI/images/information.png&#0;&#0;0&#0;$Øcom/givaudan/mobileadmin/uI/images/magnifier.png&#0;&#0;&#0;&#0;.&#0;$Øcom/givaudan/mobileadmin/uI/images/rounded.png&#0;&#0;2&#0;$Øcom/givaudan/mobileadmin/uI/images/spotlight_G.jpg&#0;&#0;&#0;$Øinformation.png&#0; &#0;$ØloadStatus&#0;&#0; &#0;$ØloginName&#0;&#0;&#0; &#0;$ØloginPassword&#0;&#0;&#0; &#0;$Ømagnifier.png&#0;net_rim_cldc&#0;&#0;&#0;$Øpassword&#0;&#0;&#0;&#0;&#0;$ØregisteredToolNames&#0;&#0;$ØregisteredToolViews&#0; &#0;$Ørounded.png&#0;&#0;$Øspotlight_G.jpg&#0; &#0;$ØuserToolNames&#0;&#0;&#0; &#0;$ØuserToolViews&#0;&#0;&#0;&#0;$Øusername&#0;&#0;&#0;&#0;&#0;$Ø{STATIC}ToolRegister&#0;&#0;&#0;&#0;&#0;$Ø~ (&#0;&#0;&#0;&#0; &#0;$Ø~ERROR &#0;&#0;&#0;&#0;$Ø~[&#0;&#0;&#0;$Ø~[TEMPORARY] &#0;&#0;ò7õ3&#0;&#0;&#0;&#0;&#0;ÿÿÿ&#0;&#0;&#0;&#0;&#0;.&#0;(&#0;(&#0;(&#0;*&#0;*&#0;*&#0;*&#0;*&#0;&#0;ò7þ3&#0;&#0;&#0;&#0;&#0;ÿÿÿ&#0;&#0;&#0;.&#0;c&#0;&#0;(&#0;*&#0;*&#0;,&#0;0&#0;0&#0;2&#0;3&#0;7&#0;W&#037f 

 

 I then noticed the little word "Buff" on the first line of that code snippit, so I assume this is a kind of text buffer to make the program faster at run time. Seems like a little extra overhead to me, but an interesting way of buffering the output, none the less.

 

Here is the cleaned up version:

Buff
 Cmd
 EMPTY
 ContentPanel
 SCREEN
 (View Empty
 - About - Home - Login :
 == END ==;
 is allowed.
 view(s)
Add Field
Added item:
Adding Error
Adding Item:
Adding Menu
Adding element:
Adding item:
An error has occured
Answer:
Application
Application Start
Application help&
Are you sure you want to exit?
Asking to hid current
Attemping to retrieve location of variable:
Attempt to reference MAIN before being set!
Attempt to reference command invoker before being set!
Attempt to reference model before being set!
Attempt to reference view controller before being set!
Attempting to get next field
Building
Building Title Area
Building login display

... And on and on and on

 

 

I also noticed this bit of copyright to HP

text&#0;&#0;&#0;&#0;Copyright (c) 1998 Hewlett-Packard Company&#0;&#0;desc&#0;&#0;&#0;&#0;&#0;&#0;&#0;sRGB IEC61966-2.1&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;sRGB IEC61966-2.1&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;XYZ &#0;&#0;&#0;&#0;&#0;&#0;óQ&#0;&#0;&#0;&#0;ÌXYZ &#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;XYZ &#0;&#0;&#0;&#0;&#0;&#0;o¢&#0;&#0;8õ&#0;&#0;XYZ &#0;&#0;&#0;&#0;&#0;&#0;b™&#0;&#0;·…&#0;&#0;ÚXYZ &#0;&#0;&#0;&#0;&#0;&#0;$ &#0;&#0;„&#0;&#0;¶Ïdesc&#0;&#0;&#0;&#0;&#0;&#0;&#0;IEC http://www.iec.ch&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;IEC http://www.iec.ch&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0... 61966-2.1 Default RGB colour space - sRGB&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;.IEC 61966-2.1 Default RGB colour space - sRGB&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;desc&#0;&#0;&#0;&#0;&#0;&#0;&#0;,Reference Viewing Condition in IEC61966-2.1&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;,Reference Viewing Condition in IEC61966-2.1&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;&#0;view&#0;&#0;&#0;&#0;&#0;¤þ&#0;_.&#0;Ï&#0;íÌ&#0;

 

Looks like something color based.

 

And i then noticed this call to an external program of "adobe image ready"

 

&#0;&#0;&#0;óÿa&#0;&#0;&#0;gAMA&#0;&#0;¯È7Šé&#0;&#0;&#0;tEXtSoftware&#0;Adobe ImageReadyqÉe<&#0;&#0;œIDAT8Ë¥"ËkÔWÅ?wL¬dL&1

 

Must be something they use to deal with .gifs?

 

Anyways, nothing crazy about this post, just some interesting things I noticed while looking through my .COD files.

 

Kinda makes me wonder what you could tell about a program by looking at the textual content of its .cod file

~ Logic and reason above all things ~
http://amatoc.com/
Contributor
Amatocianmonk
Posts: 21
Registered: ‎07-26-2010
My Device: Not Specified

Re: Something Interesting in the .cod file

Update:

I now see that it's not just the System.out calls that get written but everything textual in the program.

 

I wonder if you can modify the .cod file to modify the in-program text?

 

Should be fun to try

~ Logic and reason above all things ~
http://amatoc.com/
Developer
Blanc
Posts: 638
Registered: ‎07-02-2009
My Device: Not Specified

Re: Something Interesting in the .cod file

really interesting!!!!

Thanks and Regards,
PraveenGoparaju.
Developer
rcmaniac25
Posts: 1,805
Registered: ‎04-28-2009
My Device: Z10 (STL100-4)-10.2.1.3253, Z10 (STL100-3)-10.3.1.997 Dev OS, Z30 (STA100-5)-10.3.1.997 Dev OS, Passport (SQW100-1)-10.3.0.1418, PlayBook (16GB)-2.1.0.1917

Re: Something Interesting in the .cod file

Not saying your wrong, it is always interesting to learn something new, just saying what I have noticed myself and learned from different programming languages and formats.

 

Compile your code and look at the .class file. It won't look exactly the same but it will look similar. This is because many java-based programs have "constant pool" that contains all, well, constants (such as Strings).

 

I find it interesting that it changes the format of them a little (probably explains why I can't always do a search and have the String itself show up).

 

Some people on these forums have said they can find images in their COD files, that is because that is how they are stored (big surprise). Adobe Image Ready is included with Adobe Photoshop, you are looking at the metadata stored in the image. As for the HP copyright reference I noticed "XYZ", "sRGB", etc. This tells me color convertion, sRGB according to Wikipedia "sRGB is a standard RGB color space created cooperatively by HP and Microsoft" so whatever you have as a resource or as an image is storing color converstion metadata or the ICC profile itself.

 

As for changing the COD file after installation... I want to do that to (on device IDE as crazy as that sounds) but there just is no way.

---Spends time in #blackberrydev on freenode (IRC)----
Three simple rules:
1. Please use the search bar before making new posts.
2. "Like" posts that you find helpful.
3. If a solution has been found for your post, mark it as solved.
--I code too much. Well, too bad.