reference:
AndroidXml; // androidxmldotnet
System.IO.Compression;
1 using AndroidXml; 2 using System.IO.Compression;
1 static string GetAndroidManifestStrings(string szfile) { 2 const string SZ_MANIFEST = "AndroidManifest.xml"; 3 string pszret = null; 4 using (FileStream pfstm = new FileStream(szfile, FileMode.Open, FileAccess.Read, FileShare.Read)) { 5 using (ZipArchive parc = new ZipArchive(pfstm)) { 6 ZipArchiveEntry pety = parc.GetEntry(SZ_MANIFEST); 7 using (Stream pestm = pety.Open()) { 8 using (MemoryStream pmstm = new MemoryStream()) { 9 pestm.CopyTo(pmstm); 10 pmstm.Seek(0, SeekOrigin.Begin); 11 AndroidXmlReader prdr = new AndroidXmlReader(pmstm); 12 XDocument pxdoc = XDocument.Load(prdr); 13 pszret = pxdoc.ToString(); 14 } 15 } 16 } 17 return pszret; 18 }