def parse_apk(filename): ''' Returns: Manifest(Class) ''' with zipfile.ZipFile(filename, 'r') as file: manifest = file.read('AndroidManifest.xml') return Manifest(AXMLPrinter(manifest).getBuff())
def main(): ap = AXMLPrinter(open('example/binary/AndroidManifest.xml', 'rb').read()) buff = minidom.parseString(ap.getBuff()).toxml() print(buff)
def extractManifest(apkFile): ap = AXMLPrinter(ZipFile(apkFile).read("AndroidManifest.xml")) return minidom.parseString(ap.getBuff()).toxml()
def getManifest(self): return minidom.parseString(AXMLPrinter(self._file.read('AndroidManifest.xml')).getBuff())