Method-based AOT compiler that can wrap Dalvik bytecode with JNI native code.
- Python3
- lxml python package.
pip3 install -U --user 'lxml>=4.3.0'
on Termux:
pkg install libxml2 libxslt
CFLAGS="-O0" pip install -U lxml
- JRE/JDK
- Android NDK
git clone https://github.com/Kirlif/d2c
- configure dcc.cfg with your NDK path
- changed Apktool for APKEditor
- cleaned androguard from useless parts and removed dependencies
- DEX file support: creates a ZIP archive of the built libraries and dex file
- skip constructors by default
- the application class is the loader ; if not defined or absent from dex, the custom loader is used
- --allow-init option: do not skip constructors
- --lib-name option: edit the library name, default: stub
- --output default value is « output.apk » for an APK else « output.zip » for a DEX
- --input only is required
- all options can be configured in dcc.cfg ; options passed to the command line have priority
- adjust APP_PLATFORM automatically
| Cli |
Config |
Default |
| -i, --input |
|
|
| -o, --output |
output |
output.(apk|zip) |
| -p, --obfuscate |
obfuscate |
false |
| -d, --dynamic-register |
dynamic_register |
false |
| -s, --skip-synthetic |
skip_synthetic |
false |
| -a, --allow-init |
allow_init |
false |
| -k, --force-keep-libs |
force_keep_libs |
false |
| -b, --no-build |
no_build |
false |
| -f, --filter |
filter |
filter.txt |
| -c, --custom-loader |
custom_loader |
amimo.dcc.DccApplication |
| -r, --force-custom-loader |
force_custom_loader |
false |
| -l, --lib-name |
lib_name |
stub |
| -e, --source-dir |
source_dir |
|
| -z, --project-archive |
project_archive |
project-source.zip |