def is_android_raw(raw):
    """
    Returns a string that describes the type of file, for common Android
    specific formats
    """
    val = None

    # We do not check for META-INF/MANIFEST.MF,
    # as you also want to analyze unsigned APKs...
    # AndroidManifest.xml should be in every APK.
    # classes.dex and resources.arsc are not required!
    # if raw[0:2] == b"PK" and b'META-INF/MANIFEST.MF' in raw:
    # TODO this check might be still invalid. A ZIP file with stored APK inside would match as well.
    # probably it would be better to rewrite this and add more sanity checks.
    if raw[0:2] == b"PK" and b'AndroidManifest.xml' in raw:
        val = "APK"
    elif raw[0:3] == b"dex":
        val = "DEX"
    elif raw[0:3] == b"dey":
        val = "DEY"
    elif raw[0:4] == b"\x03\x00\x08\x00" or raw[0:4] == b"\x00\x00\x08\x00":
        val = "AXML"
    elif raw[0:4] == b"\x02\x00\x0C\x00":
        val = "ARSC"

    return val
def is_android_raw ( raw ) : val = None if raw [ 0 : 2 ] == b"PK" and b'AndroidManifest.xml' in raw : val = "APK" elif raw [ 0 : 3 ] == b"dex" : val = "DEX" elif raw [ 0 : 3 ] == b"dey" : val = "DEY" elif raw [ 0 : 4 ] == b"\x03\x00\x08\x00" or raw [ 0 : 4 ] == b"\x00\x00\x08\x00" : val = "AXML" elif raw [ 0 : 4 ] == b"\x02\x00\x0C\x00" : val = "ARSC" return val
Returns a string that describes the type of file, for common Android
    specific formats