noushadali / androguard

Automatically exported from code.google.com/p/androguard
Apache License 2.0
0 stars 0 forks source link

AndroidManifest.xml is not well formatted in OBAD Malware #161

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
apk.is_valid_APK() returns false, because the AndroidManifest.xml can not be 
parsed

The Error output when manually parsing the manifest:

In [18]:  minidom.parseString(a.get_android_manifest_axml().get_buff())
---------------------------------------------------------------------------
ExpatError                                Traceback (most recent call last)
/home/android/git/androguard/androlyze.py in <module>()
----> 1 minidom.parseString(a.get_android_manifest_axml().get_buff())
/usr/lib/python2.7/xml/dom/minidom.pyc in parseString(string, parser)
   1926     if parser is None:
   1927         from xml.dom import expatbuilder
-> 1928         return expatbuilder.parseString(string)
   1929     else:
   1930         from xml.dom import pulldom
/usr/lib/python2.7/xml/dom/expatbuilder.pyc in parseString(string, namespaces)
    938     else:
    939         builder = ExpatBuilder()
--> 940     return builder.parseString(string)
    941
    942
/usr/lib/python2.7/xml/dom/expatbuilder.pyc in parseString(self, string)
    221         parser = self.getParser()
    222         try:
--> 223             parser.Parse(string, True)
    224             self._setup_subset(string)
    225         except ParseEscape:
ExpatError: not well-formed (invalid token): line 4, column 0

A sample AndroidManifest.xml is attached.

Original issue reported on code.google.com by 5hp...@gmail.com on 8 Jul 2014 at 7:57

Attachments: