I want to Securing a PhoneGap/Cordova Ionic Hybrid Mobile App from reverse engneering/decompile apk/ipa to source code.
What are the tools available for obfuscation? please suggest
I want to Securing a PhoneGap/Cordova Ionic Hybrid Mobile App from reverse engneering/decompile apk/ipa to source code.
What are the tools available for obfuscation? please suggest
If you want secure your Ionic app from reverse-engineering and fully secure your source code, I recommended two steps:
First use Enable ProGuard into your cordova/ionic project
#
at left:
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-
project.txtandroid/assets/www/proguard-custom.txt
and remove the '#' at the beginning of these lines:
#-keepclassmembers class android.webkit.WebView {
# public *;
# }
build.gradle
:
buildTypes {
debug {
minifyEnabled true
useProguard false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
Second, install cordova-plugin-crypt-file to obfuscate or encrypt your code:
cordova plugin add cordova-plugin-crypt-file
plugins/cordova-plugin-crypt-file/plugin.xml
:
//Using Reference of cordova-plugin-crypt
<cryptfiles>
<include>
<file regex="\.(htm|html|js|css)$" />
</include>
<exclude>
<file regex="exclude_file\.js$" />
</exclude>
</cryptfiles>
Final step:
ionic cordova build android --release
Now extract your apk or try an APK decompiler.
Finally Got the answer of my query:
Javascript Obfuscator converts the JavaScript source code into obfuscated and completely unreadable form, preventing it from analysing and theft. It's a 100% safe JavaScript minifier and the best JavaScript compressor. It supports all the hybrid mobile apps.
Use This Link and download the GUI to protect JavaScript source code into obfuscated code