-2

I have a Freestyle Libre 2 blood sugar meter, and it uses a driver to upload results to the website. Unfortunately this driver is written in C++ and only compiled for Windows and Mac OS. I use Linux and have tried installing in a virtual machine and also using layers such as Wine. I think I am left with only one option, recompiling for Linux.

It is a USB driver for communicating with the reader, to gather and upload the data to their website.

Is there a way to extract C++ code from the .exe file and then recompile it to Linux after making any necessary changes to the code?

figgyfarts
  • 126
  • 8
  • You might want to ask on [Super User](https://superuser.com) or on a forum for your specific VM (Virtual Box I guess?) about how to set up the USB sharing to be able to connect the device to your VM. – Some programmer dude Jan 09 '22 at 14:44
  • 2
    Suggested reading: [tag info for decompiling](https://stackoverflow.com/tags/decompiling/info) (especially "The output is generally not any easier to analyze than the original assembler") and [Is it possible to decompile a C++ executable file](https://stackoverflow.com/questions/50145627/) (duplicate?) – JaMiT Jan 09 '22 at 15:01
  • @some-programmer-dude I never thought about doing that actually! I might follow wcyat 's solution and reverse engineer it. Will learn some new things at the same time! – figgyfarts Jan 09 '22 at 16:33

1 Answers1

0

No. You cannot extract the original source code from a compiled binary. You can reverse engineer it, though.

wcyat
  • 67
  • 1
  • 2
  • 11
  • 1
    Thank you, I will try and reverse engineer it and will end up learning lots in the process! :) – figgyfarts Jan 09 '22 at 16:33
  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Jan 09 '22 at 22:17