You see this with some apps (I think ReVanced is a popular example?) and games occasionally, and I’ve never been clear on how they do it.

  • Vorpal@programming.dev
    link
    fedilink
    arrow-up
    3
    ·
    8 months ago

    With native code I mean machine code. That is indeed usually produced by C or C++, though there are some other options too, notably Rust and Go both also compile to native machine code rather than some sort of byte code. In contrast Java, C# and Python all compile to various byte code representations (that are usually much higher level and thus easier to figure out).

    You could of course also have hand written assembly code, but that is rare these days outside a few specific critical functions like memcpy or media encoders/decoders.

    I basically learnt as I went, googling things I needed to figure out. I was goal oriented in this case: I wanted to figure out how some particular drivers worked on a particular laptop so I could implement the same thing on Linux. I had heard of and used ghidra briefly before (during a capture the flag security competition at univerisity). I didn’t really want to use it here though to ensure I could be fully in the clear legally. So I focused on tracing instead.

    I did in fact write up what I found out. Be warned it is a bit on the vague side and mostly focuses on the results I found. I did plan a followup blog post with more details on the process as well as more things I figured out about the laptop, but never got around to it. In particular I did eventually figure out power monitoring and how to read the fan speed. Here is a link if you are interested to what I did write: https://vorpal.se/posts/2022/aug/21/reverse-engineering-acpi-functionality-on-a-toshiba-z830-ultrabook/

    • ALostInquirer@lemm.eeOP
      link
      fedilink
      arrow-up
      3
      ·
      8 months ago

      Thanks for the response, and the link! It’s interesting info, and good pointers to look to some of the existing tools from your OS and/or hardware providers for getting a start into whatever you’re working on.

      I think I might have made the mistake of thinking they wouldn’t be available and only bothering to look till after trying a lot of other indirect methods, so it’s a good reminder to check for any available official tooling and then supplement them with others where needed.