1 | initial version |
The method for extracting strings from strings.xml using Androguard is as follows:
from androguard import misc
from androguard.axml.axmlparser import AXMLParser
a, d, dx = misc.AnalyzeAPK('path_to_apk')
xml_string = a.get_android_resources()['xml']['strings.xml'].decode('utf-8')
parser = AXMLParser(xml_string)
parser.parse()
strings = parser.get_string_resources()
for string in strings:
print(string)
This will output a list of all the strings extracted from the strings.xml file.