validate namespace of AndroidManifest before XML decode

This commit is contained in:
REAndroid 2023-01-13 07:24:03 -05:00
parent 2c2f2c2b13
commit 8937e3cb91

View File

@ -159,6 +159,8 @@ import java.util.*;
File file=new File(outDir, AndroidManifestBlock.FILE_NAME); File file=new File(outDir, AndroidManifestBlock.FILE_NAME);
logMessage("Decoding: "+file.getName()); logMessage("Decoding: "+file.getName());
AndroidManifestBlock manifestBlock=apkModule.getAndroidManifestBlock(); AndroidManifestBlock manifestBlock=apkModule.getAndroidManifestBlock();
XMLNamespaceValidator namespaceValidator=new XMLNamespaceValidator(manifestBlock);
namespaceValidator.validate();
int currentPackageId= manifestBlock.guessCurrentPackageId(); int currentPackageId= manifestBlock.guessCurrentPackageId();
XMLDocument xmlDocument=manifestBlock.decodeToXml(entryStore, currentPackageId); XMLDocument xmlDocument=manifestBlock.decodeToXml(entryStore, currentPackageId);
xmlDocument.save(file, true); xmlDocument.save(file, true);