Giter VIP home page Giter VIP logo

pogoprotos's Introduction

POGOProtos Python script Discord Sponsor Donate

alt text The contents of this repo are a proof of concept and are for educational use onlyalt text


This repository contains the ProtoBuf .proto files needed to decode the PokémonGo RPC.


Versioning

We are following semantic versioning for POGOProtos-Private. Every version will be mapped to their current PokémonGo version.

Version Base Notes Extra
2.56.6 v0.241.0 Proto2 Compilable (Mixed) Protocol Buffers v3.21.1
2.56.6 v0.241.0 Proto3 Compilable (Mixed) Protocol Buffers v3.21.1
2.54.1 v0.205.x last 100% clean (/base/v0.205.x.proto) Protocol Buffers v3.15.8

Addons

Additional resources as *.json files Source Status
v2_GAME_MASTER.json Root BAD
GAME_MASTER.json Root BAD
ASSET_DIGEST.json Root BAD
Additional resources as *.txt files (Decode mode by script) Source Status
v2_GAME_MASTER.txt Root BAD
ASSET_DIGEST.txt Root BAD
Additional resources as *.xml files Source Status
v2_GAME_MASTER.xml Root BAD
ASSET_DIGEST.xml Root BAD

Usage

If you want to figure out the current version in an automated system, use this file. .current-version Note: This file will contain pre-release versions too.

usage: compile_base.py [-h] [-gm GENERATE_GAME_MASTER]
                       [-ga GENERATE_ASSET_DIGEST] [-l LANG] [-v VERSION]
                       [-o OUT_PATH] [-m] [-g] [-b] [-k] [-gf]

optional arguments:
  -h, --help            show this help message and exit
  -gm GENERATE_GAME_MASTER, --generate_game_master GENERATE_GAME_MASTER
                        Generates v2_GAME_MASTER.txt form PATH/v2_GAME_MASTER.
  -ga GENERATE_ASSET_DIGEST, --generate_asset_digest GENERATE_ASSET_DIGEST
                        Generates ASSET_DIGEST.txt form PATH/ASSET_DIGEST.
  -l LANG, --lang LANG  Language to produce proto single file.
  -v VERSION, --version VERSION
                        Set version out ex:. (0.205.x)
  -o OUT_PATH, --out_path OUT_PATH
                        Output path for proto single file.
  -m, --java_multiple_files
                        Write each message to a separate .java file.
  -g, --generate_only   Generates only proto compilable.
  -b, --generate_new_base
                        Generates new proto base refs.
  -k, --keep_proto_file
                        Do not remove .proto file after compiling.
  -gf, --generate_proto_files
                        Generates base/last_files/*.proto.
                        

Preparation

Current recommended protoc version: "Protocol Buffers v3.21.1". You can find download links here.

Windows

Be sure to add protoc to your environmental path.

*nix

Ensure that you have the newest version of protoc installed.

OS X

Use homebrew to install protobuf with brew install --devel protobuf.

Compilation

The compilation creates output specifically for the target language, i.e. respecting naming conventions, etc.
This is an example of how the generated code will be organized:

Compile vx.xxx.x.proto depending on the version chosen, or uses -v 0.205.x (or other version present into base folder >= 0.175.x)
  • Note: the *.desc file is auto created in this function
python compile_base.py -l cpp -k -v base:
 - vbase.proto -> out/single_file/cpp/POGOProtos.Rpc.desc
 -                -> out/single_file/cpp/POGOProtos.Rpc.pb.cc
 -                -> out/single_file/cpp/POGOProtos.Rpc.pb.h
 -                -> out/single_file/cpp/POGOProtos.Rpc.proto
Same similar outputs up but others langs:
  python compile_base.py -l csharp -k
  python compile_base.py -l java -k
  python compile_base.py -l js -k
  python compile_base.py -l python -k
  python compile_base.py -l php -k
  python compile_base.py -l objc -k
  python compile_base.py -l ruby -k
  * python compile_base.py -l swift -k
  * python compile_base.py -l go -k
  * python compile_base.py -l lua -k
  * python compile_base.py -l dart -k

* = Needs plugins

Decode Game Master or Asset Digest:
  python compile_base.py -gm [./v2_GAME_MASTER] (out as same bin name *.txt)
  python compile_base.py -ga [./ASSET_DIGEST] (out as same bin name *.txt)

Initial

pogoprotos's People

Contributors

123flo321 avatar aeonlucid avatar alucas avatar celandro avatar cyraxx avatar daangroot avatar dmadisetti avatar fabio1988 avatar fkloft avatar furtif avatar gegy avatar grover-c13 avatar ibotpeaches avatar igio90 avatar kvey avatar laverdet avatar lennix avatar lord-haji avatar mjmjelde avatar nicoschmitt avatar noctem avatar nostrademous avatar rastapasta avatar relrod avatar rubenvereecken avatar shargon avatar spl3en avatar wallycz avatar zechrales avatar zeevallin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pogoprotos's Issues

Dump enums in Rpc only and remove the unnecessary prefix in enum names

Currently base.proto contains a lot of enums that are not actually part of Holoholo.Rpc, which results in name collisions. For example, CameraZoomInLevel is under namespace Niantic.Holoholo.Combat.Stage and not part of the Rpc namespace. Currently to get around this, we append a prefix to every enum value, which is less than ideal to say the least.

One possible way to resolve this is to dump a root enum only if it is referenced by some IMessage.

I would love to contribute but unfortunately as far as I am concerned the tools for generating the proto are private.

known errors

Some versions in base / vx.xxx.x.proto are not compilable

Advice use latest...

And do not ask what is not the most current is because you cannot do everything. The old versions are useless

Need help

I need someone to modify https://github.com/Furtif/POGOProtos/blob/master/compile_base.py#L32 ie make a check by tag number and compare change the name to the one used in // ignored_oneof

diffs here: e512ee9

  • You can do by number search and by number change the name xxxxxxxx to the one used in OneOfType of one of the names of the same
  • This translates to 1/20 of the content
  • For the moment they are in mode //ignored_oneof this right obfuscated

Invalid UTF-8 data

Got this error when using "GetGymDetailsResponse"

String field 'pogoprotos.data.PokemonData.deployed_fort_id' contains invalid UTF-8 data when parsing a protocol buffer. Use the 'bytes' type if you intend to send raw bytes.

Anyone has any idea what went wrong?

Edit:
Sorry, close it. Use the wrong one

pogoprotos-java

Ive looked at what you are doing and I'm so glad someone picked up for the dead repo.

I've been updating https://github.com/celandro/pogoprotos-java for use on https://www.pokebattler.com and https://github.com/BrunnerLivio/pokemongo-game-master for json generation which is used on multiple sites.

I believe that these repos should be linked in the readme (per the pull request on the other repo). The pogoprotos-java might make a good dependency for your java api if you think a minor refactor would be worth it.

fixed64 vs (u)int64

yo, not sure if u even check issues.

anyway, i sometimes crash when decoding a GetHoloInventoryResponse, failing with "throw Error("invalid wire type " + wireType + " at offset " + this.pos);"

im using node.js todo the protobuf stuff.

After debugging it down, i found that i fails on EggIncubator decode, when it tries to read the pokemon id as fixed64 as you have here:

https://github.com/Furtif/POGOProtos/blob/master/src/POGOProtos/Inventory/EggIncubator.proto

The pokemon_id in my case is
uint64: Long { low: -49685929, high: -682833928, unsigned: true } -> 15513994688595614295n
int64: Long { low: -49685929, high: -682833928, unsigned: false } -> -2932749385113937321n

After digging around, i found that many forks in the past also changed it back and forth between fixed64, uint64 or int64.

You changed that somewhere back in 2019, so my question is to why did u change it?
Since for me it seems int64 is correct?

Also if that one is wrong, i guess all the others should be int64 then too, and not fixed64? Or any Idea where the actual problem is, in case fixed64 is correct?

Error: duplicate name 'GenerateGmapSignedUrlOutProto' in Namespace .DumpProtos

Seeing duplicate object when parsing the proto file. I get this on raw_protos.proto but not in base.proto. Just started with this version.

[
  Error: duplicate name 'GenerateGmapSignedUrlOutProto' in Namespace .DumpProtos
      at Namespace.add (...\node_modules\protobufjs\src\namespace.js:239:23)      
      at parseType (...\node_modules\protobufjs\src\parse.js:344:16)
      at parseCommon (...\node_modules\protobufjs\src\parse.js:259:17)
      at parse ...\node_modules\protobufjs\src\parse.js:731:21)
      at process (...\node_modules\protobufjs\src\root.js:117:30)
      at ...\node_modules\protobufjs\src\root.js:184:17
      at fetchReadFileCallback ...\Pokebot\node_modules\@protobufjs\fetch\index.js:51:19)
      at FSReqCallback.readFileAfterClose [as oncomplete] (internal/fs/read_file_context.js:63:3)
]

Contact

Hello Furtif,

I have some questions regarding POGOProtos and POGO itself. Is there any way I could contact you directly?
Discord or Telegram?

Hoping to hear back from you :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.