+ Reply to Thread
Results 1 to 10 of 10
resource.bin format?
This is a discussion on resource.bin format? within the General Meizu M6 forums, part of the miniPlayer M6 / SL category; I would be interested in writing a tool that could tear apart a resource.bin file and write out its constituent ...
-
02-28-2008 #1Passing By
- Join Date
- Feb 2008
- Posts
- 6
- Thanks
- 0
Thanked 0 Times in 0 Postsresource.bin format?
I would be interested in writing a tool that could tear apart a resource.bin file and write out its constituent parts onto the local filesystem. I am aware of the "Resource Editor" (currently at version 1.22?), but this requires Windows+.NET and isn't really what I'm looking for. The intent here is to enable easy modification of the resources (such as pictures and text) in the resources file.
-
02-28-2008 #2Passing By
- Join Date
- Feb 2008
- Posts
- 6
- Thanks
- 0
Thanked 0 Times in 0 PostsI'll be writing this tool on Linux, so thats the real drive here. I'm not interested in spending hours with a hex editor, guessing what values in a binary blob are. If someone can provide some reference material I'll use that to write this tool.
-
02-28-2008 #3Member
- Join Date
- Oct 2007
- Location
- Finland
- Posts
- 141
- Thanks
- 0
Thanked 0 Times in 0 PostsAll in favour: put your thumbs up!
I just wanted to tell you I'd be happy to see a Linux resource editor. Sorry, no help here. My writing skills are in the web department. It'll be a tough job, since the resource editor for Windows is made by Meizu, isn't it?
-
03-02-2008 #4Passing By
- Join Date
- Feb 2008
- Posts
- 6
- Thanks
- 0
Thanked 0 Times in 0 PostsM6 resource file specification & source code
The attached archive contains a file specification and a C implementation of a resource extractor. The C program can both extract and rebuild a resource file given the corresponding source material.
The file specification was obtained from the author of Resource Extractor (the Windows application). It was written in Chinese; I used google translate to do the initial translation and cleaned some of it up by hand.
-
03-02-2008 #5Member
- Join Date
- Jan 2008
- Location
- Indonesia
- Posts
- 106
- Thanks
- 0
Thanked 0 Times in 0 PostsHave a look at mine:
http://http://www.meizume.com/firmware-m3/5241-m3-firmware-might-relevant-m6-too.html
It's in the Public Domain, so use it as you like.
-
03-02-2008 #6Passing By
- Join Date
- Feb 2008
- Posts
- 6
- Thanks
- 0
Thanked 0 Times in 0 PostsString resource format
String resource types have a special format. They start with an index section followed by a data section in much the same way the larger container does. The format though is different. When I say 'word' here I mean a 16-bit big-endian value.
Here is an example from the M6SL firmware release 2.004.4, resource 69:
[word: 00 14] Count: how many strings are represented here? [20]
[word: 00 00] Offset: start of string 0 (??)
[word: 00 04] Offset: end of string 0
[word: 00 08] Offset: end of string 1
[word: 00 0C] Offset: end of string 2
....
The in the data section, which starts after the offsets section, the string offsets should correspond with their counterparts in the index section.
Strings are null-terminated, c-style, but remember that they are utf16-be encoded.
-
03-03-2008 #7Member
- Join Date
- Oct 2007
- Location
- Finland
- Posts
- 141
- Thanks
- 0
Thanked 0 Times in 0 PostsNice to see that there's something already. Compiled it, ran it (had to checkout the syntax: ./resource resource.bin out/resource.test). Can't make much of the extracted resource files, though. Like I said: I'm more into the web stuff, heh.
But really happy someone is taking the effort to at least check this stuff out.
Have done _some_ work in PyQt ( used it in dbKalendar ). Might get into that more if there's something more solid coming out of all this.
-
03-03-2008 #8Passing By
- Join Date
- Feb 2008
- Posts
- 6
- Thanks
- 0
Thanked 0 Times in 0 PostsI'm working with wpyh to get this editor suite up to speed. His resource extractor is far more polished than mine was, and only required a couple of small tweaks to get it working with the M6 firmware. The str2txt application works flawlessly; it outputs UTF-8 encoded text files that can be edited and then reconverted. And I'm currently working an IMG<->BMP conversion utility which should let you edit images from the firmware and later rebuild the firmware image with your mods. You will even be able to replace images lock stock and barrel so long as the replacements are the same width/height and have the same filename.
-
03-03-2008 #9Passing By
- Join Date
- Feb 2008
- Posts
- 6
- Thanks
- 0
Thanked 0 Times in 0 PostsI'm not a graphics guy at all, I'm far more interested in systems programming. If you're interested in writing a graphical frontend in PyQT, we can probably provide you with a C library and python bindings. Maybe even a nice clean API that returns a list of resources and their corresponding types, then allows you to import and export from the resources archive.
-
03-05-2008 #10Member
- Join Date
- Oct 2007
- Location
- Finland
- Posts
- 141
- Thanks
- 0
Thanked 0 Times in 0 PostsWoah, you're quite ahead of me. I'm not much of a graphics/gui guy either. My real web capabilities are in the backend. Heck, I've been trying to get a new design for my site for a few years now. :D I'm commandline capable enough to play around with your results, though.
God I'd love not having to boot into Windows anymore... Well, at least I've got Gimp for Win. :D
Similar Threads
-
no resource! please upgrade resource again!
By eugene in forum General Meizu M6Replies: 24Last Post: 03-14-2009, 03:27 PM -
FLAC format: how to re-encode
By u45735 in forum General Meizu M6Replies: 18Last Post: 02-28-2008, 04:51 PM -
Meizu welches Format
By matzekrm in forum GermanReplies: 3Last Post: 10-02-2007, 08:48 PM -
Support for audible.com format?
By Evan55 in forum TechnicalReplies: 1Last Post: 05-04-2007, 03:12 PM -
Format but I don't know why.
By Mankind in forum General Meizu M6Replies: 10Last Post: 01-02-2007, 10:47 PM



Reply With Quote