gta4xl-common: Build protobuf 3.9.1-vendorcompat

* Required by RIL and widevine DRM
* Patch widevine to load full variant as there's no lite vendorcompat variant

Change-Id: I8d1fbc40bebf66abea342780b02cda68d64899b1
diff --git a/common.mk b/common.mk
index c86d3a8..27d8be6 100644
--- a/common.mk
+++ b/common.mk
@@ -235,6 +235,10 @@
 PRODUCT_COPY_FILES += \
     $(COMMON_PATH)/configs/power/powerhint.json:$(TARGET_COPY_OUT_VENDOR)/etc/powerhint.json
 
+# Protobuf
+PRODUCT_PACKAGES += \
+    libprotobuf-cpp-full-3.9.1-vendorcompat
+
 # Public Libraries
 PRODUCT_COPY_FILES += \
     $(COMMON_PATH)/configs/linker/public.libraries.txt:$(TARGET_COPY_OUT_VENDOR)/etc/public.libraries.txt
diff --git a/extract-files.sh b/extract-files.sh
index 9e3552a..4d9e82c 100755
--- a/extract-files.sh
+++ b/extract-files.sh
@@ -66,6 +66,9 @@
         vendor/lib*/libskeymaster4device.so)
             "${PATCHELF}" --replace-needed libcrypto.so libcrypto-v33.so "${2}"
             ;;
+        vendor/lib*/libwvhidl.so)
+            "${PATCHELF}" --replace-needed libprotobuf-cpp-lite-3.9.1.so libprotobuf-cpp-full-3.9.1.so "${2}"
+            ;;
     esac
 }
 
diff --git a/proprietary-files.txt b/proprietary-files.txt
index fd54965..0de6877 100644
--- a/proprietary-files.txt
+++ b/proprietary-files.txt
@@ -142,7 +142,7 @@
 -vendor/bin/hw/android.hardware.drm@1.4-service.widevine|60d0ed267f1468110a79c64a56af3c978f269f18
 vendor/etc/init/android.hardware.drm@1.4-service.widevine.rc|992f63e9700da29099e0590858a6becaaadb2976
 -vendor/etc/vintf/manifest/manifest_android.hardware.drm@1.4-service.widevine.xml|91d7c0996133556cb7f7c5d1b7e5d9e7f07b78b2
--vendor/lib/libwvhidl.so|fd87fdf9179762fbde4b457d7003f5cccd8cd23c
+-vendor/lib/libwvhidl.so|3246cb592658f2d8f23901ac8ddcc03b6176f06f
 
 ## Wi-Fi
 vendor/etc/init/wifi.rc