c# 借助cmd命令解析apk文件信息

2023-03-07,,

借助aapt.exe文件

aapt.exe 解析apk包信息cmd命令

aapt dump badging *.apk
aapt d badging *.apk >1.txt(保存成1.txt文件)

ProcessStartInfo start = new ProcessStartInfo("cmd.exe");
start.CreateNoWindow = true;
start.RedirectStandardInput = true;
start.RedirectStandardOutput = true;
start.UseShellExecute = false;
Process process = Process.Start(start);
try
{
var aaptFile = Server.MapPath("~/aaptFile/aapt.exe");
//apkPath 安装包路径
process.StandardInput.WriteLine(aaptFile + " d badging \"" + apkPath + "\"");
StreamReader reader = process.StandardOutput; while (!reader.EndOfStream)
{
//解析所需要数据
string output = reader.ReadLine();
}
}
catch
{}

  

c# 借助cmd命令解析apk文件信息的相关教程结束。

《c# 借助cmd命令解析apk文件信息.doc》

下载本文的Word格式文档,以方便收藏与打印。