amimo / dcc

DCC (Dex-to-C Compiler) is method-based aot compiler that can translate DEX code to C code.
Apache License 2.0
1.12k stars 392 forks source link

直接使用python 脚本加固报错 #53

Closed liu1912009189 closed 2 years ago

liu1912009189 commented 2 years ago

确认已经配置号环境,报错信息如下: PS D:\Android_project\dcc\dcc> python dcc.py .\4.6.0.0-mg_debug.apk -o .\4.6.0.0-mg_debug_encrpted.apk [INFO ] androguard.axml: Namespace mapping (109, 513) already seen! This is usually not a problem but could indicate packers or broken AXML compilers. [INFO ] androguard.axml: Namespace mapping (109, 513) already seen! This is usually not a problem but could indicate packers or broken AXML compilers. [INFO ] androguard.axml: Namespace mapping (109, 513) already seen! This is usually not a problem but could indicate packers or broken AXML compilers. [INFO ] androguard.axml: Namespace mapping (109, 513) already seen! This is usually not a problem but could indicate packers or broken AXML compilers. [INFO ] androguard.axml: Namespace mapping (109, 513) already seen! This is usually not a problem but could indicate packers or broken AXML compilers. [INFO ] androguard.axml: Namespace mapping (109, 513) already seen! This is usually not a problem but could indicate packers or broken AXML compilers. [INFO ] androguard.axml: Namespace mapping (109, 513) already seen! This is usually not a problem but could indicate packers or broken AXML compilers. [INFO ] androguard.axml: Namespace mapping (109, 513) already seen! This is usually not a problem but could indicate packers or broken AXML compilers. [INFO ] androguard.axml: Namespace mapping (109, 513) already seen! This is usually not a problem but could indicate packers or broken AXML compilers. [INFO ] androguard.axml: Namespace mapping (109, 513) already seen! This is usually not a problem but could indicate packers or broken AXML compilers. [INFO ] androguard.axml: Namespace mapping (109, 513) already seen! This is usually not a problem but could indicate packers or broken AXML compilers. [INFO ] androguard.axml: Namespace mapping (109, 513) already seen! This is usually not a problem but could indicate packers or broken AXML compilers. [INFO ] androguard.axml: Namespace mapping (109, 513) already seen! This is usually not a problem but could indicate packers or broken AXML compilers. [INFO ] androguard.axml: Namespace mapping (109, 513) already seen! This is usually not a problem but could indicate packers or broken AXML compilers. [INFO ] androguard.axml: Namespace mapping (109, 513) already seen! This is usually not a problem but could indicate packers or broken AXML compilers. [INFO ] androguard.axml: Namespace mapping (109, 513) already seen! This is usually not a problem but could indicate packers or broken AXML compilers. [INFO ] androguard.axml: Namespace mapping (109, 513) already seen! This is usually not a problem but could indicate packers or broken AXML compilers. [INFO ] androguard.axml: Namespace mapping (109, 513) already seen! This is usually not a problem but could indicate packers or broken AXML compilers. [INFO ] androguard.axml: Namespace mapping (109, 513) already seen! This is usually not a problem but could indicate packers or broken AXML compilers. [INFO ] androguard.axml: Namespace mapping (109, 513) already seen! This is usually not a problem but could indicate packers or broken AXML compilers. [INFO ] androguard.axml: Namespace mapping (109, 513) already seen! This is usually not a problem but could indicate packers or broken AXML compilers. [INFO ] androguard.axml: Namespace mapping (109, 513) already seen! This is usually not a problem but could indicate packers or broken AXML compilers. [INFO ] androguard.axml: Namespace mapping (109, 513) already seen! This is usually not a problem but could indicate packers or broken AXML compilers. [INFO ] androguard.axml: Namespace mapping (109, 513) already seen! This is usually not a problem but could indicate packers or broken AXML compilers. [INFO ] androguard.axml: Namespace mapping (109, 513) already seen! This is usually not a problem but could indicate packers or broken AXML compilers. [INFO ] androguard.axml: Namespace mapping (109, 513) already seen! This is usually not a problem but could indicate packers or broken AXML compilers. [INFO ] androguard.axml: Namespace mapping (109, 513) already seen! This is usually not a problem but could indicate packers or broken AXML compilers. [INFO ] androguard.axml: Namespace mapping (109, 513) already seen! This is usually not a problem but could indicate packers or broken AXML compilers. [INFO ] androguard.axml: Namespace mapping (109, 513) already seen! This is usually not a problem but could indicate packers or broken AXML compilers. make: Entering directory 'C:/Users/MG/AppData/Local/Temp/dcc-project-8ioohy0n' [armeabi-v7a] Compile++ thumb: nc <= Java_me_grantland_widget_AutofitHelper_00024AutofitOnLayoutChangeListener_onLayoutChangeLandroid_view_View_2IIIIIIII.cpp make: Leaving directory 'C:/Users/MG/AppData/Local/Temp/dcc-project-8ioohy0n' make: Entering directory 'C:/Users/MG/AppData/Local/Temp/dcc-project-8ioohy0n' [armeabi-v7a] Compile++ thumb: nc <= well_known_classes.cpp make: Leaving directory 'C:/Users/MG/AppData/Local/Temp/dcc-project-8ioohy0n' make: Entering directory 'C:/Users/MG/AppData/Local/Temp/dcc-project-8ioohy0n' [armeabi-v7a] Compile++ thumb: nc <= Java_me_grantland_widget_AutofitHelper_00024AutofitTextWatcher_beforeTextChanged__Ljava_lang_CharSequence_2III.cpp make: Leaving directory 'C:/Users/MG/AppData/Local/Temp/dcc-project-8ioohy0n' make: Entering directory 'C:/Users/MG/AppData/Local/Temp/dcc-project-8ioohy0n' [armeabi-v7a] Compile++ thumb: nc <= Dex2C.cpp make: Leaving directory 'C:/Users/MG/AppData/Local/Temp/dcc-project-8ioohy0n' make: Entering directory 'C:/Users/MG/AppData/Local/Temp/dcc-project-8ioohy0n' [armeabi-v7a] Compile++ thumb: nc <= Java_me_grantland_widget_AutofitHelper_00024AutofitTextWatcher_onTextChangedLjava_lang_CharSequence_2III.cpp make: Leaving directory 'C:/Users/MG/AppData/Local/Temp/dcc-project-8ioohy0n' make: Entering directory 'C:/Users/MG/AppData/Local/Temp/dcc-project-8ioohy0n' [armeabi-v7a] Compile++ thumb: nc <= Java_me_grantland_widget_AutofitHelper_00024AutofitTextWatcher_afterTextChangedLandroid_text_Editable_2.cpp make: Leaving directory 'C:/Users/MG/AppData/Local/Temp/dcc-project-8ioohy0n' make: Entering directory 'C:/Users/MG/AppData/Local/Temp/dcc-project-8ioohy0n' [arm64-v8a] Compile++ : nc <= Java_me_grantland_widget_AutofitHelper_00024AutofitOnLayoutChangeListener_onLayoutChange__Landroid_view_View_2IIIIIIII.cpp make: Leaving directory 'C:/Users/MG/AppData/Local/Temp/dcc-project-8ioohy0n' make: Entering directory 'C:/Users/MG/AppData/Local/Temp/dcc-project-8ioohy0n' [arm64-v8a] Compile++ : nc <= well_known_classes.cpp make: Leaving directory 'C:/Users/MG/AppData/Local/Temp/dcc-project-8ioohy0n' make: Entering directory 'C:/Users/MG/AppData/Local/Temp/dcc-project-8ioohy0n' [arm64-v8a] Compile++ : nc <= Java_me_grantland_widget_AutofitHelper_00024AutofitTextWatcher_beforeTextChangedLjava_lang_CharSequence_2III.cpp make: Leaving directory 'C:/Users/MG/AppData/Local/Temp/dcc-project-8ioohy0n' make: Entering directory 'C:/Users/MG/AppData/Local/Temp/dcc-project-8ioohy0n' [arm64-v8a] Compile++ : nc <= Java_me_grantland_widget_AutofitHelper_00024AutofitTextWatcher_afterTextChanged__Landroid_text_Editable_2.cpp make: Leaving directory 'C:/Users/MG/AppData/Local/Temp/dcc-project-8ioohy0n' make: Entering directory 'C:/Users/MG/AppData/Local/Temp/dcc-project-8ioohy0n' [arm64-v8a] Compile++ : nc <= Dex2C.cpp make: Leaving directory 'C:/Users/MG/AppData/Local/Temp/dcc-project-8ioohy0n' make: Entering directory 'C:/Users/MG/AppData/Local/Temp/dcc-project-8ioohy0n' [arm64-v8a] Compile++ : nc <= Java_me_grantland_widget_AutofitHelper_00024AutofitTextWatcher_onTextChanged__Ljava_lang_CharSequence_2III.cpp make: Leaving directory 'C:/Users/MG/AppData/Local/Temp/dcc-project-8ioohy0n' make: Entering directory 'C:/Users/MG/AppData/Local/Temp/dcc-project-8ioohy0n' [armeabi-v7a] SharedLibrary : libnc.so make: Leaving directory 'C:/Users/MG/AppData/Local/Temp/dcc-project-8ioohy0n' make: Entering directory 'C:/Users/MG/AppData/Local/Temp/dcc-project-8ioohy0n' [arm64-v8a] SharedLibrary : libnc.so make: Leaving directory 'C:/Users/MG/AppData/Local/Temp/dcc-project-8ioohy0n' make: Entering directory 'C:/Users/MG/AppData/Local/Temp/dcc-project-8ioohy0n' [armeabi-v7a] Install : libnc.so => libs/armeabi-v7a/libnc.so make: Leaving directory 'C:/Users/MG/AppData/Local/Temp/dcc-project-8ioohy0n' make: Entering directory 'C:/Users/MG/AppData/Local/Temp/dcc-project-8ioohy0n' [arm64-v8a] Install : libnc.so => libs/arm64-v8a/libnc.so make: Leaving directory 'C:/Users/MG/AppData/Local/Temp/dcc-project-8ioohy0n' Apktool v1.4.10.f53a296 - a tool for reengineering Android apk files Copyright 2010 Ryszard Wi?niewski brut.alll@gmail.com with smali v1.3.4-dev, and baksmali v1.3.4-dev Updated by iBotPeaches (@iBotPeaches) and yyj Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0)

Usage: apktool [-q|--quiet OR -v|--verbose] COMMAND [...]

COMMANDs are:

d[ecode] [OPTS] <file.apk> [<dir>]
    Decode <file.apk> to <dir>.

    OPTS:

    -s, --no-src
        Do not decode sources.
    -r, --no-res
        Do not decode resources.
    -d, --debug
        Decode in debug mode. Check project page for more info.
    -f, --force
        Force delete destination directory.
    -t <tag>, --frame-tag <tag>
        Try to use framework files tagged by <tag>.
    --keep-broken-res
        Use if there was an error and some resources were dropped, e.g.:
        "Invalid config flags detected. Dropping resources", but you
        want to decode them anyway, even with errors. You will have to
        fix them manually before building.

b[uild] [OPTS] [<app_path>] [<out_file>]
    Build an apk from already decoded application located in <app_path>.

    It will automatically detect, whether files was changed and perform
    needed steps only.

    If you omit <app_path> then current directory will be used.
    If you omit <out_file> then <app_path>/dist/<name_of_original.apk>
    will be used.

    OPTS:

    -f, --force-all
        Skip changes detection and build all files.
    -d, --debug
        Build in debug mode. Check project page for more info.

if|install-framework <framework.apk> [<tag>]
    Install framework file to your system.

For additional info, see: http://code.google.com/p/android-apktool/ [ERROR ] dcc: Compile .\4.6.0.0-mg_debug.apk failed! Traceback (most recent call last): File "dcc.py", line 463, in dcc_main(infile, filtercfg, outapk, do_compile, project_dir, source_archive) File "dcc.py", line 415, in dcc_main decompiled_dir = ApkTool.decompile(apkfile) File "dcc.py", line 69, in decompile subprocess.check_call(['java', '-jar', APKTOOL, 'd', '-r', '-f', '-o', outdir, apk]) File "C:\Users\MG\AppData\Local\Programs\Python\Python38\lib\subprocess.py", line 364, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['java', '-jar', 'tools/apktool.jar', 'd', '-r', '-f', '-o', 'C:\Users\MG\AppData\Local\Temp\dcc-apktool-3b3rspqa', '.\4.6.0.0-mg_debug.apk']' returned non-zero exit status 1. [INFO ] dcc: removing C:\Users\MG\AppData\Local\Temp\dcc-project-8ioohy0n [INFO ] dcc: removing C:\Users\MG\AppData\Local\Temp\tmp3sh89t9x-dcc [INFO ] dcc: removing C:\Users\MG\AppData\Local\Temp\dcc-apktool-3b3rspqa PS D:\Android_project\dcc\dcc>

liu1912009189 commented 2 years ago

我自己的锅,下载的apktool 居然是最老的