From 2ab52ee4a3d9f5b238f0cee21d97181ffe60afa4 Mon Sep 17 00:00:00 2001 From: AndnixSH <40742924+AndnixSH@users.noreply.github.com> Date: Wed, 6 Sep 2023 11:57:49 +0200 Subject: [PATCH] Parse alt-native-code from aapt --- APKToolGUI/ApkTool/AaptParser.cs | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/APKToolGUI/ApkTool/AaptParser.cs b/APKToolGUI/ApkTool/AaptParser.cs index c5e2c80..9781de6 100644 --- a/APKToolGUI/ApkTool/AaptParser.cs +++ b/APKToolGUI/ApkTool/AaptParser.cs @@ -1,10 +1,12 @@ using System; +using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; using System.Text.RegularExpressions; using System.Threading; using System.Threading.Tasks; +using System.Windows.Documents; namespace APKToolGUI.Utils { @@ -83,6 +85,8 @@ namespace APKToolGUI.Utils new string[] { "\r\n", "\r", "\n" }, StringSplitOptions.None); + List nativecode = new List { }; + List nativecode2 = new List { }; foreach (string line in lines) { switch (line.Split(':')[0]) @@ -124,13 +128,16 @@ namespace APKToolGUI.Utils var densities = Regex.Matches(line.Split(':')[1], @"(?<= \')(.*?)(?=\')").Cast().Select(m => m.Value).ToList(); Densities = string.Join(", ", densities); break; + case "alt-native-code": + nativecode2 = Regex.Matches(line.Split(':')[1], @"(?<= \')(.*?)(?=\')").Cast().Select(m => m.Value).ToList(); + break; case "native-code": - var nativecode = Regex.Matches(line.Split(':')[1], @"(?<= \')(.*?)(?=\')").Cast().Select(m => m.Value).ToList(); - NativeCode = string.Join(", ", nativecode); + nativecode = Regex.Matches(line.Split(':')[1], @"(?<= \')(.*?)(?=\')").Cast().Select(m => m.Value).ToList(); break; } } - + List combinedList = nativecode2.Concat(nativecode).ToList(); + NativeCode += string.Join(", ", combinedList); ApkFile = file; PlayStoreLink = "https://play.google.com/store/apps/details?id=" + PackageName; ApkComboLink = "https://apkcombo.com/a/" + PackageName;