Introducing XDA:DevCon – A Conference For Developers By Developers
XDA Developers Android and Mobile Development Forum
Forgot your password?
 
Post Reply+
Tip us?
 
k8500
Old
(Last edited by k8500; 31st October 2012 at 04:02 PM.)
#1  
Senior Member - OP
Thanks Meter 225
Posts: 229
Join Date: Apr 2012
Default Application to modify .RBM files (help needed)

dassRBM v0.9

New since last version:
  • PNG to LZ32 conversion working.
  • Some minor bugfixes.
  • Windows batch files (*.bat) include a PAUSE now.
  • Some minor source code optimizations.

Noteworthy stuff created with this:
Usage instructions:
Code:
dassRBM - Usage Guide
~~~~~~~~~~~~~~~~~~~~~

These instructions are written for Microsoft Windows, but should work 
for anything else, too. Given that you're able to compile dassRBM for 
your system, of course. 


To extract a RBM file:
~~~~~~~~~~~~~~~~~~~~~~

[1] Put dassRBM.exe, extract_all.bat and the RBM file into one folder. 
[2] Run extract_all.exe.
-> You'll get one .img/.qmg file for each item in the RBM and one 
"build" CSV file containing the instructions for rebuild of the RBM 
file. The "build" CSV file can be opened using 
Excel/OpenOffice/LibreOffice or similar. See "editing build CSV files" 
for editing. 


To (re)build a RBM file:
~~~~~~~~~~~~~~~~~~~~~~~~

[1] Put dassRBM.exe, build_all.bat, all items to include (img/qmg/png) 
and the CSV file into one folder.
[2] Run build_all.exe.
-> All the items will be used as detailed in the CSV file to (re)build 
the RBM file. 


To analyse RBM files:
~~~~~~~~~~~~~~~~~~~~~

[1] Put dassRBM.exe, summarize_all.bat, and all RBMs to analyse into one 
folder.
[2] Run summarize_all.exe.
-> You'll get a comprehensive analysis of all RBM files in 
summary_items.csv (for items included in the RBM files) and 
sammary_rbms.csv (for RBM overview). Open in 
Excel/OpenOffice/LibreOffice or similar. 


Editing CSV build files
~~~~~~~~~~~~~~~~~~~~~~~

To completely remove one item:
Just delete the whole line/row corresponding to the item you no longer 
want. Rebuild the RBM file (see above). Keep in mind that doing this, 
and with it effectively changing the numbering for following items, is 
not recommended for RBMs used in Hardware. 

To safely remove one item:
Change the value in the "type" column to zero ("0"). Rebuild the RBM 
file (see above). The item ordering will be preserved this way, and (as 
long as the item is really not used) it is safe to do so. 

To add an IMG/QMG as new item or replace existing:
Add a row/line to the CSV file or replace an existing row. ID must be 
sequential (no double IDs, IDs in order, same as replaced row), 
resolution (width/height) and bpp must be correct. Type is 2 for IMG and 
3 or 5 for QMG (refer to the original source for choice between 3/5). 
Everything else may be zero (refer to the original source for alpha/mask 
anyways for the correct values). 

To add a PNG file as new item or replace existing:
Add a row/line to the CSV file or replace an existing row. ID must be 
sequential (no double IDs, IDs in order, same as replaced row), 
resolution (width/height) must be correct and bpp must be 16 or 32 (32 
for better quality and alpha channel). Type is 1. Alpha/mask is zero.

Original first post:
Code:
I took a look at ho1ods discontinued Wave Remaker source code, hoping 
that I could code a small command line application for modification of 
.RBM files myself. 

Here's my findings: 

[1] An RBM file is a 'frame' containing one or more images.
[2] The structure of the .RBM file is pretty simple, but the formats
    of the embedded images are not.
[3] Four different image formats are used: LZ16, LZ32, QMG16, QMG32. 
[4] Most interesting stuff is QMG32 compressed. 

Now, I could manage to write the code to handle the RBM structure and 
the LZ16/LZ32 formats, but I don't have any idea about QMG. Is there 
already such a thing as a working QMG encoder? If not, can anyone code 
one? 

EDIT: I think I should also write something about this: 

What is it good for?
For a whole lot of stuff! If we're able to edit .RBM files we can change 
aspects of the Bada GUI that we haven't been able to change before. We 
could effectively do a complete GUI redesign, going far beyound what's 
possible with themes. We could finally have Bada Apps with proper icons 
in the main menu. We could change the icons in the drop down bar.... 
etc...
Attached Files
File Type: 7z dassRBM v0.9b.7z - [Click for QR Code] (787.1 KB, 381 views)
The Following 12 Users Say Thank You to k8500 For This Useful Post: [ Click to Expand ]
 
adfree
Old
#2  
Senior Member
Thanks Meter 1902
Posts: 3,374
Join Date: Jun 2008
Quote:
The structure of the .RBM file is pretty simple, but the formats of the embedded images are not.
Maybe we could start here.

I have only found position to set 0 x 0 Pixel and to disable...
But not to remove content for valid RBM...
http://forum.xda-developers.com/show...&postcount=124
Maybe "file size" or adresses are stored in RBM ?

But where ?

Best Regards
The Following User Says Thank You to adfree For This Useful Post: [ Click to Expand ]
 
adfree
Old
#3  
Senior Member
Thanks Meter 1902
Posts: 3,374
Join Date: Jun 2008
PshRsrcBmpIdle.rbm
186 Pics

I have disabled ID0 ... first Picture...

PshRsrcBmpIdleAni.rbm
23 Pics

I have disabled ID9 - ID13...

But now how to remove disabled Pic?

I will do next few days again few tests... maybe I can self find solution for me...

Best Regards
Attached Thumbnails
Click image for larger version

Name:	ID0.jpg
Views:	171
Size:	9.2 KB
ID:	1281186   Click image for larger version

Name:	ID9.png
Views:	146
Size:	29.8 KB
ID:	1281187  
The Following 3 Users Say Thank You to adfree For This Useful Post: [ Click to Expand ]
 
k8500
Old
(Last edited by k8500; 25th August 2012 at 09:02 PM.)
#4  
Senior Member - OP
Thanks Meter 225
Posts: 229
Join Date: Apr 2012
Quote:
Originally Posted by adfree View Post
Maybe we could start here.

I have only found position to set 0 x 0 Pixel and to disable...
But not to remove content for valid RBM...
http://forum.xda-developers.com/show...&postcount=124
Maybe "file size" or adresses are stored in RBM ?

But where ?

Best Regards
File size and adress are stored inside the RBM header. Let me do it, I'll code something basic just to disassamble (and reassemble) the RBM file.
The Following User Says Thank You to k8500 For This Useful Post: [ Click to Expand ]
 
k8500
Old
(Last edited by k8500; 27th August 2012 at 10:51 PM.)
#5  
Senior Member - OP
Thanks Meter 225
Posts: 229
Join Date: Apr 2012
Quote:
Originally Posted by k8500 View Post
File size and adress are stored inside the RBM header. Let me do it, I'll code something basic just to disassamble (and reassemble) the RBM file.

And here we go!

Syntax:

To disassemble RBM file
dassRBM -d [Name of RBM] [Name of Listfile]

To resassemble RBM file
dassRBM -a [Name of RBM] [Name of Listfile]


Listfile is created during disassembling and used during reassembling.
If you want to remove images from the RBM, no need to remove them physically, delete them from the list file and reassemble.
If you want to replace an image, keep in mind that the ID (= first 4 Bytes in image file) must match the old one.

Also: Alpha status software, so check the results!

I hope this gets us further!
Attached Files
File Type: 7z dassRBM.7z - [Click for QR Code] (17.9 KB, 65 views)
The Following 5 Users Say Thank You to k8500 For This Useful Post: [ Click to Expand ]
 
adfree
Old
#6  
Senior Member
Thanks Meter 1902
Posts: 3,374
Join Date: Jun 2008
Sorry, need an while...

libgcc_s_dw2-1.dll is missing in my XP System...
I think their will be more DLLs missing...

Maybe tomorrow I have few tests...

Thanx.

Best Regards
 
cyber kamikaz
Old
#7  
Member
Thanks Meter 19
Posts: 93
Join Date: Sep 2011
Quote:
Originally Posted by adfree View Post
Sorry, need an while...

libgcc_s_dw2-1.dll is missing in my XP System...
I think their will be more DLLs missing...

Try using cygwin
 
k8500
Old
#8  
Senior Member - OP
Thanks Meter 225
Posts: 229
Join Date: Apr 2012
Quote:
Originally Posted by adfree View Post
Sorry, need an while...

libgcc_s_dw2-1.dll is missing in my XP System...
I think their will be more DLLs missing...

Maybe tomorrow I have few tests...

Thanx.

Best Regards
Sorry, should have compiled it differently. Try the attached one.
Attached Files
File Type: 7z dassRBM.7z - [Click for QR Code] (17.9 KB, 63 views)
The Following 2 Users Say Thank You to k8500 For This Useful Post: [ Click to Expand ]
 
adfree
Old
#9  
Senior Member
Thanks Meter 1902
Posts: 3,374
Join Date: Jun 2008
Quote:
-> done, 186 file(s) found in file "PshRsrcBmpIdle.rbm"


I have written:
Code:
dassRBM -d PshRsrcBmpIdle.rbm list1.txt
So next file

Code:
dassRBM -d PshRsrcBmpIdleAni.rbm list2.txt
I will do soon with this 2 RBM files some experiments.

Thanx.

Best Regards

Edit 1...
Code:
Disassembling file "PshRsrcBmpIdleAni.rbm" using list "list2.txt"...
000: PshRsrcBmpIdleAni.rbm_000_480x400x32.qmg -> OK!
001: PshRsrcBmpIdleAni.rbm_001_480x400x32.qmg -> OK!
002: PshRsrcBmpIdleAni.rbm_002_480x400x32.qmg -> OK!
003: PshRsrcBmpIdleAni.rbm_003_480x400x32.qmg -> OK!
004: PshRsrcBmpIdleAni.rbm_004_480x400x32.qmg -> OK!
005: PshRsrcBmpIdleAni.rbm_005_480x400x32.qmg -> OK!
006: PshRsrcBmpIdleAni.rbm_006_107x156x32.qmg -> OK!
007: PshRsrcBmpIdleAni.rbm_007_480x400x32.qmg -> OK!
008: PshRsrcBmpIdleAni.rbm_008_3x188x32.qmg -> OK!
009: PshRsrcBmpIdleAni.rbm_009_480x400x32.qmg -> OK!
010: PshRsrcBmpIdleAni.rbm_010_480x400x32.qmg -> OK!
011: PshRsrcBmpIdleAni.rbm_011_480x400x32.qmg -> OK!
012: PshRsrcBmpIdleAni.rbm_012_480x400x32.qmg -> OK!
013: PshRsrcBmpIdleAni.rbm_013_480x400x32.qmg -> OK!
014: PshRsrcBmpIdleAni.rbm_014_480x400x32.qmg -> OK!
015: PshRsrcBmpIdleAni.rbm_015_480x400x32.qmg -> OK!
016: PshRsrcBmpIdleAni.rbm_016_480x400x32.qmg -> OK!
017: PshRsrcBmpIdleAni.rbm_017_480x400x32.qmg -> OK!
018: PshRsrcBmpIdleAni.rbm_018_480x400x32.qmg -> OK!
019: PshRsrcBmpIdleAni.rbm_019_1x1x32.qmg -> OK!
020: PshRsrcBmpIdleAni.rbm_020_1x1x32.qmg -> OK!
021: PshRsrcBmpIdleAni.rbm_021_1x1x32.qmg -> OK!
022: PshRsrcBmpIdleAni.rbm_022_1x1x32.qmg -> OK!
-> done, 23 file(s) found in file "PshRsrcBmpIdleAni.rbm"
The Following 4 Users Say Thank You to adfree For This Useful Post: [ Click to Expand ]
 
k8500
Old
#10  
Senior Member - OP
Thanks Meter 225
Posts: 229
Join Date: Apr 2012
If we had a working QMG encoder now, we could edit all that stuff.

The Following 2 Users Say Thank You to k8500 For This Useful Post: [ Click to Expand ]
 
Post Reply+
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Go to top of page...