GrapheneOS-Archive / carriersettings-extractor

Converts the CarrierSettings binary protobuf files in Google Pixel device images to XML format compatible with AOSP
BSD 3-Clause "New" or "Revised" License
49 stars 12 forks source link

TypeError: __new__() got an unexpected keyword argument 'serialized_options' #3

Closed harut420 closed 2 years ago

harut420 commented 3 years ago

Traceback (most recent call last): File "./carriersettings_extractor.py", line 12, in from carriersettings_pb2 import CarrierList, CarrierSettings, \ File "/vendor/android-prepare-vendor/scripts/carriersettings-extractor/carriersettings_pb2.py", line 21, in serialized_pb=_b('\n\x15\x63\x61rriersettings.proto\"\x86\x02\n\x0b\x43\x61rrierList\x12&\n\x05\x65ntry\x18\x01 \x03(\x0b\x32\x17.CarrierList.CarrierMap\x12\x0f\n\x07version\x18\x02 \x02(\x03\x1a\xbd\x01\n\nCarrierMap\x12\x15\n\rcanonicalName\x18\x01 \x02(\t\x12\x34\n\tcarrierId\x18\x02 \x02(\x0b\x32!.CarrierList.CarrierMap.CarrierId\x1a\x62\n\tCarrierId\x12\x0e\n\x06mccMnc\x18\x01 \x02(\t\x12\r\n\x03spn\x18\x02 \x01(\tH\x00\x12\x0e\n\x04imsi\x18\x03 \x01(\tH\x00\x12\x0e\n\x04gid1\x18\x04 \x01(\tH\x00\x12\x0e\n\x04gid2\x18\x05 \x01(\tH\x00\x42\x06\n\x04mvno\"\xcd\r\n\x0f\x43\x61rrierSettings\x12\x15\n\rcanonicalName\x18\x01 \x02(\t\x12\x0f\n\x07version\x18\x02 \x01(\x03\x12*\n\x04\x61pns\x18\x03 \x01(\x0b\x32\x1c.CarrierSettings.CarrierApns\x12/\n\x07\x63onfigs\x18\x04 \x01(\x0b\x32\x1e.CarrierSettings.CarrierConfig\x12\x35\n\rvendorConfigs\x18\x05 \x01(\x0b\x32\x1e.CarrierSettings.VendorConfigs\x1a\xf9\x07\n\x0b\x43\x61rrierApns\x12\x31\n\x03\x61pn\x18\x02 \x03(\x0b\x32$.CarrierSettings.CarrierApns.ApnItem\x1a\xb6\x07\n\x07\x41pnItem\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x02(\t\x12:\n\x04type\x18\x03 \x03(\x0e\x32,.CarrierSettings.CarrierApns.ApnItem.ApnType\x12\x15\n\rbearerBitmask\x18\x04 \x01(\t\x12\x0e\n\x06server\x18\x05 \x01(\t\x12\r\n\x05proxy\x18\x06 \x01(\t\x12\x0c\n\x04port\x18\x07 \x01(\t\x12\x0c\n\x04user\x18\x08 \x01(\t\x12\x10\n\x08password\x18\t \x01(\t\x12\x10\n\x08\x61uthtype\x18\n \x01(\x05\x12\x0c\n\x04mmsc\x18\x0b \x01(\t\x12\x11\n\tmmscProxy\x18\x0c \x01(\t\x12\x15\n\rmmscProxyPort\x18\r \x01(\t\x12?\n\x08protocol\x18\x0e \x01(\x0e\x32-.CarrierSettings.CarrierApns.ApnItem.Protocol\x12\x46\n\x0froamingProtocol\x18\x0f \x01(\x0e\x32-.CarrierSettings.CarrierApns.ApnItem.Protocol\x12\x0b\n\x03mtu\x18\x10 \x01(\x05\x12\x11\n\tprofileId\x18\x11 \x01(\x05\x12\x10\n\x08maxConns\x18\x12 \x01(\x05\x12\x10\n\x08waitTime\x18\x13 \x01(\x05\x12\x14\n\x0cmaxConnsTime\x18\x14 \x01(\x05\x12\x16\n\x0e\x63\x61rrierEnabled\x18\x15 \x01(\x08\x12\x16\n\x0emodemCognitive\x18\x16 \x01(\x08\x12\x13\n\x0buserVisible\x18\x17 \x01(\x08\x12\x14\n\x0cuserEditable\x18\x18 \x01(\x08\x12\x10\n\x08\x61pnSetId\x18\x19 \x01(\x05\x12>\n\x0bskip464Xlat\x18\x1a \x01(\x0e\x32).CarrierSettings.CarrierApns.ApnItem.Xlat\"\x8b\x01\n\x07\x41pnType\x12\x07\n\x03\x41LL\x10\x00\x12\x0b\n\x07\x44\x45\x46\x41ULT\x10\x01\x12\x07\n\x03MMS\x10\x02\x12\x08\n\x04SUPL\x10\x03\x12\x07\n\x03\x44UN\x10\x04\x12\t\n\x05HIPRI\x10\x05\x12\x08\n\x04\x46OTA\x10\x06\x12\x07\n\x03IMS\x10\x07\x12\x07\n\x03\x43\x42S\x10\x08\x12\x06\n\x02IA\x10\t\x12\r\n\tEMERGENCY\x10\n\x12\x08\n\x04XCAP\x10\x0b\x12\x06\n\x02UT\x10\x0c\"1\n\x08Protocol\x12\x06\n\x02IP\x10\x00\x12\x08\n\x04IPV6\x10\x01\x12\n\n\x06IPV4V6\x10\x02\x12\x07\n\x03PPP\x10\x03\"S\n\x04Xlat\x12\x18\n\x14SKIP_464XLAT_DEFAULT\x10\x00\x12\x18\n\x14SKIP_464XLAT_DISABLE\x10\x01\x12\x17\n\x13SKIP_464XLAT_ENABLE\x10\x02\x1a\xf9\x02\n\rCarrierConfig\x12\x35\n\x06\x63onfig\x18\x02 \x03(\x0b\x32%.CarrierSettings.CarrierConfig.Config\x1a\xb0\x02\n\x06\x43onfig\x12\x0b\n\x03key\x18\x01 \x02(\t\x12\x13\n\ttextValue\x18\x02 \x01(\tH\x00\x12\x12\n\x08intValue\x18\x03 \x01(\x05H\x00\x12\x13\n\tlongValue\x18\x04 \x01(\x03H\x00\x12\x13\n\tboolValue\x18\x05 \x01(\x08H\x00\x12\x44\n\ttextArray\x18\x06 \x01(\x0b\x32/.CarrierSettings.CarrierConfig.Config.TextArrayH\x00\x12\x42\n\x08intArray\x18\x07 \x01(\x0b\x32..CarrierSettings.CarrierConfig.Config.IntArrayH\x00\x1a\x19\n\tTextArray\x12\x0c\n\x04item\x18\x01 \x03(\t\x1a\x18\n\x08IntArray\x12\x0c\n\x04item\x18\x01 \x03(\x05\x42\x07\n\x05value\x1a\x85\x01\n\rVendorConfigs\x12\x41\n\x06\x63lient\x18\x02 \x03(\x0b\x32\x31.CarrierSettings.VendorConfigs.VendorConfigClient\x1a\x31\n\x12VendorConfigClient\x12\x0c\n\x04name\x18\x01 \x02(\t\x12\r\n\x05value\x18\x02 \x02(\x0c\"J\n\x14MultiCarrierSettings\x12\x0f\n\x07version\x18\x01 \x02(\x03\x12!\n\x07setting\x18\x02 \x03(\x0b\x32\x10.CarrierSettings') TypeError: new() got an unexpected keyword argument 'serialized_options'

daradib commented 3 years ago

I think your python3-protobuf runtime is too old. Try upgrading python3-protobuf or regenerating with older protobuf-compiler (protoc) by running make clean && make. See protocolbuffers/protobuf#4716.