Disallow input file write access to jdigen.py

jdigen.py does not need write access to its input file.
This is especially important in environments where
the source is read-only.

Fixes: 158693674
Test: lunch aosp_arm64 && make -j out/soong/.intermediates/external/oj-libjdwp/jdi_generated_properties/gen/jdi.java
Change-Id: Ic41debc8760df2f6e9df4c959d013361d0606eae
diff --git a/etc/jdigen.py b/etc/jdigen.py
index a5ba1a5..d8ce8af 100644
--- a/etc/jdigen.py
+++ b/etc/jdigen.py
@@ -51,7 +51,7 @@
 INSTANCE_FORMAT = '{{ "{key}", "{value}" }},\n'
 
 VALUES = ""
-with open(args[1], 'r+') as inp:
+with open(args[1], 'r') as inp:
   for l in inp.readlines():
     key, value = l.split('=')
     VALUES += INSTANCE_FORMAT.format(key = key.strip(), value = value.strip())