コード例 #1
0
        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}");
        }
コード例 #2
0
        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}");
        }
コード例 #3
0
ファイル: Smali.cs プロジェクト: toraidl/MiuiEULocalization
        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}");
        }