Kevin
Kevin

Reputation: 117

Is there any way to decompiler google protobuf binary file(.pb file) to .proto file

When I'm reversing an apk I got .pb file but not .proto file, is there any way to decompiler this file to .proto file or can I just generate java code from this .pb file ?

Upvotes: 6

Views: 4223

Answers (1)

Marc Gravell
Marc Gravell

Reputation: 1062855

If (as per comments) the file you have is the compiled descriptor set, then you can use protoc to generate any language (that it usually supports) from this; simply use the --descriptor_set_in=FILES option at the command line to specify your file as input (in place of FILES), and use --java_out=OUT_DIR (or whatever) to indicate the output language and location.

Upvotes: 4

Related Questions