77[ ![ Windows Build Status] ( https://github.com/ClaudiuGeorgiu/Obfuscapk/workflows/Windows/badge.svg )] ( https://github.com/ClaudiuGeorgiu/Obfuscapk/actions?query=workflow%3AWindows )
88[ ![ MacOS Build Status] ( https://github.com/ClaudiuGeorgiu/Obfuscapk/workflows/MacOS/badge.svg )] ( https://github.com/ClaudiuGeorgiu/Obfuscapk/actions?query=workflow%3AMacOS )
99[ ![ Docker Hub] ( https://img.shields.io/docker/cloud/build/claudiugeorgiu/obfuscapk )] ( https://hub.docker.com/r/claudiugeorgiu/obfuscapk )
10- [ ![ Python Version] ( https://img.shields.io/badge/Python-3.6 %2B-green.svg?logo=python&logoColor=white )] ( https://www.python.org/downloads/ )
10+ [ ![ Python Version] ( https://img.shields.io/badge/Python-3.7 %2B-green.svg?logo=python&logoColor=white )] ( https://www.python.org/downloads/ )
1111[ ![ License] ( https://img.shields.io/badge/license-MIT-blue.svg )] ( https://github.com/ClaudiuGeorgiu/Obfuscapk/blob/master/LICENSE )
1212
1313
@@ -20,6 +20,22 @@ obfuscated app retains the same functionality as the original one, but the diffe
2020under the hood sometimes make the new application very different from the original
2121(e.g., to signature-based antivirus software).
2222
23+ ### :new : Android App Bundle support :new :
24+
25+ Obfuscapk is adding support for
26+ [ Android App Bundles] ( https://developer.android.com/guide/app-bundle ) (aab files) by
27+ using [ BundleDecompiler] ( https://github.com/TamilanPeriyasamy/BundleDecompiler ) (see
28+ [ #121 ] ( https://github.com/ClaudiuGeorgiu/Obfuscapk/pull/121 ) ). In order to use this new
29+ feature, download the latest version of BundleDecompiler available from
30+ [ here] ( https://github.com/TamilanPeriyasamy/BundleDecompiler/tree/master/build/libs ) and
31+ save it as ` BundleDecompiler.jar ` in a directory included in ` PATH ` (e.g., in Ubuntu,
32+ ` /usr/local/bin ` or ` /usr/bin ` ).
33+
34+ ` NOTE: ` BundleDecompiler doesn't work on Windows yet, so app bundle obfuscation is not
35+ supported by Obfuscapk on Windows platform. Also, app bundle support is still in early
36+ development, so if you faced any problems or if you want to help us improve, please see
37+ [ contributing] ( #-contributing ) .
38+
2339
2440
2541## ❱ Publication
@@ -109,7 +125,7 @@ Docker version 19.03.0, build aeac949
109125#### Official Docker Hub image
110126
111127The [ official Obfuscapk Docker image] ( https://hub.docker.com/r/claudiugeorgiu/obfuscapk )
112- is available on Docker Hub (automatically built from this repository) :
128+ is available on Docker Hub:
113129
114130``` Shell
115131$ # Download the Docker image.
@@ -136,7 +152,7 @@ installed correctly:
136152
137153``` Shell
138154$ docker run --rm -it obfuscapk --help
139- usage: python3 -m obfuscapk.cli [-h] -o OBFUSCATOR [-w DIR] [-d OUT_APK ]
155+ usage: python3 -m obfuscapk.cli [-h] -o OBFUSCATOR [-w DIR] [-d OUT_APK_OR_AAB ]
140156...
141157```
142158
@@ -174,15 +190,22 @@ Copyright (C) 2009 The Android Open Source Project
174190...
175191```
176192
177- To install and use ` apktool ` you need a recent version of Java.
193+ To support app bundles obfuscation you need
194+ [ BundleDecompiler] ( https://github.com/TamilanPeriyasamy/BundleDecompiler ) , so download
195+ the latest available version from
196+ [ here] ( https://github.com/TamilanPeriyasamy/BundleDecompiler/tree/master/build/libs ) and
197+ save it as ` BundleDecompiler.jar ` in a directory included in ` PATH ` (e.g., in Ubuntu,
198+ ` /usr/local/bin ` or ` /usr/bin ` ).
199+
200+ To use BundleDecompiler and ` apktool ` you also need a recent version of Java.
178201` zipalign ` and ` apksigner ` are included in the Android SDK. The location of the
179202executables can also be specified through the following environment variables:
180- ` APKTOOL_PATH ` , ` APKSIGNER_PATH ` and ` ZIPALIGN_PATH ` (e.g., in Ubuntu, run
181- ` export APKTOOL_PATH=/custom/location/apktool ` before running Obfuscapk in the same
182- terminal).
203+ ` APKTOOL_PATH ` , ` BUNDLE_DECOMPILER_PATH ` , ` APKSIGNER_PATH ` and ` ZIPALIGN_PATH ` (e.g.,
204+ in Ubuntu, run ` export APKTOOL_PATH=/custom/location/apktool ` before running Obfuscapk
205+ in the same terminal).
183206
184207Apart from the above tools, the only requirement of this project is a working
185- ` Python 3 ` (at least ` 3.6 ` ) installation (along with its package manager ` pip ` ).
208+ ` Python 3 ` (at least ` 3.7 ` ) installation (along with its package manager ` pip ` ).
186209
187210#### Install
188211
@@ -209,7 +232,7 @@ $ cd src/
209232$ # The following command has to be executed always from Obfuscapk/src/ directory
210233$ # or by adding Obfuscapk/src/ directory to PYTHONPATH environment variable.
211234$ python3 -m obfuscapk.cli --help
212- usage: python3 -m obfuscapk.cli [-h] -o OBFUSCATOR [-w DIR] [-d OUT_APK ]
235+ usage: python3 -m obfuscapk.cli [-h] -o OBFUSCATOR [-w DIR] [-d OUT_APK_OR_AAB ]
213236...
214237```
215238
@@ -249,28 +272,29 @@ Let's start by looking at the help message:
249272
250273``` Shell
251274$ obfuscapk --help
252- obfuscapk [-h] -o OBFUSCATOR [-w DIR] [-d OUT_APK ] [-i] [-p] [-k VT_API_KEY]
275+ obfuscapk [-h] -o OBFUSCATOR [-w DIR] [-d OUT_APK_OR_AAB ] [-i] [-p] [-k VT_API_KEY]
253276 [--keystore-file KEYSTORE_FILE] [--keystore-password KEYSTORE_PASSWORD]
254277 [--key-alias KEY_ALIAS] [--key-password KEY_PASSWORD] [--use-aapt2]
255- < APK_FILE >
278+ < APK_OR_BUNDLE_FILE >
256279```
257280
258- There are two mandatory parameters: ` <APK_FILE > ` , the path (relative or absolute) to
259- the apk file to obfuscate and the list with the names of the obfuscation techniques to
260- apply (specified with a ` -o ` option that can be used multiple times, e.g.,
261- ` -o Rebuild -o NewAlignment -o NewSignature ` ). The other optional arguments are as
262- follows:
281+ There are two mandatory parameters: ` <APK_OR_BUNDLE_FILE > ` , the path (relative or
282+ absolute) to the apk or app bundle file to obfuscate and the list with the names of the
283+ obfuscation techniques to apply (specified with a ` -o ` option that can be used multiple
284+ times, e.g., ` -o Rebuild -o NewAlignment -o NewSignature ` ). The other optional arguments
285+ are as follows:
263286
264287* ` -w DIR ` is used to set the working directory where to save the intermediate files
265288(generated by ` apktool ` ). If not specified, a directory named ` obfuscation_working_dir `
266289is created in the same directory as the input application. This can be useful for
267290debugging purposes, but if it's not needed it can be set to a temporary directory
268291(e.g., ` -w /tmp/ ` ).
269292
270- * ` -d OUT_APK ` is used to set the path of the destination file: the apk file generated
271- by the obfuscation process (e.g., ` -d /home/user/Desktop/obfuscated.apk ` ). If not
272- specified, the final obfuscated file will be saved inside the working directory.
273- Note: existing files will be overwritten without any warning.
293+ * ` -d OUT_APK_OR_AAB ` is used to set the path of the destination file: the apk file
294+ generated by the obfuscation process (e.g., ` -d /home/user/Desktop/obfuscated.apk ` or
295+ ` -d /home/user/Desktop/obfuscated.aab ` ). If not specified, the final obfuscated file
296+ will be saved inside the working directory. Note: existing files will be overwritten
297+ without any warning.
274298
275299* ` -i ` is a flag for ignoring known third party libraries during the obfuscation
276300process, to use fewer resources, to increase performances and to reduce the risk of
@@ -302,8 +326,8 @@ shown in the example below:
302326 com.mycompany.dontobfuscate
303327 com.mycompany.ignore
304328 ...
305- ```
306- * ` --use-aapt2 ` is a flag for use aapt2 option to rebuild app when using apktool.
329+ ```
330+ * ` --use-aapt2 ` is a flag for using aapt2 option when rebuilding an app with ` apktool ` .
307331
308332Let's consider now a simple working example to see how Obfuscapk works:
309333
0 commit comments