|
1 | 1 | Android String Obfuscator |
2 | 2 | ========================= |
3 | 3 |
|
4 | | -Hide strings easily with that lib (and script)! It uses AES/ECB/PKCS5Padding transformation to convert strings with your app's SHA1 fingerprint. |
| 4 | +Hide strings easily with that lib and plugin! It uses AES/ECB/PKCS5Padding transformation to convert strings with your app's SHA1 fingerprint. |
5 | 5 |
|
6 | | -Installation |
| 6 | +Gradle implementation |
7 | 7 | ------------ |
8 | 8 |
|
9 | | -Put [AndroidStringObfuscator.jar](https://github.com/efraespada/AndroidStringObfuscator/raw/master/AndroidStringObfuscator.jar) in the root of the project. |
10 | | - |
11 | | -#### Gradle |
| 9 | +root_project/build.gradle |
| 10 | +```groovy |
| 11 | +buildscript { |
| 12 | + |
| 13 | + ext { |
| 14 | + aso_sop_version = '0.4.1' |
| 15 | + } |
| 16 | + |
| 17 | + repositories { |
| 18 | + jcenter() |
| 19 | + } |
| 20 | + |
| 21 | + dependencies { |
| 22 | + classpath "com.efraespada:stringobfuscatorplugin:$aso_sop_version" |
| 23 | + } |
| 24 | + |
| 25 | +} |
| 26 | + |
| 27 | +apply plugin: com.efraespada.stringobfuscatorplugin.StringObfuscatorPlugin |
| 28 | +``` |
12 | 29 |
|
| 30 | +root_project/app/build.gradle |
13 | 31 | ```groovy |
14 | 32 | repositories { |
15 | 33 | jcenter() |
16 | | -} |
17 | | -
|
| 34 | +} |
| 35 | + |
18 | 36 | dependencies { |
19 | | - compile 'efraespada:androidstringobfuscator:0.4.1' |
20 | | -} |
21 | | -
|
22 | | -android.applicationVariants.all{ variant -> |
23 | | - variant.mergeResources.doLast{ |
24 | | - println ":initStringObfuscator:" + project.name + ":" + variant.dirName |
25 | | - javaexec { |
26 | | - main = "-jar"; |
27 | | - args = [ |
28 | | - "../AndroidStringObfuscator.jar", |
29 | | - project.name, |
30 | | - variant.dirName |
31 | | - ] |
32 | | - } |
33 | | - } |
| 37 | + implementation "efraespada:androidstringobfuscator:$aso_sop_version" |
34 | 38 | } |
35 | 39 | ``` |
36 | 40 |
|
@@ -98,37 +102,22 @@ Gradle Console Output Example |
98 | 102 | ----------------------------- |
99 | 103 | ``` |
100 | 104 | ... |
| 105 | +:sample:generateDebugResValues UP-TO-DATE |
| 106 | +:sample:generateDebugResources UP-TO-DATE |
101 | 107 | :sample:mergeDebugResources |
102 | | -:sample:initStringObfuscator |
103 | | -:sample:obfuscator-script - ----------------------------------------------------------------------------- |
104 | | -:sample:obfuscator-script - debug variant |
105 | | -:sample:obfuscator-script - SHA1 fingerprint: E1:28:0C:3E:65:91:2E:21:E9:98:2B:58:80:9A:25:3A:F6:88:7D:FF |
106 | | -:sample:obfuscator-script - [hello world!] - [D1862D9B434D08E..] |
107 | | -:sample:obfuscator-script - ----------------------------------------------------------------------------- |
108 | | -:sample:obfuscator-script - v 0.7 |
109 | | -:sample:processDebugManifest UP-TO-DATE |
| 108 | +:sample:debug:B8:DC:47:58:9B:5F:2C:21:45:C4:04:37:0E:56:53:DC:24:6B:2C:66 |
| 109 | +:sample:backupStringResources |
| 110 | + - values/strings.xml |
| 111 | +:sample:encryptStringResources |
| 112 | + - values/strings.xml |
| 113 | + [hello world!] - [A8590C43DA85D67..] |
| 114 | +:sample:mergeDebugResources UP-TO-DATE |
| 115 | +:sample:restoreStringResources |
| 116 | + - values/strings.xml |
| 117 | +:sample:createDebugCompatibleScreenManifests UP-TO-DATE |
110 | 118 | ... |
111 | 119 | ``` |
112 | 120 |
|
113 | | - |
114 | | -#### More information |
115 | | -If you haven't installed Gradle before you compile: |
116 | | -``` |
117 | | -... |
118 | | -:sample:obfuscator-script - Downloading https://services.gradle.org/distributions/gradle-2.14.1-all.zip |
119 | | -:sample:obfuscator-script - Unzipping /Users/efraespada/.gradle/wrapper/dists/gradle-2.14.1-all/8bnwg5hd3w55iofp58khbp6yv/gradle-2.14.1-all.zip to /Users/efraespada/.gradle/wrapper/dists/gradle-2.14.1-all/8bnwg5hd3w55iofp58khbp6yv |
120 | | -:sample:obfuscator-script - Set executable permissions for: /Users/efraespada/.gradle/wrapper/dists/gradle-2.14.1-all/8bnwg5hd3w55iofp58khbp6yv/gradle-2.14.1/bin/gradle |
121 | | -... |
122 | | -``` |
123 | | - |
124 | | -If `~/.android/debug.keystore` is missing, run your app to generate that file. For non default keystore file, check your project configuration. |
125 | | -``` |
126 | | -... |
127 | | -:sample:obfuscator-script - debug variant |
128 | | -:sample:obfuscator-script - Missing keystore |
129 | | -:sample:obfuscator-script - SHA1 fingerprint not detected; try params [module] [variant] [optional:sha1] |
130 | | -... |
131 | | -``` |
132 | 121 | License |
133 | 122 | ------- |
134 | 123 | Copyright 2017 Efraín Espada |
|
0 commit comments