Application to modify .RBM files (help needed)

Search This thread

k8500

Senior Member
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: 

[B]What is it good for?[/B]
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...
 
Last edited:

adfree

Senior Member
Jun 14, 2008
10,615
6,172
Samsung Galaxy Watch 4
Samsung Galaxy S22
  • Like
Reactions: k8500

adfree

Senior Member
Jun 14, 2008
10,615
6,172
Samsung Galaxy Watch 4
Samsung Galaxy S22
PshRsrcBmpIdle.rbm
186 Pics

I have disabled ID0 ... first Picture... :D

PshRsrcBmpIdleAni.rbm
23 Pics

I have disabled ID9 - ID13... :D :victory:

But now how to remove disabled Pic? :eek:

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

Best Regards
 

Attachments

  • ID0.jpg
    ID0.jpg
    9.2 KB · Views: 234
  • ID9.png
    ID9.png
    29.8 KB · Views: 200

k8500

Senior Member
Last edited:
  • Like
Reactions: adfree

k8500

Senior Member
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!
 

Attachments

  • dassRBM.7z
    17.9 KB · Views: 104
Last edited:

adfree

Senior Member
Jun 14, 2008
10,615
6,172
Samsung Galaxy Watch 4
Samsung Galaxy S22
-> done, 186 file(s) found in file "PshRsrcBmpIdle.rbm"

:good:

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

So next file :D

Code:
dassRBM -d PshRsrcBmpIdleAni.rbm list[B]2[/B].txt

I will do soon with this 2 RBM files some experiments.

Thanx. :cool:

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"
 

adfree

Senior Member
Jun 14, 2008
10,615
6,172
Samsung Galaxy Watch 4
Samsung Galaxy S22

Theme Creator is helpfull... maybe...

If I extract QMG from RBM then I can see them in Themes...
http://xdaforums.com/showpost.php?p=20091561&postcount=62

But not other direction...

:confused:

Best Regards

---------- Post added at 04:22 AM ---------- Previous post was at 03:49 AM ----------

:cool: :good:

First try...

Removed from list... (list1.txt)
Code:
#QMG@00000BAC (171856 byte): 480x800x16, type 3, alpha 1, mask 63519
0:PshRsrcBmpIdle.rbm_000_480x800x16.qmg

First Picture... ID0 ...

Code:
dassRBM -[B]a[/B] PshRsrcBmpIdle.rbm list1.txt


S8500 booting now without Samsung Logo... :D

Next days I will check deeper... next file is PshRsrcBmpIdleAni.rbm as higher ID as 0...

Thanx k8500 :good: :cool:

Maybe someone can help to identify big useless Pictures in RBM files to remove them ...
No idea if this could help to free view Bytes of RAM...

But I will try. :D

Best Regards
 

k8500

Senior Member
Theme Creator is helpfull... maybe...

If I extract QMG from RBM then I can see them in Themes...
http://xdaforums.com/showpost.php?p=20091561&postcount=62

But not other direction...

:confused:

Is it possible to create QMG in Theme Creator? QMG in .RBM files need a special header, but not very difficult to code something for this.

EDIT: Just give me any 480x800 (32 bit) QMG created in Theme Creator (if possible...), and I'll see what I can do with it tomorrow.
 
Last edited:

adfree

Senior Member
Jun 14, 2008
10,615
6,172
Samsung Galaxy Watch 4
Samsung Galaxy S22
:eek:

No idea how to create 32 bpp ... compatible for Theme Creator...

Supported Formats...
PNG,JPeG,GIF

I can create 32 bpp with old Corel Draw...

I can only remeber TIF...

Anayway, here is 24 bpp first try.
Only black or white...

Please, correct or add header. :good:

Thanx in advance.

Best Regards
 

Attachments

  • TestRBM1.rar
    1.6 KB · Views: 49

k8500

Senior Member
:eek:

No idea how to create 32 bpp ... compatible for Theme Creator...

Supported Formats...
PNG,JPeG,GIF

I can create 32 bpp with old Corel Draw...

I can only remeber TIF...

Anayway, here is 24 bpp first try.
Only black or white...

Please, correct or add header. :good:

Thanx in advance.

Best Regards

Thanks! I'm on vacation now and can't do much, though. I'll see about it later.

Just one remark: 32bpp (for QMG) most likely means 24bpp plus 8 bit alpha channel. So, nothing wrong with using 24bpp input data :).
 
  • Like
Reactions: adfree

adfree

Senior Member
Jun 14, 2008
10,615
6,172
Samsung Galaxy Watch 4
Samsung Galaxy S22
:confused:

Edited Menu.rbm and removed 30 Pics...
But Menu seems okay...
But I have lost other ugly stuff...

No idea why...

So for what is Menu.rbm ? :confused:

Will check WinComm if Menu.rbm is loaded into RAM... or only Zombie file...

Best Regards
 

Attachments

  • 20101231190124.jpg
    20101231190124.jpg
    88.9 KB · Views: 137
  • 20101231190133.jpg
    20101231190133.jpg
    104.4 KB · Views: 111

adfree

Senior Member
Jun 14, 2008
10,615
6,172
Samsung Galaxy Watch 4
Samsung Galaxy S22
:D
My fault...
Icons are 80x80

So I've reduced HsMenuItem.rbm

At the moment only for test and to identify where Pics are used...

I can see many 0x0 Pixel...
As it seems, maybe no placeholders necessary...

Will check if visible RAM differences...

Best Regards
 

Attachments

  • 20101231200034.jpg
    20101231200034.jpg
    61.2 KB · Views: 159

adfree

Senior Member
Jun 14, 2008
10,615
6,172
Samsung Galaxy Watch 4
Samsung Galaxy S22
I will create Batch file...

Take an while...

XXLA1 has 183 files in Black folder... 182 in 2 folders are RBM...
+
OspMapZoomControl.h

Step 1.
Copy all RBM in 1 folder. :D

Uupsi...
Code:
Disassembling file "W_WsRsrcWheelList.rbm" using list "W_WsRsrcWheelList.txt"...

[B]possibly not a RBM file![/B]

:confused:

Attached is my Batch...
1.bat and result...
Few files are empty... 0 KB

Best Regards

Edit 2...

Ah, few files have only 0x0 Pix... maybe useless crap...

Edit 3...

System.rbm is not only empty... but txt is empty...
 

Attachments

  • result1.rar
    83.2 KB · Views: 38
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 12
    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: 
    
    [B]What is it good for?[/B]
    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...
    8
    my Wsrsrcindicator icons numbers

    lmpQD.png
    VFTbW.png
    lCYhk.png
    4q2Xe.png
    7
    This can facilitate to change images in FW. I released a new beta of WR with implementation of QMG Compression mode 9 and the possibility to choose both method 3 or 5.
    But this compression is not intended for big image so :
    - a warning is displayed to test a special mode for medium size image (not yet tested in real FW)
    - an error message will be displayed if an image is too big and the compression will stop.
    In this case, use STD for QMG compression and QMG image compressed by STD can be directly used to replace existing image in WR.
    Thus alpha color and mask can be changed.

    2.9.6.8
    Fixed : colors for some images are not correct
    Added : Edit Mask/Transparence
    Added : Compression rate is displayed in tooltip
    Added : Dialogbox for replacing images
    Added : Implementation of QMG compression mode 9 method 3/5
    Added : Replace with QMG file compressed with STD

    Wave_Remaker_beta.zip
    6
    I know now why RC2 saved with WR are smaller.
    All images wasn't extracted.
    Now they are
    61271394.jpg


    WR last version
    6
    replacing an image in an RBM file is now integrated and RBM file is automatically saved. In addition, two additional compression formats for QMG were added.
    I'm waiting for your feedback.

    New version of WR (2.9.6.6)

    Added : a Dump can now be opened by simply Drag&Droping a directory in both view
    Added : open image in RBM with KeyUp/KeyDown
    Added : QMG can now be opened directly by Drag&Drop, button "QMG view" in 'utils' tab is now obsolete
    Added : some integrity tests for CSC files
    Added : Visualization of QMG method 3 / mode 65 + mode 137
    Added : image in RBM can now be replaced