frida-java-bridge 6.3.0 → 6.3.1

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.
@@ -2193,6 +2193,7 @@ class DexFile {
2193
2193
  const file = new File(filePath, 'w');
2194
2194
  file.write(buffer.buffer);
2195
2195
  file.close();
2196
+ setReadOnlyDex(filePath, factory);
2196
2197
 
2197
2198
  return new DexFile(filePath, fileValue, factory);
2198
2199
  }
@@ -2251,6 +2252,12 @@ function createTemporaryDex (factory) {
2251
2252
  return JFile.createTempFile(tempFileNaming.prefix, tempFileNaming.suffix + '.dex', cacheDirValue);
2252
2253
  }
2253
2254
 
2255
+ function setReadOnlyDex (filePath, factory) {
2256
+ const JFile = factory.use('java.io.File');
2257
+ const file = JFile.$new(filePath);
2258
+ file.setWritable(false, false);
2259
+ }
2260
+
2254
2261
  function getFactoryCache () {
2255
2262
  switch (factoryCache.state) {
2256
2263
  case 'empty': {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "frida-java-bridge",
3
- "version": "6.3.0",
3
+ "version": "6.3.1",
4
4
  "description": "Java runtime interop from Frida",
5
5
  "main": "index.js",
6
6
  "files": [