Пример #1
0
 /// <summary>
 /// 初始化需要反编译的APK信息
 /// </summary>
 /// <param name="apkpath">APK路径</param>
 /// <returns>结果</returns>
 public tool_error InitApk(string apkpath,string signedApkpath,tool_keystore keystore)
 {
     tool_error error = tool_error.error_ok;
     DealApk = new tool_apk_model();
     DealApk.ApkPath = apkpath;
     DealApk.ApkFilename = Path.GetFileName(apkpath);
     DealApk.DecompilerFolder = Path.GetDirectoryName(tool_config.ToolConfig.apktool) + @"\" + Path.GetFileNameWithoutExtension(apkpath);
     DealApk.AndroidManifestPath = DealApk.DecompilerFolder + @"\AndroidManifest.xml";
     DealApk.ApktoolYml = DealApk.DecompilerFolder + @"\apktool.yml";
     DealApk.RepackUnsignedApkPath = DealApk.DecompilerFolder + @"\dist\" + DealApk.ApkFilename;
     DealApk.in_assets = DealApk.DecompilerFolder + @"\assets";
     DealApk.in_lib = DealApk.DecompilerFolder + @"\lib";
     DealApk.in_res = DealApk.DecompilerFolder + @"\res";
     DealApk.in_smali = DealApk.DecompilerFolder + @"\smali";
     DealApk.in_smali_classes2 = DealApk.DecompilerFolder + @"\smali_classes2";
     DealApk.in_unknown = DealApk.DecompilerFolder + @"\unknown";
     DealApk.SignedApkPath = signedApkpath;
     if(signedApkpath!="")
         DealApk.ZipalignApkPath = Path.GetDirectoryName(signedApkpath) + @"\" + Path.GetFileNameWithoutExtension(signedApkpath) + @"_zipalign.apk";
     DealApk.Keystore = keystore;
     return error;
 }
Пример #2
0
 /// <summary>
 /// 设置APK信息
 /// </summary>
 /// <param name="apkinfo">apk信息</param>
 public void SetApkInfo(tool_apk_model apkinfo)
 {
     DealApk = apkinfo;
 }