Home Forums Gallery FAQs Downloads
 
 

Go Back   Meizu Me > miniPlayer M6 / SL > General Meizu M6

Register Today!  

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 ...


Reply
 
Thread Tools Display Modes
Old 02-28-2008   #1
Passing By
 
Join Date: Feb 2008
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
resource.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.
Rupan nincs online  
Reply With Quote
Old 02-28-2008   #2
Passing By
 
Join Date: Feb 2008
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
I'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.
Rupan nincs online   Reply With Quote
Old 02-28-2008   #3
Member
 
Join Date: Oct 2007
Location: Finland
Posts: 141
Thanks: 0
Thanked 0 Times in 0 Posts
My Meizu
All 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?
parena nincs online   Reply With Quote
Old 03-01-2008   #4
Passing By
 
Join Date: Feb 2008
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
M6 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.
Attached Files
File Type: zip extractor.zip (3.6 KB, 36 views)
Rupan nincs online   Reply With Quote
Old 03-02-2008   #5
Member
 
Join Date: Jan 2008
Location: Indonesia
Posts: 106
Thanks: 0
Thanked 0 Times in 0 Posts
Have 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.
wpyh nincs online   Reply With Quote
Old 03-02-2008   #6
Passing By
 
Join Date: Feb 2008
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
String 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.
Rupan nincs online   Reply With Quote
Old 03-03-2008   #7
Member
 
Join Date: Oct 2007
Location: Finland
Posts: 141
Thanks: 0
Thanked 0 Times in 0 Posts
My Meizu
Nice 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.
parena nincs online   Reply With Quote
Old 03-03-2008   #8
Passing By
 
Join Date: Feb 2008
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
I'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.
Rupan nincs online   Reply With Quote
Old 03-03-2008   #9
Passing By
 
Join Date: Feb 2008
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
I'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.
Rupan nincs online   Reply With Quote
Old 03-05-2008   #10
Member
 
Join Date: Oct 2007
Location: Finland
Posts: 141
Thanks: 0
Thanked 0 Times in 0 Posts
My Meizu
Woah, 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
parena nincs online   Reply With Quote

   
 
Meizu Me is an independent resource for all things Meizu. All rights reserved. Powered by vBulletin. Copyright ©2000 - 2010, Jelsoft Enterprises Ltd. Meizu M8, miniPlayer and all related names are properties of MEIZU Electronic Technology, Inc. Copyright 2009 Meizu Me.
LinkBacks Enabled by vBSEO © 2010, Crawlability, Inc.