示例#1
0
def decodeGameAPK():
    global backupPath

    if (isNeedDecodeGameAPK):
        print("start decode gameAPK......")
    else:
        print("no need to decode gameAPK.")
        return

    try:
        #delete backup folder
        FileUtils.delDir(backupPath)
    except Exception as ex:
        print("exception :{0}".format(str(ex)))

    gameApk = "games/" + gameApkName + ".apk"
    cmd = "".join([
        "java -classpath ./libs/apktool.jar:. brut.apktool.Main d -f ",
        gameApk, " -o out/temp/" + str(timestamp) + "/" + gameApkName
    ])
    print("cmd is ", cmd)
    (status, output) = commands.getstatusoutput(cmd)
    print output
    print("end decode gameAPK.")
    return