protodec/README.md

30 lines
1.6 KiB
Markdown
Raw Normal View History

2023-04-20 22:01:53 +00:00
protodec
2023-04-24 04:10:40 +00:00
========
A tool to decompile protobuf parser/serializer classes compiled by [protoc](https://github.com/protocolbuffers/protobuf), from dotnet assemblies back into .proto definitions.
Usage
-----
```
Usage: protodec(.exe) <target_assembly_dir> <out_path> [target_assembly_name] [options]
2023-04-24 04:10:40 +00:00
Arguments:
target_assembly_dir A directory of assemblies to be loaded.
2023-04-24 04:10:40 +00:00
out_path An existing directory to output into individual files, otherwise output to a single file.
target_assembly_name The name of an assembly to parse. If omitted, all assemblies in the target_assembly_dir will be parsed.
2023-05-02 17:23:30 +00:00
Options:
--skip_enums Skip parsing enums and replace references to them with int32.
--skip_properties_without_protoc_attribute Skip properties that aren't decorated with `GeneratedCode("protoc")` when parsing
2023-05-02 17:23:30 +00:00
```
2023-04-24 04:10:40 +00:00
Limitations
-----------
- Integers are assumed to be (u)int32/64 as C# doesn't differentiate between them and sint32/64 and (s)fixed32/64.
### Decompiling from [Il2CppDumper](https://github.com/Perfare/Il2CppDumper) DummyDLLs
- The `Name` parameter of `OriginalNameAttribute` is not dumped. In this case the C# names are used after conforming them to protobuf conventions
2023-04-24 04:10:40 +00:00
- Dumped assemblies depend on strong-named core libs, however the ones dumped are not strong-named.
This interferes with loading and can be mitigated by copying the assemblies from your runtime into the target assembly directory.
I recommend using [Cpp2IL](https://github.com/SamboyCoding/Cpp2IL) instead of Il2CppDumper.
2023-04-24 04:10:40 +00:00
License
-------
This project is subject to the terms of the [Mozilla Public License, v. 2.0](./LICENSE).