title: Parsing Protocol-Buffers without .proto file
body: <p>I am reverse-engineering an Android app as part of a security project. My first step is to discover the protocol exchanged between the app and server. I have found that the protocol being used is protocol buffers. Given the nature of protobuf, the original .proto file is needed to be able to unserialize the protobuf-encoded message. Since I don't have that, I used <a href="https://sysdream.com/news/lab/2012-06-06-reverse-engineering-of-protobuf-based-applications/" rel="nofollow">protod</a> to disassemble the Android app and recover out any .proto files used.</p>
  
  <p>I have the Android app in a form where it is a bunch of .smali and .so files. Running protod against the .so files yields only one .proto file -- google/protobuf/descriptor.proto.</p>
  
  <p>I was under the impression that users of protocol buffers write their own .proto files, which might reference google/protobuf/descriptor.proto, but according to protod google/protobuf/descriptor.proto is the only protofile used by the app. Could this actually be possible and google/protobuf/descriptor.proto is enough for me to unserialize the messages between the app and server?</p>