These protos are generated from Resources.proto and Configuration.proto from the Android repo. They are found in the frameworks/base/tools/aapt2/ directory. To regenerate these if there are changes, run this command from the root of an Android checkout:

protoc --python_out=some_dir frameworks/base/tools/aapt2/Resources.proto

Then copy the resulting * files from some_dir here. To make sure is able to import, replace the “from” portion of the import statement with “from .” so it will instead be imported from the current directory.