Code Obfuscation - How to prevent code decipher?


#1

How could I prevent code decipher or ionic 1 and ionic 2 app?

I saw ionic enterprise framework offers this service. How could i make it too?


#2

it seems that ionic entreprise is not a free service and may charges you some money, i think you’ll have to do the obfuscation by yourself.


#3

if you want secure your ionic app from reverse engineering and fully
secured source code i recommended two steps.
First use Enable ProGuard into cordova/ionic project

  1. To implement this, open /platforms/android/project.properties and
    uncomment one line by removing the “#” at left:
    #proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-
    project.txt

2.copy proguard-custom.txt from ( https://github.com/greybax/cordova-plugin-
proguard/blob/master/proguard-custom.txt )
to
$android/assets/www/proguard-custom.txt Remove ‘#’
#-keepclassmembers class android.webkit.WebView {
# public *;
# }

  1. add snippet from to build.gradle
    Find buildTypes by ctrl + F and add like this
    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 use cordova-plugin-crypt-file
obfuscate or encrypt your code like build/main.js
1)Install cordova plugin add cordova-plugin-crypt-file
2)plugins/cordova-plugin-crypt-file/plugin.xml

//Using Refrence of cordova-plugin-crypt

Final step ionic cordova build android --release
Now extreact your apk or try APK decompiler
(http://www.javadecompilers.com/apk)

For remotely secur fetching and sending data use RxJS


#4

The advice in the previous post, while apparently well-intentioned, is pointless. Anything usable by your app, including its code, is available to anybody with a copy of the app binary. Do not burn secrets into your app.


#5

Hi
Anyone knew good alternative for Ionic iOS App obfuscation.
Any samples plugin etc


#6

I have the same problem for ios obfuscation, thanks