SUBMIT A FILE TYPE CONTACT US SUPPORT ABOUT US

What Is an RBF File? How to Find Which Kind You Have Before You Touch It

RBF files are not one format, and our script flagged 14 of 17 damaged copies of an EV3 file that the file command and 7-Zip could not name. Jump to your question below, or work through it in order.

36 min read Updated October 2026 Checked against sources and tests

What Is an RBF File? Not one format but several, and the ending cannot separate them

Short answer

RBF files are not one format. The same three letters name a LEGO MINDSTORMS EV3 program, a Windows Installer rollback file, an FPGA bitstream and several backup and database files. FileInfo lists five kinds and file-extensions.org lists six. The first bytes, the folder and the neighbors name the kind.

We read 46 EV3 RBF files from the ev3dev project and damaged one of them in 17 ways. The file command printed data for all 63 files, and 7-Zip refused all 63. Our 28 line script flagged 14 of 17 damaged copies, and ten kinds of damage came back byte for byte.

To name your file, read the five questions. To check an EV3 RBF file, read the check steps. If your RBF file will not open, begin with the eight causes.

RBF files are not one format. The ending names a LEGO EV3 program, a Windows Installer rollback file, an FPGA bitstream and other files, so the folder and the first bytes decide what yours is.

Picture a file called ui.rbf in a robot project and another called 4e6142cc.rbf in a hidden Windows folder. Both end in .rbf. They share no format, no maker and no program.

FileInfo lists five RBF file types for the ending. The LEGO Group made the EV3 Robot Brick File, and Microsoft made the Windows Installer Rollback File. The other three are the Stellar Insta Backup Image, the Redatam Binary File from CELADE and the Retrospect Backup File from EMC Insignia.

File-extensions.org lists six RBF meanings. They are Windows rollback files, an Oracle database backup, Quartus II raw binary data, R:BASE data, Retrospect backups and Warhammer 40,000 Dawn of War 2 binary data. Filext lists five and names the same LEGO and Windows meanings.

We could test only one kind. The ev3dev lmsasm project ships 46 compiled EV3 RBF files as test data, and we read all of them. The other meanings come from the pages we name, and we say so every time.

Where our RBF files come from

The ev3dev project wrote lmsasm, a tool that compiles .lms source files into EV3 programs. Its README calls it a reimplementation of the assembler in the official LEGO firmware. Its test data contains 46 compiled RBF files and 45 matching .lms sources.

The files are LEGO system and test programs, for example ui, Bluetooth, Brick Info, Port View and the SelfTest set. They are 33 to 10,342 bytes long and 103,534 bytes in total, and the median is 777 bytes.

We damaged one EV3 RBF file, ui.rbf, in 17 ways, and every copy changes one thing. We worked on Linux. We started no file on a LEGO brick, we opened none in LEGO software and we had no sample of any other kind.

RBF file facts at a glance

Quick facts about RBF files
Property Value
Meaning Not one format. FileInfo lists five file types and file-extensions.org lists six.
Ending .rbf. Related endings are .rbs for Windows rollback scripts, .rpf for LEGO programs saved on the brick and .rbc for Retrospect catalogs.
First bytes EV3 programs start with 4c 45 47 4f, the text LEGO. We have no sample of any other kind, so we give no first bytes for them.
EV3 header 16 bytes. The size is at bytes 4 to 7, and the version, 109, is at bytes 8 and 9. The object count is at bytes 10 and 11, and the global memory size is at bytes 12 to 15.
Byte order Low byte first in the EV3 header. Intel says configuration data in an FPGA RBF file is little endian too.
Sizes Our 46 EV3 RBF files are 33 to 10,342 bytes long, and the median is 777 bytes.
Opens with No desktop program for EV3 RBF files, per FileInfo. They are executables for the EV3 Intelligent Brick. We tested file, 7-Zip, strings and our script on Linux.
Our tests 46 healthy EV3 RBF files, 17 damaged copies, 10 repairs checked on all 46 RBF files.

Wrong page? A rollback script ends in .rbs and a LEGO program saved on the brick ends in .rpf. See how the neighbors differ.

Which Kind of RBF File Do You Have? Five questions, and the folder answers the first one

Five questions name the kind of an RBF file. Is it in Config.Msi, do its first bytes spell LEGO, did Quartus make it, is a .rbc catalog next to it, and which software came with it?

Work down the figure and stop at the first yes. We tested only the first row. The others rest on the pages named in the row, because we found no sample files for them.

Decision chart with five questions about where an RBF file came from, which folder it is in, what is next to it, what its first four bytes are and what made it, leading to LEGO EV3, Windows Installer rollback, FPGA bitstream, Retrospect backup and other meanings.
Figure 1. Five questions that name the kind of an RBF file. The ending names none of them.

The five kinds in detail

Kinds of RBF files and the clues that name them
Kind Clue and source
LEGO EV3 program The first four bytes spell LEGO. FileInfo says it is an executable for the EV3 Intelligent Brick and that no desktop application opens it. Tested on 46 RBF files.
Windows rollback Microsoft says Windows Installer keeps a rollback script and copies of deleted files in a hidden system directory. The ZDI blog names C:\Config.Msi, .rbs scripts and .rbf copies. Source only.
FPGA bitstream Intel calls it a raw binary file and documents quartus_cpf for making an .rbf file from a .sof file. Source only.
Retrospect backup FileInfo says a related .rbc catalog stores the information needed to restore it. Source only.
Other meanings FileInfo adds Redatam census files and Insta Backup Gold images, which it calls discontinued. R:BASE lists RBF as a database file for R:BASE 3.0. Source only.

Start with the folder

The folder of an RBF file is the first clue. A file in C:\Config.Msi belongs to Windows Installer, per the ZDI blog. A file next to the .sof file it was made from belongs to an FPGA project, per Intel. A file in a robot project belongs to LEGO.

Then read the first bytes

EV3 RBF files start with the text LEGO, as the next part shows. For the other kinds we found no header in the pages we read, so we give no first bytes. If your file does not start with LEGO, it is not an EV3 program.

Folder first The folder is the cheapest clue, and it costs no tool.
First bytes second LEGO at byte 0 names an EV3 program. We have no signature for the other kinds.
Neighbors third A .rbs file beside it points to rollback, and a .rbc file points to Retrospect, per the sources above. A .sof file points to Quartus.
The ending last Five or six formats share it, so it proves nothing.

Not sure your file is an RBF file at all? Check it with our script.

What Is Inside an EV3 RBF File? A header, a table and the code, in as few as 33 bytes

EV3 RBF files have three parts, a header of 16 bytes, a table of 12 byte entries and the code. Our smallest file, TestPrg1.rbf, is 33 bytes long, and our largest, Test0108.rbf, is 10,342 bytes long.

We read EV3 RBF files because the ev3dev project ships sources and files together, so every value can be checked. The smallest file shows all three parts in 33 bytes.

All 33 bytes of TestPrg1.rbf
xxd TestPrg1.rbf
00000000: 4c45 474f 2100 0000 6d00 0100 0000 0000  LEGO!...m.......
00000010: 1c00 0000 0000 0000 0000 0000 4082 fcff  ............@...
00000020: 0a                                       .

Bytes 0 to 3, 4c 45 47 4f, spell LEGO. Bytes 4 to 7, 21 00 00 00, are the size, which is 33 and matches the RBF file. Bytes 8 and 9, 6d 00, are the version, which is 109. Numbers are stored low byte first.

Bytes 10 and 11, 01 00, say the file has 1 object. Bytes 12 to 15 give the global memory size, which is 0 here. The table starts at byte 16 and has one entry of 12 bytes.

The first number in the entry, 1c 00 00 00, is 28. It says where the code starts, and it equals 16 plus 12 times 1. Five bytes of code follow, 40 82 fc ff 0a. The source has one thread with a loop, so one object is correct.

Diagram of an EV3 RBF file of 5,030 bytes in four blocks: a 16 byte header, a table of 20 entries of 12 bytes, the code of 20 objects, and a final byte 0a, with three rules about the header, the table and the size field.
Figure 2. One EV3 RBF file from our tests, ui.rbf. The blocks are not drawn to scale.

The header, byte by byte

The first 64 bytes of ui.rbf
xxd -l 64 ui.rbf
00000000: 4c45 474f a613 0000 6d00 1400 7f00 0000  LEGO....m.......
00000010: 0001 0000 0000 0000 0100 0000 4601 0000  ............F...
00000020: 0000 0000 1900 0000 6202 0000 0000 0000  ........b.......
00000030: 8c00 0000 5a04 0000 0000 0100 0500 0000  ....Z...........

Bytes 4 to 7, a6 13 00 00, give 5,030, the size of the file. Bytes 10 and 11, 14 00, give 20 objects. Bytes 12 to 15, 7f 00 00 00, give 127 bytes of global memory. The table starts at byte 16.

The first entry reads 256, and 16 plus 12 times 20 is 256, so the code starts right after the table. The second entry reads 326 and the third reads 610. Every offset says where an object begins.

We found no public layout for the last three fields of an entry, so we name none. They are 2, 2 and 4 bytes long.

In 337 entries across the RBF files the first was 0 in 335 and 1 in 2. The second was 1 in 287 and 0 in 50. The third reached 987 and was 0 in 67.

The parts of an EV3 RBF file

Parts of EV3 RBF files
Part What it stores and what we saw
LEGO header 16 bytes with the text LEGO, the size, the version 109, the object count and the global memory size. All 46 RBF files follow the rules in the figure.
Object table 12 bytes for every object. The first number says where its code starts. In 45 of 46 RBF files the first entry equals 16 plus 12 times the count.
Code The instructions of the objects. The assembler writes them from thread, subcall and block declarations in the .lms source. The count matched in 45 of 45 files that have a source.
Text Names like Startup, screen and ui V1.04. 43 of 46 RBF files contain readable text of 6 or more characters, and 28 name a version like V1.02.
Last byte 0a in all 46 RBF files. It is a newline, so text mode copies change the file.

What the sources say

The ev3dev project compiles .lms text into RBF files with lmsasm, so one source gives one binary. The LEGO test sources include a GPL notice from The LEGO Group dated 2010 to 2013. We did not build lmsasm, so every file is one the project ships.

The LEGO EV3 Communication Developer Kit uses the path ../apps/tst/tst.rbf in its download example. In another example it says the on brick program file ends in rpf and not rbf. So LEGO treats the two endings as different files.

The map is small. Our script reads the header and the table. It does not read the code, so damage inside the code can pass it, as the 17 copies show.

What Did We Find in 46 EV3 RBF Files? Three readers, and two of them knew nothing

We read 46 EV3 RBF files with three readers. The file command printed data for all 46, 7-Zip refused all 46 and our 28 line script printed OK for all 46. No common tool knows RBF files, so the header is your check.

All 46 RBF files come from the ev3dev lmsasm test data. They are LEGO system and test programs, so this is a study of one kind and not a survey of every RBF file. We tested no file on a brick.

Readers were file 5.45, 7-Zip 23.01 and our own script on Python 3.13, all on Linux. The file command had to print an EV3 name, and 7-Zip had to open the RBF file as an archive. Our script had to print OK.

46 healthy EV3 RBF files read
3 readers on every file
17 damaged copies of ui.rbf
14 copies our script flagged
Bar chart of 46 EV3 RBF files by size, from 33 to 10,342 bytes, next to a grid showing the file command, 7-Zip and our check script on all 46, and four facts measured in the files.
Figure 3. 46 EV3 RBF files, three readers and four measured facts.
What three readers found in 46 EV3 RBF files
Test Result
The file command Printed data for all 46 RBF files. It has no rule for RBF files, so it names no kind.
7-Zip Refused all 46 with the message Cannot open the file as archive. That is correct, because RBF files are not archives.
Our script Printed OK for all 46 RBF files and named them EV3 programs, with their sizes and object counts.
Sizes 33 to 10,342 bytes, with a median of 777 and a total of 103,534.
Objects 1 to 44 objects in a file. Global memory ranged from 0 to 30,122 bytes, and 23 files use none.
Text 43 of 46 RBF files contain readable text, and 28 show a version like Brick Name V1.02.

One header and 46 RBF files

Every file starts with LEGO and stores version 109. The size field equals the length of the file in all 46. The first table entry equals 16 plus 12 times the count in 45 of 46 RBF files.

The exception is TestPrg4.rbf, which is 133 bytes long and stores 0 in its first entry. It is also the only file without a matching source. For the 45 files that have one, the object count equals the thread, subcall and block declarations in the source.

Text inside the code

The strings command prints Brick Name V1.02 for Brick_Name.rbf, and ui.rbf prints ui V1.04. 28 of 46 RBF files show a version like that. The text names the program, so it gives a fast clue to what a file does.

No tool knows the format The file command printed data for all 46, and 7-Zip refused all 46.
A header check is cheap Our 28 line script reads 16 bytes and a table, and it passed all 46 RBF files.
One odd file TestPrg4.rbf stores 0 in its first table entry, so a rule that fits 45 files does not fit all 46.
Not tested on hardware We started no file on a brick, so a pass from our script does not mean a program works.

Read the study with care. It shows what three readers do with 46 RBF files from one project. They are LEGO test and system programs. Programs made in the LEGO software can differ, and we had none of those.

What Happens When an RBF File Is Damaged? 17 broken copies, 14 flagged and ten kinds of damage repaired

We damaged one EV3 RBF file in 17 ways. The file command printed data and 7-Zip refused all 17 copies. Our script flagged 14, and ten kinds of damage came back byte for byte on all 46 RBF files.

The 17 copies of the RBF file come in three groups. Group A changes the header, in seven copies. Group B changes the length of the file or how it was moved, and group C changes the table and the body. Every copy changes one thing in ui.rbf, which is 5,030 bytes long.

We asked two questions about every copy. Did our script flag it? And did one command restore the original, checked by SHA-256 on all 46 RBF files? The file command and 7-Zip gave one answer for all 17, so they cannot separate one damage from another.

Grid of 17 damaged copies of one EV3 RBF file against the file command, 7-Zip, our check script and a repair test over all 46 files. Our script flagged 14 copies and repairs restored 10 kinds of damage.
Figure 4. 17 damaged copies, three readers and a repair test. An amber band marks a copy our script passed.

The 14 copies our script flagged

A1 changes LEGO to LEGX, and B6 removes the first byte. Both give an RBF file that does not start with LEGO. A2 and A3 set the size field to 5,031 and 0. A4 sets the version to 0. A5 sets the object count to 0, and A6 raises it to 21.

B1 cuts the last byte, B2 cuts the RBF file to half and B3 keeps only the 16 header bytes. B4 adds 512 zero bytes and B5 replaces every newline with 0d 0a. In all five the size field no longer equals the length of the file.

C2 swaps two table offsets, so the script reports offsets out of order. C3 points one offset past the end, so it reports an offset outside the code. Most flags come from the size field.

The 3 copies our script passed

A7 sets the global memory size to ffffffff. C1 flips one byte in the middle of the code, and C4 zeroes the second half of the file. All three keep a sound header and table, so our script printed OK.

All three differ from the original. A hash or a source file finds them, and our script cannot. Passes mean the header is sound. They do not mean the program is intact.

Repairs that worked

We wrote one command per kind of damage, ten kinds in all, and tested it on all 46 RBF files. A hash matched the original for A1, A2, A3, A4, B4, B5 and B6 on all 46.

A5 and A6 worked on 45 of 46 RBF files, and C2 worked on 26 of 26 where the swap changes bytes.

The one failure is TestPrg4.rbf, which stores 0 in its first table entry, so its object count cannot be read back from the entry. B5 mimics a text mode copy. Five files contain a natural 0d 0a pair and still came back intact.

What no command repaired

B1, B2 and B3 cut the RBF file, and C4 zeroes half of it. Cut and zeroed code is gone, and no header brings it back. C1 flips one byte, C3 points an offset past the end and A7 changes the global memory size. We tested no repair for those three.

Generic tools cannot help The file command and 7-Zip gave one answer for all 17 copies.
Headers can be rebuilt Ten kinds of header, length and order damage came back byte for byte.
Passed is not intact Three copies passed our script and still differ from the original.
Lost bytes stay lost No command restored a cut or a zeroed body.

Read the grid with care. Every copy changes one thing in one file. Damage in the wild changes many things at once. We opened no copy in LEGO software or on a brick, and our repairs rely on rules that fit these 46 RBF files.

What Does Our Expert Say About RBF Files? A note from Neeraj Singh on trusting the ending

Read the first bytes of an RBF file before you trust its ending. The ending names at least five formats, and common tools stay silent about the one kind we could read.

Neeraj Singh

Expert insight

“The ending .rbf names at least five formats, and no common tool names the one you have. In our test the file command printed data for all 46 EV3 RBF files and 7-Zip refused all 46. A 28 line script read every header. Check the source, read the first bytes and keep the original before you repair anything.”

Neeraj Singh Manager, Tech Support & Operations 19+ years fixing Windows and system errors

Why the ending proves nothing

FileInfo lists five file types for .rbf and file-extensions.org lists six. The makers are the LEGO Group, Microsoft, Stellar, CELADE and EMC Insignia, so no single owner stands behind the ending.

Checks have limits. Our script reads a header, and it passed 3 of 17 damaged copies. A source file or a hash from the sender is a better check than any header rule.

Copy your RBF file before you repair it. Work on the copy and keep the original untouched. Write down its SHA-256 hash first, so you can show later that the copy came back as it was.

How Do You Open an RBF File? It depends on the kind, and most kinds have no desktop viewer

No desktop program opens an EV3 RBF file, per FileInfo, because it is an executable for the EV3 Intelligent Brick. Windows Installer uses its own rollback files without your help, and Intel documents tools for FPGA bitstreams. We opened no file in any of them.

The table lists what every source names. Programs with version numbers are the ones we tested. Every other row rests on the page named in it, and we tested none of those.

Programs that handle RBF files
Program What it does
LEGO EV3 brick FileInfo says EV3 Robot Brick Files are executables for the EV3 Intelligent Brick and that no desktop application opens them. We started no file on a brick.
Windows Installer Microsoft says Windows Installer keeps a rollback script and copies of files while an install is under way, and deletes them after success. Nobody opens these files by hand. We did not test it.
Quartus tools Intel documents quartus_cpf for making an .rbf file from a .sof file, and the Programmer for single RBF conversion. We tested neither.
Retrospect FileInfo lists EMC Insignia Retrospect for Windows and Mac, with a related .rbc catalog. We did not test it.
7-Zip Version 23.01. It refused all 46 EV3 RBF files and all 17 damaged copies. RBF files are not archives.
The file command Version 5.45. It printed data for all 63 files, because it has no rule for EV3 RBF files.
Our script A 28 line Python script that names EV3 programs by their header. It passed all 46 healthy files and flagged 14 of 17 damaged copies.
The strings command Binutils 2.42. It printed readable text like Brick Name V1.02 from 43 of 46 RBF files.

Open an EV3 RBF file on Linux

Four ways to look at an EV3 RBF file
file -b ui.rbf
data
7z l ui.rbf (abridged)
ERROR: ev3/ui__ui.rbf : Cannot open the file as archive
Errors: 1
xxd -l 16 ui.rbf
00000000: 4c45 474f a613 0000 6d00 1400 7f00 0000  LEGO....m.......
strings -n 6 Brick_Name.rbf
Brick Name V1.02
Brick Name

The file command printed data and 7-Zip refused, so neither names the kind. The header does. The first four bytes spell LEGO, and the strings command prints the name of the program.

What to use for every kind

EV3 programs. To change one, change its source and compile it again. The ev3dev lmsasm tool compiles .lms files, and FileInfo says EV3 Explorer compiles .sb files. We compiled nothing.

Windows rollback files. Leave them to Windows Installer. The safety part says what Microsoft and other sources report about deleting them.

FPGA bitstreams. Intel documents the conversion from a .sof file in its Arria 10 SoC guide. We tested no loading, and the byte order notes give what Intel says.

Retrospect backups. FileInfo says they need Retrospect and the related .rbc catalog. Without the catalog, we found no way to restore one.

Install programs from their makers. Take Quartus tools from Intel and Retrospect from its maker. A free site that offers to open or convert any RBF file can keep your upload, so try the steps on this page first.

How Do You Check an RBF File? Six steps and a script of 28 lines

Check an EV3 RBF file in six steps. Read the first 16 bytes, compare the size with the length, read the table and read the text. Our 28 line script passed all 46 healthy files and flagged 14 of 17 damaged copies.

First reads need no Python. The xxd command prints bytes and wc prints the length. For ui.rbf the size field and the length both read 5,030.

Steps 3 and 4 on ui.rbf
xxd -l 16 ui.rbf
00000000: 4c45 474f a613 0000 6d00 1400 7f00 0000  LEGO....m.......
wc -c < ui.rbf
5030

Read the first line from the left. Bytes 0 to 3 spell LEGO. Bytes 4 to 7, a6 13 00 00, read 5,030 with the low byte first, which equals the length. Bytes 8 and 9, 6d 00, read 109.

Check RBF files with Python

The script reads the first 16 bytes of an RBF file and looks for LEGO. It checks that the size field equals the length of the file and that the version is 109. It reads the object count and checks that a table of 12 byte entries fits.

It then checks that every offset points inside the file and that offsets are in order. It prints OK or FLAG, then the kind, the size and the object count. It never changes a file.

Check the header and the table of an EV3 RBF file
import os, struct, sys

def peek(path):
    b = open(path, 'rb').read()
    if len(b) < 16:
        return 'FLAG', 'under 16 bytes, no room for a header'
    magic, size, ver, n, glob = struct.unpack('<4sIHHI', b[:16])
    if magic != b'LEGO':
        return 'FLAG', 'bytes 0 to 3 are not LEGO'
    bad = []
    if size != len(b):
        bad.append('size field says %d, file has %d' % (size, len(b)))
    if ver != 109:
        bad.append('version field is %d, not 109' % ver)
    end = 16 + 12 * n
    if n == 0 or end > len(b):
        bad.append('object table does not fit in the file')
    else:
        offs = [struct.unpack('<I', b[16 + 12 * i:20 + 12 * i])[0] for i in range(n)]
        used = [o for o in offs if o]
        if any(o < end or o >= len(b) for o in used):
            bad.append('an object offset points outside the code')
        elif used != sorted(used):
            bad.append('object offsets are out of order')
    return ('FLAG' if bad else 'OK'), 'EV3 program, %d bytes, %d objects%s' % (len(b), n, ', ' + '; '.join(bad) if bad else '')

for p in sys.argv[1:]:
    print(*peek(p), os.path.basename(p), sep=' | ')

Here is what it printed for four healthy files. They are the smallest, a small one, ui and the largest object count.

Four healthy files
python3 rbf_peek.py SelfTest__TestPrg1.rbf Brick_Name__Brick_Name.rbf ui__ui.rbf Brick_Program__Brick_Program.rbf
OK | EV3 program, 33 bytes, 1 objects | SelfTest__TestPrg1.rbf
OK | EV3 program, 170 bytes, 2 objects | Brick_Name__Brick_Name.rbf
OK | EV3 program, 5030 bytes, 20 objects | ui__ui.rbf
OK | EV3 program, 9723 bytes, 44 objects | Brick_Program__Brick_Program.rbf

Every answer starts with OK or FLAG, then the kind, the size and the object count. Names follow the pattern folder, two underscores, file.

Four flagged copies and one that passes
python3 rbf_peek.py A1_magic_changed.rbf A2_size_plus_one.rbf B2_cut_to_half.rbf B5_crlf_text_mode.rbf C4_second_half_zeroed.rbf
FLAG | bytes 0 to 3 are not LEGO | A1_magic_changed.rbf
FLAG | EV3 program, 5030 bytes, 20 objects, size field says 5031, file has 5030 | A2_size_plus_one.rbf
FLAG | EV3 program, 2515 bytes, 20 objects, size field says 5030, file has 2515; an object offset points outside the code | B2_cut_to_half.rbf
FLAG | EV3 program, 5062 bytes, 20 objects, size field says 5030, file has 5062 | B5_crlf_text_mode.rbf
OK | EV3 program, 5030 bytes, 20 objects | C4_second_half_zeroed.rbf

A1 does not start with LEGO. A2 stores a size one byte too big. B2 is cut to half, so the size and an offset both fail. B5 grew from 5,030 to 5,062 bytes. C4 passes, because only the second half of its code is zero.

What the script found in our files

Our script on healthy and damaged EV3 RBF files
Result Cases
Passed (46 healthy RBF files) The start reads LEGO, the version is 109, the size equals the length, the table fits and the offsets point inside the file in order.
Start is not LEGO (A1, B6) LEGO changed to LEGX, or the first byte lost. Both flagged.
Size differs from length (7 copies) A2, A3 and B1 to B5. Cuts, padding and text mode copies all break the size rule.
Version, count or offsets (5 copies) A4 sets the version to 0. A5 and A6 break the object count. C2 swaps two offsets and C3 points one past the end.
Passed (A7, C1, C4) The header and table are sound, so the script passes them. The damage is in the global memory size or in the code.

The script has limits. It does not read the code, so it passes A7, C1 and C4. It repairs nothing. The repair commands fix the ten kinds of damage we tested.

Check order for any RBF file

  1. Copy your RBF file, write its SHA256 hash and work on the copy.
  2. Note where the RBF file came from. A folder, a neighbor file or a program name names the kind faster than bytes do. See the list of kinds.
  3. Read the first 16 bytes. LEGO at bytes 0 to 3 means an EV3 program, and any other start means another kind.
  4. For EV3 RBF files, compare the size field with the length and read the table with our script.
  5. Read the text with the strings command. A name like Brick Name V1.02 shows what the program is.
  6. Ask the source for the file or its hash again. Only the LEGO software or a brick shows whether a program works, and we tested neither.

Is an RBF File Safe to Open or Delete? Reading is safe, and the rollback folder needs care

Reading the bytes of an RBF file starts nothing, so it is safe. Do not delete files from the Windows rollback folder by hand, and start an EV3 program on a brick only when you trust where it came from.

We started no RBF file. Our readers only read bytes. Our EV3 RBF files are LEGO test programs from a public project, and we scanned none for malware.

Microsoft says Windows Installer records a rollback script and keeps copies of deleted files in a hidden system directory. It deletes them after a successful install. A property named DISABLEROLLBACK switches rollback off.

Reading headers and strings Safe. Our script and the strings command only read bytes.
Writing down hashes Safe. A hash shows which copy you have.
Starting an EV3 program on a brick FileInfo calls the file an executable for the brick. We started none. Start only files from sources you trust.
Leaving C:\Config.Msi alone Windows keeps rollback files there while an install or uninstall is under way and deletes the folder after, per the ZDI blog. A file that stays can mean a leftover. We could not test it.
Deleting rollback files by hand If an install fails, Windows reads the .rbs and .rbf files to restore your system, per ZDI. It cannot restore from files that are gone.
Trusting the ending Five or six formats share it, so a name ending in .rbf proves nothing about what a file does.

A rollback file that a scanner flagged

A Microsoft Q&A thread describes SentinelOne flagging Config.Msi\4e6142cc.rbf as ransomware on Windows Server. A reply said the activity can fit Windows Installer rollback and called that no proof of safety. It advised keeping the hash, checking the source and not deleting again and again.

Random names are normal there. The ZDI blog says an uninstall moves a file into that folder under a random name with the ending .rbf and logs it in an .rbs script.

A folder that stays

ZDI says Windows deletes C:\Config.Msi when an install or uninstall finishes, barring exceptional cases. If a file in it stays open, Windows cannot delete the folder. So a lasting folder is a reason to look at the install, not a reason to delete files.

EV3 RBF files and your brick

FileInfo calls the EV3 RBF file an executable for the brick. We tested none, so treat files from strangers like any program, and read the text inside before you start one.

Not sure? Check it first. Copy the hash, read the first bytes with our check steps and ask the sender where the file came from. If it is in a Windows folder you did not make, leave it and look at the install that made it.

Why Will Your RBF File Not Open? Eight causes, and what to do about every one

Most RBF files that will not open fail for one of eight reasons. Read the first bytes first, then the size and then the table. Our script flagged 14 of 17 damaged copies, and ten kinds of damage came back byte for byte.

We damaged one EV3 RBF file in 17 ways and tested repairs on all 46 RBF files. The table groups what we saw into eight causes. Numbers in brackets match the steps below.

Every row says what happens to your RBF file and what to try. Fixes work on copies, and none changes the original. We opened no repaired file in LEGO software, so a repaired header shows only that the header is sound.

Eight causes of RBF files that will not open
Cause Result and fix
The wrong kind of file (1) The RBF file does not start with LEGO, so it is a Windows rollback, FPGA, backup or database file. LEGO tools refuse it. Fix: Find the kind in the kind finder and open it with the program of that kind.
A start that is changed or lost (2) A1 writes LEGX over LEGO, and B6 loses the first byte. Our script flagged both. Fix: Write LEGO over bytes 0 to 3, or add the missing L. Both came back byte for byte on all 46 RBF files.
A size field that is wrong (3) A2 and A3 change the size field, and B4 adds 512 zero bytes after the code. Fix: Write the length of the file into bytes 4 to 7, or cut the file to the size it names. All three came back on all 46 RBF files.
A version that is wrong (4) A4 sets the version field to 0. Fix: Write 109 into bytes 8 and 9, the version all 46 of our files store. It came back on all 46 RBF files.
An object count that is wrong (5) A5 sets the count to 0 and A6 raises it by 1. Fix: Subtract 16 from the first table entry, divide by 12 and write the result into bytes 10 and 11. It worked on 45 of 46 RBF files and failed on TestPrg4.rbf.
A copy made in text mode (6) B5 replaces every newline 0a with 0d 0a, so ui.rbf grew from 5,030 to 5,062 bytes. Fix: Replace every 0d 0a with 0a. It worked on all 46 RBF files, including 5 that contain a natural 0d 0a.
A table that is out of order (7) C2 swaps two offsets and C3 points one past the end. Fix: For C2, sort the offsets, which worked on all 26 files where the swap changes bytes. We found no repair for C3.
Code that is cut or damaged (8) B1, B2 and B3 cut the file, C4 zeroes half of it, C1 flips a byte and A7 changes the global memory size. Our script flagged the cuts and passed the other three. Fix: Ask for a new copy or the .lms source. We tested no repair.

Repairs we tested

One short script covers all eight fixes. It takes a damaged file, a kind of fix and a name for the new file. The commands after it are the ones we used, with short file names.

rbf_fix.py, 19 lines
import struct, sys

def fix(b, kind):
    u = lambda f, o: struct.unpack_from(f, b, o)[0]
    d = bytearray(b)
    if kind == 'magic': d[0:4] = b'LEGO'
    elif kind == 'size': struct.pack_into('<I', d, 4, len(b))
    elif kind == 'version': struct.pack_into('<H', d, 8, 109)
    elif kind == 'count': struct.pack_into('<H', d, 10, (u('<I', 16) - 16) // 12)
    elif kind == 'padding': d = bytearray(b[:u('<I', 4)])
    elif kind == 'crlf': d = bytearray(b.replace(b'\r\n', b'\n'))
    elif kind == 'lost': d = bytearray(b'L' + b)
    elif kind == 'order':
        offs = sorted(u('<I', 16 + 12 * i) for i in range(u('<H', 10)))
        for i, o in enumerate(offs): struct.pack_into('<I', d, 16 + 12 * i, o)
    return bytes(d)

src, kind, dst = sys.argv[1:4]
open(dst, 'wb').write(fix(open(src, 'rb').read(), kind))
Eight commands that cover ten kinds of damage
# 2  first four bytes changed (A1), first byte lost (B6)
python3 rbf_fix.py A1_magic_changed.rbf magic A1_fixed.rbf
python3 rbf_fix.py B6_first_byte_lost.rbf lost B6_fixed.rbf
# 3  size field wrong (A2, A3), zero bytes added (B4)
python3 rbf_fix.py A2_size_plus_one.rbf size A2_fixed.rbf
python3 rbf_fix.py B4_zeros_added.rbf padding B4_fixed.rbf
# 4  version wrong (A4)
python3 rbf_fix.py A4_version_zero.rbf version A4_fixed.rbf
# 5  object count wrong (A5, A6)
python3 rbf_fix.py A5_count_zero.rbf count A5_fixed.rbf
# 6  text mode copy (B5)
python3 rbf_fix.py B5_crlf_text_mode.rbf crlf B5_fixed.rbf
# 7  offsets out of order (C2)
python3 rbf_fix.py C2_two_offsets_swapped.rbf order C2_fixed.rbf
# compare with the original
sha256sum ui.rbf A1_fixed.rbf C2_fixed.rbf | cut -c1-12
f668799841f8
f668799841f8
f668799841f8

The last two lines compare hashes. The first 12 characters match for ui.rbf, A1_fixed.rbf and C2_fixed.rbf, so the repaired files equal the original. Apply only the fix that matches the flag.

Check RBF files that will not open, step by step

We tested the steps on Python 3.13 and Linux. We opened no files in LEGO software, and the steps keep the original untouched at every point.

  1. Copy your RBF file, write its SHA256 hash and work on the copy.
  2. Name the kind with the kind chart. Only EV3 RBF files start with LEGO.
  3. Read the first 16 bytes, then the size and the table with our check script. A flag names the part where your file stops making sense.
  4. Match the flag to a cause in the table above and try its fix on the copy.
  5. Compare the SHA256 hash of the result with the source if you can get one.
  6. If one fix fails, do not stack another on top. Go back to the copy and try the next cause.
  7. Open the file in the LEGO software or on a brick. We tested neither, so a repaired header is no proof that a program works.

What to send a helper

Short messages get faster answers. Include the details below and add the script output. Its first line gives OK or FLAG, then the kind and the size.

A message that gets an answer
Subject: RBF file will not open
File: name, size in bytes and SHA256 hash
Kind: where the file came from and what is next to it
Check: the output of rbf_peek.py
Program: name, version and the exact words of the error
Source: who sent the file and when it was copied

What no step can fix

Cut files No command restored B1, B2 or B3. Ask for a new copy or look for a backup.
Zeroed code C4 zeroes half of the file and passed our script. Only the source or a hash shows the damage.
Rollback files Do not repair them. Windows Installer owns them, and the rollback advice says what to check.
Files of another kind Read the first bytes and open them as the kind they are.
Wrong endings A file named .rbf can belong to any of five or six kinds. Name the kind first.

Do not try online repair sites. Sites that offer to fix or convert any RBF file can keep your upload. Backup and database files can contain private data. Try the steps above on a copy first.

Can You Convert an RBF File? You rebuild it from its source, and byte order matters

You rebuild an RBF file from its source and do not convert it. EV3 RBF files come from .lms or .sb source, FPGA files come from .sof files through the Intel quartus_cpf tool, and Windows rollback files have no source to rebuild from. We converted nothing.

Questions about converting RBF files come down to the kind. Every kind we know is an end product. The sources name tools that make RBF files, and we found none that convert an RBF file into another format.

EV3 RBF files come from source

The ev3dev lmsasm tool compiles .lms text into RBF files, and FileInfo says EV3 Explorer compiles them from .sb files. Both go from source to RBF. We built nothing and found no tool for the other direction.

Header repairs are different. The repair part fixes ten kinds of header, length and order damage with a script of 19 lines. Code needs its source.

FPGA files come from .sof files

Intel documents this command in its Arria 10 SoC UEFI Boot Loader guide. It makes a compressed .rbf file from a .sof file, and the guide shows paths for one development kit. We did not use it.

The Intel example, split over three lines
quartus/bin/quartus_cpf -c -o bitstream_compression=on
  output_files/ghrd_10as066n2.sof
  output_files/ghrd_10as066n2.rbf

Intel also documents compressed and encrypted files made with the same tool, an option file and a .sof file. That Intel article covers the steps. We read both pages and tested neither.

Mind the byte order

Intel says the configuration data in an RBF file is little endian. In its example the bytes 02 1b ee 01 become the 16 bit words 1b02 and 01ee, or the 32 bit word 01ee1b02. It warns against swapping upper and lower bytes.

So a tool that reverses byte order breaks a bitstream. Copy these files byte for byte, and compare hashes after every transfer.

Rollback and backup files

Windows rollback files exist only for Windows Installer, so there is nothing to convert them to. Retrospect backups need Retrospect and the related .rbc catalog, per FileInfo. We found no other route.

EV3 RBF files Compile again from .lms or .sb source. Fix headers with our script.
FPGA files Make them again from a .sof file with quartus_cpf, and keep byte order.
Rollback files Leave them to Windows Installer.
Compare hashes Write the hash before every copy and check it after.

Keep the original file. Rebuild from your source and keep the RBF file you have. Compare hashes of copies with the original before you delete anything.

How Does an RBF File Differ From RPF, RBS and SOF Files? Close neighbors, and only one starts with LEGO

RBF files have close neighbors. RPF files are LEGO programs saved on the brick, RBS files are Windows rollback scripts, SOF files are Quartus programming files and RBC files are Retrospect catalogs. Only EV3 RBF files start with LEGO.

Seven kinds of file get mixed up with RBF files because they share letters or folders. The table lists what separates them. Every row ends with its source.

RBF, RPF, RBS, SOF, RBC and R:BASE files compared
Type What separates it
RBF, EV3 Starts with LEGO. A compiled program for the EV3 brick. Our 46 RBF files are 33 to 10,342 bytes long. Source: Our tests and FileInfo.
LMS source Text that lmsasm compiles into EV3 RBF files. We read 45 of them next to 45 files. Source: Our tests.
RPF The on brick program file, whose ending the LEGO communication kit gives as rpf and not rbf. Source: LEGO.
RBS A Windows Installer rollback script, stored with rollback files. The R:BASE site also lists RBS as an R:BASE 5000 and 4000 database file. Source: FileInfo, ZDI and R:BASE.
SOF The Quartus file that quartus_cpf uses to make an RBF file. Source: Intel.
RBC A Retrospect catalog that a Retrospect backup set needs for a restore. Source: FileInfo.
RB1, RB2, RB3 Newer R:BASE database files. R:BASE lists RBF as a database file for R:BASE 3.0, DOS and System V. Source: R:BASE.

RBF or RPF

The LEGO communication kit downloads an .rbf file to the brick in one example. In another it says the on brick program file ends in rpf and not rbf. So an RBF file is a compiled program, and an RPF file is a program file the LEGO software saves on the brick. We read no RPF file.

RBF or SOF

A SOF file is the input and an RBF file is the output in Intel documentation. The command makes the output from the input and can compress the result. We read no SOF file, so we cannot say what its first bytes are.

RBF or RBS

Windows Installer writes .rbs scripts and .rbf copies side by side, per the ZDI blog. Every change is recorded in a script, and Windows copies a file before it overwrites it. Our EV3 RBF files are unrelated to them.

Which one do you have

Installer files Read the MSI file page for Windows Installer packages.
Programs Read the EXE file page for Windows programs and how to read their headers.
Archives Read the ZIP file page and the RAR file page for files 7-Zip opens.
Database files Read the MDF file page for SQL Server data files and the disk image page for backups.

What Is the RBF File Format Made Of? The facts we could check, and where they came from

RBF is an ending that many makers use. Facts below come from our own checks of 46 EV3 RBF files and 17 damaged copies. Sources are FileInfo, file-extensions.org, Microsoft, Intel, the ZDI blog, R:BASE and LEGO.

Facts about RBF files
Part What we could check
Maker Depends on the kind. FileInfo names the LEGO Group, Microsoft, Stellar Data Recovery, CELADE and EMC Insignia.
Name No single name. FileInfo lists EV3 Robot Brick File, Windows Installer Rollback File, Stellar Insta Backup Image, Redatam Binary File and Retrospect Backup File.
First bytes EV3 programs start with the text LEGO, as our 46 RBF files show. We found no first bytes for any other kind.
EV3 structure A header of 16 bytes, a table of 12 byte entries and the code, ending in 0a in all 46 RBF files. Numbers are stored low byte first.
FPGA byte order Intel says configuration data in an RBF file is little endian, and the first byte of the file is the low byte of a word.
Rollback files Windows Installer keeps them in a hidden directory while an install is under way. The ZDI blog names C:\Config.Msi, .rbs scripts and .rbf copies.
Sizes Our EV3 RBF files are 33 to 10,342 bytes long. We have no size data for other kinds.
Specification We found no public layout for the EV3 header. The last three fields of a table entry stay unnamed on this page.
Media type We found none. We did not check IANA.
Our tests 46 healthy EV3 RBF files, 17 damaged copies and 10 repairs checked on all 46 RBF files. The file command, 7-Zip, strings and a 28 line script all worked on Linux.

About the values we list

Facts about the EV3 layout come from our own reading of 46 RBF files, and we checked every count against the .lms sources where they exist. Facts about other kinds come from the pages we name, and we did not test them.

Where we found no record, we say so. We found no registered media type and no public header layout. The ev3utils wiki points to the EV3 Firmware Developer Kit for opcodes, and we did not read that kit.

What we left out

We started no RBF file on a brick and opened none in LEGO software, Quartus, Retrospect or Windows Installer. We had no sample of a Windows rollback file, an FPGA bitstream or any backup file. We did not build lmsasm, and we scanned no file for malware.

All 46 EV3 RBF files are LEGO system and test programs from one public project. Our damaged copies come from one file, ui.rbf, and change one thing at a time. Programs made in the LEGO software can differ from ours.

Sources checked

For the five kinds, see FileInfo on RBF files, file-extensions.org and the Filext extension list. For R:BASE, see the R:BASE file extension list.

For rollback, see Microsoft Learn on rollback installation, the ZDI blog on file deletes and the Microsoft Q&A thread. For FPGA files, see Intel on single RBF conversion, Intel on byte order and Intel on encrypted files.

For EV3 sources, see lmsasm on GitHub. We name the LEGO EV3 Communication Developer Kit without a link. Every count on this page came from files and scripts in our research folder.

Frequently Asked Questions About RBF Files

What is an RBF file?

RBF files are not one format. FileInfo lists five file types with the ending, including a LEGO EV3 program, a Windows Installer rollback file and a Retrospect backup. EV3 programs start with the text LEGO, and the other kinds need a folder or a neighbor file to name them.

How do I open an RBF file?

It depends on the kind. FileInfo says no desktop program opens an EV3 RBF file, because it is made for the EV3 brick. Windows Installer uses its rollback files itself. We tested only file, 7-Zip, strings and our script on Linux.

What kind of RBF file do I have?

Check the folder first, then the first four bytes. A file in Config.Msi belongs to Windows Installer. A file that starts with LEGO is an EV3 program. A file beside a .sof file belongs to Quartus, and a file beside a .rbc catalog belongs to Retrospect.

Is an RBF file safe to open?

Reading bytes starts nothing, so reading is safe. An EV3 RBF file is an executable for the brick, per FileInfo, so start only files you trust. Do not delete files from the Windows rollback folder by hand while an install is under way.

Can I delete an RBF file in Config.Msi?

We did not test deletion of an RBF file. The ZDI blog says Windows reads those files to restore a system after a failed install and deletes the folder when it finishes. A Microsoft Q&A reply advised keeping a hash and checking the source before deleting again and again.

What is a LEGO EV3 RBF file?

It is a compiled program for the EV3 brick, per FileInfo. Our 46 RBF files start with LEGO, store version 109 and have a header of 16 bytes, a table of 12 byte entries and code. They are 33 to 10,342 bytes long.

What is a Quartus RBF file?

Intel calls it a raw binary file made from a .sof file with the quartus_cpf tool. Intel says its data is little endian. We had no sample, so we tested nothing and give no first bytes for it.

How do I convert an RBF file?

We found no tool that converts an RBF file to another format. EV3 RBF files are compiled from .lms or .sb source, and FPGA files are made from .sof files. Rebuild from the source and keep byte order.

Why will my RBF file not open?

Eight causes cover what we saw in RBF files that will not open. They are the wrong kind, a lost start, a wrong size, a wrong version, a wrong object count, a text mode copy, a damaged table and cut or zeroed code. Our script flagged 14 of 17 damaged copies.

What is the difference between RBF and RPF?

The LEGO communication kit says the on brick program file ends in rpf and not rbf. Its download example moves an .rbf file to the brick. So an RBF file is a compiled program, and an RPF file is a program file saved by the LEGO software.

How can I check if an RBF file is damaged?

Read the first 16 bytes and compare the size field with the length of the RBF file. Our script also reads the version and the table. It flagged 14 of 17 damaged copies and passed 3. Only a hash or a source file finds the rest.

How big is an RBF file?

It depends on the kind. Our 46 EV3 RBF files are 33 to 10,342 bytes long, with a median of 777 bytes. We have no size data for other kinds.

Still Stuck With an RBF File? Seven routes out, depending on what went wrong

Your RBF file will not open

Read the first bytes and the size of your file. The cause table lists what to try in order.

You do not know the kind

The kind questions name the kind from the folder, the first bytes and the neighbors.

Is it a Windows installer file? The page on MSI files covers Windows Installer packages, and the rollback folder notes cover the rollback folder.

Is it a program or an archive? The page on EXE files covers programs, and the page on ZIP files and the page on RAR files cover archives.

Is it a database or a backup? The page on MDF files covers SQL Server data files, and the page on disk image files covers backup images.

Is it a file type you do not know? Browse the file extension resource library, or send it on the submit a file type page.

Do you need the format facts? Read the format part for the layout, byte order and sources of RBF files.