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
Posts: 16
Registered: ‎04-29-2010
My Device: 9500
My Carrier: programer

I want get Image from cod file.

Hello

 

How to get image file from cod file? Then insert new Image to cod file.

 

please suggest

thank you

 

Developer
Posts: 16,791
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: I want get Image from cod file.

you can retrieve images from the cod (of your own project) using Bitmap.getBitmapResource (or the similar method of encodedimage). you can retrieve them from other cods using Class.forName and getResourceAsStream.

you cannot put images into a cod at runtime.

----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Developer
Posts: 148
Registered: ‎11-16-2009
My Device: Not Specified

Re: I want get Image from cod file.

[ Edited ]

DELETED

Contributor
Posts: 16
Registered: ‎04-29-2010
My Device: 9500
My Carrier: programer

Re: I want get Image from cod file.

I want to get image file from cod file that not my project and it's not running.(I want hack cod file.) I had read before that code file contains four sections: header, code segment, data segment and tail. I want to know about data segment. Can we know format of storing data segment.Lastly, what can we do to edit data of cod file?

 

 

Um, I had read before header of cod file like this

typedef struct { // codfh
  int     flashid;
  uint    section_number; //always 0
  uint    vtable_pointer; //always 0
  time_t  timestamp;
  uint    user_version;
  uint    fieldref_pointer;
  ushort  maxtype_list_size;
  short   reserved; //always 0xFF
  int     data_section; //always 0xFFFF
  int     module_info; //always 0xFFFF
  ushort  version;
  ushort  code_size;
  ushort  data_size;
  ushort  flags;
} CODFILEHEADER;

SizeOf (CODFILEHEADER) = 0×2C;

 

What program should I use to open cod file.  If I want to see the structure of header of cod file

 

 

my english not very good

 

thank you very much

Developer
Posts: 148
Registered: ‎11-16-2009
My Device: Not Specified

Re: I want get Image from cod file.

[ Edited ]

I guess in my first post i understand well what you wanted to ask, but i deleted it because i wasn`t sure what you wanted to ask.

AFAIK i know you can`t reverse engineer the cod files and i guess it is against the law too, anyway it is not nice to stole somebody work, or modify without her/his agreement.

Contributor
Posts: 16
Registered: ‎04-29-2010
My Device: 9500
My Carrier: programer

Re: I want get Image from cod file.

Hello

I'm just a beginner in blackberry application development.

There is cod file that was improved by my company and my company has right to get all resource from that cod file ;my boss assign me to get resources from that cod file but i just don't know how to do that so i think u misunderstand and i'm sorry that i didn't' say it clearly

 

thank you.

Developer
Posts: 16,791
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: I want get Image from cod file.

well, if you can handle google search there are some results on cod decompile or whatever. i'll leave that to the more shady devs i guess.

----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter