I recently started trying to learn basic reverse engineering and Golang. Decompiling Android apps written in C++ and Java/Kotlin seems easy as there are tons of documents and tools that enable you to do it with as little effort as possible, but I have not found a single explanation of what one could do to decompile APKs written in Golang.

I know that one generally shouldn't try to make one software temper-proof through security by obscurity, but this seems to me like a good measure to take in order to create a bigger burden to overcome for people trying to reverse engineer the inner workings of a program.

I took an app that I know was written in Golang and shoved it into jadx, however it just seemed to result in gibberish.

  • 2
    Go is a native compiled language like C / C++ and unlike Java / Kotlin. So there's no simple bytecode to decompile. You need to disassemble the machine code. Nov 20 at 17:05
  • 1
    Jadx is the wrong tool for a Golang based apps. I would try Ghidra or IDA Pro.
    – Robert
    Nov 20 at 18:21
  • 1
    Specifically recent IDA releases had numerous improvements aimed at binaries created with Go.
    – 0xC0000022L
    Nov 21 at 8:31
  • @0xC0000022L so i can just shove the classes.dex into IDA or Ghidra and it will work? Im gonna try it, never thought of that because i thought i had to extract the machine code from it somehow.
    – CJK
    Nov 21 at 19:25
  • 1
    The classes.dex contains the dalvik bytecode, which is what JADX is for. Using IDA/Ghidra on it is a poor choice of tool. Check for a libs folder in the APK. Those files are what you should be dropping into IDA/Ghidra.
    – Col-E
    Nov 22 at 1:52


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.