reproto 0.1.1__tar.gz → 0.1.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- reproto-0.1.3/.git/COMMIT_EDITMSG +29 -0
- reproto-0.1.3/.git/index +0 -0
- {reproto-0.1.1 → reproto-0.1.3}/.git/logs/HEAD +4 -0
- {reproto-0.1.1 → reproto-0.1.3}/.git/logs/refs/heads/iyue +4 -0
- {reproto-0.1.1 → reproto-0.1.3}/.git/logs/refs/remotes/gitlab/iyue +4 -0
- {reproto-0.1.1 → reproto-0.1.3}/.git/logs/refs/remotes/origin/iyue +4 -0
- reproto-0.1.3/.git/objects/00/81a7e1ec3251cc192ed2b73d5be897593fb872 +0 -0
- reproto-0.1.3/.git/objects/00/885cebf557ff261574deb93cb96449d06db01c +0 -0
- reproto-0.1.3/.git/objects/02/33f5b60263e5dc6d041c0b223a0724eb650faa +0 -0
- reproto-0.1.3/.git/objects/03/3fab23ccc74b707a31f6f37dc5df42c100aac0 +0 -0
- reproto-0.1.3/.git/objects/07/557fbd1d149ce51af8e98e8ca8590757a89dfa +0 -0
- reproto-0.1.3/.git/objects/07/b71df33935c14ddf99e3480c04eca4685028bc +0 -0
- reproto-0.1.3/.git/objects/0b/e20ea749c6ae1075ae98f9426e00b0a4a235af +0 -0
- reproto-0.1.3/.git/objects/12/f9cc4ad0b4f0af4f7bae379f281b2cebe7cc7f +0 -0
- reproto-0.1.3/.git/objects/13/5f50fea51c72f977f48d06a7584aba0f61e260 +0 -0
- reproto-0.1.3/.git/objects/1b/97584ebada3e93d7a2cfa4a1aae0b79c414d20 +0 -0
- reproto-0.1.3/.git/objects/1b/f0c1ad9586578e8332d061f7648dcb041ec063 +0 -0
- reproto-0.1.3/.git/objects/1e/46816d16e7c9db7575f1964403c3daa105be5c +0 -0
- reproto-0.1.3/.git/objects/24/d78e796570a8572a03bc1dd26608a7cfb506f8 +2 -0
- reproto-0.1.3/.git/objects/27/24208ca2442e8ab9b453d0eb230fa41243b270 +0 -0
- reproto-0.1.3/.git/objects/2a/fe93d8bcbeab9e136d8b6766604c32b3610314 +0 -0
- reproto-0.1.3/.git/objects/2d/2b812ca27c477f9e1b2c2706a5eb795ffcf8eb +0 -0
- reproto-0.1.3/.git/objects/2d/8a0da260a710010ae62be134ac1cea6ceecfd1 +0 -0
- reproto-0.1.3/.git/objects/2d/e8ecbb5ab5de1a032bef3f4606ce5fa7c6c4e8 +0 -0
- reproto-0.1.3/.git/objects/30/9347e5681d80bd3c7949882e27090dd9070d16 +0 -0
- reproto-0.1.3/.git/objects/33/633c9df669ff8cf38638717937a54990814268 +0 -0
- reproto-0.1.3/.git/objects/39/993e3600bf4ab82aa361b738ee97a108787450 +0 -0
- reproto-0.1.3/.git/objects/3b/ab663710fd6b43d9372313fced9043c4cb07dd +0 -0
- reproto-0.1.3/.git/objects/3e/b3f1273caf6814dfa69325ccbd9fd1340cf20a +0 -0
- reproto-0.1.3/.git/objects/3f/b8830f516342a0ae1cb7c34b65016827cb9570 +4 -0
- reproto-0.1.3/.git/objects/41/f40c22247de377be99e30784229f3f128508a2 +0 -0
- reproto-0.1.3/.git/objects/45/fbc774dedb61c7c205ea732f59a8dca8d13555 +3 -0
- reproto-0.1.3/.git/objects/48/cb11e75518a53be14146018214110986fade67 +0 -0
- reproto-0.1.3/.git/objects/4f/c6dc41f9c0a1a8e0eedd3ba49c43d78d0dbaba +0 -0
- reproto-0.1.3/.git/objects/59/4c23f158ccbd0a4288f9ea046d06160195afbf +0 -0
- reproto-0.1.3/.git/objects/5b/d4d87753b79e9157817f0c2e6964a731052854 +0 -0
- reproto-0.1.3/.git/objects/60/5cb6fd6a9f8894ad4d43a9b8e4785c1b3b0e17 +1 -0
- reproto-0.1.3/.git/objects/60/f61a0ea50091eac8d344c86597375cbdfc2785 +0 -0
- reproto-0.1.3/.git/objects/63/ddda2a403efaab3f4c6597b3a73a7b1147adb5 +0 -0
- reproto-0.1.3/.git/objects/65/0189fe083bd711e45d463b229a72be619abad2 +0 -0
- reproto-0.1.3/.git/objects/66/663db35bfec8ef5f1a5b1c840fde1bb62a0eb8 +0 -0
- reproto-0.1.3/.git/objects/66/6c5c5fc30435228116fa08c9d821bebaaa8926 +0 -0
- reproto-0.1.3/.git/objects/7c/ef0adfb28fd774bc78061c6f088e1ef9b050f6 +0 -0
- reproto-0.1.3/.git/objects/7d/dc129188a10c68ab756ef2cacb292c76920403 +0 -0
- reproto-0.1.3/.git/objects/80/17038e0f7818a44a742f77c86f4f88ed768fcd +0 -0
- reproto-0.1.3/.git/objects/87/c7db6c91c17a2df84b56d30bd24a0f6b9dbdd9 +0 -0
- reproto-0.1.3/.git/objects/8a/0ed0ed8886fbc823e8d2258fa6d18699e94e25 +0 -0
- reproto-0.1.3/.git/objects/8d/d857b3d0ab3f5cd2e9173d532ef86e30df8eda +0 -0
- reproto-0.1.3/.git/objects/92/984cf67b2c25d435468a8218daa26ba0466054 +0 -0
- reproto-0.1.3/.git/objects/93/140b54b1fb9116ee214afee8abf2c72a232487 +0 -0
- reproto-0.1.3/.git/objects/93/68f2c32f83054ab072b7c9686d8baa0bad7f12 +4 -0
- reproto-0.1.3/.git/objects/9a/5ad062be9f6e001f4237a598a08981aba731e6 +0 -0
- reproto-0.1.3/.git/objects/9e/23448ac58f907d9d123c32bdccedbb3d6741b5 +0 -0
- reproto-0.1.3/.git/objects/a0/d192999af7e2cbfa6a9ccd04d720a04e5a06d5 +0 -0
- reproto-0.1.3/.git/objects/a1/655e0cb323c300562f97dcc67d5a446908c8ec +0 -0
- reproto-0.1.3/.git/objects/a5/38cc82cef7c49500d3522220f0f60a9ebc1ae6 +0 -0
- reproto-0.1.3/.git/objects/a9/41063a7ce89c353fa24378ec7c3f12f08f9df8 +0 -0
- reproto-0.1.3/.git/objects/a9/cc7923c34a4c97c5711d6309672f41d46c612a +0 -0
- reproto-0.1.3/.git/objects/ac/5c983d949d8c928bb022badf801e45e75e785e +0 -0
- reproto-0.1.3/.git/objects/af/c9cc15629847447063e86a82b8b56abb4fc08f +0 -0
- reproto-0.1.3/.git/objects/b0/82ca2c1b5a03edff25da3c2b2b573d049877e9 +0 -0
- reproto-0.1.3/.git/objects/b1/db1c131cf32916028342c0037ce8eb57a8eb26 +0 -0
- reproto-0.1.3/.git/objects/b2/8334b94392b8af397a05ed702690fa6c9ab1ca +0 -0
- reproto-0.1.3/.git/objects/b8/7c89dcfce9e244ff5ef6a4bd394de12e8c8092 +0 -0
- reproto-0.1.3/.git/objects/bc/e98bdb71c8681acb460195fdcbbe5d36290976 +0 -0
- reproto-0.1.3/.git/objects/c1/87d5e047eca86cfd8d444be2987aaa3f62c4d6 +0 -0
- reproto-0.1.3/.git/objects/c4/c2da96b0bb8db2acb0e6615cf340c7e51af26b +0 -0
- reproto-0.1.3/.git/objects/c5/13a96e7584636b20b12280c029750d5bc3da1e +0 -0
- reproto-0.1.3/.git/objects/c7/c34283697bd3cce07db53953eda25ee7cc371e +0 -0
- reproto-0.1.3/.git/objects/c9/d60d922a04b87587cd67b0abf9fe5a7b7b76cd +0 -0
- reproto-0.1.3/.git/objects/d2/69b1676dbf32f76a7c405d0b4ea6a70ac3a626 +0 -0
- reproto-0.1.3/.git/objects/d3/5a918b1d9125ad35d60e08b181323df3246f1a +0 -0
- reproto-0.1.3/.git/objects/d8/eaf86669fbfd10497570c1784db1ed2696b588 +0 -0
- reproto-0.1.3/.git/objects/d9/3bd435c8c7ad4efb83dff04d5450fabb9e3faf +0 -0
- reproto-0.1.3/.git/objects/d9/90e6d553577d37ebce8b28b3015ecbde038b42 +0 -0
- reproto-0.1.3/.git/objects/da/13cc15bcd8ee39c81f36dee7f179a569ecab0b +0 -0
- reproto-0.1.3/.git/objects/e3/27755808d88c7ae5c06c229cf18bd0519646df +0 -0
- reproto-0.1.3/.git/objects/e4/4c1d8a90207ac082d8ab7ff0db66708e2ebc31 +0 -0
- reproto-0.1.3/.git/objects/e5/83e7c40be934d16a1fa2e973487b395d930f42 +0 -0
- reproto-0.1.3/.git/objects/ed/1ae867d5e63195845afc58d88c38ecbdea97df +0 -0
- reproto-0.1.3/.git/objects/ef/f44e5099da27f7fb1ef14bb34902ccf4250b89 +0 -0
- reproto-0.1.3/.git/objects/f5/1be495b96272fa2e47f30071aed35ac1f0dd2c +0 -0
- reproto-0.1.3/.git/objects/f8/ed595d25bd9d500e765a792c513878f7ddb1f7 +0 -0
- reproto-0.1.3/.git/objects/fd/0bc07dc3c95e6168ab6d367d9eca139ac1e539 +0 -0
- reproto-0.1.3/.git/refs/heads/iyue +1 -0
- reproto-0.1.3/.git/refs/remotes/gitlab/iyue +1 -0
- reproto-0.1.3/.git/refs/remotes/origin/iyue +1 -0
- {reproto-0.1.1 → reproto-0.1.3}/.gitignore +2 -1
- reproto-0.1.3/PKG-INFO +209 -0
- reproto-0.1.3/README.md +186 -0
- reproto-0.1.3/core/__init__.py +26 -0
- {reproto-0.1.1 → reproto-0.1.3}/core/info_decoder.py +520 -10
- {reproto-0.1.1 → reproto-0.1.3}/core/reconstructor.py +159 -21
- reproto-0.1.3/generation/__init__.py +20 -0
- {reproto-0.1.1 → reproto-0.1.3}/generation/proto_generator.py +62 -16
- reproto-0.1.3/include/google/protobuf/any.proto +162 -0
- reproto-0.1.3/include/google/protobuf/api.proto +207 -0
- reproto-0.1.3/include/google/protobuf/compiler/plugin.proto +180 -0
- reproto-0.1.3/include/google/protobuf/cpp_features.proto +67 -0
- reproto-0.1.3/include/google/protobuf/descriptor.proto +1417 -0
- reproto-0.1.3/include/google/protobuf/duration.proto +115 -0
- reproto-0.1.3/include/google/protobuf/empty.proto +51 -0
- reproto-0.1.3/include/google/protobuf/field_mask.proto +245 -0
- reproto-0.1.3/include/google/protobuf/go_features.proto +80 -0
- reproto-0.1.3/include/google/protobuf/java_features.proto +130 -0
- reproto-0.1.3/include/google/protobuf/source_context.proto +48 -0
- reproto-0.1.3/include/google/protobuf/struct.proto +95 -0
- reproto-0.1.3/include/google/protobuf/timestamp.proto +144 -0
- reproto-0.1.3/include/google/protobuf/type.proto +193 -0
- reproto-0.1.3/include/google/protobuf/wrappers.proto +157 -0
- {reproto-0.1.1 → reproto-0.1.3}/main.py +53 -56
- reproto-0.1.3/models/__init__.py +34 -0
- reproto-0.1.3/parsing/__init__.py +25 -0
- {reproto-0.1.1 → reproto-0.1.3}/parsing/enum_parser.py +10 -2
- {reproto-0.1.1 → reproto-0.1.3}/parsing/java_parser.py +302 -13
- {reproto-0.1.1 → reproto-0.1.3}/pyproject.toml +1 -1
- reproto-0.1.3/utils/__init__.py +43 -0
- reproto-0.1.3/utils/builtin_proto.py +269 -0
- {reproto-0.1.1 → reproto-0.1.3}/utils/file_cache.py +8 -1
- reproto-0.1.3/utils/report_utils.py +71 -0
- {reproto-0.1.1 → reproto-0.1.3}/utils/type_index.py +8 -1
- {reproto-0.1.1 → reproto-0.1.3}/utils/type_utils.py +39 -6
- reproto-0.1.1/.git/COMMIT_EDITMSG +0 -1
- reproto-0.1.1/.git/index +0 -0
- reproto-0.1.1/.git/refs/heads/iyue +0 -1
- reproto-0.1.1/.git/refs/remotes/gitlab/iyue +0 -1
- reproto-0.1.1/.git/refs/remotes/origin/iyue +0 -1
- reproto-0.1.1/PKG-INFO +0 -295
- reproto-0.1.1/README.md +0 -272
- reproto-0.1.1/core/__init__.py +0 -3
- reproto-0.1.1/core/bytecode_parser.py +0 -274
- reproto-0.1.1/generation/__init__.py +0 -3
- reproto-0.1.1/models/__init__.py +0 -27
- reproto-0.1.1/parsing/__init__.py +0 -3
- reproto-0.1.1/utils/__init__.py +0 -3
- {reproto-0.1.1 → reproto-0.1.3}/.git/FETCH_HEAD +0 -0
- {reproto-0.1.1 → reproto-0.1.3}/.git/HEAD +0 -0
- {reproto-0.1.1 → reproto-0.1.3}/.git/config +0 -0
- {reproto-0.1.1 → reproto-0.1.3}/.git/description +0 -0
- {reproto-0.1.1 → reproto-0.1.3}/.git/hooks/applypatch-msg.sample +0 -0
- {reproto-0.1.1 → reproto-0.1.3}/.git/hooks/commit-msg.sample +0 -0
- {reproto-0.1.1 → reproto-0.1.3}/.git/hooks/fsmonitor-watchman.sample +0 -0
- {reproto-0.1.1 → reproto-0.1.3}/.git/hooks/post-update.sample +0 -0
- {reproto-0.1.1 → reproto-0.1.3}/.git/hooks/pre-applypatch.sample +0 -0
- {reproto-0.1.1 → reproto-0.1.3}/.git/hooks/pre-commit.sample +0 -0
- {reproto-0.1.1 → reproto-0.1.3}/.git/hooks/pre-merge-commit.sample +0 -0
- {reproto-0.1.1 → reproto-0.1.3}/.git/hooks/pre-push.sample +0 -0
- {reproto-0.1.1 → reproto-0.1.3}/.git/hooks/pre-rebase.sample +0 -0
- {reproto-0.1.1 → reproto-0.1.3}/.git/hooks/pre-receive.sample +0 -0
- {reproto-0.1.1 → reproto-0.1.3}/.git/hooks/prepare-commit-msg.sample +0 -0
- {reproto-0.1.1 → reproto-0.1.3}/.git/hooks/push-to-checkout.sample +0 -0
- {reproto-0.1.1 → reproto-0.1.3}/.git/hooks/sendemail-validate.sample +0 -0
- {reproto-0.1.1 → reproto-0.1.3}/.git/hooks/update.sample +0 -0
- {reproto-0.1.1 → reproto-0.1.3}/.git/info/exclude +0 -0
- {reproto-0.1.1 → reproto-0.1.3}/.git/logs/refs/remotes/origin/HEAD +0 -0
- {reproto-0.1.1 → reproto-0.1.3}/.git/objects/09/a92517fe9eeb33d2fd7c979e01d163665f7abc +0 -0
- {reproto-0.1.1 → reproto-0.1.3}/.git/objects/0c/7b11b535a18f311aedadbe91e14fc9fe6b50d9 +0 -0
- {reproto-0.1.1 → reproto-0.1.3}/.git/objects/14/d323d58fb90c209a730c17e23fd82a6c735fc1 +0 -0
- {reproto-0.1.1 → reproto-0.1.3}/.git/objects/15/eb3f02479e633439ec83c143e703f8448043a1 +0 -0
- {reproto-0.1.1 → reproto-0.1.3}/.git/objects/18/89a4fb55eb3abdc528ce87f0cea039278c06fd +0 -0
- {reproto-0.1.1 → reproto-0.1.3}/.git/objects/1a/4435c23bdf5543e3270aa69361c9c68f205efb +0 -0
- {reproto-0.1.1 → reproto-0.1.3}/.git/objects/20/cf56ec106bcd66420dd000279f983571b918b6 +0 -0
- {reproto-0.1.1 → reproto-0.1.3}/.git/objects/21/55b64d52922c88527c102d62f23e5c2abbae79 +0 -0
- {reproto-0.1.1 → reproto-0.1.3}/.git/objects/23/bfbca38e177bcbb423dd782c35b19d127a5ab0 +0 -0
- {reproto-0.1.1 → reproto-0.1.3}/.git/objects/26/1f67f3b731b32f6d77de9dd7be2d61e2a14ace +0 -0
- {reproto-0.1.1 → reproto-0.1.3}/.git/objects/29/4708b82b343e04e7a6685f5cd1287f3d17f7a9 +0 -0
- {reproto-0.1.1 → reproto-0.1.3}/.git/objects/2b/64656ce2df6259c822733b03f26eb828fe9269 +0 -0
- {reproto-0.1.1 → reproto-0.1.3}/.git/objects/2c/fcddd7eebeb4eee0562dc384a79366bc7b04bb +0 -0
- {reproto-0.1.1 → reproto-0.1.3}/.git/objects/2d/a515dbb88d31400d5b84d41caf270e9309232d +0 -0
- {reproto-0.1.1 → reproto-0.1.3}/.git/objects/2e/2c1c42f5ac5d665cc672d3792078b756d9ab0e +0 -0
- {reproto-0.1.1 → reproto-0.1.3}/.git/objects/33/181441ab38eded005db356da89b54c7d29f452 +0 -0
- {reproto-0.1.1 → reproto-0.1.3}/.git/objects/33/52dfa8f5d9eb46cc98ea7ccecf02e4d9df95f7 +0 -0
- {reproto-0.1.1 → reproto-0.1.3}/.git/objects/34/192f0df5f5b694c881d086019eda349608d222 +0 -0
- {reproto-0.1.1 → reproto-0.1.3}/.git/objects/35/8bace20b731ff1bbb256d2a0158dfc84720978 +0 -0
- {reproto-0.1.1 → reproto-0.1.3}/.git/objects/38/907894973091f8e9b224a13fe596e1cb309cf5 +0 -0
- {reproto-0.1.1 → reproto-0.1.3}/.git/objects/3c/6f0120229cc2cd8123efbeb7f186eb0a485f29 +0 -0
- {reproto-0.1.1 → reproto-0.1.3}/.git/objects/3c/c3ca375694d43e35cdc88d4a5d067e510df427 +0 -0
- {reproto-0.1.1 → reproto-0.1.3}/.git/objects/3d/3cc6aab4eefed46c77dda27503bebcce88962c +0 -0
- {reproto-0.1.1 → reproto-0.1.3}/.git/objects/3e/d953d5ed2c66722045f5e39d068696a0853b4f +0 -0
- {reproto-0.1.1 → reproto-0.1.3}/.git/objects/40/84f4567d983a977c49598b7d886e46b13ff50b +0 -0
- {reproto-0.1.1 → reproto-0.1.3}/.git/objects/44/4af3a0d68ba81976f67c7b638c9b0db4640709 +0 -0
- {reproto-0.1.1 → reproto-0.1.3}/.git/objects/48/369b05749e384be9be58e5f943f3a0040d0f37 +0 -0
- {reproto-0.1.1 → reproto-0.1.3}/.git/objects/4b/43f5f577e1cdc35f8e06d178d8f5c892034061 +0 -0
- {reproto-0.1.1 → reproto-0.1.3}/.git/objects/4b/442fccf86631bf5196ee5b48ab8d58228ab59c +0 -0
- {reproto-0.1.1 → reproto-0.1.3}/.git/objects/4c/16984be6ef7b24d01604821e9728cb579acd69 +0 -0
- {reproto-0.1.1 → reproto-0.1.3}/.git/objects/4d/6d457bfabc4af842e5ddc2d56eb059d5dfdc9d +0 -0
- {reproto-0.1.1 → reproto-0.1.3}/.git/objects/55/6723fdd4f525eed41c52fa80defca3f0c81c47 +0 -0
- {reproto-0.1.1 → reproto-0.1.3}/.git/objects/56/79064a3138031d3a92d60aa629b82009fd0d1d +0 -0
- {reproto-0.1.1 → reproto-0.1.3}/.git/objects/58/0d8f872aa869e42ba608f64888b1349f8b3ff4 +0 -0
- {reproto-0.1.1 → reproto-0.1.3}/.git/objects/5a/11f9d70791e06a0570e01d3dcbbae39cde55db +0 -0
- {reproto-0.1.1 → reproto-0.1.3}/.git/objects/5c/715dcb05e32db7a7a3b030f07524bdd8a56849 +0 -0
- {reproto-0.1.1 → reproto-0.1.3}/.git/objects/5d/e2e9d536c2c0b78e8f9b3b61daa531a55332dc +0 -0
- {reproto-0.1.1 → reproto-0.1.3}/.git/objects/5e/9daac72a48ce60688ab2eeddcc3d9152329e20 +0 -0
- {reproto-0.1.1 → reproto-0.1.3}/.git/objects/65/a4f0ada7519f8b1e6a7c7e287541b8effde9fd +0 -0
- {reproto-0.1.1 → reproto-0.1.3}/.git/objects/66/7291e131d4769e7d028346a0cc7a0c05d500e5 +0 -0
- {reproto-0.1.1 → reproto-0.1.3}/.git/objects/67/f27f77274917580e687fd00ca18da0660215c1 +0 -0
- {reproto-0.1.1 → reproto-0.1.3}/.git/objects/67/f54a4a3ede6749acc7c718ad97a86634215b5e +0 -0
- {reproto-0.1.1 → reproto-0.1.3}/.git/objects/6f/90fcf9eacdc794313471f54279011a787c8760 +0 -0
- {reproto-0.1.1 → reproto-0.1.3}/.git/objects/70/ded03ee69f30850c938a8129be308cb30772d9 +0 -0
- {reproto-0.1.1 → reproto-0.1.3}/.git/objects/76/311aa8e59d780763e0d66787067cc5d9613a67 +0 -0
- {reproto-0.1.1 → reproto-0.1.3}/.git/objects/78/3e7e252c20e73e33615c703174766036546ff6 +0 -0
- {reproto-0.1.1 → reproto-0.1.3}/.git/objects/7c/00eec7ae9ef5f94fc337e5c8f9793a2a48810d +0 -0
- {reproto-0.1.1 → reproto-0.1.3}/.git/objects/7e/5935774ee7a85f2523427c9100f9c578ac172f +0 -0
- {reproto-0.1.1 → reproto-0.1.3}/.git/objects/8c/809c42c7ae13007fd885ee7bcffae7acf2c520 +0 -0
- {reproto-0.1.1 → reproto-0.1.3}/.git/objects/8d/44142ae2d6dbb59d4ebed8587bccd051e5766b +0 -0
- {reproto-0.1.1 → reproto-0.1.3}/.git/objects/8d/4a5767bef0c342f1660526f9671c0944922c40 +0 -0
- {reproto-0.1.1 → reproto-0.1.3}/.git/objects/92/c6018b4fb8e3b6c2f3f3054a56f2bfaca27470 +0 -0
- {reproto-0.1.1 → reproto-0.1.3}/.git/objects/94/ce01b61b90d1fb21d2d339fbeb22e821b6f413 +0 -0
- {reproto-0.1.1 → reproto-0.1.3}/.git/objects/95/295a15779ebefd563ec777c3d3cced7e8d0209 +0 -0
- {reproto-0.1.1 → reproto-0.1.3}/.git/objects/97/56fe0931216a7c40cbf250e1ab8a6dfd589f13 +0 -0
- {reproto-0.1.1 → reproto-0.1.3}/.git/objects/97/71dd4958faa94d3db229c129f6af35b508905a +0 -0
- {reproto-0.1.1 → reproto-0.1.3}/.git/objects/9a/e313cdf64cd82416c1238eb493e6396f799f12 +0 -0
- {reproto-0.1.1 → reproto-0.1.3}/.git/objects/9e/9978522bc8ca79133d7c11ef8ca3fe3c7eed0a +0 -0
- {reproto-0.1.1 → reproto-0.1.3}/.git/objects/9f/b57064e0c53ed80af8507acaab718a1e80184e +0 -0
- {reproto-0.1.1 → reproto-0.1.3}/.git/objects/a0/d630c3f6024b196d4ee933ab13a32905efdaaa +0 -0
- {reproto-0.1.1 → reproto-0.1.3}/.git/objects/a3/cedc28e563a1845a7860161b39b0fe58d5f0d3 +0 -0
- {reproto-0.1.1 → reproto-0.1.3}/.git/objects/a5/b7e4e1b63bfb65288f6553687aaabcfb4d51b1 +0 -0
- {reproto-0.1.1 → reproto-0.1.3}/.git/objects/ae/046e08176523e8a98dc7294436319f724db13c +0 -0
- {reproto-0.1.1 → reproto-0.1.3}/.git/objects/b0/7a43f0462bf25a8b1f4c0ca60c1b533dae1dde +0 -0
- {reproto-0.1.1 → reproto-0.1.3}/.git/objects/b3/28dc445ee33220db9359370fc0089a77174101 +0 -0
- {reproto-0.1.1 → reproto-0.1.3}/.git/objects/b3/d2b3037bede44e7e4d18dc99419f8c712c9c62 +0 -0
- {reproto-0.1.1 → reproto-0.1.3}/.git/objects/c3/93db4841dbbb8acf54e9af12b6705c9f5ecde9 +0 -0
- {reproto-0.1.1 → reproto-0.1.3}/.git/objects/c3/c8594874dd9ff9c21662fd06cac9b5baadbba0 +0 -0
- {reproto-0.1.1 → reproto-0.1.3}/.git/objects/c8/2a656fe6b5d479b327cdf5fe3bf60db987a2a2 +0 -0
- {reproto-0.1.1 → reproto-0.1.3}/.git/objects/c8/cb3bb9552dcf6a368a1418996c4b925db2d8ab +0 -0
- {reproto-0.1.1 → reproto-0.1.3}/.git/objects/c9/a6ca8f8efee4a5632e9a655ced29f1b708f35e +0 -0
- {reproto-0.1.1 → reproto-0.1.3}/.git/objects/c9/cdef9ab627b874ffe6455a47583a75bf16496d +0 -0
- {reproto-0.1.1 → reproto-0.1.3}/.git/objects/cd/2d6c229438c6b1c694b9392a85888d89ef49c1 +0 -0
- {reproto-0.1.1 → reproto-0.1.3}/.git/objects/d0/9c84ad2142a187bf26a1714b7041b62e404c8f +0 -0
- {reproto-0.1.1 → reproto-0.1.3}/.git/objects/d9/6d7456245232b3e159dcf691f11e51224c557a +0 -0
- {reproto-0.1.1 → reproto-0.1.3}/.git/objects/db/beedb30613f79ae3ff67df1428cf8ade223711 +0 -0
- {reproto-0.1.1 → reproto-0.1.3}/.git/objects/df/f8f64cee2b97df7d86f73207c5e690f98f0208 +0 -0
- {reproto-0.1.1 → reproto-0.1.3}/.git/objects/e2/b7433fbfbfac5bc800a962be2f4adbed145b42 +0 -0
- {reproto-0.1.1 → reproto-0.1.3}/.git/objects/e4/1e5aa2bc3074c2014d01ab1f603f69c327a83f +0 -0
- {reproto-0.1.1 → reproto-0.1.3}/.git/objects/e8/1433b6ad92206cdadbee1f474b4f99383314cb +0 -0
- {reproto-0.1.1 → reproto-0.1.3}/.git/objects/e8/2f42ea26b8bf4f0bc92c0648ac8f190f14226d +0 -0
- {reproto-0.1.1 → reproto-0.1.3}/.git/objects/e9/a15996cb55ac72aeb6611d26e8d22246589943 +0 -0
- {reproto-0.1.1 → reproto-0.1.3}/.git/objects/eb/528f06c622d54e411e9e05b3a200b4ac624a90 +0 -0
- {reproto-0.1.1 → reproto-0.1.3}/.git/objects/ed/fb5bbf938de738d1f658f80e23c675bb8b3fae +0 -0
- {reproto-0.1.1 → reproto-0.1.3}/.git/objects/ef/4844af55f7f64b8dd24b81b5a8322a8c80208e +0 -0
- {reproto-0.1.1 → reproto-0.1.3}/.git/objects/f2/2bfffda9fb6a7f37bed04b7c40c9466ef09454 +0 -0
- {reproto-0.1.1 → reproto-0.1.3}/.git/objects/f5/18c69a6e1bf3052b79da01502b2837ea58f0f4 +0 -0
- {reproto-0.1.1 → reproto-0.1.3}/.git/objects/f7/25a430eb3364460ba854dbc8809edc21dc6c70 +0 -0
- {reproto-0.1.1 → reproto-0.1.3}/.git/objects/fa/fc981b0d80d8d0323c04365785f66996ed5211 +0 -0
- {reproto-0.1.1 → reproto-0.1.3}/.git/objects/fc/e15b9dbffd9f37b1f2d46944ee2d0394df6565 +0 -0
- {reproto-0.1.1 → reproto-0.1.3}/.git/objects/fd/267d9de63212db235135fa6834f62572224fc6 +0 -0
- {reproto-0.1.1 → reproto-0.1.3}/.git/objects/pack/pack-289f7bb06603881c49190e6036de6390223baf77.idx +0 -0
- {reproto-0.1.1 → reproto-0.1.3}/.git/objects/pack/pack-289f7bb06603881c49190e6036de6390223baf77.pack +0 -0
- {reproto-0.1.1 → reproto-0.1.3}/.git/objects/pack/pack-289f7bb06603881c49190e6036de6390223baf77.rev +0 -0
- {reproto-0.1.1 → reproto-0.1.3}/.git/packed-refs +0 -0
- {reproto-0.1.1 → reproto-0.1.3}/.git/refs/remotes/origin/HEAD +0 -0
- {reproto-0.1.1 → reproto-0.1.3}/.python-version +0 -0
- {reproto-0.1.1 → reproto-0.1.3}/ARCHITECTURE.md +0 -0
- {reproto-0.1.1 → reproto-0.1.3}/models/message_definition.py +0 -0
- {reproto-0.1.1 → reproto-0.1.3}/requirements.txt +0 -0
- {reproto-0.1.1 → reproto-0.1.3}/utils/file_utils.py +0 -0
- {reproto-0.1.1 → reproto-0.1.3}/utils/logger.py +0 -0
@@ -0,0 +1,29 @@
|
|
1
|
+
feat: 实施智能导入系统并优化README
|
2
|
+
|
3
|
+
🚀 主要更新:
|
4
|
+
- 实施智能导入方案,同时支持开发环境和包安装环境
|
5
|
+
- 使用try/except块自动切换相对导入和绝对导入
|
6
|
+
- 解决ModuleNotFoundError导入错误问题
|
7
|
+
|
8
|
+
📝 代码改进:
|
9
|
+
- 所有模块文件添加智能导入语句
|
10
|
+
- 统一导入格式,提升代码兼容性
|
11
|
+
- 优化包结构,支持作为Python包使用
|
12
|
+
|
13
|
+
📖 文档优化:
|
14
|
+
- 简化README内容,去除冗余技术细节
|
15
|
+
- 突出核心使用方法和注意事项
|
16
|
+
- 特别强调内部类()的正确使用方法
|
17
|
+
- 移除特定应用相关内容,使用通用示例
|
18
|
+
|
19
|
+
🔧 技术特性:
|
20
|
+
- 开发环境: 使用绝对导入 (from core import)
|
21
|
+
- 包环境: 使用相对导入 (from .core import)
|
22
|
+
- 自动检测环境并选择合适的导入方式
|
23
|
+
- 完全向后兼容,无破坏性变更
|
24
|
+
|
25
|
+
✅ 测试验证:
|
26
|
+
- 开发环境测试通过 ✅
|
27
|
+
- 包安装环境测试通过 ✅
|
28
|
+
- 命令行工具正常运行 ✅
|
29
|
+
- 导入系统工作正常 ✅
|
reproto-0.1.3/.git/index
ADDED
Binary file
|
@@ -12,3 +12,7 @@ fce15b9dbffd9f37b1f2d46944ee2d0394df6565 70ded03ee69f30850c938a8129be308cb30772d
|
|
12
12
|
e41e5aa2bc3074c2014d01ab1f603f69c327a83f b07a43f0462bf25a8b1f4c0ca60c1b533dae1dde iyue <ys1231@126.com> 1751010729 +0800 commit: fix: 改进日志级别和错误处理
|
13
13
|
b07a43f0462bf25a8b1f4c0ca60c1b533dae1dde 3d3cc6aab4eefed46c77dda27503bebcce88962c iyue <ys1231@126.com> 1751011389 +0800 commit: release: v2.1.0 - 重大性能优化和功能增强
|
14
14
|
3d3cc6aab4eefed46c77dda27503bebcce88962c 7e5935774ee7a85f2523427c9100f9c578ac172f iyue <ys1231@126.com> 1751011558 +0800 commit: feat(build): update version
|
15
|
+
7e5935774ee7a85f2523427c9100f9c578ac172f 07b71df33935c14ddf99e3480c04eca4685028bc iyue <ys1231@126.com> 1751093937 +0800 commit: feat: 完善proto重构系统 - 硬编码移除与智能分析优化
|
16
|
+
07b71df33935c14ddf99e3480c04eca4685028bc 12f9cc4ad0b4f0af4f7bae379f281b2cebe7cc7f iyue <ys1231@126.com> 1751096494 +0800 commit: feat: 代码优化
|
17
|
+
12f9cc4ad0b4f0af4f7bae379f281b2cebe7cc7f 9368f2c32f83054ab072b7c9686d8baa0bad7f12 iyue <ys1231@126.com> 1751101028 +0800 commit: 重构: 将print_results_summary函数移动到utils.report_utils模块
|
18
|
+
9368f2c32f83054ab072b7c9686d8baa0bad7f12 2de8ecbb5ab5de1a032bef3f4606ce5fa7c6c4e8 iyue <ys1231@126.com> 1751103208 +0800 commit: feat: 实施智能导入系统并优化README
|
@@ -12,3 +12,7 @@ fce15b9dbffd9f37b1f2d46944ee2d0394df6565 70ded03ee69f30850c938a8129be308cb30772d
|
|
12
12
|
e41e5aa2bc3074c2014d01ab1f603f69c327a83f b07a43f0462bf25a8b1f4c0ca60c1b533dae1dde iyue <ys1231@126.com> 1751010729 +0800 commit: fix: 改进日志级别和错误处理
|
13
13
|
b07a43f0462bf25a8b1f4c0ca60c1b533dae1dde 3d3cc6aab4eefed46c77dda27503bebcce88962c iyue <ys1231@126.com> 1751011389 +0800 commit: release: v2.1.0 - 重大性能优化和功能增强
|
14
14
|
3d3cc6aab4eefed46c77dda27503bebcce88962c 7e5935774ee7a85f2523427c9100f9c578ac172f iyue <ys1231@126.com> 1751011558 +0800 commit: feat(build): update version
|
15
|
+
7e5935774ee7a85f2523427c9100f9c578ac172f 07b71df33935c14ddf99e3480c04eca4685028bc iyue <ys1231@126.com> 1751093937 +0800 commit: feat: 完善proto重构系统 - 硬编码移除与智能分析优化
|
16
|
+
07b71df33935c14ddf99e3480c04eca4685028bc 12f9cc4ad0b4f0af4f7bae379f281b2cebe7cc7f iyue <ys1231@126.com> 1751096494 +0800 commit: feat: 代码优化
|
17
|
+
12f9cc4ad0b4f0af4f7bae379f281b2cebe7cc7f 9368f2c32f83054ab072b7c9686d8baa0bad7f12 iyue <ys1231@126.com> 1751101028 +0800 commit: 重构: 将print_results_summary函数移动到utils.report_utils模块
|
18
|
+
9368f2c32f83054ab072b7c9686d8baa0bad7f12 2de8ecbb5ab5de1a032bef3f4606ce5fa7c6c4e8 iyue <ys1231@126.com> 1751103208 +0800 commit: feat: 实施智能导入系统并优化README
|
@@ -11,3 +11,7 @@ fce15b9dbffd9f37b1f2d46944ee2d0394df6565 70ded03ee69f30850c938a8129be308cb30772d
|
|
11
11
|
e41e5aa2bc3074c2014d01ab1f603f69c327a83f b07a43f0462bf25a8b1f4c0ca60c1b533dae1dde iyue <ys1231@126.com> 1751010753 +0800 update by push
|
12
12
|
b07a43f0462bf25a8b1f4c0ca60c1b533dae1dde 3d3cc6aab4eefed46c77dda27503bebcce88962c iyue <ys1231@126.com> 1751011478 +0800 update by push
|
13
13
|
3d3cc6aab4eefed46c77dda27503bebcce88962c 7e5935774ee7a85f2523427c9100f9c578ac172f iyue <ys1231@126.com> 1751011568 +0800 update by push
|
14
|
+
7e5935774ee7a85f2523427c9100f9c578ac172f 07b71df33935c14ddf99e3480c04eca4685028bc iyue <ys1231@126.com> 1751094024 +0800 update by push
|
15
|
+
07b71df33935c14ddf99e3480c04eca4685028bc 12f9cc4ad0b4f0af4f7bae379f281b2cebe7cc7f iyue <ys1231@126.com> 1751096510 +0800 update by push
|
16
|
+
12f9cc4ad0b4f0af4f7bae379f281b2cebe7cc7f 9368f2c32f83054ab072b7c9686d8baa0bad7f12 iyue <ys1231@126.com> 1751101083 +0800 update by push
|
17
|
+
9368f2c32f83054ab072b7c9686d8baa0bad7f12 2de8ecbb5ab5de1a032bef3f4606ce5fa7c6c4e8 iyue <ys1231@126.com> 1751103234 +0800 update by push
|
@@ -11,3 +11,7 @@ fce15b9dbffd9f37b1f2d46944ee2d0394df6565 70ded03ee69f30850c938a8129be308cb30772d
|
|
11
11
|
e41e5aa2bc3074c2014d01ab1f603f69c327a83f b07a43f0462bf25a8b1f4c0ca60c1b533dae1dde iyue <ys1231@126.com> 1751010741 +0800 update by push
|
12
12
|
b07a43f0462bf25a8b1f4c0ca60c1b533dae1dde 3d3cc6aab4eefed46c77dda27503bebcce88962c iyue <ys1231@126.com> 1751011447 +0800 update by push
|
13
13
|
3d3cc6aab4eefed46c77dda27503bebcce88962c 7e5935774ee7a85f2523427c9100f9c578ac172f iyue <ys1231@126.com> 1751011577 +0800 update by push
|
14
|
+
7e5935774ee7a85f2523427c9100f9c578ac172f 07b71df33935c14ddf99e3480c04eca4685028bc iyue <ys1231@126.com> 1751093982 +0800 update by push
|
15
|
+
07b71df33935c14ddf99e3480c04eca4685028bc 12f9cc4ad0b4f0af4f7bae379f281b2cebe7cc7f iyue <ys1231@126.com> 1751096519 +0800 update by push
|
16
|
+
12f9cc4ad0b4f0af4f7bae379f281b2cebe7cc7f 9368f2c32f83054ab072b7c9686d8baa0bad7f12 iyue <ys1231@126.com> 1751101033 +0800 update by push
|
17
|
+
9368f2c32f83054ab072b7c9686d8baa0bad7f12 2de8ecbb5ab5de1a032bef3f4606ce5fa7c6c4e8 iyue <ys1231@126.com> 1751103218 +0800 update by push
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1,2 @@
|
|
1
|
+
x�RMo�@��_�J�BB�#B=�!�I7�����k�܂��CSZ�Rh U��*����L�N���:vQT�=X�7o�̾��F����;w�% N;P>u{m8hJ8eh|�F�w볟e�}��Ɓ~���xo����}�:r�����G|�Q �;=+����o�Fţ�V��>ކo{�6��7���84~<��FP�S��W�~�Uߚ@�>�fN�J�2T�|�L #"�!!9
|
2
|
+
����ǯ�\����5'H���IH�t����R����0E�nʐ��m��B9�.�c YU�rF�<�a�G����M,�Lլ��#�b�����誑�3�x�)�5Y�X6)�`�"4���U���c$����]1�X�_P5��z��1*Ş��5�j0�b�֘%[��+4/��6Z�={@)�sϯ��7�vߔ�>Ȋ��?)B�'��<�@4t|�QĚYj��H��h�,���oA2���T�E+�L�����M
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1,4 @@
|
|
1
|
+
x�T[kA�y~Ű}�t�4�Rl�ZAAԷ�����vtwf��u��%T�(ZT�E�(�I�4�L6��l�U
|
2
|
+
�����\�;�v�ڴ�<r��bۋ,���u�����^�t�.FZ�3�d���6���Z�·y|d��1�˹U��k���X�E$�!�
|
3
|
+
�i#�qSD�{��LE�(<�c�mL7�Ӈ��|y\V9h������v�^O�[�퀨W�_d���p���:0�+P�(���9�#���ad*$�2
|
4
|
+
���*z$�<��߂�X;��lO6�Wjx����Y.SZ�I��:��na�e�iD���Q,{Oʵ�[eo���r�N���`mu�r
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1 @@
|
|
1
|
+
x��MO�0�=�S4p��4��#=y7ff�`��ћ�K�R_��| $��_���_�����=5�����i���3s��H��w̡Pj�F
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1,4 @@
|
|
1
|
+
x���n�@�Y�)�G�3�!�TU��6���d,,�Id��5"m�(�(mP�R���"�"RKC����o�oX���|�sY��=�ؼ'�UD4�5S�F���c�B4�,�s�4�K�R��
|
2
|
+
w�1�V������k9�k֦K��!�;�b�r���@�W5BL4���j�c[�#RV�2BJ��k ��%k��Y�
|
3
|
+
��z�U��0��F�O���r0I�fЍ�3����^��^2��ӡ�<P�s���r�_�To,o��a?[���dv$Ͼ��%v�{����^y2�����U=a۹O^��r�����h�Bg�^Ĺo����>�����"9�s:��Zq{����Z+n-�~�j��z�����˧Ys{}����:����WOe�Y��QO�r�
|
4
|
+
>�_�f/����`y������i���
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1 @@
|
|
1
|
+
2de8ecbb5ab5de1a032bef3f4606ce5fa7c6c4e8
|
@@ -0,0 +1 @@
|
|
1
|
+
2de8ecbb5ab5de1a032bef3f4606ce5fa7c6c4e8
|
@@ -0,0 +1 @@
|
|
1
|
+
2de8ecbb5ab5de1a032bef3f4606ce5fa7c6c4e8
|
reproto-0.1.3/PKG-INFO
ADDED
@@ -0,0 +1,209 @@
|
|
1
|
+
Metadata-Version: 2.3
|
2
|
+
Name: reproto
|
3
|
+
Version: 0.1.3
|
4
|
+
Summary: 一个强大的逆向工程工具, 能够从任何使用Google Protobuf Lite的Android应用中自动重构出完整的.proto文件结构.
|
5
|
+
License: Proprietary
|
6
|
+
Keywords: protobuf,reverse-engineering,android,jadx,proto
|
7
|
+
Author: iyue
|
8
|
+
Author-email: ys1231@126.com
|
9
|
+
Requires-Python: >=3.12,<4.0
|
10
|
+
Classifier: Development Status :: 4 - Beta
|
11
|
+
Classifier: Intended Audience :: Developers
|
12
|
+
Classifier: License :: Other/Proprietary License
|
13
|
+
Classifier: Programming Language :: Python :: 3
|
14
|
+
Classifier: Programming Language :: Python :: 3.12
|
15
|
+
Classifier: Programming Language :: Python :: 3.13
|
16
|
+
Classifier: Topic :: Software Development :: Code Generators
|
17
|
+
Classifier: Topic :: Software Development :: Disassemblers
|
18
|
+
Requires-Dist: loguru (>=0.7.3)
|
19
|
+
Project-URL: Homepage, https://github.com/ys1231/reproto
|
20
|
+
Project-URL: Repository, https://github.com/ys1231/reproto.git
|
21
|
+
Description-Content-Type: text/markdown
|
22
|
+
|
23
|
+
# Protobuf Reconstructor
|
24
|
+
|
25
|
+
🔧 **从JADX反编译的Java源码自动重构Protobuf .proto文件**
|
26
|
+
|
27
|
+
一个强大的逆向工程工具,能够从任何使用Google Protobuf Lite的Android应用中自动重构出完整的.proto文件结构。
|
28
|
+
|
29
|
+
## ✨ 特性
|
30
|
+
|
31
|
+
- 🎯 **精准解析**: 基于Google Protobuf Lite字节码的逆向工程
|
32
|
+
- 🔄 **递归依赖**: 自动发现和处理所有依赖的消息和枚举类型
|
33
|
+
- 📦 **完整支持**: 支持oneof、repeated、map、枚举等所有Protobuf特性
|
34
|
+
- 🌐 **通用性**: 适用于任何Android应用,无需硬编码映射
|
35
|
+
- 🧠 **智能推断**: 从Java源码直接读取类型信息,确保高准确性
|
36
|
+
- 📝 **标准输出**: 严格遵循Google Proto Style Guide
|
37
|
+
|
38
|
+
## 🛠️ 安装
|
39
|
+
|
40
|
+
### 方式一:拉取代码
|
41
|
+
```bash
|
42
|
+
# 克隆项目
|
43
|
+
git clone <repository_url>
|
44
|
+
cd reproto
|
45
|
+
|
46
|
+
# 安装依赖
|
47
|
+
pip install -r requirements.txt
|
48
|
+
```
|
49
|
+
|
50
|
+
### 方式二:pip安装
|
51
|
+
```bash
|
52
|
+
# 从本地构建安装
|
53
|
+
pip install .
|
54
|
+
|
55
|
+
# 在线安装
|
56
|
+
pip install reproto
|
57
|
+
```
|
58
|
+
|
59
|
+
## 📖 使用
|
60
|
+
|
61
|
+
### 命令行使用
|
62
|
+
```bash
|
63
|
+
# 基本用法 python main.py or 命令 reproto
|
64
|
+
reproto <java_sources_dir> <root_class> <output_dir> [--verbose]
|
65
|
+
|
66
|
+
# 示例:重构普通类
|
67
|
+
reproto ./out_jadx/sources com.example.messaging.v1.models.MessageData ./protos_generated
|
68
|
+
|
69
|
+
# 示例:重构内部类(注意:包含$的类名需要用单引号包裹)
|
70
|
+
reproto ./out_jadx/sources 'com.example.account.v1.Models$Onboarded' ./output
|
71
|
+
|
72
|
+
# 详细输出
|
73
|
+
reproto ./out_jadx/sources com.example.Model ./output --verbose
|
74
|
+
```
|
75
|
+
|
76
|
+
### 代码使用
|
77
|
+
```python
|
78
|
+
# 作为包使用
|
79
|
+
from core import ProtoReconstructor
|
80
|
+
from utils.logger import setup_logger
|
81
|
+
from pathlib import Path
|
82
|
+
|
83
|
+
# 初始化
|
84
|
+
setup_logger("./logs")
|
85
|
+
sources_dir = Path("./out_jadx/sources")
|
86
|
+
output_dir = Path("./protos_generated")
|
87
|
+
|
88
|
+
# 创建重构器并执行
|
89
|
+
reconstructor = ProtoReconstructor(sources_dir, output_dir)
|
90
|
+
results = reconstructor.reconstruct_from_root("com.example.Model")
|
91
|
+
|
92
|
+
# 查看结果
|
93
|
+
for class_name, definition in results.items():
|
94
|
+
print(f"生成: {class_name} -> {definition.proto_filename}")
|
95
|
+
```
|
96
|
+
|
97
|
+
### 参数说明
|
98
|
+
- `java_sources_dir`: JADX反编译的Java源码目录路径
|
99
|
+
- `root_class`: 要重构的根类完整类名
|
100
|
+
- `output_dir`: 生成的proto文件输出目录路径
|
101
|
+
- `--verbose`: 显示详细处理信息
|
102
|
+
|
103
|
+
## ⚠️ 注意事项
|
104
|
+
|
105
|
+
### 重要提醒
|
106
|
+
- **内部类命名**: 包含`$`符号的类名(如内部类)必须用**单引号包裹**
|
107
|
+
```bash
|
108
|
+
# ✅ 正确
|
109
|
+
reproto ./sources 'com.example.Outer$Inner' ./output
|
110
|
+
|
111
|
+
# ❌ 错误
|
112
|
+
reproto ./sources com.example.Outer$Inner ./output
|
113
|
+
```
|
114
|
+
|
115
|
+
### 使用建议
|
116
|
+
1. **JADX反编译**: 先使用JADX反编译APK文件
|
117
|
+
```bash
|
118
|
+
jadx -d out_jadx app.apk
|
119
|
+
```
|
120
|
+
|
121
|
+
2. **类名查找**: 在JADX GUI中找到目标Protobuf类的完整类名
|
122
|
+
|
123
|
+
3. **输出目录**: 确保输出目录有写入权限
|
124
|
+
|
125
|
+
4. **日志查看**: 使用`--verbose`参数查看详细处理过程
|
126
|
+
|
127
|
+
## 📊 输出示例
|
128
|
+
|
129
|
+
### 输入:Java源码
|
130
|
+
```java
|
131
|
+
public final class SearchResult extends GeneratedMessageLite {
|
132
|
+
private MapFieldLite<String, Contact> contacts_;
|
133
|
+
private Internal.ProtobufList<String> phoneNumbers_;
|
134
|
+
|
135
|
+
public static final int CONTACTS_FIELD_NUMBER = 1;
|
136
|
+
public static final int PHONE_NUMBERS_FIELD_NUMBER = 2;
|
137
|
+
}
|
138
|
+
```
|
139
|
+
|
140
|
+
### 输出:Proto文件
|
141
|
+
```protobuf
|
142
|
+
syntax = "proto3";
|
143
|
+
|
144
|
+
package com.example.search.v1.models;
|
145
|
+
|
146
|
+
option java_package = "com.example.search.v1.models";
|
147
|
+
option java_multiple_files = true;
|
148
|
+
|
149
|
+
message SearchResult {
|
150
|
+
map<string, Contact> contacts = 1;
|
151
|
+
repeated string phone_numbers = 2;
|
152
|
+
}
|
153
|
+
```
|
154
|
+
|
155
|
+
## 🛠️ 支持的特性
|
156
|
+
|
157
|
+
### Protobuf类型支持
|
158
|
+
- ✅ 基础类型:`string`, `int32`, `int64`, `bool`, `float`, `double`
|
159
|
+
- ✅ 消息类型:嵌套消息和引用消息
|
160
|
+
- ✅ 枚举类型:完整的枚举值解析
|
161
|
+
- ✅ 重复字段:`repeated` 类型
|
162
|
+
- ✅ 映射字段:`map<key, value>` 类型
|
163
|
+
- ✅ Oneof字段:互斥字段组
|
164
|
+
- ✅ Google Well-Known Types
|
165
|
+
|
166
|
+
### 特殊Java类型
|
167
|
+
- `MapFieldLite<K, V>` → `map<K, V>`
|
168
|
+
- `Internal.ProtobufList<T>` → `repeated T`
|
169
|
+
- `Internal.IntList` → `repeated enum` (枚举列表)
|
170
|
+
|
171
|
+
## 📁 项目结构
|
172
|
+
|
173
|
+
```
|
174
|
+
reproto/
|
175
|
+
├── main.py # 主程序入口
|
176
|
+
├── core/ # 核心组件
|
177
|
+
│ ├── reconstructor.py # 主协调器
|
178
|
+
│ └── info_decoder.py # 字节码解码器
|
179
|
+
├── parsing/ # 解析模块
|
180
|
+
│ ├── java_parser.py # Java文件解析器
|
181
|
+
│ └── enum_parser.py # 枚举解析器
|
182
|
+
├── generation/ # 生成模块
|
183
|
+
│ └── proto_generator.py # Proto文件生成器
|
184
|
+
├── models/ # 数据模型
|
185
|
+
│ └── message_definition.py # 消息和枚举定义
|
186
|
+
├── utils/ # 工具函数
|
187
|
+
│ ├── logger.py # 日志系统
|
188
|
+
│ ├── file_cache.py # 文件缓存系统
|
189
|
+
│ ├── type_utils.py # 类型处理工具
|
190
|
+
│ └── report_utils.py # 结果统计工具
|
191
|
+
└── include/ # Google Protobuf标准文件
|
192
|
+
└── google/protobuf/ # Well-Known Types
|
193
|
+
```
|
194
|
+
|
195
|
+
## 🔧 开发
|
196
|
+
|
197
|
+
```bash
|
198
|
+
# 使用Poetry管理依赖
|
199
|
+
poetry install
|
200
|
+
poetry shell
|
201
|
+
|
202
|
+
# 运行测试
|
203
|
+
reproto ../out_jadx/sources com.example.TestClass ../test_output --verbose
|
204
|
+
```
|
205
|
+
|
206
|
+
---
|
207
|
+
|
208
|
+
**🚀 立即开始重构你的Protobuf文件!**
|
209
|
+
|