public void Disassemble(ApkProcessor apkProcessor) { var process = Process.Start(new ProcessStartInfo() { FileName = "java", Arguments = string.Join(" ", new string[] { "-jar", BaksmaliPath, "d", apkProcessor.ApkPath, "--output", Path.Combine(apkProcessor.ApkPath, "smali") }) }); process.WaitForExit(); ConsoleWrapper.WriteInfo("DEX", true, $"disassembled from APK {apkProcessor.ApkPath}"); }
public void DisassembleFrom(string dexPath) { var process = Process.Start(new ProcessStartInfo() { FileName = "java", Arguments = string.Join(" ", new string[] { "-jar", BaksmaliPath, "d", dexPath, "--output", Path.Combine(Path.GetDirectoryName(dexPath), $"{Path.GetFileNameWithoutExtension(dexPath)}_smali") }) }); process.WaitForExit(); ConsoleWrapper.WriteInfo("DEX", true, $"disassembled from DEX {dexPath}"); }
public void AssembleFrom(string smaliPath, string api) { var process = Process.Start(new ProcessStartInfo() { FileName = "java", Arguments = string.Join(" ", new string[] { "-jar", SmaliPath, "a", smaliPath, "-a", api, "-o", Path.Combine(Path.GetDirectoryName(smaliPath), $"{Path.GetFileNameWithoutExtension(smaliPath).Replace("_smali", "_x.dex")}") }) }); process.WaitForExit(); ConsoleWrapper.WriteInfo("DEX", true, $"assembled from SMALI {smaliPath}"); }