Removing rn_dev_preference XML file from React Native release APK decompiled source

71 Views Asked by At

Description

we used the RN version 0.63.4 and somehow in the release build, we are getting rn_dev_preference XML in the build.

we need to remove the file for some security issues. please suggest a way to remove the file from the release build.

The path on decompile build: res/XML/rn_dev_preference The path

React Native Version 0.63.4

Output of npx react-native info click to view info

Steps to reproduce

create a build and just decompile the build you can see the file in res/xml/ folder

I'm using jadx apk-decompiler to decompile apk

below file need to remove from decompiled relese apk version

res/xml/rn_dev_preference.xml

To exclude the rn_dev_preferences.xml file from the release APK in React Native I tried below way by adding exclude path on release android block on android/app/build.gradle

android {
  // ...
  buildTypes {
    release {
      // ...
      packagingOptions {
        exclude 'res/xml/rn_dev_preferences.xml'
      }
    }
  }
}

But still there is rn_dev_preferences.xml present in release apk decompiled version and i'm expecting to remove it from res/XML/ path

0

There are 0 best solutions below