Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Developing drivers with no info

How does the open-source/free software community develop drivers for products that offer no documentation?

like image 371
Mike Avatar asked Feb 03 '26 22:02

Mike


2 Answers

How do you reverse engineer something?

  • You observe the input and output, and develop a set of rules or models that describe the operation of the object.

Example:

Let's say you want to develop a USB camera driver. The "black box" is the software driver.

  1. Develop hooks into the OS and/or driver so you can see the inputs and outputs of the driver
  2. Generate typical inputs, and record the outputs
  3. Analyze the outputs and synthesize a model that describes the relationship between the input and output
  4. Test the model - put it in place of the black box driver, and run your tests
  5. If it does everything you need, you're done, if not rinse and repeat

Note that this is just a regular problem solving/scientific process. For instance, weather forecasters do the same thing - they observe the weather, test the current conditions against the model, which predicts what will happen over the next few days, and then compare the model's output to reality. When it doesn't match they go back and adjust the model.

This method is slightly safer (legally) than clean room reverse engineering, where someone actually decompiles the code, or disassembles the product, analyzes it thoroughly, and makes a model based on what they saw. Then the model (AND NOTHING ELSE) is passed to the developers replicating the functionality of the product. The engineer who took the original apart, however, cannot participate because he might bring copyrighted portions of the code/design and inadvertently put them in the new code.

If you never disassemble or decompile the product, though, you should be in legally safe waters - the only problem left is that of patents.

-Adam

like image 157
Adam Davis Avatar answered Feb 06 '26 13:02

Adam Davis


Usually by reverse engineering the code. There might be legal issues in some countries, though.

like image 32
Christian Lescuyer Avatar answered Feb 06 '26 11:02

Christian Lescuyer