diff --git a/.gitmodules b/.gitmodules index 94d4a955..e69de29b 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +0,0 @@ -[submodule "libraries/axplorer"] - path = libraries/axplorer - url = https://github.com/reddr/axplorer.git diff --git a/README.md b/README.md index 0c8ae716..e36c6fcf 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ Androguard is a full python tool to play with Android files. * Android's binary xml * Android resources * Disassemble DEX/ODEX bytecodes -* Decompiler for DEX/ODEX files +* Basic Decompiler for DEX/ODEX files ## Authors: Androguard Team @@ -60,7 +60,7 @@ You are using Androguard and are not listed here? Just create a [ticket](https:/ ### Androguard -Copyright (C) 2012 - 2016, Anthony Desnos (desnos at t0t0.fr) +Copyright (C) 2012 - 2022, Anthony Desnos (desnos at t0t0.fr) All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/androguard/__init__.py b/androguard/__init__.py index b576f62a..8171e7a2 100644 --- a/androguard/__init__.py +++ b/androguard/__init__.py @@ -1,4 +1,4 @@ # The current version of Androguard # Please use only this variable in any scripts, # to keep the version number the same everywhere. -__version__ = "3.4.0a1" +__version__ = "4.0" diff --git a/androguard/core/__init__.py b/androguard/core/__init__.py index 8b137891..e69de29b 100644 --- a/androguard/core/__init__.py +++ b/androguard/core/__init__.py @@ -1 +0,0 @@ - diff --git a/androguard/core/bytecodes/apk.py b/androguard/core/apk/__init__.py similarity index 97% rename from androguard/core/bytecodes/apk.py rename to androguard/core/apk/__init__.py index 3f7160c4..8650d9e6 100644 --- a/androguard/core/bytecodes/apk.py +++ b/androguard/core/apk/__init__.py @@ -1,8 +1,10 @@ +# Androguard from androguard.core import androconf from androguard.util import read, get_certificate_name_string -from androguard.core.bytecodes.axml import ARSCParser, AXMLPrinter, ARSCResTableConfig, AXMLParser, format_value, START_TAG, END_TAG, TEXT, END_DOCUMENT +from androguard.core.axml import ARSCParser, AXMLPrinter, ARSCResTableConfig, AXMLParser, format_value, START_TAG, END_TAG, TEXT, END_DOCUMENT +# Python core import io from zlib import crc32 import os @@ -13,13 +15,17 @@ import logging from struct import unpack import hashlib import warnings +import sys +# External dependecies +from loguru import logger import lxml.sax from xml.dom.pulldom import SAX2DOM - # Used for reading Certificates from asn1crypto import cms, x509, keys +logger.add(sys.stderr, format="{time} {level} {message}", filter="apk", level="INFO") + NS_ANDROID_URI = 'http://schemas.android.com/apk/res/android' NS_ANDROID = '{{{}}}'.format(NS_ANDROID_URI) # Namespace as used by etree @@ -236,7 +242,7 @@ class APK: """ if magic_file: - log.warning("You set magic_file but this parameter is actually unused. You should remove it.") + logger.warning("You set magic_file but this parameter is actually unused. You should remove it.") self.filename = filename @@ -272,7 +278,7 @@ class APK: self.zip = zipfile.ZipFile(filename, mode="r") if testzip: - log.info("Testing zip file integrity, this might take a while...") + logger.info("Testing zip file integrity, this might take a while...") # Test the zipfile for integrity before continuing. # This process might be slow, as the whole file is read. # Therefore it is possible to enable it as a separate feature. @@ -306,27 +312,27 @@ class APK: extracted from the Manifest. """ i = "AndroidManifest.xml" - log.info("Starting analysis on {}".format(i)) + logger.info("Starting analysis on {}".format(i)) try: manifest_data = self.zip.read(i) except KeyError: - log.warning("Missing AndroidManifest.xml. Is this an APK file?") + logger.warning("Missing AndroidManifest.xml. Is this an APK file?") else: ap = AXMLPrinter(manifest_data) if not ap.is_valid(): - log.error("Error while parsing AndroidManifest.xml - is the file valid?") + logger.error("Error while parsing AndroidManifest.xml - is the file valid?") return self.axml[i] = ap self.xml[i] = self.axml[i].get_xml_obj() if self.axml[i].is_packed(): - log.warning("XML Seems to be packed, operations on the AndroidManifest.xml might fail.") + logger.warning("XML Seems to be packed, operations on the AndroidManifest.xml might fail.") if self.xml[i] is not None: if self.xml[i].tag != "manifest": - log.error("AndroidManifest.xml does not start with a tag! Is this a valid APK?") + logger.error("AndroidManifest.xml does not start with a tag! Is this a valid APK?") return self.package = self.get_attribute_value("manifest", "package") @@ -363,7 +369,7 @@ class APK: self.declared_permissions[d_perm_name] = d_perm_details self.valid_apk = True - log.info("APK file was successfully validated!") + logger.info("APK file was successfully validated!") self.permission_module = androconf.load_api_specific_resource_module( "aosp_permissions", self.get_target_sdk_version()) @@ -418,7 +424,7 @@ class APK: try: maxSdkVersion = int(self.get_value_from_tag(item, "maxSdkVersion")) except ValueError: - log.warning(self.get_max_sdk_version() + 'is not a valid value for maxSdkVersion') + logger.warning(self.get_max_sdk_version() + 'is not a valid value for maxSdkVersion') except TypeError: pass return maxSdkVersion @@ -469,7 +475,7 @@ class APK: if app_name is None: # No App name set # TODO return packagename instead? - log.warning("It looks like that no app name is set for the main activity!") + logger.warning("It looks like that no app name is set for the main activity!") return "" if app_name.startswith("@"): @@ -486,12 +492,12 @@ class APK: if package == 'android': # TODO: we can not resolve this, as we lack framework-res.apk # one exception would be when parsing framework-res.apk directly. - log.warning("Resource ID with android package name encountered! " + logger.warning("Resource ID with android package name encountered! " "Will not resolve, framework-res.apk would be required.") return app_name else: # TODO should look this up, might be in the resources - log.warning("Resource ID with Package name '{}' encountered! Will not resolve".format(package)) + logger.warning("Resource ID with Package name '{}' encountered! Will not resolve".format(package)) return app_name try: @@ -586,7 +592,7 @@ class APK: app_icon = file_name current_dpi = dpi except Exception as e: - log.warning("Exception selecting app icon: %s" % e) + logger.warning("Exception selecting app icon: %s" % e) return app_icon @@ -2167,8 +2173,10 @@ def get_apkid(apkfile): hex value that starts with @). """ + logger.debug("GET_APKID") + if not os.path.exists(apkfile): - log.error("'{apkfile}' does not exist!".format(apkfile=apkfile)) + logger.error("'{apkfile}' does not exist!".format(apkfile=apkfile)) appid = None versionCode = None diff --git a/androguard/core/bytecodes/axml/__init__.py b/androguard/core/axml/__init__.py similarity index 91% rename from androguard/core/bytecodes/axml/__init__.py rename to androguard/core/axml/__init__.py index 4ef0f775..293bfd05 100644 --- a/androguard/core/bytecodes/axml/__init__.py +++ b/androguard/core/axml/__init__.py @@ -1,7 +1,5 @@ -from androguard.core import bytecode - from androguard.core.resources import public -from androguard.core.bytecodes.axml.types import * +from .types import * from struct import pack, unpack from xml.sax.saxutils import escape @@ -9,13 +7,14 @@ import collections from collections import defaultdict from lxml import etree +from loguru import logger import logging import re -import sys import binascii +import io +import sys -log = logging.getLogger("androguard.axml") - +logger.add(sys.stderr, format="{time} {level} {message}", filter="axml", level="INFO") # Constants for ARSC Files # see http://androidxref.com/9.0.0_r3/xref/frameworks/base/libs/androidfw/include/androidfw/ResourceTypes.h#215 @@ -128,7 +127,7 @@ class StringBlock: # Check if they supplied a stylesOffset even if the count is 0: if self.styleCount == 0 and self.stylesOffset > 0: - log.info("Styles Offset given, but styleCount is zero. " + logger.info("Styles Offset given, but styleCount is zero. " "This is not a problem but could indicate packers.") self.m_stringOffsets = [] @@ -155,7 +154,7 @@ class StringBlock: size = self.stylesOffset - self.stringsOffset if (size % 4) != 0: - log.warning("Size of strings is not aligned by four bytes.") + logger.warning("Size of strings is not aligned by four bytes.") self.m_charbuff = buff.read(size) @@ -163,7 +162,7 @@ class StringBlock: size = self.header.size - self.stylesOffset if (size % 4) != 0: - log.warning("Size of styles is not aligned by four bytes.") + logger.warning("Size of styles is not aligned by four bytes.") for i in range(0, size // 4): self.m_styles.append(unpack(' 0xFFFFFFFF: - log.error("Filesize is too large to be a valid AXML file! Filesize: {}".format(self.buff.size())) + if self.buff_size > 0xFFFFFFFF: + logger.error("Filesize is too large to be a valid AXML file! Filesize: {}".format(self.buff.size())) self._valid = False return try: axml_header = ARSCHeader(self.buff) except ResParserError as e: - log.error("Error parsing first resource header: %s", e) + logger.error("Error parsing first resource header: %s", e) self._valid = False return @@ -402,29 +404,29 @@ class AXMLParser: if axml_header.header_size == 28024: # Can be a common error: the file is not an AXML but a plain XML # The file will then usually start with ' self.buff.size(): - log.error("This does not look like an AXML file. Declared filesize does not match real size: {} vs {}".format(self.filesize, self.buff.size())) + if self.filesize > self.buff_size: + logger.error("This does not look like an AXML file. Declared filesize does not match real size: {} vs {}".format(self.filesize, self.buff.size())) self._valid = False return - if self.filesize < self.buff.size(): + if self.filesize < self.buff_size: # The file can still be parsed up to the point where the chunk should end. self.axml_tampered = True - log.warning("Declared filesize ({}) is smaller than total file size ({}). " + logger.warning("Declared filesize ({}) is smaller than total file size ({}). " "Was something appended to the file? Trying to parse it anyways.".format(self.filesize, self.buff.size())) # Not that severe of an error, we have plenty files where this is not # set correctly if axml_header.type != RES_XML_TYPE: self.axml_tampered = True - log.warning("AXML file has an unusual resource type! " + logger.warning("AXML file has an unusual resource type! " "Malware likes to to such stuff to anti androguard! " "But we try to parse it anyways. Resource Type: 0x{:04x}".format(axml_header.type)) @@ -432,12 +434,12 @@ class AXMLParser: try: header = ARSCHeader(self.buff, expected_type=RES_STRING_POOL_TYPE) except ResParserError as e: - log.error("Error parsing resource header of string pool: %s", e) + logger.error("Error parsing resource header of string pool: %s", e) self._valid = False return if header.header_size != 0x1C: - log.error("This does not look like an AXML file. String chunk header size does not equal 28! header size = {}".format(header.header_size)) + logger.error("This does not look like an AXML file. String chunk header size does not equal 28! header size = {}".format(header.header_size)) self._valid = False return @@ -455,6 +457,7 @@ class AXMLParser: if an error happend somewhere in the process of parsing the file, this flag is set to False. """ + logger.debug(self._valid) return self._valid def _reset(self): @@ -478,7 +481,7 @@ class AXMLParser: self._reset() while self._valid: # Stop at the declared filesize or at the end of the file - if self.buff.end() or self.buff.get_idx() == self.filesize: + if self.buff.tell() == self.filesize: self.m_event = END_DOCUMENT break @@ -486,18 +489,18 @@ class AXMLParser: try: h = ARSCHeader(self.buff) except ResParserError as e: - log.error("Error parsing resource header: %s", e) + logger.error("Error parsing resource header: %s", e) self._valid = False return # Special chunk: Resource Map. This chunk might be contained inside # the file, after the string pool. if h.type == RES_XML_RESOURCE_MAP_TYPE: - log.debug("AXML contains a RESOURCE MAP") + logger.debug("AXML contains a RESOURCE MAP") # Check size: < 8 bytes mean that the chunk is not complete # Should be aligned to 4 bytes. if h.size < 8 or (h.size % 4) != 0: - log.error("Invalid chunk size in chunk XML_RESOURCE_MAP") + logger.error("Invalid chunk size in chunk XML_RESOURCE_MAP") self._valid = False return @@ -512,13 +515,13 @@ class AXMLParser: # h.size is the size of the whole chunk including the header. # We read already 8 bytes of the header, thus we need to # subtract them. - log.error("Not a XML resource chunk type: 0x{:04x}. Skipping {} bytes".format(h.type, h.size)) - self.buff.set_idx(h.end) + logger.error("Not a XML resource chunk type: 0x{:04x}. Skipping {} bytes".format(h.type, h.size)) + self.buff.seek(h.end) continue # Check that we read a correct header if h.header_size != 0x10: - log.error("XML Resource Type Chunk header size does not match 16! " \ + logger.error("XML Resource Type Chunk header size does not match 16! " \ "At chunk type 0x{:04x}, declared header size={}, chunk size={}".format(h.type, h.header_size, h.size)) self._valid = False return @@ -530,7 +533,7 @@ class AXMLParser: self.m_comment_index, = unpack(' uri {}: '{}'".format(prefix, s_prefix, uri, s_uri)) + logger.debug("Start of Namespace mapping: prefix {}: '{}' --> uri {}: '{}'".format(prefix, s_prefix, uri, s_uri)) if s_uri == '': - log.warning("Namespace prefix '{}' resolves to empty URI. " + logger.warning("Namespace prefix '{}' resolves to empty URI. " "This might be a packer.".format(s_prefix)) if (prefix, uri) in self.namespaces: - log.info("Namespace mapping ({}, {}) already seen! " + logger.info("Namespace mapping ({}, {}) already seen! " "This is usually not a problem but could indicate packers or broken AXML compilers.".format(prefix, uri)) self.namespaces.append((prefix, uri)) @@ -563,7 +566,7 @@ class AXMLParser: if (prefix, uri) in self.namespaces: self.namespaces.remove((prefix, uri)) else: - log.warning("Reached a NAMESPACE_END without having the namespace stored before? " + logger.warning("Reached a NAMESPACE_END without having the namespace stored before? " "Prefix ID: {}, URI ID: {}".format(prefix, uri)) # We can continue with the next chunk, as we store the namespace @@ -640,7 +643,7 @@ class AXMLParser: # For now, we ingore these values size, res0, dataType, data = unpack("= len(self.m_attributes): - log.warning("Invalid attribute index") + logger.warning("Invalid attribute index") return offset @@ -775,6 +778,8 @@ class AXMLParser: """ Returns the numeric ID for the namespace URI of an attribute """ + logger.debug(index) + offset = self._get_attribute_offset(index) uri = self.m_attributes[offset + ATTRIBUTE_IX_NAMESPACE_URI] @@ -784,6 +789,8 @@ class AXMLParser: """ Return the Namespace URI (if any) for the attribute """ + logger.debug(index) + uri = self.getAttributeUri(index) # No Namespace @@ -796,6 +803,7 @@ class AXMLParser: """ Returns the String which represents the attribute name """ + logger.debug(index) offset = self._get_attribute_offset(index) name = self.m_attributes[offset + ATTRIBUTE_IX_NAME] @@ -818,6 +826,8 @@ class AXMLParser: :param index: index of the attribute """ + logger.debug(index) + offset = self._get_attribute_offset(index) return self.m_attributes[offset + ATTRIBUTE_IX_VALUE_TYPE] @@ -827,6 +837,8 @@ class AXMLParser: :param index: index of the attribute """ + logger.debug(index) + offset = self._get_attribute_offset(index) return self.m_attributes[offset + ATTRIBUTE_IX_VALUE_DATA] @@ -839,6 +851,8 @@ class AXMLParser: :param index: index of the attribute :return: """ + logger.debug(index) + offset = self._get_attribute_offset(index) valueType = self.m_attributes[offset + ATTRIBUTE_IX_VALUE_TYPE] if valueType == TYPE_STRING: @@ -929,11 +943,11 @@ class AXMLPrinter: comment = self.axml.comment if comment: if self.root is None: - log.warning("Can not attach comment with content '{}' without root!".format(comment)) + logger.warning("Can not attach comment with content '{}' without root!".format(comment)) else: cur[-1].append(etree.Comment(comment)) - log.debug("START_TAG: {} (line={})".format(tag, self.axml.m_lineNumber)) + logger.debug("START_TAG: {} (line={})".format(tag, self.axml.m_lineNumber)) elem = etree.Element(tag, nsmap=self.axml.nsmap) for i in range(self.axml.getAttributeCount()): @@ -941,9 +955,9 @@ class AXMLPrinter: uri, name = self._fix_name(uri, self.axml.getAttributeName(i)) value = self._fix_value(self._get_attribute_value(i)) - log.debug("found an attribute: {}{}='{}'".format(uri, name, value.encode("utf-8"))) + logger.debug("found an attribute: {}{}='{}'".format(uri, name, value.encode("utf-8"))) if "{}{}".format(uri, name) in elem.attrib: - log.warning("Duplicate attribute '{}{}'! Will overwrite!".format(uri, name)) + logger.warning("Duplicate attribute '{}{}'! Will overwrite!".format(uri, name)) elem.set("{}{}".format(uri, name), value) if self.root is None: @@ -951,28 +965,28 @@ class AXMLPrinter: else: if not cur: # looks like we lost the root? - log.error("No more elements available to attach to! Is the XML malformed?") + logger.error("No more elements available to attach to! Is the XML malformed?") break cur[-1].append(elem) cur.append(elem) if _type == END_TAG: if not cur: - log.warning("Too many END_TAG! No more elements available to attach to!") + logger.warning("Too many END_TAG! No more elements available to attach to!") name = self.axml.name uri = self._print_namespace(self.axml.namespace) tag = "{}{}".format(uri, name) if cur[-1].tag != tag: - log.warning("Closing tag '{}' does not match current stack! At line number: {}. Is the XML malformed?".format(self.axml.name, self.axml.m_lineNumber)) + logger.warning("Closing tag '{}' does not match current stack! At line number: {}. Is the XML malformed?".format(self.axml.name, self.axml.m_lineNumber)) cur.pop() if _type == TEXT: - log.debug("TEXT for {}".format(cur[-1])) + logger.debug("TEXT for {}".format(cur[-1])) cur[-1].text = self.axml.text if _type == END_DOCUMENT: # Check if all namespace mappings are closed if len(self.axml.namespaces) > 0: - log.warning("Not all namespace mappings were closed! Malformed AXML?") + logger.warning("Not all namespace mappings were closed! Malformed AXML?") break def get_buff(self): @@ -1055,13 +1069,13 @@ class AXMLPrinter: :rtype: tuple """ if not name[0].isalpha() and name[0] != "_": - log.warning("Invalid start for name '{}'. " + logger.warning("Invalid start for name '{}'. " "XML name must start with a letter.".format(name)) self.packerwarning = True name = "_{}".format(name) if name.startswith("android:") and prefix == '' and 'android' in self.axml.nsmap: # Seems be a common thing... - log.info("Name '{}' starts with 'android:' prefix but 'android' is a known prefix. Replacing prefix.".format(name)) + logger.info("Name '{}' starts with 'android:' prefix but 'android' is a known prefix. Replacing prefix.".format(name)) prefix = self._print_namespace(self.axml.nsmap['android']) name = name[len("android:"):] # It looks like this is some kind of packer... Not sure though. @@ -1070,15 +1084,15 @@ class AXMLPrinter: self.packerwarning = True embedded_prefix, new_name = name.split(":", 1) if embedded_prefix in self.axml.nsmap: - log.info("Prefix '{}' is in namespace mapping, assume that it is a prefix.") + logger.info("Prefix '{}' is in namespace mapping, assume that it is a prefix.") prefix = self._print_namespace(self.axml.nsmap[embedded_prefix]) name = new_name else: # Print out an extra warning - log.warning("Confused: name contains a unknown namespace prefix: '{}'. " + logger.warning("Confused: name contains a unknown namespace prefix: '{}'. " "This is either a broken AXML file or some attempt to break stuff.".format(name)) if not re.match(r"^[a-zA-Z0-9._-]*$", name): - log.warning("Name '{}' contains invalid characters!".format(name)) + logger.warning("Name '{}' contains invalid characters!".format(name)) self.packerwarning = True name = re.sub(r"[^a-zA-Z0-9._-]", "_", name) @@ -1102,14 +1116,14 @@ class AXMLPrinter: # Reading string until \x00. This is the same as aapt does. if "\x00" in value: self.packerwarning = True - log.warning("Null byte found in attribute value at position {}: " + logger.warning("Null byte found in attribute value at position {}: " "Value(hex): '{}'".format( value.find("\x00"), binascii.hexlify(value.encode("utf-8")))) value = value[:value.find("\x00")] if not self.__charrange.match(value): - log.warning("Invalid character in value found. Replacing with '_'.") + logger.warning("Invalid character in value found. Replacing with '_'.") self.packerwarning = True value = self.__replacement.sub('_', value) return value @@ -1207,9 +1221,10 @@ class ARSCParser: """ :param bytes raw_buff: the raw bytes of the file """ - self.buff = bytecode.BuffHandle(raw_buff) + self.buff = io.BufferedReader(io.BytesIO(raw_buff)) + self.buff_size = self.buff.raw.getbuffer().nbytes - if self.buff.size() < 8 or self.buff.size() > 0xFFFFFFFF: + if self.buff_size < 8 or self.buff_size > 0xFFFFFFFF: raise ResParserError("Invalid file size {} for a resources.arsc file!".format(self.buff.size())) self.analyzed = False @@ -1226,43 +1241,43 @@ class ARSCParser: # More sanity checks... if self.header.header_size != 12: - log.warning("The ResTable_header has an unexpected header size! Expected 12 bytes, got {}.".format(self.header.header_size)) + logger.warning("The ResTable_header has an unexpected header size! Expected 12 bytes, got {}.".format(self.header.header_size)) - if self.header.size > self.buff.size(): - raise ResParserError("The file seems to be truncated. Refuse to parse the file! Filesize: {}, declared size: {}".format(self.buff.size(), self.header.size)) + if self.header.size > self.buff_size: + raise ResParserError("The file seems to be truncated. Refuse to parse the file! Filesize: {}, declared size: {}".format(self.buff_size, self.header.size)) - if self.header.size < self.buff.size(): - log.warning("The Resource file seems to have data appended to it. Filesize: {}, declared size: {}".format(self.buff.size(), self.header.size)) + if self.header.size < self.buff_size: + logger.warning("The Resource file seems to have data appended to it. Filesize: {}, declared size: {}".format(self.buff_size, self.header.size)) # The ResTable_header contains the packageCount, i.e. the number of ResTable_package self.packageCount = unpack(' self.header.end: # this inner chunk crosses the boundary of the table chunk - log.warning("Invalid chunk found! It is larger than the outer chunk: %s", res_header) + logger.warning("Invalid chunk found! It is larger than the outer chunk: %s", res_header) break if res_header.type == RES_STRING_POOL_TYPE: # There should be only one StringPool per resource table. if self.stringpool_main: - log.warning("Already found a ResStringPool_header, but there should be only one! Will not parse the Pool again.") + logger.warning("Already found a ResStringPool_header, but there should be only one! Will not parse the Pool again.") else: self.stringpool_main = StringBlock(self.buff, res_header) - log.debug("Found the main string pool: %s", self.stringpool_main) + logger.debug("Found the main string pool: %s", self.stringpool_main) elif res_header.type == RES_TABLE_PACKAGE_TYPE: if len(self.packages) > self.packageCount: @@ -1272,12 +1287,12 @@ class ARSCParser: package_name = current_package.get_name() # After the Header, we have the resource type symbol table - self.buff.set_idx(current_package.header.start + current_package.typeStrings) + self.buff.seek(current_package.header.start + current_package.typeStrings) type_sp_header = ARSCHeader(self.buff, expected_type=RES_STRING_POOL_TYPE) mTableStrings = StringBlock(self.buff, type_sp_header) # Next, we should have the resource key symbol table - self.buff.set_idx(current_package.header.start + current_package.keyStrings) + self.buff.seek(current_package.header.start + current_package.keyStrings) key_sp_header = ARSCHeader(self.buff, expected_type=RES_STRING_POOL_TYPE) mKeyStrings = StringBlock(self.buff, key_sp_header) @@ -1287,7 +1302,7 @@ class ARSCParser: self.packages[package_name].append(mKeyStrings) pc = PackageContext(current_package, self.stringpool_main, mTableStrings, mKeyStrings) - log.debug("Constructed a PackageContext: %s", pc) + logger.debug("Constructed a PackageContext: %s", pc) # skip to the first header in this table package chunk # FIXME is this correct? We have already read the first two sections! @@ -1299,18 +1314,18 @@ class ARSCParser: if next_idx != self.buff.tell(): # If this happens, we have a testfile ;) - log.error("This looks like an odd resources.arsc file!") - log.error("Please report this error including the file you have parsed!") - log.error("next_idx = {}, current buffer position = {}".format(next_idx, self.buff.tell())) - log.error("Please open a issue at https://github.com/androguard/androguard/issues") - log.error("Thank you!") + logger.error("This looks like an odd resources.arsc file!") + logger.error("Please report this error including the file you have parsed!") + logger.error("next_idx = {}, current buffer position = {}".format(next_idx, self.buff.tell())) + logger.error("Please open a issue at https://github.com/androguard/androguard/issues") + logger.error("Thank you!") - self.buff.set_idx(next_idx) + self.buff.seek(next_idx) # Read all other headers - while self.buff.get_idx() <= res_header.end - ARSCHeader.SIZE: + while self.buff.tell() <= res_header.end - ARSCHeader.SIZE: pkg_chunk_header = ARSCHeader(self.buff) - log.debug("Found a header: {}".format(pkg_chunk_header)) + logger.debug("Found a header: {}".format(pkg_chunk_header)) if pkg_chunk_header.start + pkg_chunk_header.size > res_header.end: # we are way off the package chunk; bail out break @@ -1327,7 +1342,7 @@ class ARSCParser: self.packages[package_name].append(a_res_type) self.resource_configs[package_name][a_res_type].add(a_res_type.config) - log.debug("Config: {}".format(a_res_type.config)) + logger.debug("Config: {}".format(a_res_type.config)) entries = [] for i in range(0, a_res_type.entryCount): @@ -1337,9 +1352,6 @@ class ARSCParser: self.packages[package_name].append(entries) for entry, res_id in entries: - if self.buff.end(): - break - if entry != -1: ate = ARSCResTableEntry(self.buff, res_id, pc) self.packages[package_name].append(ate) @@ -1351,21 +1363,21 @@ class ARSCParser: # So we do some kind of hack here. We set the idx to the entry again... # Now we will read all entries! # Not sure if this is a good solution though - self.buff.set_idx(ate.start) + self.buff.seek(ate.start) elif pkg_chunk_header.type == RES_TABLE_LIBRARY_TYPE: - log.warning("RES_TABLE_LIBRARY_TYPE chunk is not supported") + logger.warning("RES_TABLE_LIBRARY_TYPE chunk is not supported") else: # Unknown / not-handled chunk type - log.warning("Unknown chunk type encountered inside RES_TABLE_PACKAGE: %s", pkg_chunk_header) + logger.warning("Unknown chunk type encountered inside RES_TABLE_PACKAGE: %s", pkg_chunk_header) # skip to the next chunk - self.buff.set_idx(pkg_chunk_header.end) + self.buff.seek(pkg_chunk_header.end) else: # Unknown / not-handled chunk type - log.warning("Unknown chunk type encountered: %s", res_header) + logger.warning("Unknown chunk type encountered: %s", res_header) # move to the next resource chunk - self.buff.set_idx(res_header.end) + self.buff.seek(res_header.end) def _analyse(self): if self.analyzed: @@ -1475,7 +1487,7 @@ class ARSCParser: DIMENSION_UNITS[ate.key.get_data() & COMPLEX_UNIT_MASK]) ] except IndexError: - log.debug("Out of range dimension unit index for {}: {}".format( + logger.debug("Out of range dimension unit index for {}: {}".format( complexToFloat(ate.key.get_data()), ate.key.get_data() & COMPLEX_UNIT_MASK)) return [ate.get_value(), ate.key.get_data()] @@ -1813,7 +1825,7 @@ class ARSCParser: # Infinite loop detection: # TODO should this stay here or should be detect the loop much earlier? if res_id == parent.mResId: - log.warning("Infinite loop detected at resource item {}. It references itself!".format(parent)) + logger.warning("Infinite loop detected at resource item {}. It references itself!".format(parent)) return self._resolve_into_result(result, item.get_data(), self.wanted_config) @@ -1902,7 +1914,7 @@ class ARSCParser: raise ValueError("'rid' must be an int") if rid not in self.resource_values: - log.warning("The requested rid '0x{:08x}' could not be found in the list of resources.".format(rid)) + logger.warning("The requested rid '0x{:08x}' could not be found in the list of resources.".format(rid)) return [] res_options = self.resource_values[rid] @@ -1910,7 +1922,7 @@ class ARSCParser: if config in res_options: return [(config, res_options[config])] elif fallback and config == ARSCResTableConfig.default_config(): - log.warning("No default resource config could be found for the given rid '0x{:08x}', using fallback!".format(rid)) + logger.warning("No default resource config could be found for the given rid '0x{:08x}', using fallback!".format(rid)) return [list(self.resource_values[rid].items())[0]] else: return [] @@ -2074,9 +2086,9 @@ class ARSCHeader: :param androguard.core.bytecode.BuffHandle buff: the buffer set to the position where the header starts. :param int expected_type: the type of the header which is expected. """ - self.start = buff.get_idx() + self.start = buff.tell() # Make sure we do not read over the buffer: - if buff.size() < self.start + self.SIZE: + if buff.raw.getbuffer().nbytes < self.start + self.SIZE: raise ResParserError("Can not read over the buffer size! Offset={}".format(self.start)) self._type, self._header_size, self._size = unpack(' read 256 bytes - # TODO why not read a null terminated string in buffer (like the meth name suggests) instead of parsing it later in get_name()? - self.name = buff.readNullString(256) + self.name = buff.read(256) self.typeStrings = unpack('= 36: @@ -2302,7 +2312,7 @@ class ARSCResTableConfig: # uint16_t screenHeightDp self.screenSizeDp, = unpack('= 40: @@ -2312,12 +2322,12 @@ class ARSCResTableConfig: # uint16_t screenConfigPad2 self.screenConfig2, = unpack(" 0: - log.debug("Skipping padding bytes!") + logger.debug("Skipping padding bytes!") self.padding = buff.read(self.exceedingSize) else: @@ -2576,7 +2586,7 @@ class ARSCResTableEntry: FLAG_WEAK = 4 def __init__(self, buff, mResId, parent=None): - self.start = buff.get_idx() + self.start = buff.tell() self.mResId = mResId self.parent = parent @@ -2592,7 +2602,7 @@ class ARSCResTableEntry: self.key = ARSCResStringPoolRef(buff, self.parent) if self.is_weak(): - log.debug("Parsed %s", self) + logger.debug("Parsed {}".format(self)) def get_index(self): return self.index @@ -2633,7 +2643,7 @@ class ARSCComplex: and http://androidxref.com/9.0.0_r3/xref/frameworks/base/libs/androidfw/include/androidfw/ResourceTypes.h#1498 for `ResTable_map` """ def __init__(self, buff, parent=None): - self.start = buff.get_idx() + self.start = buff.tell() self.parent = parent self.id_parent = unpack('= len(self.__buff) - - def get_buff(self): - """ - Return the whole buffer - - :rtype: bytearray - """ - return self.__buff - - def set_buff(self, buff): - """ - Overwrite the current buffer with the content of `buff` - - :param bytearray buff: the new buffer - """ - self.__buff = buff - - def save(self, filename): - """ - Save the current buffer to `filename` - - Exisiting files with the same name will be overwritten. - - :param str filename: the name of the file to save to - """ - with open(filename, "wb") as fd: - fd.write(self.__buff) - - -class Buff: - def __init__(self, offset, buff): - self.offset = offset - self.buff = buff - - self.size = len(buff) - - -# Here for legacy reasons. Might get removed some day... -_Bytecode = BuffHandle - - def FormatClassToJava(i): """ Transform a java class name into the typed variant found in DEX files. diff --git a/androguard/core/bytecodes/__init__.py b/androguard/core/bytecodes/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/androguard/core/bytecodes/dvm.py b/androguard/core/dex/__init__.py similarity index 97% rename from androguard/core/bytecodes/dvm.py rename to androguard/core/dex/__init__.py index b61992b3..77eb70c2 100644 --- a/androguard/core/bytecodes/dvm.py +++ b/androguard/core/dex/__init__.py @@ -1,4 +1,5 @@ import sys +import io import re import struct import binascii @@ -9,13 +10,15 @@ import warnings import zlib import hashlib from enum import IntEnum +from loguru import logger from androguard.core import bytecode -from androguard.core.bytecodes.apk import APK +from androguard.core.apk import APK from androguard.core.androconf import CONF +from androguard.util import read_at from androguard.core import mutf8 -from androguard.core.bytecodes.dvm_types import ( +from .dvm_types import ( TypeMapItem, ACCESS_FLAGS, TYPE_DESCRIPTOR, @@ -23,10 +26,9 @@ from androguard.core.bytecodes.dvm_types import ( Operand, ) +logger.add(sys.stderr, format="{time} {level} {message}", filter="dex", level="INFO") -log = logging.getLogger("androguard.dvm") - # TODO: have some more generic magic... DEX_FILE_MAGIC_35 = b'dex\n035\x00' DEX_FILE_MAGIC_36 = b'dex\n036\x00' @@ -109,8 +111,8 @@ def read_null_terminated_string(f): if 0 in z: s = z.split(b'\x00',1) x.append(s[0]) - idx = f.get_idx() - f.set_idx(idx - len(s[1])) + idx = f.tell() + f.seek(idx - len(s[1])) break else: x.append(z) @@ -230,7 +232,7 @@ def readuleb128(cm, buff): if cur > 0x7f: cur = get_byte(cm, buff) if cur > 0x0f: - log.warning("possible error while decoding number") + logger.warning("possible error while decoding number") result |= cur << 28 return result @@ -377,7 +379,7 @@ def determineNext(i, cur_idx, m): # emit an extra nop instruction as a spacer if such an instruction would otherwise be unaligned." padding = (off + cur_idx) % 4 if padding != 0: - log.warning("Switch payload not aligned, assume stuff and add {} bytes...".format(padding)) + logger.warning("Switch payload not aligned, assume stuff and add {} bytes...".format(padding)) data = code.get_ins_off(off + cur_idx + padding) # TODO: some malware points to invalid code @@ -387,7 +389,7 @@ def determineNext(i, cur_idx, m): for target in data.get_targets(): x.append(target * 2 + cur_idx) else: - log.warning("Could not determine payload of switch command at offset {} inside {}! " + logger.warning("Could not determine payload of switch command at offset {} inside {}! " "Possibly broken bytecode?".format(cur_idx, m)) return x @@ -460,23 +462,25 @@ class HeaderItem: Also the Adler32 checksum of the file is calculated in order to detect file corruption. :param buff: a string which represents a Buff object of the header_item - :type androguard.core.bytecode.BuffHandle buff: Buff object + :type io.BufferedReader buff: Buff object :param cm: a ClassManager object :type cm: :class:`ClassManager` """ def __init__(self, size, buff, cm): + logger.debug("HeaderItem") + self.CM = cm - self.offset = buff.get_idx() + self.offset = buff.tell() if self.offset != 0: - log.warning("Unusual DEX file, does not have the header at offset 0") + logger.warning("Unusual DEX file, does not have the header at offset 0") - if len(buff) < self.get_length(): + if buff.raw.getbuffer().nbytes < self.get_length(): raise ValueError("Not a DEX file, Header too small.") - self.endian_tag, = unpack('= offsets_size: break offset, = cm.packer["I"].unpack(buff.read(4)) @@ -1302,7 +1306,7 @@ class TypeList: def __init__(self, buff, cm): self.CM = cm - self.offset = buff.get_idx() + self.offset = buff.tell() self.size, = cm.packer["I"].unpack(buff.read(4)) self.list = [TypeItem(buff, cm) for _ in range(self.size)] @@ -1423,7 +1427,7 @@ class DebugInfoItem: def __init__(self, buff, cm): self.CM = cm - self.offset = buff.get_idx() + self.offset = buff.tell() self.line_start = readuleb128(cm, buff) self.parameters_size = readuleb128(cm, buff) @@ -1505,10 +1509,11 @@ class DebugInfoItem: i.show() def get_raw(self): - return [bytecode.Buff(self.__offset, writeuleb128(self.CM, self.line_start) + \ - writeuleb128(self.CM, self.parameters_size) + \ - b''.join(writeuleb128(self.CM, i) for i in self.parameter_names) + \ - b''.join(i.get_raw() for i in self.bytecodes))] + pass + #return [bytecode.Buff(self.__offset, writeuleb128(self.CM, self.line_start) + \ + # writeuleb128(self.CM, self.parameters_size) + \ + # b''.join(writeuleb128(self.CM, i) for i in self.parameter_names) + \ + # b''.join(i.get_raw() for i in self.bytecodes))] def get_off(self): return self.offset @@ -1518,7 +1523,7 @@ class DebugInfoItemEmpty: def __init__(self, buff, cm): self.CM = cm - self.offset = buff.get_idx() + self.offset = buff.tell() self.__buff = buff self.__raw = "" @@ -1535,10 +1540,10 @@ class DebugInfoItemEmpty: n = self.CM.get_next_offset_item(offset) - s_idx = self.__buff.get_idx() - self.__buff.set_idx(offset) + s_idx = self.__buff.tell() + self.__buff.seek(offset) self.__raw = self.__buff.read(n - offset) - self.__buff.set_idx(s_idx) + self.__buff.seek(s_idx) def show(self): pass @@ -1565,7 +1570,7 @@ class EncodedArray: def __init__(self, buff, cm): self.CM = cm - self.offset = buff.get_idx() + self.offset = buff.tell() self.size = readuleb128(cm, buff) @@ -1667,7 +1672,7 @@ class EncodedValue: else: self.value = False else: - log.warning("Unknown value 0x%x" % self.value_type) + logger.warning("Unknown value 0x%x" % self.value_type) def get_value(self): """ @@ -1725,7 +1730,7 @@ class AnnotationElement: def __init__(self, buff, cm): self.CM = cm - self.offset = buff.get_idx() + self.offset = buff.tell() self.name_idx = readuleb128(cm, buff) self.value = EncodedValue(buff, cm) @@ -1773,7 +1778,7 @@ class EncodedAnnotation: def __init__(self, buff, cm): self.CM = cm - self.offset = buff.get_idx() + self.offset = buff.tell() self.type_idx = readuleb128(cm, buff) self.size = readuleb128(cm, buff) @@ -1841,7 +1846,7 @@ class AnnotationItem: def __init__(self, buff, cm): self.CM = cm - self.offset = buff.get_idx() + self.offset = buff.tell() self.visibility = get_byte(cm, buff) self.annotation = EncodedAnnotation(buff, cm) @@ -1896,7 +1901,7 @@ class EncodedArrayItem: def __init__(self, buff, cm): self.CM = cm - self.offset = buff.get_idx() + self.offset = buff.tell() self.value = EncodedArray(buff, cm) def get_value(self): @@ -1950,7 +1955,7 @@ class StringDataItem: python you ca use :meth:`get` which escapes invalid characters. :param buff: a string which represents a Buff object of the string_data_item - :type buff: BuffHandle + :type buff: io.io.BufferedReader :param cm: a ClassManager object :type cm: :class:`ClassManager` """ @@ -1958,7 +1963,7 @@ class StringDataItem: def __init__(self, buff, cm): self.CM = cm - self.offset = buff.get_idx() + self.offset = buff.tell() # Content of string_data_item self.utf16_size = readuleb128(cm, buff) @@ -2031,7 +2036,7 @@ class StringIdItem: def __init__(self, buff, cm): self.CM = cm - self.offset = buff.get_idx() + self.offset = buff.tell() self.string_data_off, = cm.packer["I"].unpack(buff.read(4)) @@ -2079,7 +2084,7 @@ class TypeIdItem: def __init__(self, buff, cm): self.CM = cm - self.offset = buff.get_idx() + self.offset = buff.tell() self.descriptor_idx, = cm.packer["I"].unpack(buff.read(4)) self.descriptor_idx_value = self.CM.get_string(self.descriptor_idx) @@ -2128,7 +2133,7 @@ class TypeHIdItem: def __init__(self, size, buff, cm): self.CM = cm - self.offset = buff.get_idx() + self.offset = buff.tell() self.type = [TypeIdItem(buff, cm) for i in range(0,size)] @@ -2182,7 +2187,7 @@ class ProtoIdItem: def __init__(self, buff, cm): self.CM = cm - self.offset = buff.get_idx() + self.offset = buff.tell() self.shorty_idx, \ self.return_type_idx, \ @@ -2287,7 +2292,7 @@ class ProtoHIdItem: def __init__(self, size, buff, cm): self.CM = cm - self.offset = buff.get_idx() + self.offset = buff.tell() self.proto = [ProtoIdItem(buff, cm) for i in range(0, size)] @@ -2333,7 +2338,7 @@ class FieldIdItem: def __init__(self, buff, cm): self.CM = cm - self.offset = buff.get_idx() + self.offset = buff.tell() self.class_idx, \ self.type_idx, \ @@ -2448,7 +2453,7 @@ class FieldHIdItem: """ def __init__(self, size, buff, cm): - self.offset = buff.get_idx() + self.offset = buff.tell() self.elem = [FieldIdItem(buff, cm) for i in range(0, size)] @@ -2499,7 +2504,7 @@ class MethodIdItem: def __init__(self, buff, cm): self.CM = cm - self.offset = buff.get_idx() + self.offset = buff.tell() self.class_idx, \ self.proto_idx, \ @@ -2627,7 +2632,7 @@ class MethodHIdItem: def __init__(self, size, buff, cm): self.CM = cm - self.offset = buff.get_idx() + self.offset = buff.tell() self.methods = [MethodIdItem(buff, cm) for i in range(0, size)] @@ -2735,7 +2740,7 @@ class EncodedField: def __init__(self, buff, cm): self.CM = cm - self.offset = buff.get_idx() + self.offset = buff.tell() self.field_idx_diff = readuleb128(cm, buff) self.access_flags = readuleb128(cm, buff) @@ -2905,7 +2910,7 @@ class EncodedMethod: def __init__(self, buff, cm): self.CM = cm - self.offset = buff.get_idx() + self.offset = buff.tell() self.method_idx_diff = readuleb128(cm, buff) #: method index diff in the corresponding section self.access_flags = readuleb128(cm, buff) #: access flags of the method @@ -3361,7 +3366,7 @@ class EncodedMethod: :type idx: int """ if self.code is not None: - self.code.set_idx(idx) + self.code.seek(idx) def set_name(self, value): self.CM.set_hook_method_name(self, value) @@ -3391,7 +3396,7 @@ class ClassDataItem: def __init__(self, buff, cm): self.CM = cm - self.offset = buff.get_idx() + self.offset = buff.tell() self.static_fields_size = readuleb128(cm, buff) self.instance_fields_size = readuleb128(cm, buff) @@ -3596,7 +3601,7 @@ class ClassDefItem: def __init__(self, buff, cm): self.CM = cm - self.offset = buff.get_idx() + self.offset = buff.tell() self.class_idx, \ self.access_flags, \ @@ -3886,17 +3891,17 @@ class ClassHDefItem: def __init__(self, size, buff, cm): self.CM = cm - self.offset = buff.get_idx() + self.offset = buff.tell() self.class_def = [] for i in range(0, size): - idx = buff.get_idx() + idx = buff.tell() class_def = ClassDefItem(buff, cm) self.class_def.append(class_def) - buff.set_idx(idx + calcsize("8I")) + buff.seek(idx + calcsize("8I")) def set_off(self, off): self.offset = off @@ -3999,7 +4004,7 @@ class EncodedCatchHandler: def __init__(self, buff, cm): self.CM = cm - self.offset = buff.get_idx() + self.offset = buff.tell() self.size = readsleb128(cm, buff) @@ -4089,7 +4094,7 @@ class EncodedCatchHandlerList: def __init__(self, buff, cm): self.CM = cm - self.offset = buff.get_idx() + self.offset = buff.tell() self.size = readuleb128(cm, buff) self.list = [EncodedCatchHandler(buff, cm) for _ in range(self.size)] @@ -6414,7 +6419,7 @@ class LinearSweepAlgorithm: """ Yields all instructions for the given bytecode sequence. If unknown/corrupt/unused instructions are encountered, - the loop will stop and an error is written to the log. + the loop will stop and an error is written to the logger. That means that the bytecode read might be corrupt or was crafted in this way, to break parsers. @@ -6431,7 +6436,7 @@ class LinearSweepAlgorithm: max_idx = size * calcsize('H') if max_idx > len(insn): - log.warning("Declared size of instructions is larger than the bytecode!") + logger.warning("Declared size of instructions is larger than the bytecode!") max_idx = len(insn) # Get instructions @@ -6457,7 +6462,7 @@ class LinearSweepAlgorithm: obj = get_instruction(cm, op_value & 0xff, insn[idx:]) except InvalidInstruction as e: # TODO somehow it would be nice to know that the parsing failed at the level of EncodedMethod or for the decompiler - log.error("Invalid instruction encountered! Stop parsing bytecode at idx %s. Message: %s", idx, e) + logger.error("Invalid instruction encountered! Stop parsing bytecode at idx %s. Message: %s", idx, e) return # emit instruction yield obj @@ -6507,7 +6512,7 @@ class DCode: self.insn = insn self.size = len(self.insn) - def set_idx(self, idx): + def seek(self, idx): """ Set the start address of the buffer @@ -6648,13 +6653,13 @@ class TryItem: This class represents the try_item format :param buff: a raw buffer where are the try_item format - :type buff: BuffHandle + :type buff: io.BufferedReader :param cm: the ClassManager :type cm: ClassManager """ def __init__(self, buff, cm): - self.offset = buff.get_idx() + self.offset = buff.tell() self.CM = cm @@ -6706,14 +6711,14 @@ class DalvikCode: This class represents the instructions of a method :param buff: a raw buffer where are the instructions - :type buff: BuffHandle + :type buff: io.BufferedReader :param cm: the ClassManager :type cm: :class:`ClassManager` object """ def __init__(self, buff, cm): self.CM = cm - self.offset = buff.get_idx() + self.offset = buff.tell() self.registers_size, \ self.ins_size, \ @@ -6724,7 +6729,7 @@ class DalvikCode: ushort = calcsize('H') - self.code = DCode(self.CM, buff.get_idx(), self.insns_size, buff.read(self.insns_size * ushort)) + self.code = DCode(self.CM, buff.tell(), self.insns_size, buff.read(self.insns_size * ushort)) if self.insns_size % 2 == 1 and self.tries_size > 0: self.padding, = cm.packer["H"].unpack(buff.read(2)) @@ -6817,19 +6822,19 @@ class DalvikCode: """ return self.code - def set_idx(self, idx): - self.code.set_idx(idx) + def seek(self, idx): + self.code.seek(idx) def get_length(self): return self.insns_size def _begin_show(self): - log.debug("registers_size: %d" % self.registers_size) - log.debug("ins_size: %d" % self.ins_size) - log.debug("outs_size: %d" % self.outs_size) - log.debug("tries_size: %d" % self.tries_size) - log.debug("debug_info_off: %d" % self.debug_info_off) - log.debug("insns_size: %d" % self.insns_size) + logger.debug("registers_size: %d" % self.registers_size) + logger.debug("ins_size: %d" % self.ins_size) + logger.debug("outs_size: %d" % self.outs_size) + logger.debug("tries_size: %d" % self.tries_size) + logger.debug("debug_info_off: %d" % self.debug_info_off) + logger.debug("insns_size: %d" % self.insns_size) bytecode._PrintBanner() @@ -6903,7 +6908,7 @@ class CodeItem: def __init__(self, size, buff, cm): self.CM = cm - self.offset = buff.get_idx() + self.offset = buff.tell() self.code = [] self.__code_off = {} @@ -6912,9 +6917,9 @@ class CodeItem: # As we read the DalvikCode items from the map, there might be # padding bytes in between. # We know, that the alignment is 4 bytes. - off = buff.get_idx() + off = buff.tell() if off % 4 != 0: - buff.set_idx(off + (4 - (off % 4))) + buff.seek(off + (4 - (off % 4))) x = DalvikCode(buff, cm) self.code.append(x) @@ -6966,7 +6971,7 @@ class MapItem: self.CM = cm self.buff = buff - self.off = buff.get_idx() + self.off = buff.tell() self.type = TypeMapItem(cm.packer["H"].unpack(buff.read(2))[0]) self.unused, \ @@ -6994,7 +6999,7 @@ class MapItem: return self.size def parse(self): - log.debug("Starting parsing map_item '{}'".format(self.type.name)) + logger.debug("Starting parsing map_item '{}'".format(self.type.name)) started_at = time.time() # Not all items are aligned in the same way. Most are aligned by four bytes, @@ -7006,108 +7011,108 @@ class MapItem: if TypeMapItem.STRING_ID_ITEM == self.type: # Byte aligned - buff.set_idx(self.offset) + buff.seek(self.offset) self.item = [StringIdItem(buff, cm) for _ in range(self.size)] elif TypeMapItem.CODE_ITEM == self.type: # 4-byte aligned - buff.set_idx(self.offset + (self.offset % 4)) + buff.seek(self.offset + (self.offset % 4)) self.item = CodeItem(self.size, buff, cm) elif TypeMapItem.TYPE_ID_ITEM == self.type: # 4-byte aligned - buff.set_idx(self.offset + (self.offset % 4)) + buff.seek(self.offset + (self.offset % 4)) self.item = TypeHIdItem(self.size, buff, cm) elif TypeMapItem.PROTO_ID_ITEM == self.type: # 4-byte aligned - buff.set_idx(self.offset + (self.offset % 4)) + buff.seek(self.offset + (self.offset % 4)) self.item = ProtoHIdItem(self.size, buff, cm) elif TypeMapItem.FIELD_ID_ITEM == self.type: # 4-byte aligned - buff.set_idx(self.offset + (self.offset % 4)) + buff.seek(self.offset + (self.offset % 4)) self.item = FieldHIdItem(self.size, buff, cm) elif TypeMapItem.METHOD_ID_ITEM == self.type: # 4-byte aligned - buff.set_idx(self.offset + (self.offset % 4)) + buff.seek(self.offset + (self.offset % 4)) self.item = MethodHIdItem(self.size, buff, cm) elif TypeMapItem.CLASS_DEF_ITEM == self.type: # 4-byte aligned - buff.set_idx(self.offset + (self.offset % 4)) + buff.seek(self.offset + (self.offset % 4)) self.item = ClassHDefItem(self.size, buff, cm) elif TypeMapItem.HEADER_ITEM == self.type: # FIXME probably not necessary to parse again here... # 4-byte aligned - buff.set_idx(self.offset + (self.offset % 4)) + buff.seek(self.offset + (self.offset % 4)) self.item = HeaderItem(self.size, buff, cm) elif TypeMapItem.ANNOTATION_ITEM == self.type: # Byte aligned - buff.set_idx(self.offset) + buff.seek(self.offset) self.item = [AnnotationItem(buff, cm) for _ in range(self.size)] elif TypeMapItem.ANNOTATION_SET_ITEM == self.type: # 4-byte aligned - buff.set_idx(self.offset + (self.offset % 4)) + buff.seek(self.offset + (self.offset % 4)) self.item = [AnnotationSetItem(buff, cm) for _ in range(self.size)] elif TypeMapItem.ANNOTATIONS_DIRECTORY_ITEM == self.type: # 4-byte aligned - buff.set_idx(self.offset + (self.offset % 4)) + buff.seek(self.offset + (self.offset % 4)) self.item = [AnnotationsDirectoryItem(buff, cm) for _ in range(self.size)] elif TypeMapItem.HIDDENAPI_CLASS_DATA_ITEM == self.type: # Byte aligned - buff.set_idx(self.offset) + buff.seek(self.offset) self.item = HiddenApiClassDataItem(buff, cm) elif TypeMapItem.ANNOTATION_SET_REF_LIST == self.type: # 4-byte aligned - buff.set_idx(self.offset + (self.offset % 4)) + buff.seek(self.offset + (self.offset % 4)) self.item = [AnnotationSetRefList(buff, cm) for _ in range(self.size)] elif TypeMapItem.TYPE_LIST == self.type: # 4-byte aligned - buff.set_idx(self.offset + (self.offset % 4)) + buff.seek(self.offset + (self.offset % 4)) self.item = [TypeList(buff, cm) for _ in range(self.size)] elif TypeMapItem.STRING_DATA_ITEM == self.type: # Byte aligned - buff.set_idx(self.offset) + buff.seek(self.offset) self.item = [StringDataItem(buff, cm) for _ in range(self.size)] elif TypeMapItem.DEBUG_INFO_ITEM == self.type: # Byte aligned - buff.set_idx(self.offset) + buff.seek(self.offset) self.item = DebugInfoItemEmpty(buff, cm) elif TypeMapItem.ENCODED_ARRAY_ITEM == self.type: # Byte aligned - buff.set_idx(self.offset) + buff.seek(self.offset) self.item = [EncodedArrayItem(buff, cm) for _ in range(self.size)] elif TypeMapItem.CLASS_DATA_ITEM == self.type: # Byte aligned - buff.set_idx(self.offset) + buff.seek(self.offset) self.item = [ClassDataItem(buff, cm) for _ in range(self.size)] elif TypeMapItem.MAP_LIST == self.type: # 4-byte aligned - buff.set_idx(self.offset + (self.offset % 4)) + buff.seek(self.offset + (self.offset % 4)) pass # It's me I think !!! No need to parse again else: - log.warning("Map item with id '{type}' offset: 0x{off:x} ({off}) " + logger.warning("Map item with id '{type}' offset: 0x{off:x} ({off}) " "size: {size} is unknown. " - "Is this a newer DEX format?".format(type=self.type, off=buff.get_idx(), size=self.size)) + "Is this a newer DEX format?".format(type=self.type, off=buff.tell(), size=self.size)) diff = time.time() - started_at minutes, seconds = diff // 60, diff % 60 - log.debug("End of parsing map_item '{}'. Required time {:.0f}:{:07.4f}".format(self.type.name, minutes, seconds)) + logger.debug("End of parsing map_item '{}'. Required time {:.0f}:{:07.4f}".format(self.type.name, minutes, seconds)) def show(self): bytecode._Print("\tMAP_TYPE_ITEM", self.type.name) @@ -7294,7 +7299,7 @@ class ClassManager: def get_class_data_item(self, off): i = self.__classdata_off.get(off) if i is None: - log.warning("unknown class data item @ 0x%x" % off) + logger.warning("unknown class data item @ 0x%x" % off) return i @@ -7350,13 +7355,13 @@ class ClassManager: try: off = self.__manage_item[TypeMapItem.STRING_ID_ITEM][idx].get_string_data_off() except IndexError: - log.warning("unknown string item @ %d" % idx) + logger.warning("unknown string item @ %d" % idx) return "AG:IS: invalid string" try: return self.__strings_off[off].get() except KeyError: - log.warning("unknown string item @ 0x%x(%d)" % (off, idx)) + logger.warning("unknown string item @ 0x%x(%d)" % (off, idx)) return "AG:IS: invalid string" def get_type_list(self, off): @@ -7455,12 +7460,12 @@ class ClassManager: name += "_" + bytecode.FormatDescriptorToPython( encoded_method.get_descriptor()) - log.debug("try deleting old name in python...") + logger.debug("try deleting old name in python...") try: delattr(class_def.M, name) - log.debug("success with regular name") + logger.debug("success with regular name") except AttributeError: - log.debug("WARNING: fail with regular name") + logger.debug("WARNING: fail with regular name") # python_export = False try: @@ -7474,17 +7479,17 @@ class ClassManager: try: delattr(class_def.M, name) - log.debug("success with name containing prototype") + logger.debug("success with name containing prototype") except AttributeError: - log.debug("WARNING: fail with name containing prototype") + logger.debug("WARNING: fail with name containing prototype") python_export = False if python_export: name = bytecode.FormatNameToPython(value) setattr(class_def.M, name, encoded_method) - log.debug("new name in python: created: %s." % name) + logger.debug("new name in python: created: %s." % name) else: - log.debug("skipping creating new name in python") + logger.debug("skipping creating new name in python") method.reload() @@ -7525,7 +7530,7 @@ class ClassManager: return idx def get_debug_off(self, off): - self.buff.set_idx(off) + self.buff.seek(off) return DebugInfoItem(self.buff, self) @@ -7540,7 +7545,7 @@ class MapList: def __init__(self, cm, off, buff): self.CM = cm - buff.set_idx(off) + buff.seek(off) self.offset = off @@ -7548,12 +7553,12 @@ class MapList: self.map_item = [] for _ in range(0, self.size): - idx = buff.get_idx() + idx = buff.tell() mi = MapItem(buff, self.CM) self.map_item.append(mi) - buff.set_idx(idx + mi.get_length()) + buff.seek(idx + mi.get_length()) load_order = TypeMapItem.determine_load_order() ordered = sorted(self.map_item, key=lambda mi: load_order[mi.get_type()]) @@ -7617,7 +7622,7 @@ class DalvikPacker: """ def __init__(self, endian_tag): if endian_tag == 0x78563412: - log.error("DEX file with byte swapped endian tag is not supported!") + logger.error("DEX file with byte swapped endian tag is not supported!") raise NotImplementedError("Byte swapped endian tag encountered!") elif endian_tag == 0x12345678: self.endian_tag = '<' @@ -7640,7 +7645,7 @@ class DalvikPacker: self.__structs = {} -class DalvikVMFormat(bytecode.BuffHandle): +class DEX: """ This class can parse a classes.dex file of an Android application (APK). @@ -7651,10 +7656,12 @@ class DalvikVMFormat(bytecode.BuffHandle): example:: - d = DalvikVMFormat( read("classes.dex") ) + d = DEX( read("classes.dex") ) """ def __init__(self, buff, decompiler=None, config=None, using_api=None): + logger.debug("DEX {} {} {}".format(decompiler, config, using_api)) + # to allow to pass apk object ==> we do not need to pass additionally target version if isinstance(buff, APK): self.api_version = buff.get_target_sdk_version() @@ -7664,7 +7671,8 @@ class DalvikVMFormat(bytecode.BuffHandle): else: self.api_version = CONF["DEFAULT_API"] - super().__init__(buff) + self.raw = io.BufferedReader(io.BytesIO(buff)) + self._flush() self.CM = ClassManager(self) @@ -7677,13 +7685,13 @@ class DalvikVMFormat(bytecode.BuffHandle): pass def _load(self, buff): - self.header = HeaderItem(0, self, self.CM) + self.header = HeaderItem(0, self.raw, self.CM) if self.header.map_off == 0: # TODO check if the header specifies items but does not have a map - log.warning("no map list! This DEX file is probably empty.") + logger.warning("no map list! This DEX file is probably empty.") else: - self.map_list = MapList(self.CM, self.header.map_off, self) + self.map_list = MapList(self.CM, self.header.map_off, self.raw) self.classes = self.map_list.get_item_type(TypeMapItem.CLASS_DEF_ITEM) self.methods = self.map_list.get_item_type(TypeMapItem.METHOD_ID_ITEM) @@ -7720,14 +7728,14 @@ class DalvikVMFormat(bytecode.BuffHandle): """ .. deprecated:: 3.1.0 The :class:`~androguard.core.analysis.analysis.Analysis` is not - loaded anymore into :class:`DalvikVMFormat` in order to avoid + loaded anymore into :class:`DEX` in order to avoid cyclic dependencies. :class:`~androguard.core.analysis.analysis.Analysis` extends now - :class:`DalvikVMFormat`. + :class:`DEX`. This Method does nothing anymore! The Analysis Object should contain all the information required, - inclduing the DalvikVMFormats. + inclduing the DEX. """ warnings.warn("deprecated, this method does nothing!", DeprecationWarning) @@ -7735,14 +7743,14 @@ class DalvikVMFormat(bytecode.BuffHandle): """ .. deprecated:: 3.1.0 The :class:`~androguard.core.analysis.analysis.Analysis` is not - loaded anymore into :class:`DalvikVMFormat` in order to avoid + loaded anymore into :class:`DEX` in order to avoid cyclic dependencies. :class:`~androguard.core.analysis.analysis.Analysis` extends now - :class:`DalvikVMFormat`. + :class:`DEX`. This Method does nothing anymore! The Analysis Object should contain all the information required, - inclduing the DalvikVMFormats. + inclduing the DEX. """ warnings.warn("deprecated, this method does nothing!", DeprecationWarning) @@ -7866,9 +7874,9 @@ class DalvikVMFormat(bytecode.BuffHandle): s[idx + length] = c_length length += c_length - # log.debug("SAVE" + str(j) + " @ 0x%x" % (idx+length)) + # logger.debug("SAVE" + str(j) + " @ 0x%x" % (idx+length)) - log.debug("SAVE " + str(i[0]) + " @0x{:x} ({:x})".format(idx, length)) + logger.debug("SAVE " + str(i[0]) + " @0x{:x} ({:x})".format(idx, length)) else: if isinstance(i, MapList): @@ -7883,7 +7891,7 @@ class DalvikVMFormat(bytecode.BuffHandle): s[idx] = length - log.debug("SAVE " + str(i) + " @0x{:x} ({:x})".format(idx, length)) + logger.debug("SAVE " + str(i) + " @0x{:x} ({:x})".format(idx, length)) idx += length @@ -7905,7 +7913,7 @@ class DalvikVMFormat(bytecode.BuffHandle): idx = h[i] if idx != last_idx: - log.debug("Adjust alignment @{:x} with 00 {:x}".format(idx, idx - last_idx)) + logger.debug("Adjust alignment @{:x} with 00 {:x}".format(idx, idx - last_idx)) buff += bytearray([0] * (idx - last_idx)) buff += i.get_raw() @@ -7913,7 +7921,7 @@ class DalvikVMFormat(bytecode.BuffHandle): buff += b"\x00" last_idx = idx + s[idx] - log.debug("GLOBAL SIZE %d" % len(buff)) + logger.debug("GLOBAL SIZE %d" % len(buff)) return self.fix_checksums(buff) @@ -7930,8 +7938,8 @@ class DalvikVMFormat(bytecode.BuffHandle): checksum = zlib.adler32(buff[12:]) buff = buff[:8] + self.CM.packer["I"].pack(checksum) + buff[12:] - log.debug("NEW SIGNATURE %s" % repr(signature)) - log.debug("NEW CHECKSUM %x" % checksum) + logger.debug("NEW SIGNATURE %s" % repr(signature)) + logger.debug("NEW CHECKSUM %x" % checksum) return buff @@ -8354,7 +8362,7 @@ class DalvikVMFormat(bytecode.BuffHandle): """ for i in DCode( self.CM, offset, size, - self.get_buff()[offset:offset + size]).get_instructions(): + read_at(self.raw, offset, size)).get_instructions(): yield i def _get_class_hierarchy(self): @@ -8508,7 +8516,7 @@ class OdexHeaderItem: """ def __init__(self, buff): - buff.set_idx(8) + buff.seek(8) self.dex_offset = unpack("=I", buff.read(4))[0] self.dex_length = unpack("=I", buff.read(4))[0] @@ -8579,7 +8587,7 @@ class OdexDependencies: dependencies -class DalvikOdexVMFormat(DalvikVMFormat): +class ODEX(DEX): """ This class can parse an odex file @@ -8589,7 +8597,7 @@ class DalvikOdexVMFormat(DalvikVMFormat): :type decompiler: object :Example: - DalvikOdexVMFormat( read("classes.odex") ) + ODEX( read("classes.odex") ) """ def _preload(self, buff): @@ -8598,15 +8606,15 @@ class DalvikOdexVMFormat(DalvikVMFormat): if self.magic in (ODEX_FILE_MAGIC_35, ODEX_FILE_MAGIC_36, ODEX_FILE_MAGIC_37): self.odex_header = OdexHeaderItem(self) - self.set_idx(self.odex_header.deps_offset) + self.seek(self.odex_header.deps_offset) self.dependencies = OdexDependencies(self) self.padding = buff[self.odex_header.deps_offset + self.odex_header.deps_length:] - self.set_idx(self.odex_header.dex_offset) + self.seek(self.odex_header.dex_offset) self.set_buff(self.read(self.odex_header.dex_length)) - self.set_idx(0) + self.seek(0) def save(self): """ diff --git a/androguard/core/bytecodes/dvm_types.py b/androguard/core/dex/dvm_types.py similarity index 100% rename from androguard/core/bytecodes/dvm_types.py rename to androguard/core/dex/dvm_types.py diff --git a/androguard/core/mutf8.py b/androguard/core/mutf8/__init__.py similarity index 100% rename from androguard/core/mutf8.py rename to androguard/core/mutf8/__init__.py diff --git a/androguard/util.py b/androguard/util.py index de748c4c..b25cfd4d 100644 --- a/androguard/util.py +++ b/androguard/util.py @@ -1,18 +1,15 @@ +# External dependecies +from loguru import logger import asn1crypto -# Functions that might be useful +# Stuff that might be useful -def read(filename, binary=True): - """ - Open and read a file - - :param filename: filename to open and read - :param binary: True if the file should be read as binary - :return: bytes if binary is True, str otherwise - """ - with open(filename, 'rb' if binary else 'r') as f: - return f.read() - +def read_at(buff, offset, size=-1): + idx = buff.tell() + buff.seek(offset) + d = buff.read(size) + buff.seek(idx) + return d def get_certificate_name_string(name, short=False, delimiter=', '): """ diff --git a/androguard/cli/entry_points.py b/cli.py similarity index 90% rename from androguard/cli/entry_points.py rename to cli.py index f3842ad0..d7512ee1 100755 --- a/androguard/cli/entry_points.py +++ b/cli.py @@ -3,26 +3,32 @@ """Androguard is a full Python tool to play with Android files.""" + # core modules -import sys -import logging +import sys, json +from loguru import logger + # 3rd party modules import click +import androguard.core.apk + # local modules import androguard -from androguard.core.androconf import show_logging -from androguard.cli import (androarsc_main, - androaxml_main, - androcg_main, - export_apps_to_format, - androsign_main, - androlyze_main, - androgui_main, - androdis_main - ) +from androguard.core.androconf import show_logging +from main import (androarsc_main, + androaxml_main, + androcg_main, + export_apps_to_format, + androsign_main, + androlyze_main, + androgui_main, + androdis_main +) + +logger.add(sys.stderr, format="{time} {level} {message}", filter="cli", level="INFO") @click.group(help=__doc__) @click.version_option(version=androguard.__version__) @@ -30,16 +36,7 @@ from androguard.cli import (androarsc_main, @click.option("--quiet", 'verbosity', flag_value='quiet', help="Print less (only warnings and above)") @click.option("--silent", 'verbosity', flag_value='silent', help="Print no log messages") def entry_point(verbosity): - level = logging.INFO - - if verbosity == 'verbose': - level = logging.DEBUG - if verbosity == 'quiet': - level = logging.WARNING - - # If something out of this module is imported, activate console logging - if verbosity != 'silent': - show_logging(level=level) + pass @entry_point.command() @@ -155,17 +152,17 @@ def arsc(input_, \b $ androguard arsc app.apk """ + logger.debug("ARSC") + from androguard.core import androconf - from androguard.core.bytecodes import apk + from androguard.core import axml, apk if file_ and input_: - print("Can not give --input and positional argument! " - "Please use only one of them!", - file=sys.stderr) + logger.info("Can not give --input and positional argument! Please use only one of them!") sys.exit(1) if not input_ and not file_: - print("Give one file to decode!", file=sys.stderr) + logger.info("Give one file to decode!") sys.exit(1) if input_: @@ -178,16 +175,16 @@ def arsc(input_, a = apk.APK(fname) arscobj = a.get_android_resources() if not arscobj: - print("The APK does not contain a resources file!", file=sys.stderr) + logger.error("The APK does not contain a resources file!") sys.exit(0) elif ret_type == "ARSC": with open(fname, 'rb') as fp: - arscobj = apk.ARSCParser(fp.read()) + arscobj = axml.ARSCParser(fp.read()) if not arscobj: - print("The resources file seems to be invalid!", file=sys.stderr) + logger.error("The resources file seems to be invalid!") sys.exit(1) else: - print("Unknown file type!", file=sys.stderr) + logger.error("Unknown file type!") sys.exit(1) if id_: @@ -435,12 +432,13 @@ def sign(hash_, print_all_hashes, show, apk): ) def apkid(apks): """Return the packageName/versionCode/versionName per APK as JSON.""" - import json - import logging - logging.getLogger("androguard.axml").setLevel(logging.ERROR) + from androguard.core.apk import get_apkid + + logger.debug("APKID") + results = dict() for apk in apks: - results[apk] = androguard.core.bytecodes.apk.get_apkid(apk) + results[apk] = get_apkid(apk) print(json.dumps(results, indent=2)) diff --git a/examples/android/Invalid/Invalid.apk b/examples/android/Invalid/Invalid.apk deleted file mode 100644 index c2911308..00000000 Binary files a/examples/android/Invalid/Invalid.apk and /dev/null differ diff --git a/examples/android/TC/AndroidManifest.xml b/examples/android/TC/AndroidManifest.xml deleted file mode 100644 index e5f6f1d3..00000000 --- a/examples/android/TC/AndroidManifest.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - diff --git a/examples/android/TC/androguard.xml b/examples/android/TC/androguard.xml deleted file mode 100644 index 4f7759b4..00000000 --- a/examples/android/TC/androguard.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - ./examples/android/TC/ - ./libs/ - - - BM_A0 - BM_A1 - wm.xml - - - - - - - - - org/t0t0/androguard/TC/TCActivity - - - - org/t0t0/androguard/TC/TCMod1 - TC1 - I - - - - - diff --git a/examples/android/TC/bin/TC-debug.apk b/examples/android/TC/bin/TC-debug.apk deleted file mode 100644 index cc0fb744..00000000 Binary files a/examples/android/TC/bin/TC-debug.apk and /dev/null differ diff --git a/examples/android/TC/bin/classes.dex b/examples/android/TC/bin/classes.dex deleted file mode 100644 index 178eb262..00000000 Binary files a/examples/android/TC/bin/classes.dex and /dev/null differ diff --git a/examples/android/TC/build.properties b/examples/android/TC/build.properties deleted file mode 100644 index ee52d86d..00000000 --- a/examples/android/TC/build.properties +++ /dev/null @@ -1,17 +0,0 @@ -# This file is used to override default values used by the Ant build system. -# -# This file must be checked in Version Control Systems, as it is -# integral to the build system of your project. - -# This file is only used by the Ant script. - -# You can use this to override default values such as -# 'source.dir' for the location of your java source folder and -# 'out.dir' for the location of your output folder. - -# You can also use it define how the release builds are signed by declaring -# the following properties: -# 'key.store' for the location of your keystore and -# 'key.alias' for the name of the key to use. -# The password will be asked during the build when you use the 'release' target. - diff --git a/examples/android/TC/build.xml b/examples/android/TC/build.xml deleted file mode 100644 index 034a3af4..00000000 --- a/examples/android/TC/build.xml +++ /dev/null @@ -1,84 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/android/TC/default.properties b/examples/android/TC/default.properties deleted file mode 100644 index e2e8061f..00000000 --- a/examples/android/TC/default.properties +++ /dev/null @@ -1,11 +0,0 @@ -# This file is automatically generated by Android Tools. -# Do not modify this file -- YOUR CHANGES WILL BE ERASED! -# -# This file must be checked in Version Control Systems. -# -# To customize properties used by the Ant build system use, -# "build.properties", and override values to adapt the script to your -# project structure. - -# Project target. -target=android-8 diff --git a/examples/android/TC/local.properties b/examples/android/TC/local.properties deleted file mode 100644 index dfd1408b..00000000 --- a/examples/android/TC/local.properties +++ /dev/null @@ -1,10 +0,0 @@ -# This file is automatically generated by Android Tools. -# Do not modify this file -- YOUR CHANGES WILL BE ERASED! -# -# This file must *NOT* be checked in Version Control Systems, -# as it contains information specific to your local configuration. - -# location of the SDK. This is only used by Ant -# For customization when using a Version Control System, please read the -# header note. -sdk.dir=/home/desnos/android/android-sdk-linux_x86 diff --git a/examples/android/TC/proguard.cfg b/examples/android/TC/proguard.cfg deleted file mode 100644 index 8ad7d335..00000000 --- a/examples/android/TC/proguard.cfg +++ /dev/null @@ -1,34 +0,0 @@ --optimizationpasses 5 --dontusemixedcaseclassnames --dontskipnonpubliclibraryclasses --dontpreverify --verbose --optimizations !code/simplification/arithmetic,!field/*,!class/merging/* - --keep public class * extends android.app.Activity --keep public class * extends android.app.Application --keep public class * extends android.app.Service --keep public class * extends android.content.BroadcastReceiver --keep public class * extends android.content.ContentProvider --keep public class com.android.vending.licensing.ILicensingService - --keepclasseswithmembernames class * { - native ; -} - --keepclasseswithmembernames class * { - public (android.content.Context, android.util.AttributeSet); -} - --keepclasseswithmembernames class * { - public (android.content.Context, android.util.AttributeSet, int); -} - --keepclassmembers enum * { - public static **[] values(); - public static ** valueOf(java.lang.String); -} - --keep class * implements android.os.Parcelable { - public static final android.os.Parcelable$Creator *; -} diff --git a/examples/android/TC/res/drawable-hdpi/icon.png b/examples/android/TC/res/drawable-hdpi/icon.png deleted file mode 100644 index 8074c4c5..00000000 Binary files a/examples/android/TC/res/drawable-hdpi/icon.png and /dev/null differ diff --git a/examples/android/TC/res/drawable-ldpi/icon.png b/examples/android/TC/res/drawable-ldpi/icon.png deleted file mode 100644 index 1095584e..00000000 Binary files a/examples/android/TC/res/drawable-ldpi/icon.png and /dev/null differ diff --git a/examples/android/TC/res/drawable-mdpi/icon.png b/examples/android/TC/res/drawable-mdpi/icon.png deleted file mode 100644 index a07c69fa..00000000 Binary files a/examples/android/TC/res/drawable-mdpi/icon.png and /dev/null differ diff --git a/examples/android/TC/res/layout/main.xml b/examples/android/TC/res/layout/main.xml deleted file mode 100644 index b6cf25ff..00000000 --- a/examples/android/TC/res/layout/main.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - diff --git a/examples/android/TC/res/values/strings.xml b/examples/android/TC/res/values/strings.xml deleted file mode 100644 index 3aa22bd8..00000000 --- a/examples/android/TC/res/values/strings.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - TCActivity - diff --git a/examples/android/TC/src/org/t0t0/androguard/TC/TCA.java b/examples/android/TC/src/org/t0t0/androguard/TC/TCA.java deleted file mode 100644 index adef33f2..00000000 --- a/examples/android/TC/src/org/t0t0/androguard/TC/TCA.java +++ /dev/null @@ -1,33 +0,0 @@ -package org.t0t0.androguard.TC; - -public class TCA { - public int TC1 = 30; - private int TC2 = -6; - - public String equal(int a, String b) - { - String c = Integer.toString( a ); - - System.out.print(c + " " + b + " ---- "); - if (c.equals(b)) { - return " OK "; - } - - return " X "; - } - - public TCA() - { - System.out.println("TCA TC1 == 30 : " + this.equal( this.TC1, "30" )); - System.out.println("TCA TC2 == -6 : " + this.equal( this.TC2, "-6" )); - TC1 = 20; - System.out.println("TCA TC1 == 20 : " + this.equal( this.TC1, "20" )); - } - - public void T1() - { - TCC c = new TCC(); - - c.T1(); - } -} diff --git a/examples/android/TC/src/org/t0t0/androguard/TC/TCActivity.java b/examples/android/TC/src/org/t0t0/androguard/TC/TCActivity.java deleted file mode 100644 index dc548ec9..00000000 --- a/examples/android/TC/src/org/t0t0/androguard/TC/TCActivity.java +++ /dev/null @@ -1,15 +0,0 @@ -package org.t0t0.androguard.TC; - -import android.app.Activity; -import android.os.Bundle; - -public class TCActivity extends Activity -{ - /** Called when the activity is first created. */ - @Override - public void onCreate(Bundle savedInstanceState) - { - super.onCreate(savedInstanceState); - setContentView(R.layout.main); - } -} diff --git a/examples/android/TC/src/org/t0t0/androguard/TC/TCB.java b/examples/android/TC/src/org/t0t0/androguard/TC/TCB.java deleted file mode 100644 index d4eafe16..00000000 --- a/examples/android/TC/src/org/t0t0/androguard/TC/TCB.java +++ /dev/null @@ -1,32 +0,0 @@ -package org.t0t0.androguard.TC; - -public class TCB { - public int TC1 = 1337; - private int TC2 = -90000; - - public String equal(int a, String b) - { - String c = Integer.toString( a ); - - System.out.print(c + " " + b + " ---- "); - if (c.equals(b)) { - return " OK "; - } - - return " X "; - } - - public TCB(TCA a) - { - System.out.println("TCB TC1 == 1337 : " + this.equal( this.TC1, "1337" )); - System.out.println("TCB TC2 == -90000 : " + this.equal( this.TC2, "-90000" )); - TC1 = 20; - System.out.println("TCB TC1 == 20 : " + this.equal( this.TC1, "20" )); - - a.T1(); - } - - public void T1() - { - } -} diff --git a/examples/android/TC/src/org/t0t0/androguard/TC/TCC.java b/examples/android/TC/src/org/t0t0/androguard/TC/TCC.java deleted file mode 100644 index 4b46eadd..00000000 --- a/examples/android/TC/src/org/t0t0/androguard/TC/TCC.java +++ /dev/null @@ -1,30 +0,0 @@ -package org.t0t0.androguard.TC; - -public class TCC { - public int TC1 = 30; - private int TC2 = -6; - - public String equal(int a, String b) - { - String c = Integer.toString( a ); - - System.out.print(c + " " + b + " ---- "); - if (c.equals(b)) { - return " OK "; - } - - return " X "; - } - - public TCC() - { - System.out.println("TCC TC1 == 30 : " + this.equal( this.TC1, "30" )); - System.out.println("TCC TC2 == -6 : " + this.equal( this.TC2, "-6" )); - TC1 = 20; - System.out.println("TCC TC1 == 20 : " + this.equal( this.TC1, "20" )); - } - - public void T1() - { - } -} diff --git a/examples/android/TC/src/org/t0t0/androguard/TC/TCD.java b/examples/android/TC/src/org/t0t0/androguard/TC/TCD.java deleted file mode 100644 index 8ca665ed..00000000 --- a/examples/android/TC/src/org/t0t0/androguard/TC/TCD.java +++ /dev/null @@ -1,33 +0,0 @@ -package org.t0t0.androguard.TC; - -public class TCD { - public int TC1 = 1337; - private int TC2 = -90000; - - public String equal(int a, String b) - { - String c = Integer.toString( a ); - - System.out.print(c + " " + b + " ---- "); - if (c.equals(b)) { - return " OK "; - } - - return " X "; - } - - public TCD() - { - System.out.println("TCD TC1 == 1337 : " + this.equal( this.TC1, "1337" )); - System.out.println("TCD TC2 == -90000 : " + this.equal( this.TC2, "-90000" )); - TC1 = 20; - System.out.println("TCD TC1 == 20 : " + this.equal( this.TC1, "20" )); - - TCE e = new TCE(); - e.T1(); - } - - public void T1() - { - } -} diff --git a/examples/android/TC/src/org/t0t0/androguard/TC/TCE.java b/examples/android/TC/src/org/t0t0/androguard/TC/TCE.java deleted file mode 100644 index f2ea5b57..00000000 --- a/examples/android/TC/src/org/t0t0/androguard/TC/TCE.java +++ /dev/null @@ -1,75 +0,0 @@ -package org.t0t0.androguard.TC; - -public class TCE { - public int TC1 = 1337; - private int TC2 = -90000; - - public String equal(int a, String b) - { - String c = Integer.toString( a ); - - System.out.print(c + " " + b + " ---- "); - if (c.equals(b)) { - return " OK "; - } - - return " X "; - } - - public TCE() - { - System.out.println("TCE TC1 == 1337 : " + this.equal( this.TC1, "1337" )); - System.out.println("TCE TC2 == -90000 : " + this.equal( this.TC2, "-90000" )); - - this.TC1 = 20; - System.out.println("TCE TC1 == 20 : " + this.equal( this.TC1, "20" )); - - this.TC2 = -30; - System.out.println("TCE TC2 == -30 : " + this.equal( this.TC2, "-30" )); - - int y = 0; - for(int i = 0; i < (this.TC1 - this.TC2); i++) { - for(int j=0; j < i; j++) { - y = y + this.TCE_t1( 400 ); - } - - switch( this.TC1 ) { - case 0 : y += 1; - default : y = y + this.TCE_t2(); - } - - switch( this.TC2 ) { - case 0 : y += 30; - case 45 : y += 2; - case -6 : y = y + this.TCE_t3(); - } - } - - this.TC1 = y; - - System.out.println("TCE TC1 == 3433300 : " + this.equal( this.TC1, "3433300" )); - - TCC c = new TCC(); - c.T1(); - } - - public int TCE_t1(int a) - { - return a * 7; - } - - public int TCE_t2() - { - return 0x42; - } - - public int TCE_t3() - { - return 0x45; - } - - - public void T1() - { - } -} diff --git a/examples/android/TC/src/org/t0t0/androguard/TC/TCMod1.java b/examples/android/TC/src/org/t0t0/androguard/TC/TCMod1.java deleted file mode 100644 index 12a3abac..00000000 --- a/examples/android/TC/src/org/t0t0/androguard/TC/TCMod1.java +++ /dev/null @@ -1,78 +0,0 @@ -package org.t0t0.androguard.TC; - -public class TCMod1 { - public int TC1 = 0; - private int TC2 = 3; - - public String equal(int a, String b) - { - String c = Integer.toString( a ); - - System.out.print(c + " " + b + " ---- "); - if (c.equals(b)) { - return " OK "; - } - - return " X "; - } - - public TCMod1() - { - System.out.println("TC1 == 0 : " + this.equal( this.TC1, "0" )); - System.out.println("TC2 == 3 : " + this.equal( this.TC2, "3" )); - TC1 = 20; - System.out.println("TC1 == 20 : " + this.equal( this.TC1, "20" )); - } - - public void T1() - { - int i; - for(i = 0; i < 30; i++) - { - this.TC1 += i; - } - System.out.println("TC1 == 455 : " + this.equal( this.TC1, "455" )); - - int j = 40; - System.out.println("J == 40 : " + this.equal( j, "40" )); - - for(; j < 40000; j++); - System.out.println("J == 40000 : " + this.equal( j, "40000" )); - - this.TC1 += j; - System.out.println("TC1 == 40455 : " + this.equal( this.TC1, "40455" )); - - int k[][] = { { 40, 30 }, { 60000, -788 }, { -2344556, 10000 } }; - - for(i = 0; i < k.length; i++) { - for(j=0; j < k[i].length; j++) { - this.TC1 += k[i][j]; - } - } - - TCA a = new TCA() ; - a.T1(); - - System.out.println("TC1 == -2234819 : " + this.equal( this.TC1, "-2234819" )); - - i = 300; j =-188; - System.out.println("I == 300 : " + this.equal( i, "300" )); - System.out.println("J == -188 : " + this.equal( j, "-188" )); - - TCD d = new TCD(); - d.T1(); - - do { - this.TC2 += ( j - i ); - j += 3; - i -= 2; - } while ( j < i ); - System.out.println("TC2 == -24056 : " + this.equal( this.TC2, "-24056" )); - TCA a1 = new TCA() ; - a1.T1(); - - TCB b = new TCB( a ); - b.T1(); - - } -} diff --git a/examples/android/TC/src/org/t0t0/androguard/TC/TestType1.java b/examples/android/TC/src/org/t0t0/androguard/TC/TestType1.java deleted file mode 100644 index 4894606f..00000000 --- a/examples/android/TC/src/org/t0t0/androguard/TC/TestType1.java +++ /dev/null @@ -1,23 +0,0 @@ -package org.t0t0.androguard.TC; - -public class TestType1 -{ - public TestType1() - { - long long_tc1 = 42; - long long_tc2 = -42; - long long_tc3 = 0; - - int int_tc1 = 42; - int int_tc2 = -42; - int int_tc3 = 0; - - double double_tc1 = 42.0; - double double_tc2 = -42.0; - double double_tc3 = 0.0; - - float float_tc1 = 42.0f; - float float_tc2 = -42.0f; - float float_tc3 = 0.0f; - } -} diff --git a/examples/android/TCDiff/AndroidManifest.xml b/examples/android/TCDiff/AndroidManifest.xml deleted file mode 100644 index 7e046220..00000000 --- a/examples/android/TCDiff/AndroidManifest.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - diff --git a/examples/android/TCDiff/androguard.xml b/examples/android/TCDiff/androguard.xml deleted file mode 100644 index 80b0f173..00000000 --- a/examples/android/TCDiff/androguard.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - ./examples/android/TCDiff/ - ./libs/ - - - BM_A0 - BM_A1 - wm.xml - - - - - - - - - org/t0t0/androguard/TCDiff/TCActivity - - - - org/t0t0/androguard/TCDiff/TCMod1 - TC1 - I - - - - - diff --git a/examples/android/TCDiff/bin/TCDiff-debug.apk b/examples/android/TCDiff/bin/TCDiff-debug.apk deleted file mode 100644 index 0a8f99e1..00000000 Binary files a/examples/android/TCDiff/bin/TCDiff-debug.apk and /dev/null differ diff --git a/examples/android/TCDiff/bin/classes.dex b/examples/android/TCDiff/bin/classes.dex deleted file mode 100644 index 020fc9fe..00000000 Binary files a/examples/android/TCDiff/bin/classes.dex and /dev/null differ diff --git a/examples/android/TCDiff/build.properties b/examples/android/TCDiff/build.properties deleted file mode 100644 index ee52d86d..00000000 --- a/examples/android/TCDiff/build.properties +++ /dev/null @@ -1,17 +0,0 @@ -# This file is used to override default values used by the Ant build system. -# -# This file must be checked in Version Control Systems, as it is -# integral to the build system of your project. - -# This file is only used by the Ant script. - -# You can use this to override default values such as -# 'source.dir' for the location of your java source folder and -# 'out.dir' for the location of your output folder. - -# You can also use it define how the release builds are signed by declaring -# the following properties: -# 'key.store' for the location of your keystore and -# 'key.alias' for the name of the key to use. -# The password will be asked during the build when you use the 'release' target. - diff --git a/examples/android/TCDiff/build.xml b/examples/android/TCDiff/build.xml deleted file mode 100644 index d532d055..00000000 --- a/examples/android/TCDiff/build.xml +++ /dev/null @@ -1,84 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/android/TCDiff/default.properties b/examples/android/TCDiff/default.properties deleted file mode 100644 index e2e8061f..00000000 --- a/examples/android/TCDiff/default.properties +++ /dev/null @@ -1,11 +0,0 @@ -# This file is automatically generated by Android Tools. -# Do not modify this file -- YOUR CHANGES WILL BE ERASED! -# -# This file must be checked in Version Control Systems. -# -# To customize properties used by the Ant build system use, -# "build.properties", and override values to adapt the script to your -# project structure. - -# Project target. -target=android-8 diff --git a/examples/android/TCDiff/local.properties b/examples/android/TCDiff/local.properties deleted file mode 100644 index dfd1408b..00000000 --- a/examples/android/TCDiff/local.properties +++ /dev/null @@ -1,10 +0,0 @@ -# This file is automatically generated by Android Tools. -# Do not modify this file -- YOUR CHANGES WILL BE ERASED! -# -# This file must *NOT* be checked in Version Control Systems, -# as it contains information specific to your local configuration. - -# location of the SDK. This is only used by Ant -# For customization when using a Version Control System, please read the -# header note. -sdk.dir=/home/desnos/android/android-sdk-linux_x86 diff --git a/examples/android/TCDiff/proguard.cfg b/examples/android/TCDiff/proguard.cfg deleted file mode 100644 index 8ad7d335..00000000 --- a/examples/android/TCDiff/proguard.cfg +++ /dev/null @@ -1,34 +0,0 @@ --optimizationpasses 5 --dontusemixedcaseclassnames --dontskipnonpubliclibraryclasses --dontpreverify --verbose --optimizations !code/simplification/arithmetic,!field/*,!class/merging/* - --keep public class * extends android.app.Activity --keep public class * extends android.app.Application --keep public class * extends android.app.Service --keep public class * extends android.content.BroadcastReceiver --keep public class * extends android.content.ContentProvider --keep public class com.android.vending.licensing.ILicensingService - --keepclasseswithmembernames class * { - native ; -} - --keepclasseswithmembernames class * { - public (android.content.Context, android.util.AttributeSet); -} - --keepclasseswithmembernames class * { - public (android.content.Context, android.util.AttributeSet, int); -} - --keepclassmembers enum * { - public static **[] values(); - public static ** valueOf(java.lang.String); -} - --keep class * implements android.os.Parcelable { - public static final android.os.Parcelable$Creator *; -} diff --git a/examples/android/TCDiff/res/drawable-hdpi/icon.png b/examples/android/TCDiff/res/drawable-hdpi/icon.png deleted file mode 100644 index 8074c4c5..00000000 Binary files a/examples/android/TCDiff/res/drawable-hdpi/icon.png and /dev/null differ diff --git a/examples/android/TCDiff/res/drawable-ldpi/icon.png b/examples/android/TCDiff/res/drawable-ldpi/icon.png deleted file mode 100644 index 1095584e..00000000 Binary files a/examples/android/TCDiff/res/drawable-ldpi/icon.png and /dev/null differ diff --git a/examples/android/TCDiff/res/drawable-mdpi/icon.png b/examples/android/TCDiff/res/drawable-mdpi/icon.png deleted file mode 100644 index a07c69fa..00000000 Binary files a/examples/android/TCDiff/res/drawable-mdpi/icon.png and /dev/null differ diff --git a/examples/android/TCDiff/res/layout/main.xml b/examples/android/TCDiff/res/layout/main.xml deleted file mode 100644 index b6cf25ff..00000000 --- a/examples/android/TCDiff/res/layout/main.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - diff --git a/examples/android/TCDiff/res/values/strings.xml b/examples/android/TCDiff/res/values/strings.xml deleted file mode 100644 index 3aa22bd8..00000000 --- a/examples/android/TCDiff/res/values/strings.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - TCActivity - diff --git a/examples/android/TCDiff/src/org/t0t0/androguard/TCDiff/TCA.java b/examples/android/TCDiff/src/org/t0t0/androguard/TCDiff/TCA.java deleted file mode 100644 index d0659e60..00000000 --- a/examples/android/TCDiff/src/org/t0t0/androguard/TCDiff/TCA.java +++ /dev/null @@ -1,39 +0,0 @@ -package org.t0t0.androguard.TCDiff; - -public class TCA { - public int TC1 = 30; - private int TC2 = -6; - - public String equal(int a, String b) - { - String c = Integer.toString( a ); - - System.out.print(c + " " + b + " ---- "); - if (c.equals(b)) { - return " OK "; - } - - return " X "; - } - - public TCA() - { - System.out.println("TCA TC1 == 30 : " + this.equal( this.TC1, "30" )); - System.out.println("TCA TC2 == -6 : " + this.equal( this.TC2, "-6" )); - TC1 = 20; - System.out.println("TCA TC1 == 20 : " + this.equal( this.TC1, "20" )); - } - - public void T1() - { - TCC c = new TCC(); - - // PATCH - if ((TC2 % 2) == 1) { - TC1 = 3; - } - // END PATCH - - c.T1(); - } -} diff --git a/examples/android/TCDiff/src/org/t0t0/androguard/TCDiff/TCActivity.java b/examples/android/TCDiff/src/org/t0t0/androguard/TCDiff/TCActivity.java deleted file mode 100644 index b943db92..00000000 --- a/examples/android/TCDiff/src/org/t0t0/androguard/TCDiff/TCActivity.java +++ /dev/null @@ -1,15 +0,0 @@ -package org.t0t0.androguard.TCDiff; - -import android.app.Activity; -import android.os.Bundle; - -public class TCActivity extends Activity -{ - /** Called when the activity is first created. */ - @Override - public void onCreate(Bundle savedInstanceState) - { - super.onCreate(savedInstanceState); - setContentView(R.layout.main); - } -} diff --git a/examples/android/TCDiff/src/org/t0t0/androguard/TCDiff/TCB.java b/examples/android/TCDiff/src/org/t0t0/androguard/TCDiff/TCB.java deleted file mode 100644 index 49acfbf5..00000000 --- a/examples/android/TCDiff/src/org/t0t0/androguard/TCDiff/TCB.java +++ /dev/null @@ -1,32 +0,0 @@ -package org.t0t0.androguard.TCDiff; - -public class TCB { - public int TC1 = 1337; - private int TC2 = -90000; - - public String equal(int a, String b) - { - String c = Integer.toString( a ); - - System.out.print(c + " " + b + " ---- "); - if (c.equals(b)) { - return " OK "; - } - - return " X "; - } - - public TCB(TCA a) - { - System.out.println("TCB TC1 == 1337 : " + this.equal( this.TC1, "1337" )); - System.out.println("TCB TC2 == -90000 : " + this.equal( this.TC2, "-90000" )); - TC1 = 20; - System.out.println("TCB TC1 == 20 : " + this.equal( this.TC1, "20" )); - - a.T1(); - } - - public void T1() - { - } -} diff --git a/examples/android/TCDiff/src/org/t0t0/androguard/TCDiff/TCC.java b/examples/android/TCDiff/src/org/t0t0/androguard/TCDiff/TCC.java deleted file mode 100644 index 21961fcb..00000000 --- a/examples/android/TCDiff/src/org/t0t0/androguard/TCDiff/TCC.java +++ /dev/null @@ -1,30 +0,0 @@ -package org.t0t0.androguard.TCDiff; - -public class TCC { - public int TC1 = 30; - private int TC2 = -6; - - public String equal(int a, String b) - { - String c = Integer.toString( a ); - - System.out.print(c + " " + b + " ---- "); - if (c.equals(b)) { - return " OK "; - } - - return " X "; - } - - public TCC() - { - System.out.println("TCC TC1 == 30 : " + this.equal( this.TC1, "30" )); - System.out.println("TCC TC2 == -6 : " + this.equal( this.TC2, "-6" )); - TC1 = 20; - System.out.println("TCC TC1 == 20 : " + this.equal( this.TC1, "20" )); - } - - public void T1() - { - } -} diff --git a/examples/android/TCDiff/src/org/t0t0/androguard/TCDiff/TCD.java b/examples/android/TCDiff/src/org/t0t0/androguard/TCDiff/TCD.java deleted file mode 100644 index ba21f76f..00000000 --- a/examples/android/TCDiff/src/org/t0t0/androguard/TCDiff/TCD.java +++ /dev/null @@ -1,33 +0,0 @@ -package org.t0t0.androguard.TCDiff; - -public class TCD { - public int TC1 = 1337; - private int TC2 = -90000; - - public String equal(int a, String b) - { - String c = Integer.toString( a ); - - System.out.print(c + " " + b + " ---- "); - if (c.equals(b)) { - return " OK "; - } - - return " X "; - } - - public TCD() - { - System.out.println("TCD TC1 == 1337 : " + this.equal( this.TC1, "1337" )); - System.out.println("TCD TC2 == -90000 : " + this.equal( this.TC2, "-90000" )); - TC1 = 20; - System.out.println("TCD TC1 == 20 : " + this.equal( this.TC1, "20" )); - - TCE e = new TCE(); - e.T1(); - } - - public void T1() - { - } -} diff --git a/examples/android/TCDiff/src/org/t0t0/androguard/TCDiff/TCE.java b/examples/android/TCDiff/src/org/t0t0/androguard/TCDiff/TCE.java deleted file mode 100644 index 612fef1c..00000000 --- a/examples/android/TCDiff/src/org/t0t0/androguard/TCDiff/TCE.java +++ /dev/null @@ -1,80 +0,0 @@ -package org.t0t0.androguard.TCDiff; - -public class TCE { - public int TC1 = 1337; - private int TC2 = -90000; - - public String equal(int a, String b) - { - String c = Integer.toString( a ); - - System.out.print(c + " " + b + " ---- "); - if (c.equals(b)) { - return " OK "; - } - - return " X "; - } - - public TCE() - { - System.out.println("TCE TC1 == 1337 : " + this.equal( this.TC1, "1337" )); - System.out.println("TCE TC2 == -90000 : " + this.equal( this.TC2, "-90000" )); - - this.TC1 = 20; - System.out.println("TCE TC1 == 20 : " + this.equal( this.TC1, "20" )); - - this.TC2 = -30; - System.out.println("TCE TC2 == -30 : " + this.equal( this.TC2, "-30" )); - - int y = 0; - for(int i = 0; i < (this.TC1 - this.TC2); i++) { - for(int j=0; j < i; j++) { - y = y + this.TCE_t1( 400 ); - } - - switch( this.TC1 ) { - case 0 : y += 1; - default : y = y + this.TCE_t2(); - } - - switch( this.TC2 ) { - case 0 : y += 30; - case 45 : y += 2; - case -6 : y = y + this.TCE_t3(); - } - } - - this.TC1 = y; - - System.out.println("TCE TC1 == 3433300 : " + this.equal( this.TC1, "3433300" )); - - TCC c = new TCC(); - c.T1(); - } - - public int TCE_t1(int a) - { - return a * 7; - } - - public int TCE_t2() - { - return 0x42; - } - - public int TCE_t3() - { - return 0x45; - } - - // NEW METHOD - public int TCE_t4() - { - return 0x90; - } - - public void T1() - { - } -} diff --git a/examples/android/TCDiff/src/org/t0t0/androguard/TCDiff/TCMod1.java b/examples/android/TCDiff/src/org/t0t0/androguard/TCDiff/TCMod1.java deleted file mode 100644 index 044d6838..00000000 --- a/examples/android/TCDiff/src/org/t0t0/androguard/TCDiff/TCMod1.java +++ /dev/null @@ -1,86 +0,0 @@ -package org.t0t0.androguard.TCDiff; - -public class TCMod1 { - public int TC1 = 0; - private int TC2 = 3; - - public String equal(int a, String b) - { - String c = Integer.toString( a ); - - System.out.print(c + " " + b + " ---- "); - if (c.equals(b)) { - return " OK "; - } - - return " X "; - } - - public TCMod1() - { - System.out.println("TC1 == 0 : " + this.equal( this.TC1, "0" )); - System.out.println("TC2 == 3 : " + this.equal( this.TC2, "3" )); - TC1 = 20; - System.out.println("TC1 == 20 : " + this.equal( this.TC1, "20" )); - } - - public void T1() - { - int i; - for(i = 0; i < 30; i++) - { - this.TC1 += i; - } - System.out.println("TC1 == 455 : " + this.equal( this.TC1, "455" )); - - int j = 40; - System.out.println("J == 40 : " + this.equal( j, "40" )); - - for(; j < 40000; j++); - System.out.println("J == 40000 : " + this.equal( j, "40000" )); - - this.TC1 += j; - System.out.println("TC1 == 40455 : " + this.equal( this.TC1, "40455" )); - - int k[][] = { { 40, 30 }, { 60000, -788 }, { -2344556, 10000 } }; - - for(i = 0; i < k.length; i++) { - for(j=0; j < k[i].length; j++) { - // PATCH - this.TC1 += k[i][j] + 1; - // END PATCH - } - } - - TCA a = new TCA() ; - a.T1(); - - System.out.println("TC1 == -2234819 : " + this.equal( this.TC1, "-2234819" )); - - i = 300; j =-188; - System.out.println("I == 300 : " + this.equal( i, "300" )); - System.out.println("J == -188 : " + this.equal( j, "-188" )); - - TCD d = new TCD(); - d.T1(); - - do { - this.TC2 += ( j - i ); - j += 3; - // PATCH - if (j == 4) { - break; - } - // END PATCH - - i -= 2; - } while ( j < i ); - System.out.println("TC2 == -24056 : " + this.equal( this.TC2, "-24056" )); - TCA a1 = new TCA() ; - a1.T1(); - - TCB b = new TCB( a ); - b.T1(); - - } -} diff --git a/examples/android/TCDiff/src/org/t0t0/androguard/TCDiff/TestType1.java b/examples/android/TCDiff/src/org/t0t0/androguard/TCDiff/TestType1.java deleted file mode 100644 index 0a1089e1..00000000 --- a/examples/android/TCDiff/src/org/t0t0/androguard/TCDiff/TestType1.java +++ /dev/null @@ -1,23 +0,0 @@ -package org.t0t0.androguard.TCDiff; - -public class TestType1 -{ - public TestType1() - { - long long_tc1 = 42; - long long_tc2 = -42; - long long_tc3 = 0; - - int int_tc1 = 42; - int int_tc2 = -42; - int int_tc3 = 0; - - double double_tc1 = 42.0; - double double_tc2 = -42.0; - double double_tc3 = 0.0; - - float float_tc1 = 42.0f; - float float_tc2 = -42.0f; - float float_tc3 = 0.0f; - } -} diff --git a/examples/android/TestsAndroguard/.classpath b/examples/android/TestsAndroguard/.classpath deleted file mode 100644 index b1bf8312..00000000 --- a/examples/android/TestsAndroguard/.classpath +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/examples/android/TestsAndroguard/.project b/examples/android/TestsAndroguard/.project deleted file mode 100644 index 206d059b..00000000 --- a/examples/android/TestsAndroguard/.project +++ /dev/null @@ -1,33 +0,0 @@ - - - TestsAndroguard - - - - - - com.android.ide.eclipse.adt.ResourceManagerBuilder - - - - - com.android.ide.eclipse.adt.PreCompilerBuilder - - - - - org.eclipse.jdt.core.javabuilder - - - - - com.android.ide.eclipse.adt.ApkBuilder - - - - - - com.android.ide.eclipse.adt.AndroidNature - org.eclipse.jdt.core.javanature - - diff --git a/examples/android/TestsAndroguard/AndroidManifest.xml b/examples/android/TestsAndroguard/AndroidManifest.xml deleted file mode 100644 index 36204969..00000000 --- a/examples/android/TestsAndroguard/AndroidManifest.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/examples/android/TestsAndroguard/bin/TestActivity.apk b/examples/android/TestsAndroguard/bin/TestActivity.apk deleted file mode 100644 index b43a1d3d..00000000 Binary files a/examples/android/TestsAndroguard/bin/TestActivity.apk and /dev/null differ diff --git a/examples/android/TestsAndroguard/bin/TestActivity_unsigned.apk b/examples/android/TestsAndroguard/bin/TestActivity_unsigned.apk deleted file mode 100644 index 3719abb8..00000000 Binary files a/examples/android/TestsAndroguard/bin/TestActivity_unsigned.apk and /dev/null differ diff --git a/examples/android/TestsAndroguard/bin/classes.dex b/examples/android/TestsAndroguard/bin/classes.dex deleted file mode 100644 index 9974c580..00000000 Binary files a/examples/android/TestsAndroguard/bin/classes.dex and /dev/null differ diff --git a/examples/android/TestsAndroguard/gen/tests/androguard/R.java b/examples/android/TestsAndroguard/gen/tests/androguard/R.java deleted file mode 100644 index 8811d479..00000000 --- a/examples/android/TestsAndroguard/gen/tests/androguard/R.java +++ /dev/null @@ -1,23 +0,0 @@ -/* AUTO-GENERATED FILE. DO NOT MODIFY. - * - * This class was automatically generated by the - * aapt tool from the resource data it found. It - * should not be modified by hand. - */ - -package tests.androguard; - -public final class R { - public static final class attr { - } - public static final class drawable { - public static final int icon=0x7f020000; - } - public static final class layout { - public static final int main=0x7f030000; - } - public static final class string { - public static final int app_name=0x7f040001; - public static final int hello=0x7f040000; - } -} diff --git a/examples/android/TestsAndroguard/libs/android-support-v4.jar b/examples/android/TestsAndroguard/libs/android-support-v4.jar deleted file mode 100644 index 6080877d..00000000 Binary files a/examples/android/TestsAndroguard/libs/android-support-v4.jar and /dev/null differ diff --git a/examples/android/TestsAndroguard/project.properties b/examples/android/TestsAndroguard/project.properties deleted file mode 100644 index b7c2081d..00000000 --- a/examples/android/TestsAndroguard/project.properties +++ /dev/null @@ -1,14 +0,0 @@ -# This file is automatically generated by Android Tools. -# Do not modify this file -- YOUR CHANGES WILL BE ERASED! -# -# This file must be checked in Version Control Systems. -# -# To customize properties used by the Ant build system edit -# "ant.properties", and override values to adapt the script to your -# project structure. -# -# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home): -#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt - -# Project target. -target=android-10 diff --git a/examples/android/TestsAndroguard/res/drawable-hdpi/icon.png b/examples/android/TestsAndroguard/res/drawable-hdpi/icon.png deleted file mode 100644 index 8074c4c5..00000000 Binary files a/examples/android/TestsAndroguard/res/drawable-hdpi/icon.png and /dev/null differ diff --git a/examples/android/TestsAndroguard/res/drawable-ldpi/icon.png b/examples/android/TestsAndroguard/res/drawable-ldpi/icon.png deleted file mode 100644 index 1095584e..00000000 Binary files a/examples/android/TestsAndroguard/res/drawable-ldpi/icon.png and /dev/null differ diff --git a/examples/android/TestsAndroguard/res/drawable-mdpi/icon.png b/examples/android/TestsAndroguard/res/drawable-mdpi/icon.png deleted file mode 100644 index a07c69fa..00000000 Binary files a/examples/android/TestsAndroguard/res/drawable-mdpi/icon.png and /dev/null differ diff --git a/examples/android/TestsAndroguard/res/layout/main.xml b/examples/android/TestsAndroguard/res/layout/main.xml deleted file mode 100644 index 3a5f117d..00000000 --- a/examples/android/TestsAndroguard/res/layout/main.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - diff --git a/examples/android/TestsAndroguard/res/values/strings.xml b/examples/android/TestsAndroguard/res/values/strings.xml deleted file mode 100644 index 598dbd52..00000000 --- a/examples/android/TestsAndroguard/res/values/strings.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - Hello World, TestActivity! kikoololmodif - TestsAndroguardApplication - diff --git a/examples/android/TestsAndroguard/src/TestDefaultPackage.java b/examples/android/TestsAndroguard/src/TestDefaultPackage.java deleted file mode 100644 index 85835d03..00000000 --- a/examples/android/TestsAndroguard/src/TestDefaultPackage.java +++ /dev/null @@ -1,82 +0,0 @@ -import java.util.ArrayList; -import java.util.List; - - -public class TestDefaultPackage { - - static long [] test_; - private class TestInnerClass { - private int a, b; - - private TestInnerClass(int a, int b) - { - this.a = a; - this.b = b; - } - - public void Test(int d) - { - System.out.println("Test2: " + this.a + d + this.b); - } - - private class TestInnerInnerClass { - private int a, c; - - private TestInnerInnerClass(int a, int c) - { - this.a = a; - this.c = c; - } - - public void Test(int b) - { - System.out.println("Test: " + this.a * b + this.c); - } - } - } - - public void const4() - { - byte _ = -8; - byte a = -7; - byte b = -6; - byte c = -5; - byte d = -4; - byte e = -3; - byte f = -2; - byte g = -1; - byte h = 0; - byte i = 1; - byte j = 2; - byte k = 3; - byte l = 4; - byte m = 5; - byte n = 6; - byte o = 7; - System.out.println("" + _ + a + b + c + d + e + f + g + h + i + j + k + l + m + n + o); - } - - public static void main(String [] z) - { - int a = 5; - switch(a) - { - case 1: - case 2: - System.out.println("1 || 2"); - break; - case 3: - System.out.print("3 || "); - case 4: - default: - System.out.println("4"); - break; - case 5: - System.out.println("5"); - } - TestDefaultPackage p = new TestDefaultPackage(); - TestInnerClass t = p.new TestInnerClass(3, 4); - TestInnerClass.TestInnerInnerClass t2 = t.new TestInnerInnerClass(3, 4); - System.out.println("t.a = " + t.a); - } -} diff --git a/examples/android/TestsAndroguard/src/tests/androguard/Eratosthene.java b/examples/android/TestsAndroguard/src/tests/androguard/Eratosthene.java deleted file mode 100644 index b297a7d4..00000000 --- a/examples/android/TestsAndroguard/src/tests/androguard/Eratosthene.java +++ /dev/null @@ -1,36 +0,0 @@ -package tests.androguard; - -public class Eratosthene { - public static int[] eratosthenes(int n) { - boolean a[] = new boolean[n+1]; - a[0] = true; - a[1] = true; - - int sqn = (int)Math.sqrt(n); - for(int i = 2; i <= sqn; i++) { - if(!a[i]) { - int j = i*i; - while(j <= n) { - a[j] = true; - j += i; - } - } - } - - int cnt = 0; - for(boolean b: a) { - if(!b) { - cnt++; - } - } - - int j = 0; - int[] primes = new int[cnt]; - for(int i = 0; i < a.length; i++) { - if(!a[i]) { - primes[j++] = i; - } - } - return primes; - } -} diff --git a/examples/android/TestsAndroguard/src/tests/androguard/Lzss.java b/examples/android/TestsAndroguard/src/tests/androguard/Lzss.java deleted file mode 100644 index 06f515a8..00000000 --- a/examples/android/TestsAndroguard/src/tests/androguard/Lzss.java +++ /dev/null @@ -1,59 +0,0 @@ -package tests.androguard; - -public class Lzss { - public static int lzss_decompress(byte[] in, byte[] out) { - int i = 0; - int j = 0; - int flags = 0; - int cnt = 7; - - while(j < out.length) { - - if(++cnt == 8) { - if(i >= in.length) { - break; - } - flags = in[i++] & 0xFF; - cnt = 0; - } - - if((flags & 1) == 0) { - if(i >= in.length) { - break; - } - out[j] = in[i]; - j++; - i++; - } - else { - if((i + 1) >= in.length) { - return -1; - } - int v = (in[i] & 0xFF) | (in[i+1] & 0xFF) << 8; - i += 2; - - int offset = (v >> 4) + 1; - int length = (v & 0xF) + 3; - - // not enough data decoded - if(offset > j) { - return -1; - } - - // output buffer is too small - if((out.length - j) < length) { - return -1; - } - - for(int k = 0; k < length; k++) { - out[j+k] = out[j+k-offset]; - } - j += length; - } - - flags >>= 1; - } - - return j; - } -} diff --git a/examples/android/TestsAndroguard/src/tests/androguard/RC4.java b/examples/android/TestsAndroguard/src/tests/androguard/RC4.java deleted file mode 100644 index 17ff0dd0..00000000 --- a/examples/android/TestsAndroguard/src/tests/androguard/RC4.java +++ /dev/null @@ -1,41 +0,0 @@ -package tests.androguard; - -public class RC4 { - -public static void rc4_crypt(byte[] key, byte[] data) { - int keylen = key.length; - int datalen = data.length; - int i; - int j; - - // key scheduling - byte[] sbox = new byte[256]; - for(i = 0; i < 256; i++) { - sbox[i] = (byte)i; - } - j = 0; - for(i = 0; i < 256; i++) { - j = ((j + sbox[i] + key[i % keylen]) % 256) & 0xFF; - byte tmp = sbox[i]; - sbox[i] = sbox[j]; - sbox[j] = tmp; - } - - // generate output - i = 0; - j = 0; - int index = 0; - while(index < datalen) { - i = ((i + 1) % 256) & 0xFF; - j = ((j + sbox[i]) % 256) & 0xFF; - - byte tmp = sbox[i]; - sbox[i] = sbox[j]; - sbox[j] = tmp; - - byte k = (byte)(sbox[((sbox[i] + sbox[j]) % 256) & 0xFF]); - data[index] ^= k; - index++; - } -} -} \ No newline at end of file diff --git a/examples/android/TestsAndroguard/src/tests/androguard/TestActivity.java b/examples/android/TestsAndroguard/src/tests/androguard/TestActivity.java deleted file mode 100644 index 61755889..00000000 --- a/examples/android/TestsAndroguard/src/tests/androguard/TestActivity.java +++ /dev/null @@ -1,373 +0,0 @@ -package tests.androguard; - -import java.io.PrintStream; - -import android.app.Activity; -import android.os.Bundle; -import android.widget.TextView; -import android.widget.Toast; - -public class TestActivity extends Activity { - public int value; - public int value2; - private int test = 10; - private static final int test2 = 20; - public int test3 = 30; - public int tab[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }; - - static { - int t = 5; - System.out.println("foobar"); - } - - public TestActivity() { - value = 100; - value2 = 200; - } - - public TestActivity(int value, int value2) { - this.value = value; - this.value2 = value2; - } - - public TestActivity(double value, double value2) { - this.test = 5; - this.value = (int) value; - this.value2 = (int) value2; - } - - public int test_base(int _value, int _value2) { - int y = 0; - double sd = -6; - double zz = -5; - double yy = -4; - double xx = -3; - double w = -2; - double x = -1; - double k = 0.0; - double d = 1; - double b = 2; - double c = 3; - double f = 4; - double z = 5; - double cd = 6; - float g = 4.20f; - - double useless = g * c + b - y + d; - - System.out.println("VALUE = " + this.value + " VALUE 2 = " - + this.value2); - - for (int i = 0; i < (_value + _value2); i++) { - y = this.value + y - this.value2; - y = y & 200 * test1(20); - - y = this.value2 - y; - } - - try { - int[] t = new int[5]; - t[6] = 1; - } catch (java.lang.ArrayIndexOutOfBoundsException e) { - System.out.println("boom"); - } - - if (this.value > 0) { - this.value2 = y; - } - - switch (this.value) { - case 0: - this.value2 = this.pouet(); - break; - default: - this.value2 = this.pouet2(); - } - - switch (this.value) { - case 1: - this.value2 = this.pouet(); - break; - case 2: - this.value2 = this.pouet2(); - break; - case 3: - this.value2 = this.pouet3(); - } - - return y; - } - - public int foo(int i, int j) { - while (true) { - try { - while (i < j) - i = j++ / i; - } catch (RuntimeException re) { - i = 10; - continue; - } - if (i == 0) - return j; - } - } - - public int foobis(int i, int j) { - while (i < j && i != 10) { - try { - i = j++ / i; - } catch (RuntimeException re) { - i = 10; - continue; - } - } - return j; - - } - - public int foo2(int i, int j) { - while (true) { - if (i < j) { - try { - i = j++ / i; - } catch (RuntimeException re) { - i = 10; - continue; - } - } - if (i == 0) - return j; - } - } - - public int foo4(int i, int j) { - while (i < j) { - try { - i = j++ / i; - } catch (RuntimeException re) { - i = 10; - } - } - return j; - } - - public int test1(int val) { - int a = 0x10; - - return val + a - 60 * this.value; - } - - public int pouet() { - int v = this.value; - return v; - } - - public void testVars(int z, char y) { - int a = this.value * 2; - int b = 3; - int c = 4; - int d = c + b * a - 1 / 3 * this.value; - int e = c + b - a; - int f = e + 2; - int g = 3 * d - c + f - 8; - int h = 10 + this.value + a + b + c + d + e + f + g; - int i = 150 - 40 + 12; - int j = h - i + g; - int k = 10; - int l = 5; - int m = 2; - int n = 10; - int o = k * l + m - n * this.value + c / e - f * g + h - j; - int p = a + b + c; - int q = p - k + o - l; - int r = a + b - c * d / e - f + g - h * i + j * k * l - m - n + o / p - * q; - System.out.println(" meh " + r); - System.out.println(y); - y += 'a'; - this.testVars(a, y); - this.test1(10); - pouet2(); - this.pouet2(); - int s = pouet2(); - } - - public static void testDouble() { - double f = -5; - double g = -4; - double h = -3; - double i = -2; - double j = -1; - double k = 0; - double l = 1; - double m = 2; - double n = 3; - double o = 4; - double p = 5; - - long ff = -5; - long gg = -4; - long hh = -3; - long ii = -2; - long jj = -1; - long kk = 0; - long ll = 1; - long mm = 2; - long nn = 3; - long oo = 4; - long pp = 5; - - float fff = -5; - float ggg = -4; - float hhh = -3; - float iii = -2; - float jjj = -1; - float kkk = 0; - float lll = 1; - float mmm = 2; - float nnn = 3; - float ooo = 4; - float ppp = 5; - - double abc = 65534; - double def = 65535; - double ghi = 65536; - double jkl = 65537; - - double mno = 32769; - double pqr = 32768; - double stu = 32767; - double vwx = 32766; - - long aabc = 65534; - long adef = 65535; - long aghi = 65536; - long ajkl = 65537; - - long amno = 32769; - long apqr = 32768; - long astu = 32767; - long avwx = 32766; - - float babc = 65534; - float bdef = 65535; - float bghi = 65536; - float bjkl = 65537; - - float bmno = 32769; - float bpqr = 32768; - float bstu = 32767; - float bvwx = 32766; - - double abcd = 5346952; - long dcba = 5346952; - float cabd = 5346952; - - double zabc = 65534.50; - double zdef = 65535.50; - double zghi = 65536.50; - double zjkl = 65537.50; - - double zmno = 32769.50; - double zpqr = 32768.50; - double zstu = 32767.50; - double zvwx = 32766.50; - - float xabc = 65534.50f; - float xdef = 65535.50f; - float xghi = 65536.50f; - float xjkl = 65537.50f; - - float xmno = 32769.50f; - float xpqr = 32768.50f; - float xstu = 32767.50f; - float xvwx = 32766.50f; - - float ymno = -5f; - float ypqr = -65535f; - float ystu = -65536f; - float yvwx = -123456789123456789.555555555f; - double yvwx2 = -123456789123456789.555555555; - int boom = -606384730; - float reboom = -123456790519087104f; - float gettype = boom + 2 + 3.5f; - System.out.println(gettype); - } - - public static void testCall1(float b) { - System.out.println("k" + b); - } - - public static void testCall2(long i) { - new PrintStream(System.out).println("k" + i); - } - - public static void testCalls(TestIfs d) { - testCall2(3); - TestIfs.testIF(5); - System.out.println(d.getClass()); - } - - public static void testLoop(double a) { - while (a < 10) { - System.out.println(a); - a *= 2; - } - } - - public void testVarArgs(int p, long[] p2, String... p3) { - - } - - public void testString( ) - { - String a = "foo"; - String b = new String("bar"); - System.out.println(a + b); - } - - public synchronized int pouet2() { - int i = 0, j = 10; - System.out.println("test"); - - while (i < j) { - try { - i = j++ / i; - } catch (RuntimeException re) { - i = 10; - } - } - this.value = i; - return 90; - } - - public int pouet3() { - return 80; - } - - public int go() { - System.out.println(" test_base(500, 3) " + this.test_base(500, 3)); - return test + test2 + 10; - } - - public void testAccessField() { - TestArr$ays a = new TestArr$ays(); - a.d = new byte[5]; - a.d[2] = 'c'; - System.out.println("test :" + a.d[2]); - } - - /** Called when the activity is first created. */ - @Override - public void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - setContentView(R.layout.main); - - Toast toast = Toast.makeText(getApplicationContext(), "this is a test ! " + 42, Toast.LENGTH_LONG); - toast.show(); - /* - TestLoops o = new TestLoops(); - o.testIrreducible(test3, test2); - */ - } -} diff --git a/examples/android/TestsAndroguard/src/tests/androguard/TestArr$ays.java b/examples/android/TestsAndroguard/src/tests/androguard/TestArr$ays.java deleted file mode 100644 index 9121c181..00000000 --- a/examples/android/TestsAndroguard/src/tests/androguard/TestArr$ays.java +++ /dev/null @@ -1,44 +0,0 @@ -package tests.androguard; - -public class TestArr$ays { - - public static class InternField { - public static byte[] b; - } - - private byte[] b; - public byte[] d; - - public TestArr$ays( ) { - b = new byte[5]; - } - - public TestArr$ays( byte [] b ) { - this.b = b; - } - - public TestArr$ays( int i ) { - byte [] a = { 1, 2, 3, 4, 5 }; - b = a; - } - - public void testEmptyArrayByte( ) { - byte [] b = new byte[5]; - InternField.b = b; - } - - public void testFullArrayByte( ) { - byte[] b = { 1, 2, 4, 39, 20 }; - this.b = b; - } - - public void testModifArrayByte( ) { - b[2000000] = 2; - } - - public void testInstanceInternArrayByte( ){ - InternField f = new InternField(); - f.b = new byte[5]; - f.b[2] = 40; - } -} diff --git a/examples/android/TestsAndroguard/src/tests/androguard/TestExceptions.java b/examples/android/TestsAndroguard/src/tests/androguard/TestExceptions.java deleted file mode 100644 index 687aafe8..00000000 --- a/examples/android/TestsAndroguard/src/tests/androguard/TestExceptions.java +++ /dev/null @@ -1,146 +0,0 @@ -package tests.androguard; - -public class TestExceptions { - - public int testException1( int a ) - { - try { - a = 5 / 0; - } catch ( ArithmeticException e ) { - a = 3; - } - return a; - } - - public static int testException2( int a, int b ) throws ArrayIndexOutOfBoundsException - { - int [] t = new int[b]; - - if ( b == 10 ) - b++; - - for( int i = 0; i < b; i++ ) - { - t[i] = 5; - } - - return a + t[0]; - } - - public int testException3( int a, int[] t ) - { - int result = 0; - - if ( a % 2 == 0 ) - { - try { - result = t[a]; - } catch (ArrayIndexOutOfBoundsException e) { - result = 1337; - } - } - else if ( a % 3 == 0 ) { - result = a * 2; - } else { - result = t[0] - 10; - } - - return result; - } - - public int testException4( int a ) - { - int res = 15; - - res += a; - - try { - Runtime b = Runtime.getRuntime(); - b.notifyAll(); - } catch( RuntimeException e ) { - System.out.println("runtime " + e.getMessage()); - } - - try { - Runtime c = Runtime.getRuntime(); - c.wait(); - } - catch (RuntimeException e) { - System.out.println("runtime " + e.getMessage()); - } - catch (Exception e) { - System.out.println("exception e " + e.getMessage()); - } - - try { - res /= a; - } catch (Exception e) { - System.out.println("exception e " + e.getMessage()); - } - - System.out.println("end"); - return res; - - } - - public static void testTry1(int b) - { - int a = 15; - try { - if ( b % 2 == 0) - { - a = a / b; - if ( a - 3 == 4 ) - System.out.println("lll"); - } - else { - a = a * b; - System.out.println("ppp"); - } - } catch(ArithmeticException e){ - System.out.println("oupla"); - } - } - - public static void testCatch1(int b) - { - int a = 15; - try { - if ( b % 2 == 0 ) - { - a = a / b; - if ( a - 3 == 4 ) - System.out.println("mmm"); - } else { - a = a * b; - System.out.println("qqq"); - } - } catch(ArithmeticException e) - { - if ( a == 12 ) - System.out.println("test"); - else { - b += 3 * a; - System.out.println("test2 " + b); - } - } - } - - public static void testExceptions( String [] z ) - { - System.out.println( "Result test1 : " + new TestExceptions().testException1( 10 ) ); - - System.out.println( "=================================" ); - try { - System.out.println( "Result test2 : " + testException2( 5, 10 ) ); - } catch (ArrayIndexOutOfBoundsException e) { - System.out.println( "Result test2 : " + testException2( 5, 9 ) ); - } - - System.out.println( "=================================" ); - int [] t = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }; - System.out.println( "Result test3 : " + new TestExceptions().testException3( 8, t ) ); - System.out.println( "Result test3 : " + new TestExceptions().testException3( 9, t ) ); - System.out.println( "Result test3 : " + new TestExceptions().testException3( 7, t ) ); - } -} \ No newline at end of file diff --git a/examples/android/TestsAndroguard/src/tests/androguard/TestIfs.java b/examples/android/TestsAndroguard/src/tests/androguard/TestIfs.java deleted file mode 100644 index 561d2a65..00000000 --- a/examples/android/TestsAndroguard/src/tests/androguard/TestIfs.java +++ /dev/null @@ -1,145 +0,0 @@ -package tests.androguard; - -public class TestIfs { - private boolean P, Q, R, S, T; - - public static int testIF(int p) { - int i; - - if (p > 0) { - i = p * 2; - } else { - i = p + 2; - } - return i; - } - - public static int testIF2(int p) { - int i = 0; - - if (p > 0) { - i = p * 2; - } else { - i = p + 2; - } - return i; - } - - public static int testIF3(int p) { - int i = 0; - if (p > 0) { - i = p * 2; - } - return i; - } - - public static int testIF4(int p, int i) { - if (p > 0 && p % 2 == 3) { - i += p * 3; - } - return i; - } - - public static int testIF5(int p, int i) { - if ((p <= 0 && i == 0) || (p == i * 2 || i == p / 3)) { - i = -p; - } - return i; - } - - public static int testIfBool(int p, boolean b) { - int i = 0; - if ( p > 0 && b ) - i += p * 3; - else if (b) - i += 5; - else - i = 2; - return i; - } - - public static int testShortCircuit(int p) { - int i = 0; - if (p > 0 && p % 2 == 3) { - i = p + 1; - } else { - i = -p; - } - return i; - } - - public static int testShortCircuit2(int p) { - int i = 0; - if (p <= 0 || p % 2 != 3) - i = -p; - else - i = p + 1; - return i; - } - - public static int testShortCircuit3(int p, int i) { - if ((p <= 0 && i == 0) || (p == i * 2 || i == p / 3)) { - i = -p; - } else { - i = p + 1; - } - return i; - } - - public static int testShortCircuit4(int p, int i) { - if ((p <= 0 || i == 0) && (p == i * 2 || i == p / 3)) - i = -p; - else - i = p + 1; - return i; - } - - public void testCFG() { - int I = 1, J = 1, K = 1, L = 1; - - do { - if (P) { - J = I; - if (Q) - L = 2; - else - L = 3; - K++; - } else { - K += 2; - } - System.out.println(I + "," + J + "," + K + "," + L); - do { - if (R) - L += 4; - } while (!S); - I += 6; - } while (!T); - } - - public void testCFG2(int a, int b, int c) { - a += 5; - b += a * 5; - if (a < b) { - if (b < c) { - System.out.println("foo"); - } else { - System.out.println("bar"); - } - } - a = 10; - while (a < c) { - a += c; - do { - b = a++; - System.out.println("baz"); - } while (c < b); - b++; - } - System.out.println("foobar"); - if (a >= 5 || b * c <= c + 10) { - System.out.println("a = " + 5); - } - System.out.println("end"); - } -} diff --git a/examples/android/TestsAndroguard/src/tests/androguard/TestInvoke.java b/examples/android/TestsAndroguard/src/tests/androguard/TestInvoke.java deleted file mode 100644 index 5bc08468..00000000 --- a/examples/android/TestsAndroguard/src/tests/androguard/TestInvoke.java +++ /dev/null @@ -1,50 +0,0 @@ -package tests.androguard; - - -public class TestInvoke { - - public TestInvoke( ) { - TestInvoke1(42 ); - } - - public int TestInvoke1( int a ) - { - return TestInvoke2( a, 42 ); - } - - public int TestInvoke2( int a, int b ) - { - return TestInvoke3( a, b, 42 ); - } - - public int TestInvoke3( int a, int b, int c ) - { - return TestInvoke4( a, b, c, 42 ); - } - - public int TestInvoke4( int a, int b, int c, int d ) - { - return TestInvoke5( a, b, c, d, 42 ); - } - - public int TestInvoke5(int a, int b, int c, int d, int e) - { - return TestInvoke6( a, b, c, d, e, 42 ); - } - - public int TestInvoke6( int a, int b, int c, int d, int e, int f ) - { - return TestInvoke7( a, b, c, d, e, f, 42); - } - - public int TestInvoke7( int a, int b, int c, int d, int e, int f, int g ) - { - return TestInvoke8( a, b, c, d, e, f, g, 42); - } - - public int TestInvoke8( int a, int b, int c, int d, int e, int f, int g, int h ) - { - return a * b * c * d * e *f * g *h; - } - -} diff --git a/examples/android/TestsAndroguard/src/tests/androguard/TestLoops.java b/examples/android/TestsAndroguard/src/tests/androguard/TestLoops.java deleted file mode 100644 index 1172c2e3..00000000 --- a/examples/android/TestsAndroguard/src/tests/androguard/TestLoops.java +++ /dev/null @@ -1,238 +0,0 @@ -package tests.androguard; - -import android.content.pm.LabeledIntent; -import android.util.Log; - -public class TestLoops { - - protected static class Loop { - public static int i; - public static int j; - } - - public void testWhile() { - int i = 5, j = 10; - while (i < j) { - j += i / 2.0 + j; - i += i * 2; - } - Loop.i = i; - Loop.j = j; - } - - public void testWhile2() { - while(true) - System.out.println("toto"); - } - - public void testWhile3(int i, int j) - { - while ( i < j && i % 2 == 0 ) - { - i += j / 3; - } - } - - public void testWhile4(int i, int j) - { - while ( i < j || i % 2 == 0 ) - { - i += j / 3; - } - } - - public void testWhile5(int i, int j, int k ) - { - while ( ( i < j || i % 2 == 0 ) && ( j < k || k % 2 == 0) ) - i += k - j; - } - - public void testFor() { - int i, j; - for (i = 5, j = 10; i < j; i += i * 2) { - j += i / 2.0 + j; - } - Loop.i = i; - Loop.j = j; - } - - public void testDoWhile() { - int i = 5, j = 10; - do { - j += i / 2.0 + j; - i += i * 2; - } while (i < j); - Loop.i = i; - Loop.j = j; - } - - public int testNestedLoops(int a) { - if (a > 1000) { - return testNestedLoops(a / 2); - } else { - while (a > 0) { - a += 1; - while (a % 2 == 0) { - a *= 2; - while (a % 3 == 0) { - a -= 3; - } - } - } - } - return a; - } - - public void testMultipleLoops() { - int a = 0; - while (a < 50) - a += 2; - while (a % 3 == 0) - a *= 5; - while (a < 789 && a > 901) - System.out.println("woo"); - } - - public int testDoWhileTrue(int n) { - do { - n--; - if (n == 2) - return 5; - if (n < 2) - n = 500; - } while (true); - } - - public int testWhileTrue(int n) { - while (true) { - n--; - if (n == 2) - return 5; - if (n < 2) - n = 500; - } - } - - public int testDiffWhileDoWhile(int n) { - while (n != 2) { - if (n < 2) - n = 500; - } - return 5; - } - - public void testReducible(boolean x, boolean y) { - int a = 0, b = 0; - if (x) - while (y) { - a = b + 1; - b++; - } - else - while (y) { - b++; - a = b + 1; - } - Loop.i = a; - Loop.j = b; - } - - public void testIrreducible(int a, int b) { - while (true) { - if (b < a) { - Log.i("test", "In BasicBlock A"); - } - b = a - 1; - Log.i("test2", "In BasicBlock B"); - } - } - - public int testBreak( boolean b ) { - int a = 0, c = 0; - while(true) { - System.out.println("foo"); - a += c; - c += 5; - if ( a == 50 ) - b = true; - if ( b ) - break; - } - return a + c; - } - - public int testBreakbis( boolean b ) { - int a = 0, c = 0; - do { - System.out.println("foo"); - a += c; - c += 5; - if ( a == 50 ) - b = true; - if ( b ) - break; - } while(true); - return a + c; - } - - public int testBreakMid( boolean b ) { - int a = Loop.i, c = Loop.j; - while(true) { - System.out.println("foo"); - a += c; - c += 5; - if ( a == 50 ) - b = !b; - if ( b ) break; - System.out.println("bar"); - a *= 2; - } - return a + c; - } - - public int testBreakDoWhile( boolean b ) { - int a = 0, c = 0; - do { - System.out.println("foo"); - a += c; - c += 5; - if ( a == 50 ) - b = true; - }while ( b ); - return a + c; - } - - public int testBreak2( boolean b ) { - int a = 0, c = 0; - while (true) { - System.out.println("foo"); - a += c; - c += 5; - if ( a == 50 && b ) - break; - } - return a + c; - } - - public void testBreak3( boolean b ) { - int a = 0, c = 0; - while ( true ){ - System.out.println("foo"); - a += c; - c += 5; - if ( a == 50 && b ) - break; - } - } - - public void testBreak4( boolean b, int d ) { - int a = 0, c = 0; - while ( c < 50 ) { - System.out.println("foo"); - a += c; - c +=5; - if ( a == d ) - break; - } - } -} diff --git a/examples/android/TestsAndroguard/src/tests/androguard/TestQuickSort.java b/examples/android/TestsAndroguard/src/tests/androguard/TestQuickSort.java deleted file mode 100644 index cc580971..00000000 --- a/examples/android/TestsAndroguard/src/tests/androguard/TestQuickSort.java +++ /dev/null @@ -1,45 +0,0 @@ -package tests.androguard; - -public class TestQuickSort { - public int a = 10; - - public static void Main(String[] args) { - int[] intArray = new int[args.length]; - for (int i = 0; i < intArray.length; i++) { - intArray[i] = Integer.parseInt(args[i]); - } - QuickSort(intArray, 0, intArray.length - 1); - for (int i = 0; i < intArray.length; i++) { - System.out.println(intArray[i] + " "); - } - } - - public static void QuickSort(int[] array, int left, int right) { - if (right > left) { - int pivotIndex = (left + right) / 2; - int pivotNew = Partition(array, left, right, pivotIndex); - QuickSort(array, left, pivotNew - 1); - QuickSort(array, pivotNew + 1, right); - } - } - - static int Partition(int[] array, int left, int right, int pivotIndex) { - int pivotValue = array[pivotIndex]; - Swap(array, pivotIndex, right); - int storeIndex = left; - for (int i = left; i < right; i++) { - if (array[i] <= pivotValue) { - Swap(array, storeIndex, i); - storeIndex++; - } - } - Swap(array, right, storeIndex); - return storeIndex; - } - - static void Swap(int[] array, int index1, int index2) { - int tmp = array[index1]; - array[index1] = array[index2]; - array[index2] = tmp; - } -} diff --git a/examples/android/TestsAndroguard/src/tests/androguard/TestQuickSort2.java b/examples/android/TestsAndroguard/src/tests/androguard/TestQuickSort2.java deleted file mode 100644 index ed4eedab..00000000 --- a/examples/android/TestsAndroguard/src/tests/androguard/TestQuickSort2.java +++ /dev/null @@ -1,51 +0,0 @@ -package tests.androguard; - -public class TestQuickSort2 { - - public int a = 10; - - public static void Main(String[] args) { - int[] intArray = new int[args.length]; - for (int i = 0; i < intArray.length; i++) { - intArray[i] = Integer.parseInt(args[i]); - } - quicksort(intArray, 0, intArray.length - 1); - for (int i = 0; i < intArray.length; i++) { - System.out.println(intArray[i] + " "); - } - } - - public static void quicksort(int[] array, int lo, int hi) { - int i = lo; - int j = hi; - - int pivot = array[lo + (hi - lo) / 2]; - - while(i <= j) { - - while(array[i] < pivot) { - i++; - } - - while(array[j] > pivot) { - j--; - } - - if(i <= j) { - int temp = array[i]; - array[i] = array[j]; - array[j] = temp; - i++; - j--; - } - } - - if(lo < j) { - quicksort(array, lo, j); - } - - if(i < hi) { - quicksort(array, i, hi); - } - } -} diff --git a/examples/android/TestsAndroguard/src/tests/androguard/TestSynthetic.java b/examples/android/TestsAndroguard/src/tests/androguard/TestSynthetic.java deleted file mode 100644 index a60a3997..00000000 --- a/examples/android/TestsAndroguard/src/tests/androguard/TestSynthetic.java +++ /dev/null @@ -1,76 +0,0 @@ -package tests.androguard; - -public class TestSynthetic { - - public static void TestSynthetic1( ){ - final Object o = new Object(); - - new Thread(){ - public void run(){ - System.out.println( "o : " + o.hashCode() ); - } - }.start(); - } - - public static void TestSynthetic2() { - System.out.println( "o : " + - new Object(){ - public int toto(char c){ - return Integer.parseInt("" + c); - } - }.toto('k') - ); - } - - public static void TestSynthetic3( ){ - Integer o = Integer.valueOf(5); - - new Thread(){ - Integer o = this.o; - public void run(){ - System.out.println( "o : " + o.hashCode() ); - } - }.start(); - } - - public static void TestSynthetic4( final int t ) { - final Object o = new Object(); - - new Thread(){ - public void run(){ - synchronized(o){ - if ( t == 0 ) { - TestSynthetic1(); - } - else { - TestSynthetic2(); - } - } - } - }.start(); - - System.out.println("end"); - } - - - public class Bridge { - public T getT(T arg){ - return arg; - } - } - - public class BridgeExt extends Bridge{ - public String getT(String arg){ - return arg; - } - } - - public static void TestBridge( ){ - TestSynthetic p = new TestSynthetic(); - TestSynthetic.Bridge x = p.new Bridge(); - System.out.println("bridge " + x.getT(5)); - TestSynthetic.Bridge w = p.new BridgeExt(); - System.out.println("bridgeext " + w.getT("toto")); - } - -} diff --git a/examples/android/TestsAnnotation/OPCommonTelephony.jar b/examples/android/TestsAnnotation/OPCommonTelephony.jar deleted file mode 100644 index f12867cb..00000000 Binary files a/examples/android/TestsAnnotation/OPCommonTelephony.jar and /dev/null differ diff --git a/examples/android/TestsAnnotation/classes.dex b/examples/android/TestsAnnotation/classes.dex deleted file mode 100644 index 8db5cb13..00000000 Binary files a/examples/android/TestsAnnotation/classes.dex and /dev/null differ diff --git a/examples/android/abcore/COPYING b/examples/android/abcore/COPYING deleted file mode 100755 index cb5be8f1..00000000 --- a/examples/android/abcore/COPYING +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Lawrence Nahum, Ottavio Fontolan - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/examples/android/abcore/README.md b/examples/android/abcore/README.md deleted file mode 100755 index eec2559f..00000000 --- a/examples/android/abcore/README.md +++ /dev/null @@ -1,75 +0,0 @@ -ABCore - Android Bitcoin Core -============================= - -[![Build Status](https://travis-ci.org/greenaddress/abcore.svg?branch=master)](https://travis-ci.org/greenaddress/abcore) - - Infographic - -Web site: abco.re - -Warning: This app is still in a very Proof of Concept/Alpha stage. - - - - - - -If you want to try it, you can also get it directly from GitHub [here](https://github.com/greenaddress/abcore/releases/tag/v0.62alphaPoC). - -What is Android Bitcoin Core? ------------------------------ - -Android Bitcoin Core is an Android app that fetches bitcoin core daemon built for Android using the NDK and is meant to make it easier -to run Bitcoin Core daemon node on always on Android set top box devices and home appliances as well as mobile devices. - -The full node software (Core 0.15.1 and Knots) is meant to be used as a personal node when on the go (either by using a mobile wallet that allows to connect to a remote and specific node or even directly on your mobile device). - -ABCore works on x86, x86_64, armhf and arm64 Android (any version from Lollipop onwards - sdk 21). Mips is not supported. - -License -------- - -ABCore is released under the terms of the MIT license. See [COPYING](COPYING) for more -information or see https://opensource.org/licenses/MIT. - -Privacy -------- - -ABCore doesn't do any kind of phone home, doesn't have In-App Purchase or advertising. - -During the initial configuration it connects to Github to fetch the required binaries and once it is installed it only communicates with the rest of the Bitcoin network like any normal full node. - -Limitations ------------ - -ABCore requires a fair amount of ram (tested with 2GB) and a fair amount of disk space (tested with 256GB for non pruned node) as well as a decent always on connection - 3G or 4G is not adviced. - -We also do not advice to use this as a wallet at this time, we advice to use this as your personal blockchain anchor when on the go with wallets that support to set a personal node. - -The contributors of ABCore are not liable for any cost or damage caused by the app including but not limited to data charges/penalties. - -Acknowledgement ---------------- - -- Development - -Lawrence Nahum -twitter.com/LarryBitcoin - -- Graphic Content - -Ottavio Fontolan -otta88.box (at) gmail (dot) com - -- Testing & UX - -Gabriele Domenichini -twitter.com/gabridome - -- Community Manager - -Timothy Redaelli -twitter.com/drizztbsd -timothy.redaelli (at) gmail (dot) com - -Special thanks to the [Bitcoin Core dev team](https://bitcoincore.org/), the [Arch Linux](https://www.archlinux.org/) teams and to [Alessandro Polverini](https://github.com/Polve) for the [Java RPC client](https://github.com/Polve/JavaBitcoindRpcClient). diff --git a/examples/android/abcore/app-prod-debug.apk b/examples/android/abcore/app-prod-debug.apk deleted file mode 100644 index 37c86765..00000000 Binary files a/examples/android/abcore/app-prod-debug.apk and /dev/null differ diff --git a/examples/axml/AndroidManifest-Chinese.xml b/examples/axml/AndroidManifest-Chinese.xml deleted file mode 100644 index 94ed64b6..00000000 Binary files a/examples/axml/AndroidManifest-Chinese.xml and /dev/null differ diff --git a/examples/axml/AndroidManifest-xmlns.xml b/examples/axml/AndroidManifest-xmlns.xml deleted file mode 100644 index 77b07555..00000000 Binary files a/examples/axml/AndroidManifest-xmlns.xml and /dev/null differ diff --git a/examples/axml/AndroidManifest.xml b/examples/axml/AndroidManifest.xml deleted file mode 100644 index 418bad1e..00000000 Binary files a/examples/axml/AndroidManifest.xml and /dev/null differ diff --git a/examples/axml/AndroidManifestDoubleNamespace.xml b/examples/axml/AndroidManifestDoubleNamespace.xml deleted file mode 100644 index cccb20e0..00000000 Binary files a/examples/axml/AndroidManifestDoubleNamespace.xml and /dev/null differ diff --git a/examples/axml/AndroidManifestExtraNamespace.xml b/examples/axml/AndroidManifestExtraNamespace.xml deleted file mode 100644 index b44a8974..00000000 Binary files a/examples/axml/AndroidManifestExtraNamespace.xml and /dev/null differ diff --git a/examples/axml/AndroidManifestLiapp.xml b/examples/axml/AndroidManifestLiapp.xml deleted file mode 100644 index 27b5a3a9..00000000 Binary files a/examples/axml/AndroidManifestLiapp.xml and /dev/null differ diff --git a/examples/axml/AndroidManifestMaskingNamespace.xml b/examples/axml/AndroidManifestMaskingNamespace.xml deleted file mode 100644 index 161be760..00000000 Binary files a/examples/axml/AndroidManifestMaskingNamespace.xml and /dev/null differ diff --git a/examples/axml/AndroidManifestNonZeroStyle.xml b/examples/axml/AndroidManifestNonZeroStyle.xml deleted file mode 100644 index 83cd384e..00000000 Binary files a/examples/axml/AndroidManifestNonZeroStyle.xml and /dev/null differ diff --git a/examples/axml/AndroidManifestNullbytes.xml b/examples/axml/AndroidManifestNullbytes.xml deleted file mode 100644 index 5fd74fab..00000000 Binary files a/examples/axml/AndroidManifestNullbytes.xml and /dev/null differ diff --git a/examples/axml/AndroidManifestTextChunksXML.xml b/examples/axml/AndroidManifestTextChunksXML.xml deleted file mode 100644 index 63e5a7a9..00000000 Binary files a/examples/axml/AndroidManifestTextChunksXML.xml and /dev/null differ diff --git a/examples/axml/AndroidManifestUTF8Strings.xml b/examples/axml/AndroidManifestUTF8Strings.xml deleted file mode 100644 index 9a42b169..00000000 Binary files a/examples/axml/AndroidManifestUTF8Strings.xml and /dev/null differ diff --git a/examples/axml/AndroidManifestWithComment.xml b/examples/axml/AndroidManifestWithComment.xml deleted file mode 100644 index 47fe942f..00000000 Binary files a/examples/axml/AndroidManifestWithComment.xml and /dev/null differ diff --git a/examples/axml/AndroidManifestWrongFilesize.xml b/examples/axml/AndroidManifestWrongFilesize.xml deleted file mode 100644 index 6cf2781b..00000000 Binary files a/examples/axml/AndroidManifestWrongFilesize.xml and /dev/null differ diff --git a/examples/axml/AndroidManifest_InvalidCharsInAttribute.xml b/examples/axml/AndroidManifest_InvalidCharsInAttribute.xml deleted file mode 100644 index bb26ff83..00000000 Binary files a/examples/axml/AndroidManifest_InvalidCharsInAttribute.xml and /dev/null differ diff --git a/examples/axml/AndroidManifest_NamespaceInAttributeName.xml b/examples/axml/AndroidManifest_NamespaceInAttributeName.xml deleted file mode 100644 index 5ad65c73..00000000 Binary files a/examples/axml/AndroidManifest_NamespaceInAttributeName.xml and /dev/null differ diff --git a/examples/axml/AndroidManifest_NamespaceInAttributeName2.xml b/examples/axml/AndroidManifest_NamespaceInAttributeName2.xml deleted file mode 100644 index 050aa0fd..00000000 Binary files a/examples/axml/AndroidManifest_NamespaceInAttributeName2.xml and /dev/null differ diff --git a/examples/axml/AndroidManifest_ShortName.apk b/examples/axml/AndroidManifest_ShortName.apk deleted file mode 100644 index c22d505e..00000000 Binary files a/examples/axml/AndroidManifest_ShortName.apk and /dev/null differ diff --git a/examples/axml/AndroidManifest_StringNotTerminated.xml b/examples/axml/AndroidManifest_StringNotTerminated.xml deleted file mode 100644 index 85e4e38d..00000000 Binary files a/examples/axml/AndroidManifest_StringNotTerminated.xml and /dev/null differ diff --git a/examples/axml/AndroidManifest_WrongChunkStart.xml b/examples/axml/AndroidManifest_WrongChunkStart.xml deleted file mode 100644 index 23fc2170..00000000 Binary files a/examples/axml/AndroidManifest_WrongChunkStart.xml and /dev/null differ diff --git a/examples/axml/test.xml b/examples/axml/test.xml deleted file mode 100644 index 943f119f..00000000 Binary files a/examples/axml/test.xml and /dev/null differ diff --git a/examples/axml/test1.xml b/examples/axml/test1.xml deleted file mode 100644 index 43e837db..00000000 Binary files a/examples/axml/test1.xml and /dev/null differ diff --git a/examples/axml/test2.xml b/examples/axml/test2.xml deleted file mode 100644 index dfa1d3b6..00000000 Binary files a/examples/axml/test2.xml and /dev/null differ diff --git a/examples/axml/test3.xml b/examples/axml/test3.xml deleted file mode 100644 index 36740274..00000000 Binary files a/examples/axml/test3.xml and /dev/null differ diff --git a/examples/dalvik/test/bin/Test-debug-unaligned.apk b/examples/dalvik/test/bin/Test-debug-unaligned.apk deleted file mode 100644 index 50d07e96..00000000 Binary files a/examples/dalvik/test/bin/Test-debug-unaligned.apk and /dev/null differ diff --git a/examples/dalvik/test/bin/Test-debug.apk b/examples/dalvik/test/bin/Test-debug.apk deleted file mode 100644 index 4d279549..00000000 Binary files a/examples/dalvik/test/bin/Test-debug.apk and /dev/null differ diff --git a/examples/dalvik/test/bin/Test.ap_ b/examples/dalvik/test/bin/Test.ap_ deleted file mode 100644 index 95500f14..00000000 Binary files a/examples/dalvik/test/bin/Test.ap_ and /dev/null differ diff --git a/examples/dalvik/test/bin/classes.dex b/examples/dalvik/test/bin/classes.dex deleted file mode 100644 index ea5e75ff..00000000 Binary files a/examples/dalvik/test/bin/classes.dex and /dev/null differ diff --git a/examples/dalvik/test/bin/classes/Test1.class b/examples/dalvik/test/bin/classes/Test1.class deleted file mode 100644 index b4569ae9..00000000 Binary files a/examples/dalvik/test/bin/classes/Test1.class and /dev/null differ diff --git a/examples/dalvik/test/bin/classes/org/t0t0/androguard/test/R$attr.class b/examples/dalvik/test/bin/classes/org/t0t0/androguard/test/R$attr.class deleted file mode 100644 index d6a93383..00000000 Binary files a/examples/dalvik/test/bin/classes/org/t0t0/androguard/test/R$attr.class and /dev/null differ diff --git a/examples/dalvik/test/bin/classes/org/t0t0/androguard/test/R$layout.class b/examples/dalvik/test/bin/classes/org/t0t0/androguard/test/R$layout.class deleted file mode 100644 index 24e02360..00000000 Binary files a/examples/dalvik/test/bin/classes/org/t0t0/androguard/test/R$layout.class and /dev/null differ diff --git a/examples/dalvik/test/bin/classes/org/t0t0/androguard/test/R$string.class b/examples/dalvik/test/bin/classes/org/t0t0/androguard/test/R$string.class deleted file mode 100644 index 35517ebc..00000000 Binary files a/examples/dalvik/test/bin/classes/org/t0t0/androguard/test/R$string.class and /dev/null differ diff --git a/examples/dalvik/test/bin/classes/org/t0t0/androguard/test/R.class b/examples/dalvik/test/bin/classes/org/t0t0/androguard/test/R.class deleted file mode 100644 index 34975c99..00000000 Binary files a/examples/dalvik/test/bin/classes/org/t0t0/androguard/test/R.class and /dev/null differ diff --git a/examples/dalvik/test/bin/classes/org/t0t0/androguard/test/Test1.class b/examples/dalvik/test/bin/classes/org/t0t0/androguard/test/Test1.class deleted file mode 100644 index 9017a24f..00000000 Binary files a/examples/dalvik/test/bin/classes/org/t0t0/androguard/test/Test1.class and /dev/null differ diff --git a/examples/dalvik/test/bin/classes/org/t0t0/androguard/test/TestActivity.class b/examples/dalvik/test/bin/classes/org/t0t0/androguard/test/TestActivity.class deleted file mode 100644 index 92103e68..00000000 Binary files a/examples/dalvik/test/bin/classes/org/t0t0/androguard/test/TestActivity.class and /dev/null differ diff --git a/examples/dalvik/test/bin/classes_output.dex b/examples/dalvik/test/bin/classes_output.dex deleted file mode 100644 index ea5e75ff..00000000 Binary files a/examples/dalvik/test/bin/classes_output.dex and /dev/null differ diff --git a/examples/malware/4e2201cde26141715255d2421f0bcfb1.zip b/examples/malware/4e2201cde26141715255d2421f0bcfb1.zip deleted file mode 100644 index a996a361..00000000 Binary files a/examples/malware/4e2201cde26141715255d2421f0bcfb1.zip and /dev/null differ diff --git a/examples/malware/README.md b/examples/malware/README.md deleted file mode 100644 index 3712d6c2..00000000 --- a/examples/malware/README.md +++ /dev/null @@ -1,15 +0,0 @@ -Malicious APK Examples -====================== - -**WARNING** These are actual malware samples! Do not install them on devices you -care about! - -You can also get more samples for your research here: [Contagio mobile](https://contagiominidump.blogspot.com). - -The password for the files in this folder is `infected`. - -4e2201cde26141715255d2421f0bcfb1 --------------------------------- - -Source: -[Android WipeLocker.A at Contagio Mobile](https://contagiominidump.blogspot.com/2014/10/android-wipelockera.html) diff --git a/examples/obfu/classes_tc.dex b/examples/obfu/classes_tc.dex deleted file mode 100644 index ff2d56d8..00000000 Binary files a/examples/obfu/classes_tc.dex and /dev/null differ diff --git a/examples/obfu/classes_tc.jar b/examples/obfu/classes_tc.jar deleted file mode 100644 index 86eb9e9f..00000000 Binary files a/examples/obfu/classes_tc.jar and /dev/null differ diff --git a/examples/obfu/classes_tc.sign b/examples/obfu/classes_tc.sign deleted file mode 100644 index d0e9b747..00000000 --- a/examples/obfu/classes_tc.sign +++ /dev/null @@ -1 +0,0 @@ -[ { "SAMPLE" : "examples/obfu/classes_tc.dex" }, { "BASE" : "AndroidOS", "NAME" : "CLASSES TC", "SIGNATURE" : [ { "TYPE" : "METHSIM", "CN" : "Lorg/t0t0/androguard/TC/TCMod1;", "MN" : "T1", "D" : "()V" } ], "BF" : "0" } ] diff --git a/examples/obfu/classes_tc_dasho.dex b/examples/obfu/classes_tc_dasho.dex deleted file mode 100644 index 2839e407..00000000 Binary files a/examples/obfu/classes_tc_dasho.dex and /dev/null differ diff --git a/examples/obfu/classes_tc_dasho.jar b/examples/obfu/classes_tc_dasho.jar deleted file mode 100644 index 9eb28be8..00000000 Binary files a/examples/obfu/classes_tc_dasho.jar and /dev/null differ diff --git a/examples/obfu/classes_tc_diff.dex b/examples/obfu/classes_tc_diff.dex deleted file mode 100644 index 135fbfe3..00000000 Binary files a/examples/obfu/classes_tc_diff.dex and /dev/null differ diff --git a/examples/obfu/classes_tc_diff.jar b/examples/obfu/classes_tc_diff.jar deleted file mode 100644 index 341f9d8d..00000000 Binary files a/examples/obfu/classes_tc_diff.jar and /dev/null differ diff --git a/examples/obfu/classes_tc_diff_dasho.dex b/examples/obfu/classes_tc_diff_dasho.dex deleted file mode 100644 index 6b558a61..00000000 Binary files a/examples/obfu/classes_tc_diff_dasho.dex and /dev/null differ diff --git a/examples/obfu/classes_tc_diff_dasho.jar b/examples/obfu/classes_tc_diff_dasho.jar deleted file mode 100644 index 7c5e0b24..00000000 Binary files a/examples/obfu/classes_tc_diff_dasho.jar and /dev/null differ diff --git a/examples/obfu/classes_tc_mark1.dex b/examples/obfu/classes_tc_mark1.dex deleted file mode 100644 index ff2d56d8..00000000 Binary files a/examples/obfu/classes_tc_mark1.dex and /dev/null differ diff --git a/examples/obfu/classes_tc_mark1.jar b/examples/obfu/classes_tc_mark1.jar deleted file mode 100644 index d7960ef4..00000000 Binary files a/examples/obfu/classes_tc_mark1.jar and /dev/null differ diff --git a/examples/obfu/classes_tc_proguard.dex b/examples/obfu/classes_tc_proguard.dex deleted file mode 100644 index 559e2300..00000000 Binary files a/examples/obfu/classes_tc_proguard.dex and /dev/null differ diff --git a/examples/obfu/classes_tc_proguard.jar b/examples/obfu/classes_tc_proguard.jar deleted file mode 100644 index ff96e5cd..00000000 Binary files a/examples/obfu/classes_tc_proguard.jar and /dev/null differ diff --git a/examples/obfu/dbsample b/examples/obfu/dbsample deleted file mode 100644 index 281f3b86..00000000 --- a/examples/obfu/dbsample +++ /dev/null @@ -1 +0,0 @@ -{"CLASSES TC": [[[0, "QltdQltGMEldQltGMEYxRjBHXUJbRjBQMFAxU1AxRjBTUDJQMVAxUDFGMFAwUDFTUDFTUDJQMVAxUDFdQltJXUJbRjBHXUJbRjBQMFAxU1AxU1AyUDFQMVAxRjBGMUYwUDBQMVNQMUYwU1AyUDFQMVAxXUJbSV1CW11CW0YwSV1CW0YwRjFHXUJbR1AwXUJbUDBQMlAyRjBQMFAxU1AxRjBTUDJQMVAxUDFGMFAwUDFTUDFTUDJQMVAxUDFGMFAwUDFTUDFTUDJQMVAxUDFQMFAyUDJGMF1CW0YwRjFGMEldQltGMFAwUDFTUDFGMFNQMlAxUDFQMVAwUDJQMlAwUDJQMlJdQltd", 3.1086018085479736, 1.6915500164031982, 4.4729580879211426, 4.8005590438842773, 0.0]], "0"]} \ No newline at end of file diff --git a/examples/signing/README.md b/examples/signing/README.md deleted file mode 100644 index 17321c79..00000000 --- a/examples/signing/README.md +++ /dev/null @@ -1,33 +0,0 @@ -How to create a new signing key and sign APKs in different ways: - -1) Request a new certificate: -``` -$ openssl req -newkey rsa:2048 -nodes -keyout key.pem -x509 -days 36500 -out certificate.pem -``` - -2) convert key to PKCS#8 in DER encoding and convert the certificate to DER as -well, for further testing: -``` -$ openssl pkcs8 -topk8 -inform PEM -outform DER -in key.pem -out priv.key -nocrypt -$ openssl x509 -inform pem -outform der -in certificate.pem -out certificate.der -``` - -3) delete unused file -``` -$ rm key.pem -``` - -4) Use APK Signer: -``` -$ apksigner sign --key priv.key --cert certificate.pem --v1-signing-enabled --v2-signing-enabled --v1-signer-name ANDROGUARD TestActivity_unsigned.apk -``` - -5) Verify that the file is signed: -``` -$ apksigner verify --verbose TestActivity_unsigned.apk -Verifies -Verified using v1 scheme (JAR signing): true -Verified using v2 scheme (APK Signature Scheme v2): true -Number of signers: 1 -``` - diff --git a/examples/signing/TestActivity_signed_both.apk b/examples/signing/TestActivity_signed_both.apk deleted file mode 100644 index ffdc69bd..00000000 Binary files a/examples/signing/TestActivity_signed_both.apk and /dev/null differ diff --git a/examples/signing/apksig/README.md b/examples/signing/apksig/README.md deleted file mode 100644 index 922ec9c4..00000000 --- a/examples/signing/apksig/README.md +++ /dev/null @@ -1,3 +0,0 @@ -these APKs are from: [google platform tools - apksig tests](https://android.googlesource.com/platform/tools/apksig/+/android-8.1.0_r14/src/test/resources/com/android/apksig) - -They are used to test various things. diff --git a/examples/signing/apksig/debuggable-boolean.apk b/examples/signing/apksig/debuggable-boolean.apk deleted file mode 100644 index 573376ac..00000000 Binary files a/examples/signing/apksig/debuggable-boolean.apk and /dev/null differ diff --git a/examples/signing/apksig/debuggable-resource.apk b/examples/signing/apksig/debuggable-resource.apk deleted file mode 100644 index d55c840a..00000000 Binary files a/examples/signing/apksig/debuggable-resource.apk and /dev/null differ diff --git a/examples/signing/apksig/dsa-1024.pk8 b/examples/signing/apksig/dsa-1024.pk8 deleted file mode 100644 index d500d70e..00000000 Binary files a/examples/signing/apksig/dsa-1024.pk8 and /dev/null differ diff --git a/examples/signing/apksig/dsa-1024.x509.pem b/examples/signing/apksig/dsa-1024.x509.pem deleted file mode 100644 index e230eb0b..00000000 --- a/examples/signing/apksig/dsa-1024.x509.pem +++ /dev/null @@ -1,17 +0,0 @@ ------BEGIN CERTIFICATE----- -MIICsTCCAnGgAwIBAgIJAP6EmkoBF8UoMAkGByqGSM44BAMwEzERMA8GA1UEAwwI -ZHNhLTEwMjQwHhcNMTYwMzMxMTUyNzEwWhcNNDMwODE3MTUyNzEwWjATMREwDwYD -VQQDDAhkc2EtMTAyNDCCAbYwggErBgcqhkjOOAQBMIIBHgKBgQCTDpv8gS5Y+Ehl -oln6WT/MYBnywrc3tWDfnlY+9MpVDdB2+kcB7WrhobW1L+6ayKmlkrTaAFjiMPDf -bdyA6hy3fDu1teLCb89R0uodfZa3MDXXlmqvBk4Fdw8fYijWI/q175e4Y5sNYO9+ -QZg8bBIZnxxCdbKASJ6NAHc50ts3vwIVAIebRw3HnYOZbo6rPoBmcBOxcZTLAoGA -ch+0D7JrbqmR1w5S3VBtTnONLiBYnaz1Ri3Pfiw5FHKfJcfFcQopIOLJwfdBmY4b -FLGV5u7DXeJNp16Nvl4MrsmVjkWs9MZVAp5RqzrN9JhVi4ShpdelyFjdWOXHPbc7 -NNqQpTjdkK23r/tCE6XkvkCiWm7Rt22LMpZA4ePALIoDgYQAAoGAc8SkppDzSUPH -SpKrhrldRyh5m4wSH14ZE96mlSze9tRoSDo8hsA9/vGLgoN7F+3jYSvj8m42tmNt -jZJWk7vPkJHC/9qoEGbVBY+aTNYwVJyKDJ07vZB9bLxpjD/yyQlsn7/vZTOS657c -W2S817RgGGyGcCNRoKNig6i0k9fzE8ajUDBOMB0GA1UdDgQWBBSPwzoIjftVH2ke -EJXtLq+bB50lzDAfBgNVHSMEGDAWgBSPwzoIjftVH2keEJXtLq+bB50lzDAMBgNV -HRMEBTADAQH/MAkGByqGSM44BAMDLwAwLAIUH1GQcpqx8/9p9QfhCRMvcxrECM4C -FH8ZULK91BMaHodbRMUtdxB9kIbL ------END CERTIFICATE----- diff --git a/examples/signing/apksig/dsa-2048.pk8 b/examples/signing/apksig/dsa-2048.pk8 deleted file mode 100644 index cf635944..00000000 Binary files a/examples/signing/apksig/dsa-2048.pk8 and /dev/null differ diff --git a/examples/signing/apksig/dsa-2048.x509.pem b/examples/signing/apksig/dsa-2048.x509.pem deleted file mode 100644 index 705db393..00000000 --- a/examples/signing/apksig/dsa-2048.x509.pem +++ /dev/null @@ -1,26 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIEWzCCBAKgAwIBAgIJAK4uYtTAat4+MAkGByqGSM44BAMwEzERMA8GA1UEAwwI -ZHNhLTIwNDgwHhcNMTYwMzMxMTgzMDAxWhcNNDMwODE3MTgzMDAxWjATMREwDwYD -VQQDDAhkc2EtMjA0ODCCA0cwggI5BgcqhkjOOAQBMIICLAKCAQEAv2/yUkci8fnZ -ppepy1kcOTIrbPJTW46Z2jKOWjHCTd1aqRFunz3gllpx/YDgjboNIYZf2jKhk2gi -MgF+8OT0hEHQGXSofnqRoVljexA2nC3tPhVyjN14pQ7ZJXp/raHh1uCT5K7Lfafc -8y5Cs180CdfisspANfCp10jFu1D2hKOLfggUA9efN05c0f2yOx/Pm9uEiz6ftLUJ -UWgcJenx1WUk4Nb1qMOWgg9nKQyDiBxZKoVCH5/XJO0K225w6F4scol2hMdTRlA+ -9TGb5tvHKT+Y+lE7fBbcBSKzLT3pwD/T08ErpsIoHqRPamLGHeuamGzvXLHwI1UN -cJNGg2nnCwIhAJz9K+Qpgg7sbqRMeRvIf2cuWRWbi4XnYR+IAGqgfYUZAoIBADks -N3taHUnIvkcxTuEUiCSb+d1KMlvbZiH5zLVIyzi5kZNQW8L/gR23z8T6qngXXnFw -tcTRcb0TDqR7iYPxsX3/x+jBjiApIgebqpnPdpiEAUfORZX7w6CpCNsp9Kqxb98z -4PtKE9z/20Q3zKhqlwDm8uSjjT7E5xw/YpV8bg7YuQ5eQ8mkonipNXllf3qmDV48 -see/+QwIeBiL7jTjgeBv5ziL8BY2AYmfOwGKwmK9ERxJpIoxgS+5fFuA2oAQ8CwJ -UDwwv5Wbz7NVkvljHK1Fh5u26ZHdeLT4qp4F0GamJcikq4MqFco6ToCvp8NoDNMZ -MOno2k1IvsIwrIbrQJgDggEGAAKCAQEAuxbFbx2H4n4BqfbkC9tjn/Mg3zr4LZgG -7v3FWpzpkbAcEcFCVIqTmJiRlsuf4ml/t9hflOvarfD6TesSc7gyGCJ/2QiqJcI+ -Vif5AKqZskQFlZ5BUMIMjPFMy1WtTVpEotmdbIOaQif4wQrz6SNFUOAXPBKRTY33 -HOLMoo8FRiZ1+uMu9PlUWYqMhSJg+rm2AQPt06D+JToXREaNkYjN0K97T2MTcUNh -OWiliH/zFuF8N2s6IlNaCv1Yc4FoYEIRoS07dUxcjrV9KRd0TyU0q++rRPluytJP -yAoyTIrfwa2SM5JR9RtdBZsPdR9Ckpy4ZKSJqDzTbCIU70zsGgHA4aNQME4wHQYD -VR0OBBYEFL3koBjVHAySf8Xr196yqDT6VhwSMB8GA1UdIwQYMBaAFL3koBjVHAyS -f8Xr196yqDT6VhwSMAwGA1UdEwQFMAMBAf8wCQYHKoZIzjgEAwNIADBFAiEAjowh -laeXA/CUrHt6iH4u6edWGeZzyFGlpWsxssKTMBECIG2tZs/xnZVAtXioiIcH1CXT -LN5AAzZ8wlNUKSvTc12j ------END CERTIFICATE----- diff --git a/examples/signing/apksig/dsa-3072.pk8 b/examples/signing/apksig/dsa-3072.pk8 deleted file mode 100644 index f0f8983a..00000000 Binary files a/examples/signing/apksig/dsa-3072.pk8 and /dev/null differ diff --git a/examples/signing/apksig/dsa-3072.x509.pem b/examples/signing/apksig/dsa-3072.x509.pem deleted file mode 100644 index 0284b13a..00000000 --- a/examples/signing/apksig/dsa-3072.x509.pem +++ /dev/null @@ -1,34 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIF3DCCBYKgAwIBAgIJAKmpH5wXPDbGMAkGByqGSM44BAMwEzERMA8GA1UEAwwI -ZHNhLTMwNzIwHhcNMTYwMzMxMTgzMjU2WhcNNDMwODE3MTgzMjU2WjATMREwDwYD -VQQDDAhkc2EtMzA3MjCCBMcwggM5BgcqhkjOOAQBMIIDLAKCAYEAscwotTL9jjwZ -CpGRqXVezU9P0zY/wHFYMQB09JjgoCJRm0D9FZzmTnySJa4suwlwoduzgv+pkIkk -nn0w+hL6LsblRTEuFj11o/fLLAZE4KmdIAPkCcH74HOnws4BwazJLWFtVEv+bdyj -CmrI2urYWT5uRJwWZmkG4iUnoL/5FUv2pvpSOzu6EO+qFcFcWf3/VrQDaaP3jRRh -iVCThxvX5xOrO24krrOFlHQufY0A6fHYQqII6EYac6tKTI+ltz121DYH914SHMe8 -0JJYpDVOatjTJADyg1AzHAKsyfTKHHpHbqkgU/CRtALEC1DUyLqQhHvBGpodmqPH -r9Mbd7pXudw2h6O8uapAsmaFt/YdrSbd37UvhLJyyW0fodTjBTA0WiNs0CLTJL9o -422Nt1cUDQS1JpsghAzmMWaavq7+QIRhpnMHL47p1jCZvcwMboMlcJwOCjyyZS0F -fmaD+pEi56Lx+9XDblESM78crb8/lbvuohyrwIJciQmL0hQoKIg1AiEApYT1sROj -BMB4FIQaS86VKdJ4h9OR13AraES3ba9WV1cCggGAI9LskZ7wcUna6nZyGT4f3bH1 -KSeD3602Yd86NKuB8QGr/QT5L+wFwCuvvI4V8P2lM4wb+q1LrR688f53WS4c0Kin -/MeN4YtkQBzV4l04Bxrce//EcfQzUPDAr41Fwu2tA0BHE67trxGjNS7SzoFZUiDo -d/aOZCVilFIay5oF2X8yeNcpTynsxTbGxjxhhgG2tS0fvxhbGF6rl4D0Ddskx6L/ -xjstzu0ADE8FNpDehuKqxzOisNLIJgc1INPQ06AmaUF1Pge74T2AJYPYwqfzArG3 -pj+l2iND0PM7lDeQCgivPAqhYrveoIqJe0NAEu/PiCnOW50hQ4F6dl9lzn9sGXTP -5KxdR5OyG+Ki+nWTN8h3yOy9ZK7Gh8gUeqE3QVow4+1LhcO19C+X+NM588KbKsq9 -KRP5H4v238g6oF2wgbmPrYvqiwoa1qjHvUX7ZjQuIfrN9+lICflsHKtAtchuUIiO -b1AWPeaJwAynTn2EeDsVd0e8bm+h+g7ZSDAwUOKuA4IBhgACggGBAJfW6T1BxtZo -EacqR2TwTi9B3O93Zcj0OzDOn9UMahepcfaF1B3wq9UdJ4PPIC1U27CaEXEJNxgJ -cIURfFPDXA6pLVEqrGgRX2u0FR1pmHVIxjBpvPJvO954+Hawp+ClU6PKLmxuVZpA -VeJBx7C8/DU/58J//iuG9B6/mwzPuEoPmnGYMsfVCcEX8yQ2PZXyNGp+KnUygyql -mMxpE8UXtH6mHYontjiw4Afxqwop3v/bG8eT5FHhpXoQDSN/oeGghDaq9DyIjCqr -GXZDBvEufLYRgOvnpV6T0oMa9U2W2Trz3HYD6eX09FOhGnMWl9euYrSVRihAKBh1 -72ystvPy2R4wdAA5EQf7EsDdgt/QOMf/AvkaKHMP7DNK5BZxwPQ0KwRkLB+0vaDI -Mnpu29L6TiixMxI1ihnZbR/U0v8H+/SlSjZaPNRQeuoV9d8t81miUqVSMLcpqNui -ZljSCtoGfktPAbPyFwGenBkGK5oo0I381KTECMynC0R2P9CQUHegeaNQME4wHQYD -VR0OBBYEFPRqMyQLPdq0guTx3YKiVxtWN+bPMB8GA1UdIwQYMBaAFPRqMyQLPdq0 -guTx3YKiVxtWN+bPMAwGA1UdEwQFMAMBAf8wCQYHKoZIzjgEAwNJADBGAiEAjcit -8dFR02elWKoeRAounP9TE2aqDqd5cJXqXn0ssMYCIQCIINjXEYRovfVjDotKelRg -5k0lmzMmx6Xfz8EgZDLovw== ------END CERTIFICATE----- diff --git a/examples/signing/apksig/ec-p256.pk8 b/examples/signing/apksig/ec-p256.pk8 deleted file mode 100644 index f781c308..00000000 Binary files a/examples/signing/apksig/ec-p256.pk8 and /dev/null differ diff --git a/examples/signing/apksig/ec-p256.x509.pem b/examples/signing/apksig/ec-p256.x509.pem deleted file mode 100644 index 06adcfeb..00000000 --- a/examples/signing/apksig/ec-p256.x509.pem +++ /dev/null @@ -1,10 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIBbDCCARGgAwIBAgIJAMoPtk37ZudyMAoGCCqGSM49BAMCMBIxEDAOBgNVBAMM -B2VjLXAyNTYwHhcNMTYwMzMxMTQ1ODA2WhcNNDMwODE3MTQ1ODA2WjASMRAwDgYD -VQQDDAdlYy1wMjU2MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEpl8RPSLLSROQ -gwesMe4roOkTi3hfrGU20U6izpDStL/hlLUM3I4Wn1SnOpke8Pp2MpglvgeMx4J0 -BwPaRLTX66NQME4wHQYDVR0OBBYEFNQTNWi5WzAVizIgceqMQ/9bBczIMB8GA1Ud -IwQYMBaAFNQTNWi5WzAVizIgceqMQ/9bBczIMAwGA1UdEwQFMAMBAf8wCgYIKoZI -zj0EAwIDSQAwRgIhAPUEoIZsrvAp9BcULFy3E1THn/zR1kBhjfyk8Z4W23jWAiEA -+O6kgpeZwGytCMbT0tLsBeBXQVTnR+oP27gELLZVqt0= ------END CERTIFICATE----- diff --git a/examples/signing/apksig/ec-p384.pk8 b/examples/signing/apksig/ec-p384.pk8 deleted file mode 100644 index f22507d1..00000000 Binary files a/examples/signing/apksig/ec-p384.pk8 and /dev/null differ diff --git a/examples/signing/apksig/ec-p384.x509.pem b/examples/signing/apksig/ec-p384.x509.pem deleted file mode 100644 index 9d1403b7..00000000 --- a/examples/signing/apksig/ec-p384.x509.pem +++ /dev/null @@ -1,11 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIBqTCCAS6gAwIBAgIJAMRWS+CLIsxqMAoGCCqGSM49BAMDMBIxEDAOBgNVBAMM -B2VjLXAzODQwHhcNMTYwMzMxMTUzMDU3WhcNNDMwODE3MTUzMDU3WjASMRAwDgYD -VQQDDAdlYy1wMzg0MHYwEAYHKoZIzj0CAQYFK4EEACIDYgAE18hjdbk/HXGQNIuF -xKPMAZO3PQnROO6izB/mHM1BKPpih2/51iMTFKn6KCU9NZt/Q4Z+PpZVLuawEWP/ -uoWwWIj+60vk25z47/Sr0icelSDGt9T9ujiNP6aTA5hc9gypo1AwTjAdBgNVHQ4E -FgQU981MoejFjh0rbaGXODywOYvB32kwHwYDVR0jBBgwFoAU981MoejFjh0rbaGX -ODywOYvB32kwDAYDVR0TBAUwAwEB/zAKBggqhkjOPQQDAwNpADBmAjEA/58rXa+F -mB6JwB89/IAucpNlktjSPrH2tD63BSROvpUpXNy+p+OlJu4sCvY7HnwEAjEA0VWw -QqUBFLQHFJx1JjMYYfT78V8ylY+Ns1lxrdvs29NNg45MA9uw/ZVMMHgTFNph ------END CERTIFICATE----- diff --git a/examples/signing/apksig/ec-p521.pk8 b/examples/signing/apksig/ec-p521.pk8 deleted file mode 100644 index 9c75e4c1..00000000 Binary files a/examples/signing/apksig/ec-p521.pk8 and /dev/null differ diff --git a/examples/signing/apksig/ec-p521.x509.pem b/examples/signing/apksig/ec-p521.x509.pem deleted file mode 100644 index a9b8194a..00000000 --- a/examples/signing/apksig/ec-p521.x509.pem +++ /dev/null @@ -1,13 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIB8zCCAVSgAwIBAgIJAOxXdFsvm3YiMAoGCCqGSM49BAMEMBIxEDAOBgNVBAMM -B2VjLXA1MjEwHhcNMTYwMzMxMTUzMTIyWhcNNDMwODE3MTUzMTIyWjASMRAwDgYD -VQQDDAdlYy1wNTIxMIGbMBAGByqGSM49AgEGBSuBBAAjA4GGAAQAYX95sSjPEQqg -yLD04tNUyq9y/w8seblOpfqa/Amx6H4GFdrjGXX0YTfXKr9GhAyIyQSnNrIg0zDl -WQUbBPRW4CYBLFOg1pUn1NBhKFD4NtO1KWvYtNOYDegFjRCPB0p+fEXDbq8QFDYv -lh+NZUJ16+ih8XNIf1C29xuLEqN6oKOnAvajUDBOMB0GA1UdDgQWBBT/Ra3kz60g -Q7tYk3byZckcLabt8TAfBgNVHSMEGDAWgBT/Ra3kz60gQ7tYk3byZckcLabt8TAM -BgNVHRMEBTADAQH/MAoGCCqGSM49BAMEA4GMADCBiAJCAP39hYLsWk2H84oEw+HJ -qGGjexhqeD3vSO1mWhopripE/81oy3yV10puYoJe11xDSfcDj2VfNCHazuXO3kSx -GA/1AkIBLUJxp/WYbYzhBGKr6lcxczKI/wuMfkZ6vL+0EMJVA/2uEoeqvnl7Bsdk -icyaOBNEADijuVdaPPIWzKClt9OaVxE= ------END CERTIFICATE----- diff --git a/examples/signing/apksig/empty-unsigned.apk b/examples/signing/apksig/empty-unsigned.apk deleted file mode 100644 index 15cb0ecb..00000000 Binary files a/examples/signing/apksig/empty-unsigned.apk and /dev/null differ diff --git a/examples/signing/apksig/golden-aligned-in.apk b/examples/signing/apksig/golden-aligned-in.apk deleted file mode 100644 index 97f78813..00000000 Binary files a/examples/signing/apksig/golden-aligned-in.apk and /dev/null differ diff --git a/examples/signing/apksig/golden-aligned-out.apk b/examples/signing/apksig/golden-aligned-out.apk deleted file mode 100644 index 58eaab22..00000000 Binary files a/examples/signing/apksig/golden-aligned-out.apk and /dev/null differ diff --git a/examples/signing/apksig/golden-aligned-v1-out.apk b/examples/signing/apksig/golden-aligned-v1-out.apk deleted file mode 100644 index 403e45a2..00000000 Binary files a/examples/signing/apksig/golden-aligned-v1-out.apk and /dev/null differ diff --git a/examples/signing/apksig/golden-aligned-v1v2-out.apk b/examples/signing/apksig/golden-aligned-v1v2-out.apk deleted file mode 100644 index 58eaab22..00000000 Binary files a/examples/signing/apksig/golden-aligned-v1v2-out.apk and /dev/null differ diff --git a/examples/signing/apksig/golden-aligned-v1v2v3-lineage-out.apk b/examples/signing/apksig/golden-aligned-v1v2v3-lineage-out.apk deleted file mode 100644 index b9dc782d..00000000 Binary files a/examples/signing/apksig/golden-aligned-v1v2v3-lineage-out.apk and /dev/null differ diff --git a/examples/signing/apksig/golden-aligned-v1v2v3-out.apk b/examples/signing/apksig/golden-aligned-v1v2v3-out.apk deleted file mode 100644 index 2396782f..00000000 Binary files a/examples/signing/apksig/golden-aligned-v1v2v3-out.apk and /dev/null differ diff --git a/examples/signing/apksig/golden-aligned-v2-out.apk b/examples/signing/apksig/golden-aligned-v2-out.apk deleted file mode 100644 index 37944635..00000000 Binary files a/examples/signing/apksig/golden-aligned-v2-out.apk and /dev/null differ diff --git a/examples/signing/apksig/golden-aligned-v2v3-lineage-out.apk b/examples/signing/apksig/golden-aligned-v2v3-lineage-out.apk deleted file mode 100644 index 88c571b7..00000000 Binary files a/examples/signing/apksig/golden-aligned-v2v3-lineage-out.apk and /dev/null differ diff --git a/examples/signing/apksig/golden-aligned-v2v3-out.apk b/examples/signing/apksig/golden-aligned-v2v3-out.apk deleted file mode 100644 index 25f35cc3..00000000 Binary files a/examples/signing/apksig/golden-aligned-v2v3-out.apk and /dev/null differ diff --git a/examples/signing/apksig/golden-aligned-v3-lineage-out.apk b/examples/signing/apksig/golden-aligned-v3-lineage-out.apk deleted file mode 100644 index 30e1f727..00000000 Binary files a/examples/signing/apksig/golden-aligned-v3-lineage-out.apk and /dev/null differ diff --git a/examples/signing/apksig/golden-aligned-v3-out.apk b/examples/signing/apksig/golden-aligned-v3-out.apk deleted file mode 100644 index f97cbeb7..00000000 Binary files a/examples/signing/apksig/golden-aligned-v3-out.apk and /dev/null differ diff --git a/examples/signing/apksig/golden-legacy-aligned-in.apk b/examples/signing/apksig/golden-legacy-aligned-in.apk deleted file mode 100644 index df0e6c17..00000000 Binary files a/examples/signing/apksig/golden-legacy-aligned-in.apk and /dev/null differ diff --git a/examples/signing/apksig/golden-legacy-aligned-out.apk b/examples/signing/apksig/golden-legacy-aligned-out.apk deleted file mode 100644 index 5d4192df..00000000 Binary files a/examples/signing/apksig/golden-legacy-aligned-out.apk and /dev/null differ diff --git a/examples/signing/apksig/golden-legacy-aligned-v1-out.apk b/examples/signing/apksig/golden-legacy-aligned-v1-out.apk deleted file mode 100644 index e8a0bf29..00000000 Binary files a/examples/signing/apksig/golden-legacy-aligned-v1-out.apk and /dev/null differ diff --git a/examples/signing/apksig/golden-legacy-aligned-v1v2-out.apk b/examples/signing/apksig/golden-legacy-aligned-v1v2-out.apk deleted file mode 100644 index 5d4192df..00000000 Binary files a/examples/signing/apksig/golden-legacy-aligned-v1v2-out.apk and /dev/null differ diff --git a/examples/signing/apksig/golden-legacy-aligned-v1v2v3-lineage-out.apk b/examples/signing/apksig/golden-legacy-aligned-v1v2v3-lineage-out.apk deleted file mode 100644 index e359da74..00000000 Binary files a/examples/signing/apksig/golden-legacy-aligned-v1v2v3-lineage-out.apk and /dev/null differ diff --git a/examples/signing/apksig/golden-legacy-aligned-v1v2v3-out.apk b/examples/signing/apksig/golden-legacy-aligned-v1v2v3-out.apk deleted file mode 100644 index d1773619..00000000 Binary files a/examples/signing/apksig/golden-legacy-aligned-v1v2v3-out.apk and /dev/null differ diff --git a/examples/signing/apksig/golden-legacy-aligned-v2-out.apk b/examples/signing/apksig/golden-legacy-aligned-v2-out.apk deleted file mode 100644 index 87c344d5..00000000 Binary files a/examples/signing/apksig/golden-legacy-aligned-v2-out.apk and /dev/null differ diff --git a/examples/signing/apksig/golden-legacy-aligned-v2v3-lineage-out.apk b/examples/signing/apksig/golden-legacy-aligned-v2v3-lineage-out.apk deleted file mode 100644 index 4b51e4f5..00000000 Binary files a/examples/signing/apksig/golden-legacy-aligned-v2v3-lineage-out.apk and /dev/null differ diff --git a/examples/signing/apksig/golden-legacy-aligned-v2v3-out.apk b/examples/signing/apksig/golden-legacy-aligned-v2v3-out.apk deleted file mode 100644 index 71778624..00000000 Binary files a/examples/signing/apksig/golden-legacy-aligned-v2v3-out.apk and /dev/null differ diff --git a/examples/signing/apksig/golden-legacy-aligned-v3-lineage-out.apk b/examples/signing/apksig/golden-legacy-aligned-v3-lineage-out.apk deleted file mode 100644 index bd3e6687..00000000 Binary files a/examples/signing/apksig/golden-legacy-aligned-v3-lineage-out.apk and /dev/null differ diff --git a/examples/signing/apksig/golden-legacy-aligned-v3-out.apk b/examples/signing/apksig/golden-legacy-aligned-v3-out.apk deleted file mode 100644 index 67a7d3fd..00000000 Binary files a/examples/signing/apksig/golden-legacy-aligned-v3-out.apk and /dev/null differ diff --git a/examples/signing/apksig/golden-rsa-minSdkVersion-1-out.apk b/examples/signing/apksig/golden-rsa-minSdkVersion-1-out.apk deleted file mode 100644 index 82da3f2b..00000000 Binary files a/examples/signing/apksig/golden-rsa-minSdkVersion-1-out.apk and /dev/null differ diff --git a/examples/signing/apksig/golden-rsa-minSdkVersion-18-out.apk b/examples/signing/apksig/golden-rsa-minSdkVersion-18-out.apk deleted file mode 100644 index c0a02440..00000000 Binary files a/examples/signing/apksig/golden-rsa-minSdkVersion-18-out.apk and /dev/null differ diff --git a/examples/signing/apksig/golden-rsa-minSdkVersion-24-out.apk b/examples/signing/apksig/golden-rsa-minSdkVersion-24-out.apk deleted file mode 100644 index c0a02440..00000000 Binary files a/examples/signing/apksig/golden-rsa-minSdkVersion-24-out.apk and /dev/null differ diff --git a/examples/signing/apksig/golden-rsa-out.apk b/examples/signing/apksig/golden-rsa-out.apk deleted file mode 100644 index c0a02440..00000000 Binary files a/examples/signing/apksig/golden-rsa-out.apk and /dev/null differ diff --git a/examples/signing/apksig/golden-unaligned-in.apk b/examples/signing/apksig/golden-unaligned-in.apk deleted file mode 100644 index a52e30b7..00000000 Binary files a/examples/signing/apksig/golden-unaligned-in.apk and /dev/null differ diff --git a/examples/signing/apksig/golden-unaligned-out.apk b/examples/signing/apksig/golden-unaligned-out.apk deleted file mode 100644 index a0181d34..00000000 Binary files a/examples/signing/apksig/golden-unaligned-out.apk and /dev/null differ diff --git a/examples/signing/apksig/golden-unaligned-v1-out.apk b/examples/signing/apksig/golden-unaligned-v1-out.apk deleted file mode 100644 index 6ddc4488..00000000 Binary files a/examples/signing/apksig/golden-unaligned-v1-out.apk and /dev/null differ diff --git a/examples/signing/apksig/golden-unaligned-v1v2-out.apk b/examples/signing/apksig/golden-unaligned-v1v2-out.apk deleted file mode 100644 index a0181d34..00000000 Binary files a/examples/signing/apksig/golden-unaligned-v1v2-out.apk and /dev/null differ diff --git a/examples/signing/apksig/golden-unaligned-v1v2v3-lineage-out.apk b/examples/signing/apksig/golden-unaligned-v1v2v3-lineage-out.apk deleted file mode 100644 index dd6324b4..00000000 Binary files a/examples/signing/apksig/golden-unaligned-v1v2v3-lineage-out.apk and /dev/null differ diff --git a/examples/signing/apksig/golden-unaligned-v1v2v3-out.apk b/examples/signing/apksig/golden-unaligned-v1v2v3-out.apk deleted file mode 100644 index 0bd34c4e..00000000 Binary files a/examples/signing/apksig/golden-unaligned-v1v2v3-out.apk and /dev/null differ diff --git a/examples/signing/apksig/golden-unaligned-v2-out.apk b/examples/signing/apksig/golden-unaligned-v2-out.apk deleted file mode 100644 index 199d3ed1..00000000 Binary files a/examples/signing/apksig/golden-unaligned-v2-out.apk and /dev/null differ diff --git a/examples/signing/apksig/golden-unaligned-v2v3-lineage-out.apk b/examples/signing/apksig/golden-unaligned-v2v3-lineage-out.apk deleted file mode 100644 index 4e523ca8..00000000 Binary files a/examples/signing/apksig/golden-unaligned-v2v3-lineage-out.apk and /dev/null differ diff --git a/examples/signing/apksig/golden-unaligned-v2v3-out.apk b/examples/signing/apksig/golden-unaligned-v2v3-out.apk deleted file mode 100644 index 74e7dbc8..00000000 Binary files a/examples/signing/apksig/golden-unaligned-v2v3-out.apk and /dev/null differ diff --git a/examples/signing/apksig/golden-unaligned-v3-lineage-out.apk b/examples/signing/apksig/golden-unaligned-v3-lineage-out.apk deleted file mode 100644 index 831c756c..00000000 Binary files a/examples/signing/apksig/golden-unaligned-v3-lineage-out.apk and /dev/null differ diff --git a/examples/signing/apksig/golden-unaligned-v3-out.apk b/examples/signing/apksig/golden-unaligned-v3-out.apk deleted file mode 100644 index 31962671..00000000 Binary files a/examples/signing/apksig/golden-unaligned-v3-out.apk and /dev/null differ diff --git a/examples/signing/apksig/mismatched-compression-method.apk b/examples/signing/apksig/mismatched-compression-method.apk deleted file mode 100644 index 9fe9ff96..00000000 Binary files a/examples/signing/apksig/mismatched-compression-method.apk and /dev/null differ diff --git a/examples/signing/apksig/original.apk b/examples/signing/apksig/original.apk deleted file mode 100644 index 05f89aa8..00000000 Binary files a/examples/signing/apksig/original.apk and /dev/null differ diff --git a/examples/signing/apksig/rsa-1024.pk8 b/examples/signing/apksig/rsa-1024.pk8 deleted file mode 100644 index 7b4beee1..00000000 Binary files a/examples/signing/apksig/rsa-1024.pk8 and /dev/null differ diff --git a/examples/signing/apksig/rsa-1024.x509.pem b/examples/signing/apksig/rsa-1024.x509.pem deleted file mode 100644 index 9498ec55..00000000 --- a/examples/signing/apksig/rsa-1024.x509.pem +++ /dev/null @@ -1,13 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIB9DCCAV2gAwIBAgIJAP0KtYjhFu3IMA0GCSqGSIb3DQEBCwUAMBMxETAPBgNV -BAMMCHJzYS0xMDI0MB4XDTE2MDMzMTE2MTQ0M1oXDTQzMDgxNzE2MTQ0M1owEzER -MA8GA1UEAwwIcnNhLTEwMjQwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAOOP -r4Y+uCAihcVjey8JmdjyfhZXplVf3HnOQfvWcY97nKnJ7L977QiWajIn7iZRAdVX -PamVrEbaU6uklgcJFG/qirtscOf6fMBf6GaP2PAhQG89MQnUt9rAjxUAakzWOBTz -bH0gHRDEGQ30LCA1oSlbLldHz+zBKSC7nsSKYp+9AgMBAAGjUDBOMB0GA1UdDgQW -BBT1x0TcWRB4i9JnU5pvRtrEv+95OTAfBgNVHSMEGDAWgBT1x0TcWRB4i9JnU5pv -RtrEv+95OTAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBCwUAA4GBAKs024CvDYFv -rj3GTXM8A9Jslg/86WukzEl/+PXDjbPljNV24RSsFVW5gO0ps6Q/EBkbllJP7xNO -XmOUDyqUcvcwC1zzySqs8kJcF5GCuRXajy4KiEiA5VRmVUSShhnkYX7g1yXkhWrP -Ps1fQArqHx84+naFSh9kVqu54QIykS7z ------END CERTIFICATE----- diff --git a/examples/signing/apksig/rsa-16384.pk8 b/examples/signing/apksig/rsa-16384.pk8 deleted file mode 100644 index c8d27939..00000000 Binary files a/examples/signing/apksig/rsa-16384.pk8 and /dev/null differ diff --git a/examples/signing/apksig/rsa-16384.x509.pem b/examples/signing/apksig/rsa-16384.x509.pem deleted file mode 100644 index 22b6148b..00000000 --- a/examples/signing/apksig/rsa-16384.x509.pem +++ /dev/null @@ -1,93 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIQ+zCCCOOgAwIBAgIJAOd3bpikuRKvMA0GCSqGSIb3DQEBDQUAMBQxEjAQBgNV -BAMMCXJzYS0xNjM4NDAeFw0xNjA0MDQxOTM0MzFaFw00MzA4MjExOTM0MzFaMBQx -EjAQBgNVBAMMCXJzYS0xNjM4NDCCCCIwDQYJKoZIhvcNAQEBBQADgggPADCCCAoC -gggBALDYs7aIK08pNr9fdrpLmUVfSc+3n/RNU2e7o3fzwQf2IMExk/ZmxF/ORgAd -pXPEkn7uOLYSp+fJHUgqsca+8HsxTN1ypKov0X3OeFbnBLXmsoXgjRzaMEgluupd -B81xnAKE/Vb+HYaEJ4YP+3UgBLIItnwLtL6vdh+e4qQGF9KEAv+T+PdrNQF0EGWK -weCaOuMKRKfSnNXMkgIgWgoEefsBXNOR/jRJVFxsnJlwsB2iw0FbKjrxnlmwBL+f -A8YxdMoCLxjL0TuUEmRyd0jO7Td49kUIkW6ux/b4qOvcUPQiODXeayesJ1lmFepS -ATjhgCz2+C3pcAJOPvOvC4v0+5OQ3YrU2kKsnj8G2ic3SdPUq4UUvQWqY+rCZVDH -IqsEs/+XO++wMELkN3uiQcRIEO8aCug+VxMSRiyRSSNtxmcmedUZevbZ6+2leBtn -AbLP33E5hC80A7WKuddQgOiA1yTUVxatZEaxHFVZlg2nzSYHipvwMVC2+zQ4yrKA -mbNp5wiVUV5WLsUkYEuSwl+MG9vEjr2gTX+qLrvpIYS2AF/16SOEw5zQBPUcfVIz -eJU+W//wwXdlNmA6qRCDXqLDBX1MQrChpaI2eRbv64k5C09LtEA5nt/lJt5dm8IF -XpurOZqHTVG3CCS15SM8PyoApYKN0oM9+6Z+FDUOB+VbTW/hAqKYLNBJmNf8mRkK -+c1peoOAYw5iG8iaSD8f8bcIi3oFPMdt0Gs5vDoLjbWmK2s9P2wknA4hmVe7hvSy -DMvyxj8j4BLadc3HafcXYPfoNPhfgoiZVLm6ijEj74iKeLSkef8F3x0Agulnitz3 -CWt7X6EXHbqR/0++VTqgnFDe+enf9oFzMsDDbOs59dpyGFSP159dTqJILimF5xUG -Fw95hsTbdEblZ7Q2MiibB38ifz8WT+Pix72SnHrlcnKonv8Tkeoie0AP+dYkYXpC -Dy0oIzl7Vhy1e99RjX8kKjZAfCuiQ7wnOGNu6V32UyKMvWD5E6mNLpsvyBRTxDhs -ePpH5dZWbhg6WxhD68QG/Wi/8FRmc8/TPpPXilOG3HHtX6Q3yfGYHJB6/dJhWQQy -iZawyEpcyZKjEyWoJayRsKSLb6gW6Idfc1Uf/yb6IHDRlYZEPF7JuznjLCaz2QC9 -8GCBGfUE9OGH+LtdMnsmn2IYEd1FtWrRGduG0HNKubmx8bJmc1HkYDQg3cksPb2o -jwCND2ALGtTcR30yllmSmEJKpXBYB00iRvxvkBqCkL4THOXhN2V5uEMrS0r8GRZN -QCvCoFKulPjITmlQ/ciVonN9y9qVeRbFE4ZxiiBxF41K/Mw45ugIqfg4ndJqbub6 -5p15nhYJIC2CbsVL5+1THmd+kompQhUo1ttwof0aHh3KLwe1uq2OEU7Tz71Ct5+G -b5JjIAlQDuGcfsx3utJY3AE5ailtvaRNAz3FyTsZGkIOeqX4uswWltxGnuSMSbPi -CPv7ngFXkytkK+3Oqs92XM8mhO1yqPzmm73+qZYDGFdy32C/Rr0enETmgkUFPToH -28hMcOsEt+7L0GM6A5N708BaF9Csy7XTFz47Hk2CjaKTvP08Tl3bFPULrgJ5KCr6 -4hc/bVIDkU7c1lhDISJ1yuw4KHizmjuf4UeRBBDoB3MpPwZSeEkggGXuX1wkFApu -RGhjCXQgFU9bNtUHM6Kj0tPQZrgsvx2wwBUFVOfPoej6afrJqpvep+EN1+OJCE4c -AzuZ1CdE96vEleVbrq3BQaJbsm8JqHs7lAn1aiCK0semqAoXD4cT4L2H4E37IDlm -PHsxIeTmgD7/TP3InuFB6sYvVM8moG1TLmtUJkpc8kkPBPNbTRHwuRvMGD1pSsP1 -aNbgKkEfGqL1iOrfoTCRGKDeDDxWGsxDOgW1hRs9wGzJuMQjl1Rlb11lnnX7UYyT -UnD/yw7YaplScWwpsqntQewI59A4ad1wOJlabDUFwkD4i4ERTcjyea1ydE03qaOy -0ItJbc8kjsEMWFAv1+y7/cxD7kALcytvBHhD8OVJ40qJrtwRsXnv2T74cTPh87qh -3j2tjdJKVSLxwqg5ZdvIemnWmmFAPuRERResp5j5WLJcOFcXhbp4CAQLViRoktLf -AKtgKSVa9FQLvombOq8GqWxqeGJEsq+8/X6UOj/RDPu8gUCdodmlxgC5BpJlMTfg -9ElvHb4oRewPfc5MBV5i++8xagxS1+5NM6z+1qZfT+XJcJ/wFYyeSvGGdEgaDIVd -XGqOFDmA20bUl0xWSM5j4At2CmymAn32i8FR5lNfB/f8tIGBlXQyrYzpAKoj6FrV -3u43zKgYBzDTqNs61e+A8MScV5666gvpcOltFiaucc455JGiN2v7N+SAygWaX3nb -jidmRaIAftup6kXVXxy1ZwpKCtUTqo0M+S/jO9clHy1EYaSX12blCL1B6OFpMRV7 -1foffUHwaPrMqqbPphgN4QRY2Ao2sKSliiP1T8s1T2iteEGiazCdWSOVVi9Acbo5 -DfeBlWwhW6OQpv1nMTznGscc4+ledP5yG5C6boz2aNwK6H6cpDfEc7tWTWhZN5Jm -Jlra4pseqf9Lsc/Y4QMD1312C3Hu8EtJ/qlxEDhLnCW8PHxdlRsIkmcV8w+as/hu -6/MlOYcCp9ae6nooFL7ZuDkdDWm84UXdce2ZVVGVoDa+RdpICnp79y/9CLxWue4H -09VFEFUH//E6lOCBymUjTSO/DQ6z+ceb2W5B3WVV8gqADTDhAgMBAAGjUDBOMB0G -A1UdDgQWBBQkHp1wX0Sfr0xz7xcip9UwEIFTLDAfBgNVHSMEGDAWgBQkHp1wX0Sf -r0xz7xcip9UwEIFTLDAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBDQUAA4IIAQAd -FhlHg4E7Yp8kIOfZRU5Cma6wbOSd2eHkV28WHGdwpKsvNhzgQEj+scYWSS8geozi -vqSdJCoMmY8hWJh4SY0ED1DjPMoRvE8OotyGoCJovvYQia+gbVneT8JnfV3fkdwi -hpUmAhokrsHkBj0jp2Ubff/D5yflA+QPCmhZZnkow+5QHXtmpy8CL9Fzfonz5uq7 -yCV5uWRicczFbQw3pDSXKn5OFqXuC8H/8R6Caq2TkJ1LusVtZJevcHBkEQ6e+XEX -kZ+QCNtHw0a67LQEPtMXSyqZ/zR0roqwT6udUgHhdvZjbbb9GDpTW3u472IY18E+ -bf+npZl9kyuv2kyK1d2IjL45TxjBr7vLbjsP2UsmZvb3Wfb/kiMscvTBcxOL7/WA -GNJ0XifmJWiDTDC+gUBC7LRN9lG8F7ykrMTtMUNlhow5LpIi0HA8TH58yq3/ulGq -XWpculy33kcVAFTMGh57r8zq9DwkeW+RWggvHO2422S1bFGmKpizKASTvY6iqo4H -yKvE9uZ41WaEbpp9WKPIaeup+ynxFpcgwMCKwvs7Yaj+mVexv7CoJ9nrEhMOHDxV -GRyWDdBoIi08S02JHztZBXp5NZ+hqey5HrO4dhrnV1nVYJmH89KcAlXMfTZ2YHsv -R2+dm6K8ToaX+Irqbz7Xbv8WG/aAdUqMSWkFEss7OT7VZBUiAdFaWqg0D0wtWSSE -jZJJs9ISUTClq+97o9BEH2sAebchLFP56nY+Bj/zHBq2qPxTKdKE5BH13KcK1fwO -eNn8a3SlSEHraa0oV6VjgSoMNdFz7b7b0r/Z8L4PEASJgH+VaGRm2TtuVWFHSqvX -015UGITk6YgAQ25MTprJc/oAd0dut+aCPtOVElfukYvdrbw1YYQ9tc7kU+AVrzaf -ytWj2GYR5Slfhle0inKlBvbpLTAHs82bp2Dgy9ZSQzW9/gIvLvCt+Hj0kiSYNcbX -W7Ai5z2i6XKE7DdQO0Uzt+1bXGK3j2PI+81lCw2ejCFwjdYDWQw9f2nzQ5FgeYwG -tc6fS4GbJM97n0yH9rj0Jb25AummZGnEL11ytPpC6Nv9cQdCuKDbaWQuQyRMCLEm -hHaqV6k/fI4Etvuo15pyfJ9w7Xrhc6emgdg2HzJ99lDGkzZAF/3FR7N5pLPk5E0/ -PPlXUSiEx17IeWp3rNt0YSMixkGz+EbKyv9RIZzm/LV4zAzs2ZyUHHavUgZ602eg -89ppqafaBrCwIWB1jUmnHJop9YlXQ3hE7pAV5qf9GxZLwUdzJcyLte1/vkn1yt94 -nLOZPPWUwUjIaBOZ7e/g8fHBjvAYwyoy3toKVpvkhR48NvcYD8pQ9cB6rIL0JkWV -nQEYeISlJCUOO3K2eZ3ZH02ftha5gLshcGRXy9NS+4fNxDT3H+102RqSxmKPIxV0 -onV9RyOxUPKLRGjCZBZxs5aSxTYjFJ591azt3yAY4vwCnnHqdNGFbTat/Zc8LUOO -J26n5cOYFGKPvZVvj8jMNYC1wo+R+A+1FeYXBV4MSVxCB7tjBlbU6OIyZSWLZ8Vw -LMcPbuZ7ESj1LeTONwS1vspZM8Y/M8+RXv9VA8Z998tnNopdU3izVC2z6Zn9hNNI -XBDbSe6ZRwsjXrm5TZCBgA4ZE18MwxPVhntSvl87Gc3wF4hz4BOiZXmffrXK4nQJ -aVA8E2IsriCV+GQBN/ui+w3U9LbtsHrbauhjrru5EfYohpuInwvgPlAnTztdv9u7 -ee8RhwaCa+MInZanD6pRAAcfM6O64CPxHZtfVW6JM42N7wQXijvYzJPVR30F+6o1 -C+KwySuMBOGxOctmzLj938/OMrxuLBOmv3PJvSnHV0pWtbR7r7jH3v0uUm54zH56 -Qo/Rm/Aqf+m4Si3Xtsf9zvc89sqG5v2TT882Joja76zlJfaS31QgbnLTmKtAHtIC -mqfQPvt1LNEJIiB6FZDHJIW5Ccm7imsixerxCBBoAt/J/dhW6N+cjZ0EWG5NiSoz -9LmAZv8iWyqK/KvdPXUopQWqkYUvuIyNCYqzTRLKudUMohefNwghvl1gSGp4IMZ/ -4LyrJHi9eCcD9Z65PJsRTua+742N2sdhFfU/C4atOUGSK9x/Dl79Qkgsl6HqAoce -HXiHAIvoOqC+jzEkjjxow30BzJeGsZoFwNvMUW7HcQ523DiIOx6MX8oQyKEo+W6C -ayFvvvT3qHu2hL2ZxOXE+rGyUJnmwqctz4ChLvyYXa/eNrycs382x2U5XNXgXzNT -3bwB9B+LnKSMJEB+UvHdbBcafYyevLptbF5xiiiUA0P3fq61AfmNiCzJWb+kaO11 -oHHQNWyG/fO49u3bZJkhvlsk8GXAp9uTqdW7YAqxjy8NohFewmtpTJPE62XKIqiq -+dqo4nUT761iaUBxgyj1v5jKcXT2JiEMnEe4AN7pZJ01pCNXQrXl+6ru4TVV3tpy -OsDJ9UfZo8xZXEAJ/gvSyiih0xq6xhwGuUyExC3GldBz2frveWImxVEiqQIdHULH -WwB6eAm9T1f+2hOGq7AB9Jb8CRyQniJWXtWu9uJBt+XwSt5lN6VUjeLt95SitvjO -llqs0zhvTf52H8siwaO83Cui78iamqv7jVatB3JYW71S5cOyZ/x5Z5FYqKi8/wjO -L4OyUs54kfcJllsxAmS014UgcTrJpbMNw7jSzLX6FxT4MEbyARK8wWQfEZQ2tCeo -IOzfcYvlY05mG0KSzs6ZGBrWRZQDPcbJ0CKNSLTFbQ== ------END CERTIFICATE----- diff --git a/examples/signing/apksig/rsa-2048.pk8 b/examples/signing/apksig/rsa-2048.pk8 deleted file mode 100644 index 105f7e74..00000000 Binary files a/examples/signing/apksig/rsa-2048.pk8 and /dev/null differ diff --git a/examples/signing/apksig/rsa-2048.x509.pem b/examples/signing/apksig/rsa-2048.x509.pem deleted file mode 100644 index 0e7b38e5..00000000 --- a/examples/signing/apksig/rsa-2048.x509.pem +++ /dev/null @@ -1,18 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIC+TCCAeGgAwIBAgIJAI41MGzdARX3MA0GCSqGSIb3DQEBCwUAMBMxETAPBgNV -BAMMCHJzYS0yMDQ4MB4XDTE2MDMzMTE0NTc0OVoXDTQzMDgxNzE0NTc0OVowEzER -MA8GA1UEAwwIcnNhLTIwNDgwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIB -AQDQ4JI1EJ239V4wss0jpVlZMudh2/kARCVdoBgsRQuvc2RNnO23Eyynlt9UN+Dc -NRdQIhbCpVTjdEl/bePECHlqg9NE3frAj5GebiUdWL6A/idKsZA1nAKyIgxxjcnu -+38OcrlO6XOm36euxGfd/ULrghZGXzMVFq4uLiIv3DqFkUcIlE0BvUiUoNwpopV4 -MKj1GQgoaEObJG5xkMBKO6vg36VfJ3s3V3r48uJxYGhhBZEB0EpoXLd4i0piAB8S -MLb0Ek6wA/HZ8A2rdnStk1wl/83OM1jO0uB3hyfJpqIijlvNGnrloYyyOIqS0LGH -nxSJD7goASH2Ef0h4yxbsOvHAgMBAAGjUDBOMB0GA1UdDgQWBBQXAi1zEH84mzkS -62ohswGGWSwdbzAfBgNVHSMEGDAWgBQXAi1zEH84mzkS62ohswGGWSwdbzAMBgNV -HRMEBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQAB92T5toLkF6dLl65/boH5Qvub -5wfIk0AD12T3t3kYWQFOH0YDCHNL3SfmrjYM/CwNJAd1KuCL5AZcn0km/n0SFXt5 -8Ps/MBcb0eK1fYezeEehKUyt5IBgDTKeQOel6So8rGuQRrDf/WV8rt6fugkIODFx -sB3oj4ESaGXbvmvWD6q4a3koq/nV26kALchnAr7/FTNq3HEIQ1BDr9pldVh1gEV/ -ohHKcQP4M22Es7lredzpIcb5K6Ko/UtwsSRtHnoOjwmb+L/FsgAJsekmcJG5TK1X -ciIsrrNFDCYzf/d9O1PD/V95kB7460qMzrGWZpc3mLe+OnmVMq6c4omOtIKl ------END CERTIFICATE----- diff --git a/examples/signing/apksig/rsa-3072.pk8 b/examples/signing/apksig/rsa-3072.pk8 deleted file mode 100644 index 163e06c2..00000000 Binary files a/examples/signing/apksig/rsa-3072.pk8 and /dev/null differ diff --git a/examples/signing/apksig/rsa-3072.x509.pem b/examples/signing/apksig/rsa-3072.x509.pem deleted file mode 100644 index 0f3cd145..00000000 --- a/examples/signing/apksig/rsa-3072.x509.pem +++ /dev/null @@ -1,24 +0,0 @@ ------BEGIN CERTIFICATE----- -MIID+TCCAmGgAwIBAgIJAN8aZ+YVywdhMA0GCSqGSIb3DQEBCwUAMBMxETAPBgNV -BAMMCHJzYS0zMDcyMB4XDTE2MDMzMTE5MTQ1OFoXDTQzMDgxNzE5MTQ1OFowEzER -MA8GA1UEAwwIcnNhLTMwNzIwggGiMA0GCSqGSIb3DQEBAQUAA4IBjwAwggGKAoIB -gQCcgu3kzCLVWeUzwO5vhwWFD4rCJVavnVJjA4hz3fg9wsh8wpK0D39a8iyKS714 -5fFF/EsPpoKo6b8l9GVHfrSzJSa0rMcQ7+GHLyfG+8Wt6cnGwb8m6FOMKM8YAlUO -zVL/WDZXBGvHu/gmZXM0ZbCy1cFBy5/kcGF2zF/fa+a8n4fUiQlbGC6y5iXKewMF -z5/tFN4BeShBSNxGJVNOut/bLOvpGoPQVsteFlUgiSOPuXeiMeXDDEMEHbY7u7lB -Fmjs5yAdXaLtnsJD689NdfIDZYHsiBRf7sFNWWNg4gE0gEPhN0QkC2Bkak80t2Mw -XNakB7gqJ7Vsy+ZPBmhzMzeZbrK9cZXgqNNlxmraHycGzPif4sqmpy1/xFxNqOQh -n2cc0fd2RG0ql1T4qO0U2b2NQzNMcgrtBW2E1UUUVukVJLCa7RKyt7yq7uUqeCYd -MxNfvWYBSCzpZMvTI7jq6HcCqQOfW8nkE/z2IBdWvBi3yIdgKSsW0uZsW2/1+KlJ -fhkCAwEAAaNQME4wHQYDVR0OBBYEFLGsv+jET2b4cWyINayy3qf/U7izMB8GA1Ud -IwQYMBaAFLGsv+jET2b4cWyINayy3qf/U7izMAwGA1UdEwQFMAMBAf8wDQYJKoZI -hvcNAQELBQADggGBACLyVVZrgLXL0PUAS2WwZruWj9q7lVnzLMla3u9j/fSLnlPK -/YcuQh/DqovNkPjFrItww4VfLxkQNsdOccAMHWA2rnWivOYnS1q3gM56e9KN/fEq -yRc3ltZCPvEoFnFEVtVfmgZJGV0xBLZUFHnPjlWtUYXS8pR89x/Klwy5aaJ9OcGW -SPaI0I3TyFHCb92Dtfdehtdu8YCDrwTyaYLHvYdNQFDrJ20I8WNsG8RwklfAWNwZ -IJ5fQxwHiCKxvdaTt2NYUSm4R4kEQCgklrgnaEy2kzDVKp4GjQwVrsa1btK+Srrd -gtIqB+azx3XziuLi129qJGeZsof8ylN5eYmw0r57d6OPB/xj3roBsB77t4d5jEhl -Y0BZ93t2HWvXJmuolf1JcauDOcGhxxgdiWdcOWeSABH3cNUiilRfs8HRwSzZwB5E -RyjvKBdGirUAbLgri+8t9165gaz3wVhP4xkcD4e6LoupWHarAMKunMVGVbCOj7mj -AUPHJ3Z+HhUKiI/q9g== ------END CERTIFICATE----- diff --git a/examples/signing/apksig/rsa-4096.pk8 b/examples/signing/apksig/rsa-4096.pk8 deleted file mode 100644 index 0f498e53..00000000 Binary files a/examples/signing/apksig/rsa-4096.pk8 and /dev/null differ diff --git a/examples/signing/apksig/rsa-4096.x509.pem b/examples/signing/apksig/rsa-4096.x509.pem deleted file mode 100644 index 704dcbd8..00000000 --- a/examples/signing/apksig/rsa-4096.x509.pem +++ /dev/null @@ -1,29 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIE+TCCAuGgAwIBAgIJAIhxrQmG+dcZMA0GCSqGSIb3DQEBCwUAMBMxETAPBgNV -BAMMCHJzYS00MDk2MB4XDTE2MDMzMTE1Mjg0NloXDTQzMDgxNzE1Mjg0NlowEzER -MA8GA1UEAwwIcnNhLTQwOTYwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoIC -AQDTPhE7i4Bv3BQG1ifMPZfTGA1ZvE+mQWOgQ1q/3AQz23I8pIaoj1wFbYDvnTYG -UCDnlJqKvwL4mrAnxvqTxm+0g/WFOoBKFoNY5OhgcDfomNEFQajY9bgXaNiwEYDU -0X+q+2KAnr35MF7vdEaHcN8gFh15wObVXmlerMIOWejnwrM4MOXjGjNXtiB+Dg04 -Fb9eHufZ+s1dKNAojD08mUJkxTC1gjmBKPr8hOAPo9ay5NZk6mGaI1E0U5NbIpDe -0EhYxRXkDjP7f6BzbhFEupCOzZNMC5CxD8fsmku1CaKBayGpsxktYFxsw1RFVTZj -3pKYnM1fJBHj/hU+7zy60MZNpdU6i5HVa8FPldwAxv6P2dz0wIl9S3rrqDrd2/1p -r3rKNrMbVo7wzZ8euVhmjttsRvN8NykCniX6oWxuX7EFQxT/ZM0xk055gMMW7xbr -oLtPAJ1Lk7R6aTCS+ObrhBgS8+38sIT8rF/CCz2KQ68iUpMmMBz+dkYsDwHPq7vG -wIy8J7fwzTLqUbyO971+4MD9/9HbqfjRAsjfnSz8HqfyHrSDKeAhgqlr8j8DtQ7X -B2PIZIEmyN//A13xfZQ63c/KR/yf9nPig4KfHulODfWXBD+2T5kzakTSn4My37FF -mzG0giMMJ3zGs4QpGZAKFGdwhUq6nAAqEKYo+dptlFhbzQIDAQABo1AwTjAdBgNV -HQ4EFgQU+f3rdfojsysUqNHmjE4c+0I8YGUwHwYDVR0jBBgwFoAU+f3rdfojsysU -qNHmjE4c+0I8YGUwDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQsFAAOCAgEAbOd0 -bKbaeGNsinFSck4niiHDhkeD7GhsneReA73LDJVwAsr5SLAYlmZL/R+1Jw2FGa5m -82q8412xoVxqAbsz/OrBjoW+5RjAUpHSv0vo3Ny9EpFDpRI1yO8EFU2PhpbcC8Av -101/oBA8tgKDKgb9H9GrnuqKqxLvrOKDle0TEWAb4X+yyuLSneU6UZTn/g6hhKMw -pRcsCkwwKa2266auq93NA30Xb1UME5med/5fBKzjL7TvA8BTbr8EdHxjbPmnyI1n -iVQJnkvvk6rDRcWeOt+lP/pmvaCcVFp9FJHlWmxrus7x0PuH8WxecVl6PeV3MLyR -HXwGLzlqJWFm753FP3sTV3xNqemo1IhtlHR3jgU8Y7Ixq2Ljjs5izucqM+u2Ioo/ -wbzlhjfRmxqGE3RWvq6Vv5C22Th3hEA7PDUKAh1/cvUwZxOh1Wa9Nedhy0SUXAR8 -nY2GHJEN6QmR1ZAoyABHuPqk1IjduDONo0usGk/iYIFMgfwitc5Tv4gdjjBLburF -NRU3QkoT1twPueb4Xnvmb/yHmTmqm7MM4OlkmTSpYRci8C1JNChdqIjNSF36Flnm -DEMqP6petbkZcORD7UtgoB+DCPyBWybtm/GDOW2v3CWo94Q5A1yRDpqyQOTIJChe -sssLUtp3bfmTSFFMfmsovynUlFpsazeFKjQOkYQ= ------END CERTIFICATE----- diff --git a/examples/signing/apksig/rsa-8192.pk8 b/examples/signing/apksig/rsa-8192.pk8 deleted file mode 100644 index cc7a7ecf..00000000 Binary files a/examples/signing/apksig/rsa-8192.pk8 and /dev/null differ diff --git a/examples/signing/apksig/rsa-8192.x509.pem b/examples/signing/apksig/rsa-8192.x509.pem deleted file mode 100644 index 42f14285..00000000 --- a/examples/signing/apksig/rsa-8192.x509.pem +++ /dev/null @@ -1,50 +0,0 @@ ------BEGIN CERTIFICATE----- -MIII+TCCBOGgAwIBAgIJAMMCN6DTJaAOMA0GCSqGSIb3DQEBDQUAMBMxETAPBgNV -BAMMCHJzYS04MTkyMB4XDTE2MDQwNDE5MzI0NloXDTQzMDgyMTE5MzI0NlowEzER -MA8GA1UEAwwIcnNhLTgxOTIwggQiMA0GCSqGSIb3DQEBAQUAA4IEDwAwggQKAoIE -AQCt2gaOPSTn1A/WkapaytoE2RGF5nBzlfLocagG+0Bgz0RH3QQq0xBEmQivmbj4 -egyKFQQ9dYrefXRnayLQvHpfeT31QXR3iKOfMnvtxK9UnkXo9S/T+czyj91Ox51w -HFUyMlXjFs8btxi6Lpkrgl3jmL+e4/WI8khvTrdszrO8rBHBYlD8Y7SAvPcVczYq -nn4m6Jd0/abR5slHiyGtkTREoHmW/u4r4PfTzanLyzcsWH9/td+sYHcu1Y0XTWTR -x2qrUmpD+7X5cvXP9rsECU82dtnyPZPIHBqzfLJ8oGELsJxgVZ0u9gW0tlmJQdVo -Q0QPJSWivnNxPl1czJYbXimbY3Zh5hCzdyNqQewVx6iNsNh008JsXJ5/yvJQgLgZ -UR2gWZMGzLc4V2wiqxuLzELt5RoXPehAdAiOLQu/3Fw+u4J/d7NEwpKgpdDGyG/U -9nV6mjvomcgOdWKblaRAeiXauYy/MgW68kIu4O4SoKWRRmOF2p+tch3aDKw9M89O -88QhEzbzDsioAxeOAqL7th3bSPZ2fX05xtM2vFK71QFM41q+FOL+062Ev/VJyU4g -kxK643V+Cxso9CZEVtFfkNnVIGOI2h8knkOiLtbMnCx/hcxuZLm/XvYQxOO/7ScL -rkHLUuKu/dK2ksDn8yBgaHfVlHkMmVoSll6fKB+UXpPX7xClrGQAFpVUji5oZN0s -+EcMQdcMtsb6LxnwC9XS1ELQ5FQGuJFatwY9RSV3cbwI6kNKaZiB5sDDAaAHX9GU -U3EA2fm0u+4UFOSSmYTfx/jl0V1NMQ1oOAY9QMqzckMo2y9cepLQ3temQ/k4bNqj -rYB3POdqS9OoT74UKU8gg9rv01PaFlLHhPKwVc+MjY36aVefbfk1KZzBpm2twUUm -F0kz4pU3BYj0aSrTeKWaTLjdn4ndGMSe3QMQQ5GUchWCcygTyID8Wx8+eDzPIs/U -sc++7fQRuPawcd11oQ7wTjWIjr7VnsV8hiHSyMupEad8HuBt8CNtDf/m/hD1LsEf -0dY8nDGSPvV/ih2YqTfhcac65D4JKKbV5x65aEwM7frYwi9QsB7CK2xLMHnatp2a -TRcA24VEsaBP2+UNSLyxkOeeuzSCksHLPBWkVfcRbKUeD9x4Dtwf2WsUtYjGzOQ7 -ApLBB4XHe+GPr/i+PmJP4IDoU1Mifbjla8rz2ZuebZgPnyV7nSvkG/FUqUYpa3Ut -LY0nF/2dDRF0NirbWuB4Mkk/KlxCQ3w8EZFY5u6L/ee23WxbnVOEQJBtKh7/I/UV -2dGqoVJx2UqT0MpjUCFjx+KjWvaEt+FfmjfRRqQfHLkJlYly/YdeUrGPdGgJNr0C -csnZkAZmKDo4OVv+wVduHxHfAgMBAAGjUDBOMB0GA1UdDgQWBBRdiMpGc1L++yQc -MtftoeGuLwJ+PzAfBgNVHSMEGDAWgBRdiMpGc1L++yQcMtftoeGuLwJ+PzAMBgNV -HRMEBTADAQH/MA0GCSqGSIb3DQEBDQUAA4IEAQBo9lUFyV8jI0IpcQLC7hC0ILxx -6DsDw/YpMd9lRyujKa//OVJOEO3Z+SalfoLslMPCD1eeJBxgx9/xTMxZUrunOMJu -Ddxc5RypVwdt6NOUQ3pNYU+Qkp73aZzakm6/i1LQDOxGf1PaZooPqXaKMfyb9CQ+ -M5wR9XsLDAyQPlylft3cWsp7DaPsrcp7Sn5u33TtvCDgfMwbKZrzzmCdAHS52p0A -czMpDgYxhxCuHPwN6XSAxlrWnfpkOsdKneiVr4aDm1fp61PQg+sOKNCNJCMmUB50 -XFj14qLmvjLERNl2vUfDqoj6DxC9OceioZljzFM2d8/DEC1/YUT8AGYZQt0ISLlq -QW4e4iIxXxVNKwXvJZMCd3z4XX8SvAOXL0+WrOffgkQQpSr2jBXKFe0BpCUnzVkN -jw/bVJ89jrqfupExJ6kKTLzI+H2u/7LgZUn9/QlvhWR3IL1nEvCCOPHXTreuUp2U -KauH7WQU+mzF/K+obzYiaPc53dz0C3JcvWgv5cBbhDUsGsziZLPkR3r5TvpTNF3t -c3Ky84q7CfOKI+hGN/S+BNSv+TdA5uOG+h8GJ6SAwVpimzguhx2/iRg7OiHmhoy4 -UfsCF/QdoF3cEoSMMzorOIM+szZ+XggJMbtWzIv4NAL2TCKJcpB6t0Uxci6JN6lM -tnbq78QxeOoJ3D3g6ZQoGvCdKwHcMQunS2MK75j9hckX5hR+0xnH++bI+D3qXaul -zCOAcMoGpM7WgyzAc3mh9aAJFk1J9OYzpFY34nX2cDMc0xtI2s9p2/8X14ir5suK -R0rqm3BZewDaQVNtrZCm/sch1I0cN4GomvxZ+2xD43vsZm8QEB2fyTvazg6kW2O9 -G0coUmszwI63f7fVx+wzZZxS24N17lIO36hjBq12SKDz9C3cIOZpPYdcaNxDyiwq -+RojbgUnosJji+xZtyK5Bf1kNB+jNoNT5OrWCXCR62Z5CQ+fAdlz4NPdibYnwscF -SD8OA2I7UIT42KAuDBEMKVXe4SlhqLzOdqXwZ7h/ZxyUlY+zpwLO9vfLVpqZiavl -bx+RO7lkvxPGEtM4mjXt5dNx2rgML/lXSE63qaqspYLJ806A3GE0918/b+ZDfvzG -HLbeqIVtAlXwOGFLdifLvsgFybQ5yriR/yTlHXN/T8K+Q6wPo3uNkKNgUDq0FmzF -N9UDQ+VFAdwaGPfBox3okGPoD6/HdiokuwZm4mlioHjZc513qhDapS3fJcXV6tu9 -OhIPBJ5NXVw3IVXwB+eskd2W5y8QlHZKBNTwzc/PBqL93QA2PxOFispDtevAuyTq -OhRConYsMhoLf/9NqhEsyKVhwtYhYrUh0Q+hCiAg+YpjKuE2YJoUNMVyF3dY ------END CERTIFICATE----- diff --git a/examples/signing/apksig/targetSandboxVersion-2.apk b/examples/signing/apksig/targetSandboxVersion-2.apk deleted file mode 100644 index 2d7685a0..00000000 Binary files a/examples/signing/apksig/targetSandboxVersion-2.apk and /dev/null differ diff --git a/examples/signing/apksig/two-signers-second-signer-v2-broken.apk b/examples/signing/apksig/two-signers-second-signer-v2-broken.apk deleted file mode 100644 index fcf154ea..00000000 Binary files a/examples/signing/apksig/two-signers-second-signer-v2-broken.apk and /dev/null differ diff --git a/examples/signing/apksig/two-signers.apk b/examples/signing/apksig/two-signers.apk deleted file mode 100644 index f11760f6..00000000 Binary files a/examples/signing/apksig/two-signers.apk and /dev/null differ diff --git a/examples/signing/apksig/unsigned-targetSandboxVersion-2.apk b/examples/signing/apksig/unsigned-targetSandboxVersion-2.apk deleted file mode 100644 index 2c92f1c9..00000000 Binary files a/examples/signing/apksig/unsigned-targetSandboxVersion-2.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-empty.apk b/examples/signing/apksig/v1-only-empty.apk deleted file mode 100644 index 1967272f..00000000 Binary files a/examples/signing/apksig/v1-only-empty.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-max-sized-eocd-comment.apk b/examples/signing/apksig/v1-only-max-sized-eocd-comment.apk deleted file mode 100644 index f7c8db33..00000000 Binary files a/examples/signing/apksig/v1-only-max-sized-eocd-comment.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-pkcs7-cert-bag-first-cert-not-used.apk b/examples/signing/apksig/v1-only-pkcs7-cert-bag-first-cert-not-used.apk deleted file mode 100644 index 0ebd01f0..00000000 Binary files a/examples/signing/apksig/v1-only-pkcs7-cert-bag-first-cert-not-used.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-targetSandboxVersion-2.apk b/examples/signing/apksig/v1-only-targetSandboxVersion-2.apk deleted file mode 100644 index 4a008791..00000000 Binary files a/examples/signing/apksig/v1-only-targetSandboxVersion-2.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-two-signers.apk b/examples/signing/apksig/v1-only-two-signers.apk deleted file mode 100644 index f096a564..00000000 Binary files a/examples/signing/apksig/v1-only-two-signers.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-cr-in-entry-name.apk b/examples/signing/apksig/v1-only-with-cr-in-entry-name.apk deleted file mode 100644 index 84828b01..00000000 Binary files a/examples/signing/apksig/v1-only-with-cr-in-entry-name.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-dsa-sha1-1.2.840.10040.4.1-1024.apk b/examples/signing/apksig/v1-only-with-dsa-sha1-1.2.840.10040.4.1-1024.apk deleted file mode 100644 index 02ce0278..00000000 Binary files a/examples/signing/apksig/v1-only-with-dsa-sha1-1.2.840.10040.4.1-1024.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-dsa-sha1-1.2.840.10040.4.1-2048.apk b/examples/signing/apksig/v1-only-with-dsa-sha1-1.2.840.10040.4.1-2048.apk deleted file mode 100644 index 62f8e69d..00000000 Binary files a/examples/signing/apksig/v1-only-with-dsa-sha1-1.2.840.10040.4.1-2048.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-dsa-sha1-1.2.840.10040.4.1-3072.apk b/examples/signing/apksig/v1-only-with-dsa-sha1-1.2.840.10040.4.1-3072.apk deleted file mode 100644 index e8f16339..00000000 Binary files a/examples/signing/apksig/v1-only-with-dsa-sha1-1.2.840.10040.4.1-3072.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-dsa-sha1-1.2.840.10040.4.3-1024.apk b/examples/signing/apksig/v1-only-with-dsa-sha1-1.2.840.10040.4.3-1024.apk deleted file mode 100644 index 0f0f0167..00000000 Binary files a/examples/signing/apksig/v1-only-with-dsa-sha1-1.2.840.10040.4.3-1024.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-dsa-sha1-1.2.840.10040.4.3-2048.apk b/examples/signing/apksig/v1-only-with-dsa-sha1-1.2.840.10040.4.3-2048.apk deleted file mode 100644 index aa30612e..00000000 Binary files a/examples/signing/apksig/v1-only-with-dsa-sha1-1.2.840.10040.4.3-2048.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-dsa-sha1-1.2.840.10040.4.3-3072.apk b/examples/signing/apksig/v1-only-with-dsa-sha1-1.2.840.10040.4.3-3072.apk deleted file mode 100644 index 68edee97..00000000 Binary files a/examples/signing/apksig/v1-only-with-dsa-sha1-1.2.840.10040.4.3-3072.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-dsa-sha224-1.2.840.10040.4.1-1024.apk b/examples/signing/apksig/v1-only-with-dsa-sha224-1.2.840.10040.4.1-1024.apk deleted file mode 100644 index 11d39425..00000000 Binary files a/examples/signing/apksig/v1-only-with-dsa-sha224-1.2.840.10040.4.1-1024.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-dsa-sha224-1.2.840.10040.4.1-2048.apk b/examples/signing/apksig/v1-only-with-dsa-sha224-1.2.840.10040.4.1-2048.apk deleted file mode 100644 index be8fd4b0..00000000 Binary files a/examples/signing/apksig/v1-only-with-dsa-sha224-1.2.840.10040.4.1-2048.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-dsa-sha224-1.2.840.10040.4.1-3072.apk b/examples/signing/apksig/v1-only-with-dsa-sha224-1.2.840.10040.4.1-3072.apk deleted file mode 100644 index 2f4db653..00000000 Binary files a/examples/signing/apksig/v1-only-with-dsa-sha224-1.2.840.10040.4.1-3072.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-dsa-sha224-2.16.840.1.101.3.4.3.1-1024.apk b/examples/signing/apksig/v1-only-with-dsa-sha224-2.16.840.1.101.3.4.3.1-1024.apk deleted file mode 100644 index 938ea7a4..00000000 Binary files a/examples/signing/apksig/v1-only-with-dsa-sha224-2.16.840.1.101.3.4.3.1-1024.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-dsa-sha224-2.16.840.1.101.3.4.3.1-2048.apk b/examples/signing/apksig/v1-only-with-dsa-sha224-2.16.840.1.101.3.4.3.1-2048.apk deleted file mode 100644 index 2f0002f9..00000000 Binary files a/examples/signing/apksig/v1-only-with-dsa-sha224-2.16.840.1.101.3.4.3.1-2048.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-dsa-sha224-2.16.840.1.101.3.4.3.1-3072.apk b/examples/signing/apksig/v1-only-with-dsa-sha224-2.16.840.1.101.3.4.3.1-3072.apk deleted file mode 100644 index 13b4bcb6..00000000 Binary files a/examples/signing/apksig/v1-only-with-dsa-sha224-2.16.840.1.101.3.4.3.1-3072.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-dsa-sha256-1.2.840.10040.4.1-1024.apk b/examples/signing/apksig/v1-only-with-dsa-sha256-1.2.840.10040.4.1-1024.apk deleted file mode 100644 index 5a7e4d34..00000000 Binary files a/examples/signing/apksig/v1-only-with-dsa-sha256-1.2.840.10040.4.1-1024.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-dsa-sha256-1.2.840.10040.4.1-2048.apk b/examples/signing/apksig/v1-only-with-dsa-sha256-1.2.840.10040.4.1-2048.apk deleted file mode 100644 index edeb27dd..00000000 Binary files a/examples/signing/apksig/v1-only-with-dsa-sha256-1.2.840.10040.4.1-2048.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-dsa-sha256-1.2.840.10040.4.1-3072.apk b/examples/signing/apksig/v1-only-with-dsa-sha256-1.2.840.10040.4.1-3072.apk deleted file mode 100644 index ea5deeac..00000000 Binary files a/examples/signing/apksig/v1-only-with-dsa-sha256-1.2.840.10040.4.1-3072.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-dsa-sha256-2.16.840.1.101.3.4.3.2-1024.apk b/examples/signing/apksig/v1-only-with-dsa-sha256-2.16.840.1.101.3.4.3.2-1024.apk deleted file mode 100644 index b1bf280d..00000000 Binary files a/examples/signing/apksig/v1-only-with-dsa-sha256-2.16.840.1.101.3.4.3.2-1024.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-dsa-sha256-2.16.840.1.101.3.4.3.2-2048.apk b/examples/signing/apksig/v1-only-with-dsa-sha256-2.16.840.1.101.3.4.3.2-2048.apk deleted file mode 100644 index 8e7415f0..00000000 Binary files a/examples/signing/apksig/v1-only-with-dsa-sha256-2.16.840.1.101.3.4.3.2-2048.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-dsa-sha256-2.16.840.1.101.3.4.3.2-3072.apk b/examples/signing/apksig/v1-only-with-dsa-sha256-2.16.840.1.101.3.4.3.2-3072.apk deleted file mode 100644 index 65f82380..00000000 Binary files a/examples/signing/apksig/v1-only-with-dsa-sha256-2.16.840.1.101.3.4.3.2-3072.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-dsa-sha384-2.16.840.1.101.3.4.3.3-1024.apk b/examples/signing/apksig/v1-only-with-dsa-sha384-2.16.840.1.101.3.4.3.3-1024.apk deleted file mode 100644 index f5db0e44..00000000 Binary files a/examples/signing/apksig/v1-only-with-dsa-sha384-2.16.840.1.101.3.4.3.3-1024.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-dsa-sha384-2.16.840.1.101.3.4.3.3-2048.apk b/examples/signing/apksig/v1-only-with-dsa-sha384-2.16.840.1.101.3.4.3.3-2048.apk deleted file mode 100644 index d18a9a97..00000000 Binary files a/examples/signing/apksig/v1-only-with-dsa-sha384-2.16.840.1.101.3.4.3.3-2048.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-dsa-sha384-2.16.840.1.101.3.4.3.3-3072.apk b/examples/signing/apksig/v1-only-with-dsa-sha384-2.16.840.1.101.3.4.3.3-3072.apk deleted file mode 100644 index 641ba509..00000000 Binary files a/examples/signing/apksig/v1-only-with-dsa-sha384-2.16.840.1.101.3.4.3.3-3072.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-dsa-sha512-2.16.840.1.101.3.4.3.4-1024.apk b/examples/signing/apksig/v1-only-with-dsa-sha512-2.16.840.1.101.3.4.3.4-1024.apk deleted file mode 100644 index dd8ab616..00000000 Binary files a/examples/signing/apksig/v1-only-with-dsa-sha512-2.16.840.1.101.3.4.3.4-1024.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-dsa-sha512-2.16.840.1.101.3.4.3.4-2048.apk b/examples/signing/apksig/v1-only-with-dsa-sha512-2.16.840.1.101.3.4.3.4-2048.apk deleted file mode 100644 index 129a3353..00000000 Binary files a/examples/signing/apksig/v1-only-with-dsa-sha512-2.16.840.1.101.3.4.3.4-2048.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-dsa-sha512-2.16.840.1.101.3.4.3.4-3072.apk b/examples/signing/apksig/v1-only-with-dsa-sha512-2.16.840.1.101.3.4.3.4-3072.apk deleted file mode 100644 index 41287d7c..00000000 Binary files a/examples/signing/apksig/v1-only-with-dsa-sha512-2.16.840.1.101.3.4.3.4-3072.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-ecdsa-sha1-1.2.840.10045.2.1-p256.apk b/examples/signing/apksig/v1-only-with-ecdsa-sha1-1.2.840.10045.2.1-p256.apk deleted file mode 100644 index bfa657a5..00000000 Binary files a/examples/signing/apksig/v1-only-with-ecdsa-sha1-1.2.840.10045.2.1-p256.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-ecdsa-sha1-1.2.840.10045.2.1-p384.apk b/examples/signing/apksig/v1-only-with-ecdsa-sha1-1.2.840.10045.2.1-p384.apk deleted file mode 100644 index 42ee240a..00000000 Binary files a/examples/signing/apksig/v1-only-with-ecdsa-sha1-1.2.840.10045.2.1-p384.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-ecdsa-sha1-1.2.840.10045.2.1-p521.apk b/examples/signing/apksig/v1-only-with-ecdsa-sha1-1.2.840.10045.2.1-p521.apk deleted file mode 100644 index fe3efbff..00000000 Binary files a/examples/signing/apksig/v1-only-with-ecdsa-sha1-1.2.840.10045.2.1-p521.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-ecdsa-sha1-1.2.840.10045.4.1-p256.apk b/examples/signing/apksig/v1-only-with-ecdsa-sha1-1.2.840.10045.4.1-p256.apk deleted file mode 100644 index e9a0d901..00000000 Binary files a/examples/signing/apksig/v1-only-with-ecdsa-sha1-1.2.840.10045.4.1-p256.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-ecdsa-sha1-1.2.840.10045.4.1-p384.apk b/examples/signing/apksig/v1-only-with-ecdsa-sha1-1.2.840.10045.4.1-p384.apk deleted file mode 100644 index 848cda02..00000000 Binary files a/examples/signing/apksig/v1-only-with-ecdsa-sha1-1.2.840.10045.4.1-p384.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-ecdsa-sha1-1.2.840.10045.4.1-p521.apk b/examples/signing/apksig/v1-only-with-ecdsa-sha1-1.2.840.10045.4.1-p521.apk deleted file mode 100644 index 397e6db1..00000000 Binary files a/examples/signing/apksig/v1-only-with-ecdsa-sha1-1.2.840.10045.4.1-p521.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-ecdsa-sha224-1.2.840.10045.2.1-p256.apk b/examples/signing/apksig/v1-only-with-ecdsa-sha224-1.2.840.10045.2.1-p256.apk deleted file mode 100644 index fff17890..00000000 Binary files a/examples/signing/apksig/v1-only-with-ecdsa-sha224-1.2.840.10045.2.1-p256.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-ecdsa-sha224-1.2.840.10045.2.1-p384.apk b/examples/signing/apksig/v1-only-with-ecdsa-sha224-1.2.840.10045.2.1-p384.apk deleted file mode 100644 index 0d83e416..00000000 Binary files a/examples/signing/apksig/v1-only-with-ecdsa-sha224-1.2.840.10045.2.1-p384.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-ecdsa-sha224-1.2.840.10045.2.1-p521.apk b/examples/signing/apksig/v1-only-with-ecdsa-sha224-1.2.840.10045.2.1-p521.apk deleted file mode 100644 index 92f8548c..00000000 Binary files a/examples/signing/apksig/v1-only-with-ecdsa-sha224-1.2.840.10045.2.1-p521.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-ecdsa-sha224-1.2.840.10045.4.3.1-p256.apk b/examples/signing/apksig/v1-only-with-ecdsa-sha224-1.2.840.10045.4.3.1-p256.apk deleted file mode 100644 index 5127d601..00000000 Binary files a/examples/signing/apksig/v1-only-with-ecdsa-sha224-1.2.840.10045.4.3.1-p256.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-ecdsa-sha224-1.2.840.10045.4.3.1-p384.apk b/examples/signing/apksig/v1-only-with-ecdsa-sha224-1.2.840.10045.4.3.1-p384.apk deleted file mode 100644 index b5d9d468..00000000 Binary files a/examples/signing/apksig/v1-only-with-ecdsa-sha224-1.2.840.10045.4.3.1-p384.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-ecdsa-sha224-1.2.840.10045.4.3.1-p521.apk b/examples/signing/apksig/v1-only-with-ecdsa-sha224-1.2.840.10045.4.3.1-p521.apk deleted file mode 100644 index f3aa1d6d..00000000 Binary files a/examples/signing/apksig/v1-only-with-ecdsa-sha224-1.2.840.10045.4.3.1-p521.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-ecdsa-sha256-1.2.840.10045.2.1-p256.apk b/examples/signing/apksig/v1-only-with-ecdsa-sha256-1.2.840.10045.2.1-p256.apk deleted file mode 100644 index c289f6f7..00000000 Binary files a/examples/signing/apksig/v1-only-with-ecdsa-sha256-1.2.840.10045.2.1-p256.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-ecdsa-sha256-1.2.840.10045.2.1-p384.apk b/examples/signing/apksig/v1-only-with-ecdsa-sha256-1.2.840.10045.2.1-p384.apk deleted file mode 100644 index b9797024..00000000 Binary files a/examples/signing/apksig/v1-only-with-ecdsa-sha256-1.2.840.10045.2.1-p384.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-ecdsa-sha256-1.2.840.10045.2.1-p521.apk b/examples/signing/apksig/v1-only-with-ecdsa-sha256-1.2.840.10045.2.1-p521.apk deleted file mode 100644 index 9ab8bd4e..00000000 Binary files a/examples/signing/apksig/v1-only-with-ecdsa-sha256-1.2.840.10045.2.1-p521.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-ecdsa-sha256-1.2.840.10045.4.3.2-p256.apk b/examples/signing/apksig/v1-only-with-ecdsa-sha256-1.2.840.10045.4.3.2-p256.apk deleted file mode 100644 index 02b8a318..00000000 Binary files a/examples/signing/apksig/v1-only-with-ecdsa-sha256-1.2.840.10045.4.3.2-p256.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-ecdsa-sha256-1.2.840.10045.4.3.2-p384.apk b/examples/signing/apksig/v1-only-with-ecdsa-sha256-1.2.840.10045.4.3.2-p384.apk deleted file mode 100644 index 5c4bf7b3..00000000 Binary files a/examples/signing/apksig/v1-only-with-ecdsa-sha256-1.2.840.10045.4.3.2-p384.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-ecdsa-sha256-1.2.840.10045.4.3.2-p521.apk b/examples/signing/apksig/v1-only-with-ecdsa-sha256-1.2.840.10045.4.3.2-p521.apk deleted file mode 100644 index 3a91ee58..00000000 Binary files a/examples/signing/apksig/v1-only-with-ecdsa-sha256-1.2.840.10045.4.3.2-p521.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-ecdsa-sha384-1.2.840.10045.2.1-p256.apk b/examples/signing/apksig/v1-only-with-ecdsa-sha384-1.2.840.10045.2.1-p256.apk deleted file mode 100644 index c24be658..00000000 Binary files a/examples/signing/apksig/v1-only-with-ecdsa-sha384-1.2.840.10045.2.1-p256.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-ecdsa-sha384-1.2.840.10045.2.1-p384.apk b/examples/signing/apksig/v1-only-with-ecdsa-sha384-1.2.840.10045.2.1-p384.apk deleted file mode 100644 index dc06637a..00000000 Binary files a/examples/signing/apksig/v1-only-with-ecdsa-sha384-1.2.840.10045.2.1-p384.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-ecdsa-sha384-1.2.840.10045.2.1-p521.apk b/examples/signing/apksig/v1-only-with-ecdsa-sha384-1.2.840.10045.2.1-p521.apk deleted file mode 100644 index 8194a87f..00000000 Binary files a/examples/signing/apksig/v1-only-with-ecdsa-sha384-1.2.840.10045.2.1-p521.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-ecdsa-sha384-1.2.840.10045.4.3.3-p256.apk b/examples/signing/apksig/v1-only-with-ecdsa-sha384-1.2.840.10045.4.3.3-p256.apk deleted file mode 100644 index ec4a42e3..00000000 Binary files a/examples/signing/apksig/v1-only-with-ecdsa-sha384-1.2.840.10045.4.3.3-p256.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-ecdsa-sha384-1.2.840.10045.4.3.3-p384.apk b/examples/signing/apksig/v1-only-with-ecdsa-sha384-1.2.840.10045.4.3.3-p384.apk deleted file mode 100644 index c3c3e0ad..00000000 Binary files a/examples/signing/apksig/v1-only-with-ecdsa-sha384-1.2.840.10045.4.3.3-p384.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-ecdsa-sha384-1.2.840.10045.4.3.3-p521.apk b/examples/signing/apksig/v1-only-with-ecdsa-sha384-1.2.840.10045.4.3.3-p521.apk deleted file mode 100644 index 5be8ac55..00000000 Binary files a/examples/signing/apksig/v1-only-with-ecdsa-sha384-1.2.840.10045.4.3.3-p521.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-ecdsa-sha512-1.2.840.10045.2.1-p256.apk b/examples/signing/apksig/v1-only-with-ecdsa-sha512-1.2.840.10045.2.1-p256.apk deleted file mode 100644 index ecd92874..00000000 Binary files a/examples/signing/apksig/v1-only-with-ecdsa-sha512-1.2.840.10045.2.1-p256.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-ecdsa-sha512-1.2.840.10045.2.1-p384.apk b/examples/signing/apksig/v1-only-with-ecdsa-sha512-1.2.840.10045.2.1-p384.apk deleted file mode 100644 index c2afc5a9..00000000 Binary files a/examples/signing/apksig/v1-only-with-ecdsa-sha512-1.2.840.10045.2.1-p384.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-ecdsa-sha512-1.2.840.10045.2.1-p521.apk b/examples/signing/apksig/v1-only-with-ecdsa-sha512-1.2.840.10045.2.1-p521.apk deleted file mode 100644 index 62b86b28..00000000 Binary files a/examples/signing/apksig/v1-only-with-ecdsa-sha512-1.2.840.10045.2.1-p521.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-ecdsa-sha512-1.2.840.10045.4.3.4-p256.apk b/examples/signing/apksig/v1-only-with-ecdsa-sha512-1.2.840.10045.4.3.4-p256.apk deleted file mode 100644 index 60090a55..00000000 Binary files a/examples/signing/apksig/v1-only-with-ecdsa-sha512-1.2.840.10045.4.3.4-p256.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-ecdsa-sha512-1.2.840.10045.4.3.4-p384.apk b/examples/signing/apksig/v1-only-with-ecdsa-sha512-1.2.840.10045.4.3.4-p384.apk deleted file mode 100644 index 63f67808..00000000 Binary files a/examples/signing/apksig/v1-only-with-ecdsa-sha512-1.2.840.10045.4.3.4-p384.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-ecdsa-sha512-1.2.840.10045.4.3.4-p521.apk b/examples/signing/apksig/v1-only-with-ecdsa-sha512-1.2.840.10045.4.3.4-p521.apk deleted file mode 100644 index 53ae508d..00000000 Binary files a/examples/signing/apksig/v1-only-with-ecdsa-sha512-1.2.840.10045.4.3.4-p521.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-lf-in-entry-name.apk b/examples/signing/apksig/v1-only-with-lf-in-entry-name.apk deleted file mode 100644 index 7d341da7..00000000 Binary files a/examples/signing/apksig/v1-only-with-lf-in-entry-name.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-nul-in-entry-name.apk b/examples/signing/apksig/v1-only-with-nul-in-entry-name.apk deleted file mode 100644 index 2bcdec17..00000000 Binary files a/examples/signing/apksig/v1-only-with-nul-in-entry-name.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-rsa-1024-cert-not-der.apk b/examples/signing/apksig/v1-only-with-rsa-1024-cert-not-der.apk deleted file mode 100644 index 28c8e0ca..00000000 Binary files a/examples/signing/apksig/v1-only-with-rsa-1024-cert-not-der.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-rsa-1024-cert-not-der2.apk b/examples/signing/apksig/v1-only-with-rsa-1024-cert-not-der2.apk deleted file mode 100644 index ff722aac..00000000 Binary files a/examples/signing/apksig/v1-only-with-rsa-1024-cert-not-der2.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-rsa-1024.apk b/examples/signing/apksig/v1-only-with-rsa-1024.apk deleted file mode 100644 index c1dff8a9..00000000 Binary files a/examples/signing/apksig/v1-only-with-rsa-1024.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-rsa-pkcs1-md5-1.2.840.113549.1.1.1-1024.apk b/examples/signing/apksig/v1-only-with-rsa-pkcs1-md5-1.2.840.113549.1.1.1-1024.apk deleted file mode 100644 index fe50da7a..00000000 Binary files a/examples/signing/apksig/v1-only-with-rsa-pkcs1-md5-1.2.840.113549.1.1.1-1024.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-rsa-pkcs1-md5-1.2.840.113549.1.1.1-16384.apk b/examples/signing/apksig/v1-only-with-rsa-pkcs1-md5-1.2.840.113549.1.1.1-16384.apk deleted file mode 100644 index 3ce17373..00000000 Binary files a/examples/signing/apksig/v1-only-with-rsa-pkcs1-md5-1.2.840.113549.1.1.1-16384.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-rsa-pkcs1-md5-1.2.840.113549.1.1.1-2048.apk b/examples/signing/apksig/v1-only-with-rsa-pkcs1-md5-1.2.840.113549.1.1.1-2048.apk deleted file mode 100644 index 5eb6dec4..00000000 Binary files a/examples/signing/apksig/v1-only-with-rsa-pkcs1-md5-1.2.840.113549.1.1.1-2048.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-rsa-pkcs1-md5-1.2.840.113549.1.1.1-3072.apk b/examples/signing/apksig/v1-only-with-rsa-pkcs1-md5-1.2.840.113549.1.1.1-3072.apk deleted file mode 100644 index 451f3367..00000000 Binary files a/examples/signing/apksig/v1-only-with-rsa-pkcs1-md5-1.2.840.113549.1.1.1-3072.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-rsa-pkcs1-md5-1.2.840.113549.1.1.1-4096.apk b/examples/signing/apksig/v1-only-with-rsa-pkcs1-md5-1.2.840.113549.1.1.1-4096.apk deleted file mode 100644 index a99a6708..00000000 Binary files a/examples/signing/apksig/v1-only-with-rsa-pkcs1-md5-1.2.840.113549.1.1.1-4096.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-rsa-pkcs1-md5-1.2.840.113549.1.1.1-8192.apk b/examples/signing/apksig/v1-only-with-rsa-pkcs1-md5-1.2.840.113549.1.1.1-8192.apk deleted file mode 100644 index 10f46540..00000000 Binary files a/examples/signing/apksig/v1-only-with-rsa-pkcs1-md5-1.2.840.113549.1.1.1-8192.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-rsa-pkcs1-md5-1.2.840.113549.1.1.4-1024.apk b/examples/signing/apksig/v1-only-with-rsa-pkcs1-md5-1.2.840.113549.1.1.4-1024.apk deleted file mode 100644 index 4f248bde..00000000 Binary files a/examples/signing/apksig/v1-only-with-rsa-pkcs1-md5-1.2.840.113549.1.1.4-1024.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-rsa-pkcs1-md5-1.2.840.113549.1.1.4-16384.apk b/examples/signing/apksig/v1-only-with-rsa-pkcs1-md5-1.2.840.113549.1.1.4-16384.apk deleted file mode 100644 index ee14de43..00000000 Binary files a/examples/signing/apksig/v1-only-with-rsa-pkcs1-md5-1.2.840.113549.1.1.4-16384.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-rsa-pkcs1-md5-1.2.840.113549.1.1.4-2048.apk b/examples/signing/apksig/v1-only-with-rsa-pkcs1-md5-1.2.840.113549.1.1.4-2048.apk deleted file mode 100644 index d7c292f7..00000000 Binary files a/examples/signing/apksig/v1-only-with-rsa-pkcs1-md5-1.2.840.113549.1.1.4-2048.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-rsa-pkcs1-md5-1.2.840.113549.1.1.4-3072.apk b/examples/signing/apksig/v1-only-with-rsa-pkcs1-md5-1.2.840.113549.1.1.4-3072.apk deleted file mode 100644 index 5d0d11a1..00000000 Binary files a/examples/signing/apksig/v1-only-with-rsa-pkcs1-md5-1.2.840.113549.1.1.4-3072.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-rsa-pkcs1-md5-1.2.840.113549.1.1.4-4096.apk b/examples/signing/apksig/v1-only-with-rsa-pkcs1-md5-1.2.840.113549.1.1.4-4096.apk deleted file mode 100644 index 32e28a90..00000000 Binary files a/examples/signing/apksig/v1-only-with-rsa-pkcs1-md5-1.2.840.113549.1.1.4-4096.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-rsa-pkcs1-md5-1.2.840.113549.1.1.4-8192.apk b/examples/signing/apksig/v1-only-with-rsa-pkcs1-md5-1.2.840.113549.1.1.4-8192.apk deleted file mode 100644 index 10163b6c..00000000 Binary files a/examples/signing/apksig/v1-only-with-rsa-pkcs1-md5-1.2.840.113549.1.1.4-8192.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha1-1.2.840.113549.1.1.1-1024.apk b/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha1-1.2.840.113549.1.1.1-1024.apk deleted file mode 100644 index f31e6498..00000000 Binary files a/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha1-1.2.840.113549.1.1.1-1024.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha1-1.2.840.113549.1.1.1-16384.apk b/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha1-1.2.840.113549.1.1.1-16384.apk deleted file mode 100644 index 784e569c..00000000 Binary files a/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha1-1.2.840.113549.1.1.1-16384.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha1-1.2.840.113549.1.1.1-2048.apk b/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha1-1.2.840.113549.1.1.1-2048.apk deleted file mode 100644 index a2801e54..00000000 Binary files a/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha1-1.2.840.113549.1.1.1-2048.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha1-1.2.840.113549.1.1.1-3072.apk b/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha1-1.2.840.113549.1.1.1-3072.apk deleted file mode 100644 index 8d9fccf5..00000000 Binary files a/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha1-1.2.840.113549.1.1.1-3072.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha1-1.2.840.113549.1.1.1-4096.apk b/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha1-1.2.840.113549.1.1.1-4096.apk deleted file mode 100644 index 3e36a400..00000000 Binary files a/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha1-1.2.840.113549.1.1.1-4096.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha1-1.2.840.113549.1.1.1-8192.apk b/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha1-1.2.840.113549.1.1.1-8192.apk deleted file mode 100644 index b8f979de..00000000 Binary files a/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha1-1.2.840.113549.1.1.1-8192.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha1-1.2.840.113549.1.1.5-1024.apk b/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha1-1.2.840.113549.1.1.5-1024.apk deleted file mode 100644 index 091cf6fa..00000000 Binary files a/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha1-1.2.840.113549.1.1.5-1024.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha1-1.2.840.113549.1.1.5-16384.apk b/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha1-1.2.840.113549.1.1.5-16384.apk deleted file mode 100644 index 4da371d4..00000000 Binary files a/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha1-1.2.840.113549.1.1.5-16384.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha1-1.2.840.113549.1.1.5-2048.apk b/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha1-1.2.840.113549.1.1.5-2048.apk deleted file mode 100644 index 43bb6987..00000000 Binary files a/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha1-1.2.840.113549.1.1.5-2048.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha1-1.2.840.113549.1.1.5-3072.apk b/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha1-1.2.840.113549.1.1.5-3072.apk deleted file mode 100644 index a4c2b158..00000000 Binary files a/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha1-1.2.840.113549.1.1.5-3072.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha1-1.2.840.113549.1.1.5-4096.apk b/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha1-1.2.840.113549.1.1.5-4096.apk deleted file mode 100644 index 806e0ea3..00000000 Binary files a/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha1-1.2.840.113549.1.1.5-4096.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha1-1.2.840.113549.1.1.5-8192.apk b/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha1-1.2.840.113549.1.1.5-8192.apk deleted file mode 100644 index efb124b8..00000000 Binary files a/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha1-1.2.840.113549.1.1.5-8192.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha224-1.2.840.113549.1.1.1-1024.apk b/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha224-1.2.840.113549.1.1.1-1024.apk deleted file mode 100644 index d86ac4d8..00000000 Binary files a/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha224-1.2.840.113549.1.1.1-1024.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha224-1.2.840.113549.1.1.1-16384.apk b/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha224-1.2.840.113549.1.1.1-16384.apk deleted file mode 100644 index 7656ece0..00000000 Binary files a/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha224-1.2.840.113549.1.1.1-16384.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha224-1.2.840.113549.1.1.1-2048.apk b/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha224-1.2.840.113549.1.1.1-2048.apk deleted file mode 100644 index 4971db7c..00000000 Binary files a/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha224-1.2.840.113549.1.1.1-2048.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha224-1.2.840.113549.1.1.1-3072.apk b/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha224-1.2.840.113549.1.1.1-3072.apk deleted file mode 100644 index ed7f3f5d..00000000 Binary files a/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha224-1.2.840.113549.1.1.1-3072.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha224-1.2.840.113549.1.1.1-4096.apk b/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha224-1.2.840.113549.1.1.1-4096.apk deleted file mode 100644 index 7d475602..00000000 Binary files a/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha224-1.2.840.113549.1.1.1-4096.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha224-1.2.840.113549.1.1.1-8192.apk b/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha224-1.2.840.113549.1.1.1-8192.apk deleted file mode 100644 index 99bcba2d..00000000 Binary files a/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha224-1.2.840.113549.1.1.1-8192.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha224-1.2.840.113549.1.1.14-1024.apk b/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha224-1.2.840.113549.1.1.14-1024.apk deleted file mode 100644 index 37192c3c..00000000 Binary files a/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha224-1.2.840.113549.1.1.14-1024.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha224-1.2.840.113549.1.1.14-16384.apk b/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha224-1.2.840.113549.1.1.14-16384.apk deleted file mode 100644 index 357999ab..00000000 Binary files a/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha224-1.2.840.113549.1.1.14-16384.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha224-1.2.840.113549.1.1.14-2048.apk b/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha224-1.2.840.113549.1.1.14-2048.apk deleted file mode 100644 index a8a6b151..00000000 Binary files a/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha224-1.2.840.113549.1.1.14-2048.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha224-1.2.840.113549.1.1.14-3072.apk b/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha224-1.2.840.113549.1.1.14-3072.apk deleted file mode 100644 index 5c7c9018..00000000 Binary files a/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha224-1.2.840.113549.1.1.14-3072.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha224-1.2.840.113549.1.1.14-4096.apk b/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha224-1.2.840.113549.1.1.14-4096.apk deleted file mode 100644 index 27742595..00000000 Binary files a/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha224-1.2.840.113549.1.1.14-4096.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha224-1.2.840.113549.1.1.14-8192.apk b/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha224-1.2.840.113549.1.1.14-8192.apk deleted file mode 100644 index 1df393aa..00000000 Binary files a/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha224-1.2.840.113549.1.1.14-8192.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha256-1.2.840.113549.1.1.1-1024.apk b/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha256-1.2.840.113549.1.1.1-1024.apk deleted file mode 100644 index 46d3e61c..00000000 Binary files a/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha256-1.2.840.113549.1.1.1-1024.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha256-1.2.840.113549.1.1.1-16384.apk b/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha256-1.2.840.113549.1.1.1-16384.apk deleted file mode 100644 index 21bf67f8..00000000 Binary files a/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha256-1.2.840.113549.1.1.1-16384.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha256-1.2.840.113549.1.1.1-2048.apk b/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha256-1.2.840.113549.1.1.1-2048.apk deleted file mode 100644 index a952f1b4..00000000 Binary files a/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha256-1.2.840.113549.1.1.1-2048.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha256-1.2.840.113549.1.1.1-3072.apk b/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha256-1.2.840.113549.1.1.1-3072.apk deleted file mode 100644 index db6941d7..00000000 Binary files a/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha256-1.2.840.113549.1.1.1-3072.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha256-1.2.840.113549.1.1.1-4096.apk b/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha256-1.2.840.113549.1.1.1-4096.apk deleted file mode 100644 index 5bd3d0de..00000000 Binary files a/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha256-1.2.840.113549.1.1.1-4096.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha256-1.2.840.113549.1.1.1-8192.apk b/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha256-1.2.840.113549.1.1.1-8192.apk deleted file mode 100644 index d8630b61..00000000 Binary files a/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha256-1.2.840.113549.1.1.1-8192.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha256-1.2.840.113549.1.1.11-1024.apk b/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha256-1.2.840.113549.1.1.11-1024.apk deleted file mode 100644 index 2aea3bdd..00000000 Binary files a/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha256-1.2.840.113549.1.1.11-1024.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha256-1.2.840.113549.1.1.11-16384.apk b/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha256-1.2.840.113549.1.1.11-16384.apk deleted file mode 100644 index 9fafe2cf..00000000 Binary files a/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha256-1.2.840.113549.1.1.11-16384.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha256-1.2.840.113549.1.1.11-2048.apk b/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha256-1.2.840.113549.1.1.11-2048.apk deleted file mode 100644 index 348afdae..00000000 Binary files a/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha256-1.2.840.113549.1.1.11-2048.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha256-1.2.840.113549.1.1.11-3072.apk b/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha256-1.2.840.113549.1.1.11-3072.apk deleted file mode 100644 index db73a9b9..00000000 Binary files a/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha256-1.2.840.113549.1.1.11-3072.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha256-1.2.840.113549.1.1.11-4096.apk b/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha256-1.2.840.113549.1.1.11-4096.apk deleted file mode 100644 index 34be32d4..00000000 Binary files a/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha256-1.2.840.113549.1.1.11-4096.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha256-1.2.840.113549.1.1.11-8192.apk b/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha256-1.2.840.113549.1.1.11-8192.apk deleted file mode 100644 index 9af7d990..00000000 Binary files a/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha256-1.2.840.113549.1.1.11-8192.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha384-1.2.840.113549.1.1.1-1024.apk b/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha384-1.2.840.113549.1.1.1-1024.apk deleted file mode 100644 index 9438016c..00000000 Binary files a/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha384-1.2.840.113549.1.1.1-1024.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha384-1.2.840.113549.1.1.1-16384.apk b/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha384-1.2.840.113549.1.1.1-16384.apk deleted file mode 100644 index bb0caf07..00000000 Binary files a/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha384-1.2.840.113549.1.1.1-16384.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha384-1.2.840.113549.1.1.1-2048.apk b/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha384-1.2.840.113549.1.1.1-2048.apk deleted file mode 100644 index 81a02588..00000000 Binary files a/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha384-1.2.840.113549.1.1.1-2048.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha384-1.2.840.113549.1.1.1-3072.apk b/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha384-1.2.840.113549.1.1.1-3072.apk deleted file mode 100644 index b76d7cf1..00000000 Binary files a/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha384-1.2.840.113549.1.1.1-3072.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha384-1.2.840.113549.1.1.1-4096.apk b/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha384-1.2.840.113549.1.1.1-4096.apk deleted file mode 100644 index 2583f6f2..00000000 Binary files a/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha384-1.2.840.113549.1.1.1-4096.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha384-1.2.840.113549.1.1.1-8192.apk b/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha384-1.2.840.113549.1.1.1-8192.apk deleted file mode 100644 index f0b47f64..00000000 Binary files a/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha384-1.2.840.113549.1.1.1-8192.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha384-1.2.840.113549.1.1.12-1024.apk b/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha384-1.2.840.113549.1.1.12-1024.apk deleted file mode 100644 index 8e725564..00000000 Binary files a/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha384-1.2.840.113549.1.1.12-1024.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha384-1.2.840.113549.1.1.12-16384.apk b/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha384-1.2.840.113549.1.1.12-16384.apk deleted file mode 100644 index d4fc6fb9..00000000 Binary files a/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha384-1.2.840.113549.1.1.12-16384.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha384-1.2.840.113549.1.1.12-2048.apk b/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha384-1.2.840.113549.1.1.12-2048.apk deleted file mode 100644 index 1e3be03d..00000000 Binary files a/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha384-1.2.840.113549.1.1.12-2048.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha384-1.2.840.113549.1.1.12-3072.apk b/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha384-1.2.840.113549.1.1.12-3072.apk deleted file mode 100644 index ac9e9725..00000000 Binary files a/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha384-1.2.840.113549.1.1.12-3072.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha384-1.2.840.113549.1.1.12-4096.apk b/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha384-1.2.840.113549.1.1.12-4096.apk deleted file mode 100644 index d2200488..00000000 Binary files a/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha384-1.2.840.113549.1.1.12-4096.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha384-1.2.840.113549.1.1.12-8192.apk b/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha384-1.2.840.113549.1.1.12-8192.apk deleted file mode 100644 index c70bce19..00000000 Binary files a/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha384-1.2.840.113549.1.1.12-8192.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha512-1.2.840.113549.1.1.1-1024.apk b/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha512-1.2.840.113549.1.1.1-1024.apk deleted file mode 100644 index 7c6ff195..00000000 Binary files a/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha512-1.2.840.113549.1.1.1-1024.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha512-1.2.840.113549.1.1.1-16384.apk b/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha512-1.2.840.113549.1.1.1-16384.apk deleted file mode 100644 index 8cf9eba1..00000000 Binary files a/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha512-1.2.840.113549.1.1.1-16384.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha512-1.2.840.113549.1.1.1-2048.apk b/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha512-1.2.840.113549.1.1.1-2048.apk deleted file mode 100644 index 58676e82..00000000 Binary files a/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha512-1.2.840.113549.1.1.1-2048.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha512-1.2.840.113549.1.1.1-3072.apk b/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha512-1.2.840.113549.1.1.1-3072.apk deleted file mode 100644 index 2f4b23cc..00000000 Binary files a/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha512-1.2.840.113549.1.1.1-3072.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha512-1.2.840.113549.1.1.1-4096.apk b/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha512-1.2.840.113549.1.1.1-4096.apk deleted file mode 100644 index b823de36..00000000 Binary files a/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha512-1.2.840.113549.1.1.1-4096.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha512-1.2.840.113549.1.1.1-8192.apk b/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha512-1.2.840.113549.1.1.1-8192.apk deleted file mode 100644 index ffa6be14..00000000 Binary files a/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha512-1.2.840.113549.1.1.1-8192.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha512-1.2.840.113549.1.1.13-1024.apk b/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha512-1.2.840.113549.1.1.13-1024.apk deleted file mode 100644 index 480fcc5b..00000000 Binary files a/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha512-1.2.840.113549.1.1.13-1024.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha512-1.2.840.113549.1.1.13-16384.apk b/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha512-1.2.840.113549.1.1.13-16384.apk deleted file mode 100644 index a6089e62..00000000 Binary files a/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha512-1.2.840.113549.1.1.13-16384.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha512-1.2.840.113549.1.1.13-2048.apk b/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha512-1.2.840.113549.1.1.13-2048.apk deleted file mode 100644 index 9de481ff..00000000 Binary files a/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha512-1.2.840.113549.1.1.13-2048.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha512-1.2.840.113549.1.1.13-3072.apk b/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha512-1.2.840.113549.1.1.13-3072.apk deleted file mode 100644 index 895e2c5d..00000000 Binary files a/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha512-1.2.840.113549.1.1.13-3072.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha512-1.2.840.113549.1.1.13-4096.apk b/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha512-1.2.840.113549.1.1.13-4096.apk deleted file mode 100644 index 70b75928..00000000 Binary files a/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha512-1.2.840.113549.1.1.13-4096.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha512-1.2.840.113549.1.1.13-8192.apk b/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha512-1.2.840.113549.1.1.13-8192.apk deleted file mode 100644 index 475a4e69..00000000 Binary files a/examples/signing/apksig/v1-only-with-rsa-pkcs1-sha512-1.2.840.113549.1.1.13-8192.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-signed-attrs-missing-content-type.apk b/examples/signing/apksig/v1-only-with-signed-attrs-missing-content-type.apk deleted file mode 100644 index 0a3ae818..00000000 Binary files a/examples/signing/apksig/v1-only-with-signed-attrs-missing-content-type.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-signed-attrs-missing-digest.apk b/examples/signing/apksig/v1-only-with-signed-attrs-missing-digest.apk deleted file mode 100644 index bdab7a9d..00000000 Binary files a/examples/signing/apksig/v1-only-with-signed-attrs-missing-digest.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-signed-attrs-multiple-good-digests.apk b/examples/signing/apksig/v1-only-with-signed-attrs-multiple-good-digests.apk deleted file mode 100644 index e2072614..00000000 Binary files a/examples/signing/apksig/v1-only-with-signed-attrs-multiple-good-digests.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-signed-attrs-signerInfo1-good-signerInfo2-good.apk b/examples/signing/apksig/v1-only-with-signed-attrs-signerInfo1-good-signerInfo2-good.apk deleted file mode 100644 index df34bcc5..00000000 Binary files a/examples/signing/apksig/v1-only-with-signed-attrs-signerInfo1-good-signerInfo2-good.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-signed-attrs-signerInfo1-missing-content-type-signerInfo2-good.apk b/examples/signing/apksig/v1-only-with-signed-attrs-signerInfo1-missing-content-type-signerInfo2-good.apk deleted file mode 100644 index b2377429..00000000 Binary files a/examples/signing/apksig/v1-only-with-signed-attrs-signerInfo1-missing-content-type-signerInfo2-good.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-signed-attrs-signerInfo1-missing-digest-signerInfo2-good.apk b/examples/signing/apksig/v1-only-with-signed-attrs-signerInfo1-missing-digest-signerInfo2-good.apk deleted file mode 100644 index bebbe83c..00000000 Binary files a/examples/signing/apksig/v1-only-with-signed-attrs-signerInfo1-missing-digest-signerInfo2-good.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-signed-attrs-signerInfo1-multiple-good-digests-signerInfo2-good.apk b/examples/signing/apksig/v1-only-with-signed-attrs-signerInfo1-multiple-good-digests-signerInfo2-good.apk deleted file mode 100644 index d49f337c..00000000 Binary files a/examples/signing/apksig/v1-only-with-signed-attrs-signerInfo1-multiple-good-digests-signerInfo2-good.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-signed-attrs-signerInfo1-wrong-content-type-signerInfo2-good.apk b/examples/signing/apksig/v1-only-with-signed-attrs-signerInfo1-wrong-content-type-signerInfo2-good.apk deleted file mode 100644 index bc3364d3..00000000 Binary files a/examples/signing/apksig/v1-only-with-signed-attrs-signerInfo1-wrong-content-type-signerInfo2-good.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-signed-attrs-signerInfo1-wrong-digest-signerInfo2-good.apk b/examples/signing/apksig/v1-only-with-signed-attrs-signerInfo1-wrong-digest-signerInfo2-good.apk deleted file mode 100644 index c684723f..00000000 Binary files a/examples/signing/apksig/v1-only-with-signed-attrs-signerInfo1-wrong-digest-signerInfo2-good.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-signed-attrs-signerInfo1-wrong-order-signerInfo2-good.apk b/examples/signing/apksig/v1-only-with-signed-attrs-signerInfo1-wrong-order-signerInfo2-good.apk deleted file mode 100644 index a6c237e7..00000000 Binary files a/examples/signing/apksig/v1-only-with-signed-attrs-signerInfo1-wrong-order-signerInfo2-good.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-signed-attrs-signerInfo1-wrong-signature-signerInfo2-good.apk b/examples/signing/apksig/v1-only-with-signed-attrs-signerInfo1-wrong-signature-signerInfo2-good.apk deleted file mode 100644 index 2cb95dd3..00000000 Binary files a/examples/signing/apksig/v1-only-with-signed-attrs-signerInfo1-wrong-signature-signerInfo2-good.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-signed-attrs-wrong-content-type.apk b/examples/signing/apksig/v1-only-with-signed-attrs-wrong-content-type.apk deleted file mode 100644 index 37b8560b..00000000 Binary files a/examples/signing/apksig/v1-only-with-signed-attrs-wrong-content-type.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-signed-attrs-wrong-digest.apk b/examples/signing/apksig/v1-only-with-signed-attrs-wrong-digest.apk deleted file mode 100644 index 9968555b..00000000 Binary files a/examples/signing/apksig/v1-only-with-signed-attrs-wrong-digest.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-signed-attrs-wrong-order.apk b/examples/signing/apksig/v1-only-with-signed-attrs-wrong-order.apk deleted file mode 100644 index 8a7c53e2..00000000 Binary files a/examples/signing/apksig/v1-only-with-signed-attrs-wrong-order.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-signed-attrs-wrong-signature.apk b/examples/signing/apksig/v1-only-with-signed-attrs-wrong-signature.apk deleted file mode 100644 index a686fbfb..00000000 Binary files a/examples/signing/apksig/v1-only-with-signed-attrs-wrong-signature.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-only-with-signed-attrs.apk b/examples/signing/apksig/v1-only-with-signed-attrs.apk deleted file mode 100644 index 49b1d830..00000000 Binary files a/examples/signing/apksig/v1-only-with-signed-attrs.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-sha1-sha256-manifest-and-sf-with-sha1-wrong-in-manifest.apk b/examples/signing/apksig/v1-sha1-sha256-manifest-and-sf-with-sha1-wrong-in-manifest.apk deleted file mode 100644 index 1d90c7e9..00000000 Binary files a/examples/signing/apksig/v1-sha1-sha256-manifest-and-sf-with-sha1-wrong-in-manifest.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-sha1-sha256-manifest-and-sf-with-sha1-wrong-in-sf.apk b/examples/signing/apksig/v1-sha1-sha256-manifest-and-sf-with-sha1-wrong-in-sf.apk deleted file mode 100644 index a16e442f..00000000 Binary files a/examples/signing/apksig/v1-sha1-sha256-manifest-and-sf-with-sha1-wrong-in-sf.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-sha1-sha256-manifest-and-sf-with-sha256-wrong-in-manifest.apk b/examples/signing/apksig/v1-sha1-sha256-manifest-and-sf-with-sha256-wrong-in-manifest.apk deleted file mode 100644 index 29a6030a..00000000 Binary files a/examples/signing/apksig/v1-sha1-sha256-manifest-and-sf-with-sha256-wrong-in-manifest.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-sha1-sha256-manifest-and-sf-with-sha256-wrong-in-sf.apk b/examples/signing/apksig/v1-sha1-sha256-manifest-and-sf-with-sha256-wrong-in-sf.apk deleted file mode 100644 index eb12bccd..00000000 Binary files a/examples/signing/apksig/v1-sha1-sha256-manifest-and-sf-with-sha256-wrong-in-sf.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-sha1-sha256-manifest-and-sf.apk b/examples/signing/apksig/v1-sha1-sha256-manifest-and-sf.apk deleted file mode 100644 index f347a1c6..00000000 Binary files a/examples/signing/apksig/v1-sha1-sha256-manifest-and-sf.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-sha1-sha256-manifest-and-sha1-sf.apk b/examples/signing/apksig/v1-sha1-sha256-manifest-and-sha1-sf.apk deleted file mode 100644 index f347a1c6..00000000 Binary files a/examples/signing/apksig/v1-sha1-sha256-manifest-and-sha1-sf.apk and /dev/null differ diff --git a/examples/signing/apksig/v1-with-apk-sig-block-but-without-apk-sig-scheme-v2-block.apk b/examples/signing/apksig/v1-with-apk-sig-block-but-without-apk-sig-scheme-v2-block.apk deleted file mode 100644 index a194a2c4..00000000 Binary files a/examples/signing/apksig/v1-with-apk-sig-block-but-without-apk-sig-scheme-v2-block.apk and /dev/null differ diff --git a/examples/signing/apksig/v1v2v3-with-rsa-2048-lineage-3-signers-invalid-lineage-attr.apk b/examples/signing/apksig/v1v2v3-with-rsa-2048-lineage-3-signers-invalid-lineage-attr.apk deleted file mode 100644 index 1bd3828d..00000000 Binary files a/examples/signing/apksig/v1v2v3-with-rsa-2048-lineage-3-signers-invalid-lineage-attr.apk and /dev/null differ diff --git a/examples/signing/apksig/v1v2v3-with-rsa-2048-lineage-3-signers-invalid-zip.apk b/examples/signing/apksig/v1v2v3-with-rsa-2048-lineage-3-signers-invalid-zip.apk deleted file mode 100644 index 2621f21e..00000000 Binary files a/examples/signing/apksig/v1v2v3-with-rsa-2048-lineage-3-signers-invalid-zip.apk and /dev/null differ diff --git a/examples/signing/apksig/v1v2v3-with-rsa-2048-lineage-3-signers-no-sig-block.apk b/examples/signing/apksig/v1v2v3-with-rsa-2048-lineage-3-signers-no-sig-block.apk deleted file mode 100644 index 17dea33d..00000000 Binary files a/examples/signing/apksig/v1v2v3-with-rsa-2048-lineage-3-signers-no-sig-block.apk and /dev/null differ diff --git a/examples/signing/apksig/v1v2v3-with-rsa-2048-lineage-3-signers.apk b/examples/signing/apksig/v1v2v3-with-rsa-2048-lineage-3-signers.apk deleted file mode 100644 index fd141b59..00000000 Binary files a/examples/signing/apksig/v1v2v3-with-rsa-2048-lineage-3-signers.apk and /dev/null differ diff --git a/examples/signing/apksig/v2-only-apk-sig-block-size-mismatch.apk b/examples/signing/apksig/v2-only-apk-sig-block-size-mismatch.apk deleted file mode 100644 index e657a80b..00000000 Binary files a/examples/signing/apksig/v2-only-apk-sig-block-size-mismatch.apk and /dev/null differ diff --git a/examples/signing/apksig/v2-only-cert-and-public-key-mismatch.apk b/examples/signing/apksig/v2-only-cert-and-public-key-mismatch.apk deleted file mode 100644 index 5fbe97e0..00000000 Binary files a/examples/signing/apksig/v2-only-cert-and-public-key-mismatch.apk and /dev/null differ diff --git a/examples/signing/apksig/v2-only-empty.apk b/examples/signing/apksig/v2-only-empty.apk deleted file mode 100644 index 071ac7ee..00000000 Binary files a/examples/signing/apksig/v2-only-empty.apk and /dev/null differ diff --git a/examples/signing/apksig/v2-only-garbage-between-cd-and-eocd.apk b/examples/signing/apksig/v2-only-garbage-between-cd-and-eocd.apk deleted file mode 100644 index 93603836..00000000 Binary files a/examples/signing/apksig/v2-only-garbage-between-cd-and-eocd.apk and /dev/null differ diff --git a/examples/signing/apksig/v2-only-max-sized-eocd-comment.apk b/examples/signing/apksig/v2-only-max-sized-eocd-comment.apk deleted file mode 100644 index ef6cb43f..00000000 Binary files a/examples/signing/apksig/v2-only-max-sized-eocd-comment.apk and /dev/null differ diff --git a/examples/signing/apksig/v2-only-missing-classes.dex.apk b/examples/signing/apksig/v2-only-missing-classes.dex.apk deleted file mode 100644 index 0f1350ac..00000000 Binary files a/examples/signing/apksig/v2-only-missing-classes.dex.apk and /dev/null differ diff --git a/examples/signing/apksig/v2-only-no-certs-in-sig.apk b/examples/signing/apksig/v2-only-no-certs-in-sig.apk deleted file mode 100644 index 692c6b34..00000000 Binary files a/examples/signing/apksig/v2-only-no-certs-in-sig.apk and /dev/null differ diff --git a/examples/signing/apksig/v2-only-signatures-and-digests-block-mismatch.apk b/examples/signing/apksig/v2-only-signatures-and-digests-block-mismatch.apk deleted file mode 100644 index fb397a4a..00000000 Binary files a/examples/signing/apksig/v2-only-signatures-and-digests-block-mismatch.apk and /dev/null differ diff --git a/examples/signing/apksig/v2-only-targetSandboxVersion-2.apk b/examples/signing/apksig/v2-only-targetSandboxVersion-2.apk deleted file mode 100644 index f3487c89..00000000 Binary files a/examples/signing/apksig/v2-only-targetSandboxVersion-2.apk and /dev/null differ diff --git a/examples/signing/apksig/v2-only-targetSandboxVersion-3.apk b/examples/signing/apksig/v2-only-targetSandboxVersion-3.apk deleted file mode 100644 index 56984c5c..00000000 Binary files a/examples/signing/apksig/v2-only-targetSandboxVersion-3.apk and /dev/null differ diff --git a/examples/signing/apksig/v2-only-truncated-cd.apk b/examples/signing/apksig/v2-only-truncated-cd.apk deleted file mode 100644 index d2e3e8dc..00000000 Binary files a/examples/signing/apksig/v2-only-truncated-cd.apk and /dev/null differ diff --git a/examples/signing/apksig/v2-only-two-signers-second-signer-no-sig.apk b/examples/signing/apksig/v2-only-two-signers-second-signer-no-sig.apk deleted file mode 100644 index 1133085a..00000000 Binary files a/examples/signing/apksig/v2-only-two-signers-second-signer-no-sig.apk and /dev/null differ diff --git a/examples/signing/apksig/v2-only-two-signers-second-signer-no-supported-sig.apk b/examples/signing/apksig/v2-only-two-signers-second-signer-no-supported-sig.apk deleted file mode 100644 index 2fab38a5..00000000 Binary files a/examples/signing/apksig/v2-only-two-signers-second-signer-no-supported-sig.apk and /dev/null differ diff --git a/examples/signing/apksig/v2-only-two-signers.apk b/examples/signing/apksig/v2-only-two-signers.apk deleted file mode 100644 index 697b046c..00000000 Binary files a/examples/signing/apksig/v2-only-two-signers.apk and /dev/null differ diff --git a/examples/signing/apksig/v2-only-unknown-additional-attr.apk b/examples/signing/apksig/v2-only-unknown-additional-attr.apk deleted file mode 100644 index f1a02000..00000000 Binary files a/examples/signing/apksig/v2-only-unknown-additional-attr.apk and /dev/null differ diff --git a/examples/signing/apksig/v2-only-unknown-pair-in-apk-sig-block.apk b/examples/signing/apksig/v2-only-unknown-pair-in-apk-sig-block.apk deleted file mode 100644 index 2904305b..00000000 Binary files a/examples/signing/apksig/v2-only-unknown-pair-in-apk-sig-block.apk and /dev/null differ diff --git a/examples/signing/apksig/v2-only-with-dsa-sha256-1024-sig-does-not-verify.apk b/examples/signing/apksig/v2-only-with-dsa-sha256-1024-sig-does-not-verify.apk deleted file mode 100644 index 18a4409a..00000000 Binary files a/examples/signing/apksig/v2-only-with-dsa-sha256-1024-sig-does-not-verify.apk and /dev/null differ diff --git a/examples/signing/apksig/v2-only-with-dsa-sha256-1024.apk b/examples/signing/apksig/v2-only-with-dsa-sha256-1024.apk deleted file mode 100644 index 9c8232fd..00000000 Binary files a/examples/signing/apksig/v2-only-with-dsa-sha256-1024.apk and /dev/null differ diff --git a/examples/signing/apksig/v2-only-with-dsa-sha256-2048.apk b/examples/signing/apksig/v2-only-with-dsa-sha256-2048.apk deleted file mode 100644 index 1d679b1a..00000000 Binary files a/examples/signing/apksig/v2-only-with-dsa-sha256-2048.apk and /dev/null differ diff --git a/examples/signing/apksig/v2-only-with-dsa-sha256-3072.apk b/examples/signing/apksig/v2-only-with-dsa-sha256-3072.apk deleted file mode 100644 index 69214790..00000000 Binary files a/examples/signing/apksig/v2-only-with-dsa-sha256-3072.apk and /dev/null differ diff --git a/examples/signing/apksig/v2-only-with-ecdsa-sha256-p256-digest-mismatch.apk b/examples/signing/apksig/v2-only-with-ecdsa-sha256-p256-digest-mismatch.apk deleted file mode 100644 index 4cfc49cf..00000000 Binary files a/examples/signing/apksig/v2-only-with-ecdsa-sha256-p256-digest-mismatch.apk and /dev/null differ diff --git a/examples/signing/apksig/v2-only-with-ecdsa-sha256-p256-sig-does-not-verify.apk b/examples/signing/apksig/v2-only-with-ecdsa-sha256-p256-sig-does-not-verify.apk deleted file mode 100644 index 0339d397..00000000 Binary files a/examples/signing/apksig/v2-only-with-ecdsa-sha256-p256-sig-does-not-verify.apk and /dev/null differ diff --git a/examples/signing/apksig/v2-only-with-ecdsa-sha256-p256.apk b/examples/signing/apksig/v2-only-with-ecdsa-sha256-p256.apk deleted file mode 100644 index 657f1f91..00000000 Binary files a/examples/signing/apksig/v2-only-with-ecdsa-sha256-p256.apk and /dev/null differ diff --git a/examples/signing/apksig/v2-only-with-ecdsa-sha256-p384.apk b/examples/signing/apksig/v2-only-with-ecdsa-sha256-p384.apk deleted file mode 100644 index 326c6810..00000000 Binary files a/examples/signing/apksig/v2-only-with-ecdsa-sha256-p384.apk and /dev/null differ diff --git a/examples/signing/apksig/v2-only-with-ecdsa-sha256-p521.apk b/examples/signing/apksig/v2-only-with-ecdsa-sha256-p521.apk deleted file mode 100644 index 7fcb887f..00000000 Binary files a/examples/signing/apksig/v2-only-with-ecdsa-sha256-p521.apk and /dev/null differ diff --git a/examples/signing/apksig/v2-only-with-ecdsa-sha512-p256.apk b/examples/signing/apksig/v2-only-with-ecdsa-sha512-p256.apk deleted file mode 100644 index 59429168..00000000 Binary files a/examples/signing/apksig/v2-only-with-ecdsa-sha512-p256.apk and /dev/null differ diff --git a/examples/signing/apksig/v2-only-with-ecdsa-sha512-p384.apk b/examples/signing/apksig/v2-only-with-ecdsa-sha512-p384.apk deleted file mode 100644 index 82aa6adb..00000000 Binary files a/examples/signing/apksig/v2-only-with-ecdsa-sha512-p384.apk and /dev/null differ diff --git a/examples/signing/apksig/v2-only-with-ecdsa-sha512-p521.apk b/examples/signing/apksig/v2-only-with-ecdsa-sha512-p521.apk deleted file mode 100644 index fde4294e..00000000 Binary files a/examples/signing/apksig/v2-only-with-ecdsa-sha512-p521.apk and /dev/null differ diff --git a/examples/signing/apksig/v2-only-with-ignorable-unsupported-sig-algs.apk b/examples/signing/apksig/v2-only-with-ignorable-unsupported-sig-algs.apk deleted file mode 100644 index 165b262e..00000000 Binary files a/examples/signing/apksig/v2-only-with-ignorable-unsupported-sig-algs.apk and /dev/null differ diff --git a/examples/signing/apksig/v2-only-with-rsa-pkcs1-sha256-1024-cert-not-der.apk b/examples/signing/apksig/v2-only-with-rsa-pkcs1-sha256-1024-cert-not-der.apk deleted file mode 100644 index ada1b009..00000000 Binary files a/examples/signing/apksig/v2-only-with-rsa-pkcs1-sha256-1024-cert-not-der.apk and /dev/null differ diff --git a/examples/signing/apksig/v2-only-with-rsa-pkcs1-sha256-1024.apk b/examples/signing/apksig/v2-only-with-rsa-pkcs1-sha256-1024.apk deleted file mode 100644 index 5751fbe6..00000000 Binary files a/examples/signing/apksig/v2-only-with-rsa-pkcs1-sha256-1024.apk and /dev/null differ diff --git a/examples/signing/apksig/v2-only-with-rsa-pkcs1-sha256-16384.apk b/examples/signing/apksig/v2-only-with-rsa-pkcs1-sha256-16384.apk deleted file mode 100644 index a8323669..00000000 Binary files a/examples/signing/apksig/v2-only-with-rsa-pkcs1-sha256-16384.apk and /dev/null differ diff --git a/examples/signing/apksig/v2-only-with-rsa-pkcs1-sha256-2048-sig-does-not-verify.apk b/examples/signing/apksig/v2-only-with-rsa-pkcs1-sha256-2048-sig-does-not-verify.apk deleted file mode 100644 index fe6be6f9..00000000 Binary files a/examples/signing/apksig/v2-only-with-rsa-pkcs1-sha256-2048-sig-does-not-verify.apk and /dev/null differ diff --git a/examples/signing/apksig/v2-only-with-rsa-pkcs1-sha256-2048.apk b/examples/signing/apksig/v2-only-with-rsa-pkcs1-sha256-2048.apk deleted file mode 100644 index 51ed3ff3..00000000 Binary files a/examples/signing/apksig/v2-only-with-rsa-pkcs1-sha256-2048.apk and /dev/null differ diff --git a/examples/signing/apksig/v2-only-with-rsa-pkcs1-sha256-3072.apk b/examples/signing/apksig/v2-only-with-rsa-pkcs1-sha256-3072.apk deleted file mode 100644 index a3569d68..00000000 Binary files a/examples/signing/apksig/v2-only-with-rsa-pkcs1-sha256-3072.apk and /dev/null differ diff --git a/examples/signing/apksig/v2-only-with-rsa-pkcs1-sha256-4096.apk b/examples/signing/apksig/v2-only-with-rsa-pkcs1-sha256-4096.apk deleted file mode 100644 index acf5cb61..00000000 Binary files a/examples/signing/apksig/v2-only-with-rsa-pkcs1-sha256-4096.apk and /dev/null differ diff --git a/examples/signing/apksig/v2-only-with-rsa-pkcs1-sha256-8192.apk b/examples/signing/apksig/v2-only-with-rsa-pkcs1-sha256-8192.apk deleted file mode 100644 index 1c9f131e..00000000 Binary files a/examples/signing/apksig/v2-only-with-rsa-pkcs1-sha256-8192.apk and /dev/null differ diff --git a/examples/signing/apksig/v2-only-with-rsa-pkcs1-sha512-1024.apk b/examples/signing/apksig/v2-only-with-rsa-pkcs1-sha512-1024.apk deleted file mode 100644 index e95e3127..00000000 Binary files a/examples/signing/apksig/v2-only-with-rsa-pkcs1-sha512-1024.apk and /dev/null differ diff --git a/examples/signing/apksig/v2-only-with-rsa-pkcs1-sha512-16384.apk b/examples/signing/apksig/v2-only-with-rsa-pkcs1-sha512-16384.apk deleted file mode 100644 index 2b332b16..00000000 Binary files a/examples/signing/apksig/v2-only-with-rsa-pkcs1-sha512-16384.apk and /dev/null differ diff --git a/examples/signing/apksig/v2-only-with-rsa-pkcs1-sha512-2048.apk b/examples/signing/apksig/v2-only-with-rsa-pkcs1-sha512-2048.apk deleted file mode 100644 index 5e5863e2..00000000 Binary files a/examples/signing/apksig/v2-only-with-rsa-pkcs1-sha512-2048.apk and /dev/null differ diff --git a/examples/signing/apksig/v2-only-with-rsa-pkcs1-sha512-3072.apk b/examples/signing/apksig/v2-only-with-rsa-pkcs1-sha512-3072.apk deleted file mode 100644 index d5878653..00000000 Binary files a/examples/signing/apksig/v2-only-with-rsa-pkcs1-sha512-3072.apk and /dev/null differ diff --git a/examples/signing/apksig/v2-only-with-rsa-pkcs1-sha512-4096-digest-mismatch.apk b/examples/signing/apksig/v2-only-with-rsa-pkcs1-sha512-4096-digest-mismatch.apk deleted file mode 100644 index 72f5dba2..00000000 Binary files a/examples/signing/apksig/v2-only-with-rsa-pkcs1-sha512-4096-digest-mismatch.apk and /dev/null differ diff --git a/examples/signing/apksig/v2-only-with-rsa-pkcs1-sha512-4096.apk b/examples/signing/apksig/v2-only-with-rsa-pkcs1-sha512-4096.apk deleted file mode 100644 index 1189d8a5..00000000 Binary files a/examples/signing/apksig/v2-only-with-rsa-pkcs1-sha512-4096.apk and /dev/null differ diff --git a/examples/signing/apksig/v2-only-with-rsa-pkcs1-sha512-8192.apk b/examples/signing/apksig/v2-only-with-rsa-pkcs1-sha512-8192.apk deleted file mode 100644 index 146534e1..00000000 Binary files a/examples/signing/apksig/v2-only-with-rsa-pkcs1-sha512-8192.apk and /dev/null differ diff --git a/examples/signing/apksig/v2-only-with-rsa-pss-sha256-1024.apk b/examples/signing/apksig/v2-only-with-rsa-pss-sha256-1024.apk deleted file mode 100644 index 1331d35c..00000000 Binary files a/examples/signing/apksig/v2-only-with-rsa-pss-sha256-1024.apk and /dev/null differ diff --git a/examples/signing/apksig/v2-only-with-rsa-pss-sha256-16384.apk b/examples/signing/apksig/v2-only-with-rsa-pss-sha256-16384.apk deleted file mode 100644 index a205741d..00000000 Binary files a/examples/signing/apksig/v2-only-with-rsa-pss-sha256-16384.apk and /dev/null differ diff --git a/examples/signing/apksig/v2-only-with-rsa-pss-sha256-2048-sig-does-not-verify.apk b/examples/signing/apksig/v2-only-with-rsa-pss-sha256-2048-sig-does-not-verify.apk deleted file mode 100644 index f90d2264..00000000 Binary files a/examples/signing/apksig/v2-only-with-rsa-pss-sha256-2048-sig-does-not-verify.apk and /dev/null differ diff --git a/examples/signing/apksig/v2-only-with-rsa-pss-sha256-2048.apk b/examples/signing/apksig/v2-only-with-rsa-pss-sha256-2048.apk deleted file mode 100644 index 8bdfb458..00000000 Binary files a/examples/signing/apksig/v2-only-with-rsa-pss-sha256-2048.apk and /dev/null differ diff --git a/examples/signing/apksig/v2-only-with-rsa-pss-sha256-3072.apk b/examples/signing/apksig/v2-only-with-rsa-pss-sha256-3072.apk deleted file mode 100644 index d36731c8..00000000 Binary files a/examples/signing/apksig/v2-only-with-rsa-pss-sha256-3072.apk and /dev/null differ diff --git a/examples/signing/apksig/v2-only-with-rsa-pss-sha256-4096.apk b/examples/signing/apksig/v2-only-with-rsa-pss-sha256-4096.apk deleted file mode 100644 index 8e190b49..00000000 Binary files a/examples/signing/apksig/v2-only-with-rsa-pss-sha256-4096.apk and /dev/null differ diff --git a/examples/signing/apksig/v2-only-with-rsa-pss-sha256-8192.apk b/examples/signing/apksig/v2-only-with-rsa-pss-sha256-8192.apk deleted file mode 100644 index c879ffef..00000000 Binary files a/examples/signing/apksig/v2-only-with-rsa-pss-sha256-8192.apk and /dev/null differ diff --git a/examples/signing/apksig/v2-only-with-rsa-pss-sha512-16384.apk b/examples/signing/apksig/v2-only-with-rsa-pss-sha512-16384.apk deleted file mode 100644 index d398584e..00000000 Binary files a/examples/signing/apksig/v2-only-with-rsa-pss-sha512-16384.apk and /dev/null differ diff --git a/examples/signing/apksig/v2-only-with-rsa-pss-sha512-2048.apk b/examples/signing/apksig/v2-only-with-rsa-pss-sha512-2048.apk deleted file mode 100644 index bf8150dd..00000000 Binary files a/examples/signing/apksig/v2-only-with-rsa-pss-sha512-2048.apk and /dev/null differ diff --git a/examples/signing/apksig/v2-only-with-rsa-pss-sha512-3072.apk b/examples/signing/apksig/v2-only-with-rsa-pss-sha512-3072.apk deleted file mode 100644 index ca11ebb3..00000000 Binary files a/examples/signing/apksig/v2-only-with-rsa-pss-sha512-3072.apk and /dev/null differ diff --git a/examples/signing/apksig/v2-only-with-rsa-pss-sha512-4096.apk b/examples/signing/apksig/v2-only-with-rsa-pss-sha512-4096.apk deleted file mode 100644 index dfa12061..00000000 Binary files a/examples/signing/apksig/v2-only-with-rsa-pss-sha512-4096.apk and /dev/null differ diff --git a/examples/signing/apksig/v2-only-with-rsa-pss-sha512-8192.apk b/examples/signing/apksig/v2-only-with-rsa-pss-sha512-8192.apk deleted file mode 100644 index 1bdd0176..00000000 Binary files a/examples/signing/apksig/v2-only-with-rsa-pss-sha512-8192.apk and /dev/null differ diff --git a/examples/signing/apksig/v2-only-wrong-apk-sig-block-magic.apk b/examples/signing/apksig/v2-only-wrong-apk-sig-block-magic.apk deleted file mode 100644 index 85750d4b..00000000 Binary files a/examples/signing/apksig/v2-only-wrong-apk-sig-block-magic.apk and /dev/null differ diff --git a/examples/signing/apksig/v2-stripped-with-ignorable-signing-schemes.apk b/examples/signing/apksig/v2-stripped-with-ignorable-signing-schemes.apk deleted file mode 100644 index 634255b3..00000000 Binary files a/examples/signing/apksig/v2-stripped-with-ignorable-signing-schemes.apk and /dev/null differ diff --git a/examples/signing/apksig/v2-stripped.apk b/examples/signing/apksig/v2-stripped.apk deleted file mode 100644 index 0d04d934..00000000 Binary files a/examples/signing/apksig/v2-stripped.apk and /dev/null differ diff --git a/examples/signing/apksig/v2v3-signed-v3-block-stripped.apk b/examples/signing/apksig/v2v3-signed-v3-block-stripped.apk deleted file mode 100644 index 751c67d1..00000000 Binary files a/examples/signing/apksig/v2v3-signed-v3-block-stripped.apk and /dev/null differ diff --git a/examples/signing/apksig/v2v3-unknown-additional-attr.apk b/examples/signing/apksig/v2v3-unknown-additional-attr.apk deleted file mode 100644 index cb080f46..00000000 Binary files a/examples/signing/apksig/v2v3-unknown-additional-attr.apk and /dev/null differ diff --git a/examples/signing/apksig/v3-only-cert-and-public-key-mismatch.apk b/examples/signing/apksig/v3-only-cert-and-public-key-mismatch.apk deleted file mode 100644 index 2291e7eb..00000000 Binary files a/examples/signing/apksig/v3-only-cert-and-public-key-mismatch.apk and /dev/null differ diff --git a/examples/signing/apksig/v3-only-empty.apk b/examples/signing/apksig/v3-only-empty.apk deleted file mode 100644 index 15cb0ecb..00000000 Binary files a/examples/signing/apksig/v3-only-empty.apk and /dev/null differ diff --git a/examples/signing/apksig/v3-only-no-certs-in-sig.apk b/examples/signing/apksig/v3-only-no-certs-in-sig.apk deleted file mode 100644 index 86e7971e..00000000 Binary files a/examples/signing/apksig/v3-only-no-certs-in-sig.apk and /dev/null differ diff --git a/examples/signing/apksig/v3-only-no-supported-sig-algs.apk b/examples/signing/apksig/v3-only-no-supported-sig-algs.apk deleted file mode 100644 index f0debf36..00000000 Binary files a/examples/signing/apksig/v3-only-no-supported-sig-algs.apk and /dev/null differ diff --git a/examples/signing/apksig/v3-only-signatures-and-digests-block-mismatch.apk b/examples/signing/apksig/v3-only-signatures-and-digests-block-mismatch.apk deleted file mode 100644 index 31aea2ff..00000000 Binary files a/examples/signing/apksig/v3-only-signatures-and-digests-block-mismatch.apk and /dev/null differ diff --git a/examples/signing/apksig/v3-only-unknown-additional-attr.apk b/examples/signing/apksig/v3-only-unknown-additional-attr.apk deleted file mode 100644 index 2245922d..00000000 Binary files a/examples/signing/apksig/v3-only-unknown-additional-attr.apk and /dev/null differ diff --git a/examples/signing/apksig/v3-only-unknown-pair-in-apk-sig-block.apk b/examples/signing/apksig/v3-only-unknown-pair-in-apk-sig-block.apk deleted file mode 100644 index 49eeaf3d..00000000 Binary files a/examples/signing/apksig/v3-only-unknown-pair-in-apk-sig-block.apk and /dev/null differ diff --git a/examples/signing/apksig/v3-only-with-dsa-sha256-1024.apk b/examples/signing/apksig/v3-only-with-dsa-sha256-1024.apk deleted file mode 100644 index af6b0d71..00000000 Binary files a/examples/signing/apksig/v3-only-with-dsa-sha256-1024.apk and /dev/null differ diff --git a/examples/signing/apksig/v3-only-with-dsa-sha256-2048-sig-does-not-verify.apk b/examples/signing/apksig/v3-only-with-dsa-sha256-2048-sig-does-not-verify.apk deleted file mode 100644 index 50dbab26..00000000 Binary files a/examples/signing/apksig/v3-only-with-dsa-sha256-2048-sig-does-not-verify.apk and /dev/null differ diff --git a/examples/signing/apksig/v3-only-with-dsa-sha256-2048.apk b/examples/signing/apksig/v3-only-with-dsa-sha256-2048.apk deleted file mode 100644 index 3d2161e5..00000000 Binary files a/examples/signing/apksig/v3-only-with-dsa-sha256-2048.apk and /dev/null differ diff --git a/examples/signing/apksig/v3-only-with-dsa-sha256-3072-digest-mismatch.apk b/examples/signing/apksig/v3-only-with-dsa-sha256-3072-digest-mismatch.apk deleted file mode 100644 index 42f885bc..00000000 Binary files a/examples/signing/apksig/v3-only-with-dsa-sha256-3072-digest-mismatch.apk and /dev/null differ diff --git a/examples/signing/apksig/v3-only-with-dsa-sha256-3072.apk b/examples/signing/apksig/v3-only-with-dsa-sha256-3072.apk deleted file mode 100644 index c58902dd..00000000 Binary files a/examples/signing/apksig/v3-only-with-dsa-sha256-3072.apk and /dev/null differ diff --git a/examples/signing/apksig/v3-only-with-ecdsa-sha256-p256.apk b/examples/signing/apksig/v3-only-with-ecdsa-sha256-p256.apk deleted file mode 100644 index 5ef4fec1..00000000 Binary files a/examples/signing/apksig/v3-only-with-ecdsa-sha256-p256.apk and /dev/null differ diff --git a/examples/signing/apksig/v3-only-with-ecdsa-sha256-p384.apk b/examples/signing/apksig/v3-only-with-ecdsa-sha256-p384.apk deleted file mode 100644 index 75135af4..00000000 Binary files a/examples/signing/apksig/v3-only-with-ecdsa-sha256-p384.apk and /dev/null differ diff --git a/examples/signing/apksig/v3-only-with-ecdsa-sha256-p521.apk b/examples/signing/apksig/v3-only-with-ecdsa-sha256-p521.apk deleted file mode 100644 index 74071f0f..00000000 Binary files a/examples/signing/apksig/v3-only-with-ecdsa-sha256-p521.apk and /dev/null differ diff --git a/examples/signing/apksig/v3-only-with-ecdsa-sha512-p256.apk b/examples/signing/apksig/v3-only-with-ecdsa-sha512-p256.apk deleted file mode 100644 index 543c1f3c..00000000 Binary files a/examples/signing/apksig/v3-only-with-ecdsa-sha512-p256.apk and /dev/null differ diff --git a/examples/signing/apksig/v3-only-with-ecdsa-sha512-p384-wrong-apk-sig-block-magic.apk b/examples/signing/apksig/v3-only-with-ecdsa-sha512-p384-wrong-apk-sig-block-magic.apk deleted file mode 100644 index ce797518..00000000 Binary files a/examples/signing/apksig/v3-only-with-ecdsa-sha512-p384-wrong-apk-sig-block-magic.apk and /dev/null differ diff --git a/examples/signing/apksig/v3-only-with-ecdsa-sha512-p384.apk b/examples/signing/apksig/v3-only-with-ecdsa-sha512-p384.apk deleted file mode 100644 index 36fa0eee..00000000 Binary files a/examples/signing/apksig/v3-only-with-ecdsa-sha512-p384.apk and /dev/null differ diff --git a/examples/signing/apksig/v3-only-with-ecdsa-sha512-p521-sig-does-not-verify.apk b/examples/signing/apksig/v3-only-with-ecdsa-sha512-p521-sig-does-not-verify.apk deleted file mode 100644 index 8e89c984..00000000 Binary files a/examples/signing/apksig/v3-only-with-ecdsa-sha512-p521-sig-does-not-verify.apk and /dev/null differ diff --git a/examples/signing/apksig/v3-only-with-ecdsa-sha512-p521.apk b/examples/signing/apksig/v3-only-with-ecdsa-sha512-p521.apk deleted file mode 100644 index b74b4fb1..00000000 Binary files a/examples/signing/apksig/v3-only-with-ecdsa-sha512-p521.apk and /dev/null differ diff --git a/examples/signing/apksig/v3-only-with-ignorable-unsupported-sig-algs.apk b/examples/signing/apksig/v3-only-with-ignorable-unsupported-sig-algs.apk deleted file mode 100644 index 88ae3764..00000000 Binary files a/examples/signing/apksig/v3-only-with-ignorable-unsupported-sig-algs.apk and /dev/null differ diff --git a/examples/signing/apksig/v3-only-with-rsa-pkcs1-sha256-1024.apk b/examples/signing/apksig/v3-only-with-rsa-pkcs1-sha256-1024.apk deleted file mode 100644 index 7a62c242..00000000 Binary files a/examples/signing/apksig/v3-only-with-rsa-pkcs1-sha256-1024.apk and /dev/null differ diff --git a/examples/signing/apksig/v3-only-with-rsa-pkcs1-sha256-16384.apk b/examples/signing/apksig/v3-only-with-rsa-pkcs1-sha256-16384.apk deleted file mode 100644 index 825cfbab..00000000 Binary files a/examples/signing/apksig/v3-only-with-rsa-pkcs1-sha256-16384.apk and /dev/null differ diff --git a/examples/signing/apksig/v3-only-with-rsa-pkcs1-sha256-2048.apk b/examples/signing/apksig/v3-only-with-rsa-pkcs1-sha256-2048.apk deleted file mode 100644 index 1ab85f8e..00000000 Binary files a/examples/signing/apksig/v3-only-with-rsa-pkcs1-sha256-2048.apk and /dev/null differ diff --git a/examples/signing/apksig/v3-only-with-rsa-pkcs1-sha256-3072-sig-does-not-verify.apk b/examples/signing/apksig/v3-only-with-rsa-pkcs1-sha256-3072-sig-does-not-verify.apk deleted file mode 100644 index ddaaccd0..00000000 Binary files a/examples/signing/apksig/v3-only-with-rsa-pkcs1-sha256-3072-sig-does-not-verify.apk and /dev/null differ diff --git a/examples/signing/apksig/v3-only-with-rsa-pkcs1-sha256-3072.apk b/examples/signing/apksig/v3-only-with-rsa-pkcs1-sha256-3072.apk deleted file mode 100644 index 8bcc82c1..00000000 Binary files a/examples/signing/apksig/v3-only-with-rsa-pkcs1-sha256-3072.apk and /dev/null differ diff --git a/examples/signing/apksig/v3-only-with-rsa-pkcs1-sha256-4096.apk b/examples/signing/apksig/v3-only-with-rsa-pkcs1-sha256-4096.apk deleted file mode 100644 index 0c9391ce..00000000 Binary files a/examples/signing/apksig/v3-only-with-rsa-pkcs1-sha256-4096.apk and /dev/null differ diff --git a/examples/signing/apksig/v3-only-with-rsa-pkcs1-sha256-8192.apk b/examples/signing/apksig/v3-only-with-rsa-pkcs1-sha256-8192.apk deleted file mode 100644 index 41db21bd..00000000 Binary files a/examples/signing/apksig/v3-only-with-rsa-pkcs1-sha256-8192.apk and /dev/null differ diff --git a/examples/signing/apksig/v3-only-with-rsa-pkcs1-sha512-1024.apk b/examples/signing/apksig/v3-only-with-rsa-pkcs1-sha512-1024.apk deleted file mode 100644 index 776d3665..00000000 Binary files a/examples/signing/apksig/v3-only-with-rsa-pkcs1-sha512-1024.apk and /dev/null differ diff --git a/examples/signing/apksig/v3-only-with-rsa-pkcs1-sha512-16384.apk b/examples/signing/apksig/v3-only-with-rsa-pkcs1-sha512-16384.apk deleted file mode 100644 index 85146f1b..00000000 Binary files a/examples/signing/apksig/v3-only-with-rsa-pkcs1-sha512-16384.apk and /dev/null differ diff --git a/examples/signing/apksig/v3-only-with-rsa-pkcs1-sha512-2048.apk b/examples/signing/apksig/v3-only-with-rsa-pkcs1-sha512-2048.apk deleted file mode 100644 index 8b1b9155..00000000 Binary files a/examples/signing/apksig/v3-only-with-rsa-pkcs1-sha512-2048.apk and /dev/null differ diff --git a/examples/signing/apksig/v3-only-with-rsa-pkcs1-sha512-3072.apk b/examples/signing/apksig/v3-only-with-rsa-pkcs1-sha512-3072.apk deleted file mode 100644 index 5b364fd0..00000000 Binary files a/examples/signing/apksig/v3-only-with-rsa-pkcs1-sha512-3072.apk and /dev/null differ diff --git a/examples/signing/apksig/v3-only-with-rsa-pkcs1-sha512-4096-apk-sig-block-size-mismatch.apk b/examples/signing/apksig/v3-only-with-rsa-pkcs1-sha512-4096-apk-sig-block-size-mismatch.apk deleted file mode 100644 index 52d5a678..00000000 Binary files a/examples/signing/apksig/v3-only-with-rsa-pkcs1-sha512-4096-apk-sig-block-size-mismatch.apk and /dev/null differ diff --git a/examples/signing/apksig/v3-only-with-rsa-pkcs1-sha512-4096.apk b/examples/signing/apksig/v3-only-with-rsa-pkcs1-sha512-4096.apk deleted file mode 100644 index c210b70d..00000000 Binary files a/examples/signing/apksig/v3-only-with-rsa-pkcs1-sha512-4096.apk and /dev/null differ diff --git a/examples/signing/apksig/v3-only-with-rsa-pkcs1-sha512-8192-digest-mismatch.apk b/examples/signing/apksig/v3-only-with-rsa-pkcs1-sha512-8192-digest-mismatch.apk deleted file mode 100644 index 28009296..00000000 Binary files a/examples/signing/apksig/v3-only-with-rsa-pkcs1-sha512-8192-digest-mismatch.apk and /dev/null differ diff --git a/examples/signing/apksig/v3-only-with-rsa-pkcs1-sha512-8192.apk b/examples/signing/apksig/v3-only-with-rsa-pkcs1-sha512-8192.apk deleted file mode 100644 index 3c2cc79d..00000000 Binary files a/examples/signing/apksig/v3-only-with-rsa-pkcs1-sha512-8192.apk and /dev/null differ diff --git a/examples/signing/apksig/v3-stripped.apk b/examples/signing/apksig/v3-stripped.apk deleted file mode 100644 index 751c67d1..00000000 Binary files a/examples/signing/apksig/v3-stripped.apk and /dev/null differ diff --git a/examples/signing/apksig/weird-compression-method.apk b/examples/signing/apksig/weird-compression-method.apk deleted file mode 100644 index 33f9af90..00000000 Binary files a/examples/signing/apksig/weird-compression-method.apk and /dev/null differ diff --git a/examples/signing/certificate.der b/examples/signing/certificate.der deleted file mode 100644 index 7013cbde..00000000 Binary files a/examples/signing/certificate.der and /dev/null differ diff --git a/examples/signing/certificate.pem b/examples/signing/certificate.pem deleted file mode 100644 index a687ecf2..00000000 --- a/examples/signing/certificate.pem +++ /dev/null @@ -1,21 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIDYjCCAkqgAwIBAgIJAOChyeZ0Qi1CMA0GCSqGSIb3DQEBCwUAMEUxCzAJBgNV -BAYTAkFVMRMwEQYDVQQIDApTb21lLVN0YXRlMSEwHwYDVQQKDBhJbnRlcm5ldCBX -aWRnaXRzIFB0eSBMdGQwIBcNMTgwMjIxMTIyNzM5WhgPMjExODAxMjgxMjI3Mzla -MEUxCzAJBgNVBAYTAkFVMRMwEQYDVQQIDApTb21lLVN0YXRlMSEwHwYDVQQKDBhJ -bnRlcm5ldCBXaWRnaXRzIFB0eSBMdGQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAw -ggEKAoIBAQCTsr+GpZTdUCIvkIKVfhfV8GGMJaB1ctRaMXT9CqoZVfmogXemavbN -KV8ezn3/Hul7btilksz/9rB8QPgWmBf4n0vUXhQyGWKUnfQr63knhuN13KyspD4o -St8gFzHsZhHlIENLl9fafqSAKW8oqZA6ZeNTR4ZA7ye2IsGvBzwZwa4bxZSVcQ7o -hacNCP9/gNI/UuVIOHhmpBFuIJ9qWYH8NTQrjY0DCgrfhMZjySWqm3BsDjsm2UPJ -z83QzAcSMKGztWbJVzgY5X3Zykk5qfXMYeFJ8ro38Vah8KXEVto9cZinlNSpXmKE -cKTq8hmXf97KgYyEayLOMHA46Kk6kpG7AgMBAAGjUzBRMB0GA1UdDgQWBBTbexgn -2KU8SP3YucrZS6Z/XOyLFzAfBgNVHSMEGDAWgBTbexgn2KU8SP3YucrZS6Z/XOyL -FzAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQCFjzXXqtdlUGtF -PKAMmBaQFgjKu98cTrXywcyVMBkw+dm532xuNR6Y2B95pewb1ctoAeLLDFJB5OxB -/yPzEt79y1KCzI2FtU7ecLK0W5AZC80kru1Gmkt5mygTuzZfjj84ayrOfxR2wvkB -rqItoYzc1+VeJWtO0RftoXtJRMBLYaW38NIMRsqdni6YCMa/xL38G7RMDJEgvOvs -16P57HGVvwRMPKRz26PKWdL7/Ewvjxn3P9NxQI/dkaFye4zwKaxMoDyRIrpt43pV -VSFm1ro2TVFVkE2TTV8SA8NWhZB6n2u6sc0zGwGwH71sx37AYTga+PDBG/+FRGc/ -JbQXTwyP ------END CERTIFICATE----- diff --git a/examples/signing/priv.key b/examples/signing/priv.key deleted file mode 100644 index e80b2e33..00000000 Binary files a/examples/signing/priv.key and /dev/null differ diff --git a/examples/tests/2992e3a94a774ddfe2b50c6e8667d925a5684d71.36.dex b/examples/tests/2992e3a94a774ddfe2b50c6e8667d925a5684d71.36.dex deleted file mode 100644 index 97a968e8..00000000 Binary files a/examples/tests/2992e3a94a774ddfe2b50c6e8667d925a5684d71.36.dex and /dev/null differ diff --git a/examples/tests/921d74ac9568121d0ea1453922a369cb66739c68.36.dex b/examples/tests/921d74ac9568121d0ea1453922a369cb66739c68.36.dex deleted file mode 100644 index e6958327..00000000 Binary files a/examples/tests/921d74ac9568121d0ea1453922a369cb66739c68.36.dex and /dev/null differ diff --git a/examples/tests/AnalysisTest.dex b/examples/tests/AnalysisTest.dex deleted file mode 100644 index 16678e0b..00000000 Binary files a/examples/tests/AnalysisTest.dex and /dev/null differ diff --git a/examples/tests/AnalysisTest.java b/examples/tests/AnalysisTest.java deleted file mode 100644 index 592581df..00000000 --- a/examples/tests/AnalysisTest.java +++ /dev/null @@ -1,21 +0,0 @@ -import java.math.BigDecimal; -import java.math.BigInteger; - -class AnalysisTest { - - public void testStaticCalls() { - // this should generate a static call to a method, ie a class reference opcode 0x1c - System.out.println("Hello world"); - } - - public void testObjectCalls() { - // Instance of a new object, ie a new instance opcode 0x22 - BigDecimal d = new BigDecimal(23); - } - - public void testCast(Object foo) { - // This should generate a check-cast opcode 0x1f - double x = ((BigInteger) foo).doubleValue(); - } - -} \ No newline at end of file diff --git a/examples/tests/ExceptionHandling.dex b/examples/tests/ExceptionHandling.dex deleted file mode 100644 index aa59f725..00000000 Binary files a/examples/tests/ExceptionHandling.dex and /dev/null differ diff --git a/examples/tests/ExceptionHandling.java b/examples/tests/ExceptionHandling.java deleted file mode 100644 index 12499790..00000000 --- a/examples/tests/ExceptionHandling.java +++ /dev/null @@ -1,38 +0,0 @@ -public class ExceptionHandling { - - public void someMethod() throws SomeException { - throw new SomeException("This is an exception!"); - } - - public int mightThrowSomething(int i) throws AnotherException { - if ( i == 42 ) { - throw new AnotherException("42 was not found"); - } - else { - return i * 2; - } - } - - public void differentExceptions(int i) throws SomeException, AnotherException { - if ( i == 42 ) { - throw new SomeException("42 is the answer"); - } - else { - throw new AnotherException("must provide the answer"); - } - } - - -} - -class SomeException extends Exception { - public SomeException(String msg) { - } - -} - -class AnotherException extends Exception { - public AnotherException(String msg) { - } - -} diff --git a/examples/tests/FieldsTest.dex b/examples/tests/FieldsTest.dex deleted file mode 100644 index 76514143..00000000 Binary files a/examples/tests/FieldsTest.dex and /dev/null differ diff --git a/examples/tests/FieldsTest.java b/examples/tests/FieldsTest.java deleted file mode 100644 index 15e3511e..00000000 --- a/examples/tests/FieldsTest.java +++ /dev/null @@ -1,18 +0,0 @@ -public class FieldsTest { - - public String afield = "hello world"; - private String bfield = "sdf"; - - public static String cfield = "i am static"; - - public void foonbar() { - System.out.println(this.afield); - System.out.println(this.bfield); - - this.afield = "hello mars"; - - System.out.println(this.afield); - System.out.println(cfield); - } - -} diff --git a/examples/tests/FillArrays.dex b/examples/tests/FillArrays.dex deleted file mode 100644 index a1d7b184..00000000 Binary files a/examples/tests/FillArrays.dex and /dev/null differ diff --git a/examples/tests/FillArrays.java b/examples/tests/FillArrays.java deleted file mode 100644 index a6fcffb9..00000000 --- a/examples/tests/FillArrays.java +++ /dev/null @@ -1,15 +0,0 @@ -class FillArrays { - public byte[] ba; - public int[] ia; - public char[] ca; - public short[] ha; - public String[] sa; - - public void someArrays() { - this.ba = new byte[] {20, 30, 40, 50}; - this.ia = new int[] {1,2,3,4,5,999,10324234}; - this.ca = new char[] {'a', 'b', 'x', 'z', 99}; - this.ha = new short[] {5, 10, 15, 20}; - this.sa = new String[] {"hello", "world"}; - } -} diff --git a/examples/tests/InterfaceCls.dex b/examples/tests/InterfaceCls.dex deleted file mode 100644 index f4212e5f..00000000 Binary files a/examples/tests/InterfaceCls.dex and /dev/null differ diff --git a/examples/tests/InterfaceCls.java b/examples/tests/InterfaceCls.java deleted file mode 100644 index e4a932ac..00000000 --- a/examples/tests/InterfaceCls.java +++ /dev/null @@ -1,19 +0,0 @@ -import javax.net.ssl.X509TrustManager; -import java.security.cert.X509Certificate; - -class InterfaceCls implements X509TrustManager { - - public void checkClientTrusted(X509Certificate[] chain, String authType){ - - } - - public void checkServerTrusted(X509Certificate[] chain, String authType) { - - } - - public X509Certificate[] getAcceptedIssuers() { - return new X509Certificate[0]; - } - - -} diff --git a/examples/tests/Makefile b/examples/tests/Makefile deleted file mode 100644 index a617b7e9..00000000 --- a/examples/tests/Makefile +++ /dev/null @@ -1,12 +0,0 @@ -all: Test.dex Switch.dex FillArrays.dex StringTests.dex AnalysisTest.dex ExceptionHandling.dex InterfaceCls.dex FieldsTest.dex - -%.class: %.java - javac -source 1.7 -target 1.7 $^ - - -# Special files with multiple classes... -ExceptionHandling.dex: ExceptionHandling.class SomeException.class AnotherException.class - /usr/lib/android-sdk/build-tools/debian/dx --dex --output $@ $^ - -%.dex: %.class - /usr/lib/android-sdk/build-tools/debian/dx --dex --output $@ $^ diff --git a/examples/tests/README.md b/examples/tests/README.md deleted file mode 100644 index d8b7fb3b..00000000 --- a/examples/tests/README.md +++ /dev/null @@ -1,11 +0,0 @@ -* `a2dp.Vol_137.apk` was downloaded from F-Droid: https://f-droid.org/packages/a2dp.Vol/ -and is released under GPLv3 -* `com.teleca.jamendo_35.apk` was downloaded from F-Droid and is released under Apache 2.0 Licence -* `hello-world.apk` is from the viper-test-files: https://github.com/viper-framework/viper-test-files/blob/master/test_files/hello-world.apk -* `com.example.android.tvleanback.apk` is build from https://github.com/googlesamples/androidtv-Leanback -* `com.example.android.wearable.wear.weardrawers.apk` is build from https://github.com/googlesamples/android-WearDrawers -* `com.android.example.text.styling.apk` is build from https://github.com/googlesamples/android-text - -The Java files are written for the purpose of testing androguard. -You can compile them into dex files using the Makefile. -Install `openjdk-8-jdk dalvik-exchange` packages to build them. diff --git a/examples/tests/StringTests.dex b/examples/tests/StringTests.dex deleted file mode 100644 index 4f34df41..00000000 Binary files a/examples/tests/StringTests.dex and /dev/null differ diff --git a/examples/tests/StringTests.java b/examples/tests/StringTests.java deleted file mode 100644 index 4355ef12..00000000 --- a/examples/tests/StringTests.java +++ /dev/null @@ -1,27 +0,0 @@ -public class StringTests{ - public static void main(String... args){ - - String a = "this is a quite normal string"; - String b = "\u0000 \u0001 \u1234"; - String c = "使用在線工具將字符串翻譯為中文"; - String d = "перевод строки на русский с помощью онлайн-инструментов"; - String e = "온라인 도구를 사용하여 문자열을 한국어로 번역"; - String f = "オンラインツールを使用して文字列を日本語に翻訳"; - String g = "This is \ud83d\ude4f, an emoji."; - String h = "\u2713 check this string"; - String i = "\uFFFF \u0000 \uFF00"; - String j = "\u0420\u043e\u0441\u0441\u0438\u044f"; - - System.out.println(a); - System.out.println(b); - System.out.println(c); - System.out.println(d); - System.out.println(d); - System.out.println(f); - System.out.println(g); - System.out.println(h); - System.out.println(i); - System.out.println(j); - } - -} diff --git a/examples/tests/Switch.dex b/examples/tests/Switch.dex deleted file mode 100644 index 999837e8..00000000 Binary files a/examples/tests/Switch.dex and /dev/null differ diff --git a/examples/tests/Switch.java b/examples/tests/Switch.java deleted file mode 100644 index d5caa53f..00000000 --- a/examples/tests/Switch.java +++ /dev/null @@ -1,24 +0,0 @@ -class Switch { - - public int someSwitch(int x, String y) { - int r = 0; - switch (x) { - case 1: - r = 23; - break; - case 2: - r = 42; - break; - case 3: - r = 72; - break; - default: - r = 17; - break; - } - if (y != null) { - r = 99; - } - return r; - } -} diff --git a/examples/tests/Test.dex b/examples/tests/Test.dex deleted file mode 100644 index df8f93b2..00000000 Binary files a/examples/tests/Test.dex and /dev/null differ diff --git a/examples/tests/Test.java b/examples/tests/Test.java deleted file mode 100644 index 393a54ba..00000000 --- a/examples/tests/Test.java +++ /dev/null @@ -1,10 +0,0 @@ -class Test{ - - public int aTestMethod(int z){ - int x = 23; - - x = (x - z) | 72 - (2 * x) & 0x42 + z; - - return x; - } -} diff --git a/examples/tests/a2dp.Vol_137.apk b/examples/tests/a2dp.Vol_137.apk deleted file mode 100644 index c0c26973..00000000 Binary files a/examples/tests/a2dp.Vol_137.apk and /dev/null differ diff --git a/examples/tests/com.android.example.text.styling.apk b/examples/tests/com.android.example.text.styling.apk deleted file mode 100644 index 24be0d45..00000000 Binary files a/examples/tests/com.android.example.text.styling.apk and /dev/null differ diff --git a/examples/tests/com.example.android.tvleanback.apk b/examples/tests/com.example.android.tvleanback.apk deleted file mode 100644 index 6b19b03b..00000000 Binary files a/examples/tests/com.example.android.tvleanback.apk and /dev/null differ diff --git a/examples/tests/com.example.android.wearable.wear.weardrawers.apk b/examples/tests/com.example.android.wearable.wear.weardrawers.apk deleted file mode 100644 index 04e5833d..00000000 Binary files a/examples/tests/com.example.android.wearable.wear.weardrawers.apk and /dev/null differ diff --git a/examples/tests/com.politedroid_4.apk b/examples/tests/com.politedroid_4.apk deleted file mode 100644 index 7ef46599..00000000 Binary files a/examples/tests/com.politedroid_4.apk and /dev/null differ diff --git a/examples/tests/com.teleca.jamendo_35.apk b/examples/tests/com.teleca.jamendo_35.apk deleted file mode 100644 index bedeeae7..00000000 Binary files a/examples/tests/com.teleca.jamendo_35.apk and /dev/null differ diff --git a/examples/tests/com.test.intent_filter.apk b/examples/tests/com.test.intent_filter.apk deleted file mode 100644 index 378f8d19..00000000 Binary files a/examples/tests/com.test.intent_filter.apk and /dev/null differ diff --git a/examples/tests/dc4b1bb9d58daa82f29e60f79d5662f731a3351f.37.dex b/examples/tests/dc4b1bb9d58daa82f29e60f79d5662f731a3351f.37.dex deleted file mode 100644 index 7e037624..00000000 Binary files a/examples/tests/dc4b1bb9d58daa82f29e60f79d5662f731a3351f.37.dex and /dev/null differ diff --git a/examples/tests/duplicate.permisssions_9999999.apk b/examples/tests/duplicate.permisssions_9999999.apk deleted file mode 100644 index a7510f3a..00000000 Binary files a/examples/tests/duplicate.permisssions_9999999.apk and /dev/null differ diff --git a/examples/tests/fdroid/README.md b/examples/tests/fdroid/README.md deleted file mode 100644 index ff6ed2ef..00000000 --- a/examples/tests/fdroid/README.md +++ /dev/null @@ -1 +0,0 @@ -These files were copied from F-Droid diff --git a/examples/tests/fdroid/cat.mvmike.minimalcalendarwidget_17.dex b/examples/tests/fdroid/cat.mvmike.minimalcalendarwidget_17.dex deleted file mode 100644 index 549e4847..00000000 Binary files a/examples/tests/fdroid/cat.mvmike.minimalcalendarwidget_17.dex and /dev/null differ diff --git a/examples/tests/fdroid/com.example.trigger_130.dex b/examples/tests/fdroid/com.example.trigger_130.dex deleted file mode 100644 index e42266f6..00000000 Binary files a/examples/tests/fdroid/com.example.trigger_130.dex and /dev/null differ diff --git a/examples/tests/fdroid/net.eneiluj.nextcloud.phonetrack_2.dex b/examples/tests/fdroid/net.eneiluj.nextcloud.phonetrack_2.dex deleted file mode 100644 index ce563183..00000000 Binary files a/examples/tests/fdroid/net.eneiluj.nextcloud.phonetrack_2.dex and /dev/null differ diff --git a/examples/tests/fdroid/org.andstatus.app_254.dex b/examples/tests/fdroid/org.andstatus.app_254.dex deleted file mode 100644 index 5fe552da..00000000 Binary files a/examples/tests/fdroid/org.andstatus.app_254.dex and /dev/null differ diff --git a/examples/tests/hello-world.apk b/examples/tests/hello-world.apk deleted file mode 100644 index 928ce6f6..00000000 Binary files a/examples/tests/hello-world.apk and /dev/null differ diff --git a/examples/tests/lineageos_nexus5_framework-res.apk b/examples/tests/lineageos_nexus5_framework-res.apk deleted file mode 100644 index 5c280ea5..00000000 Binary files a/examples/tests/lineageos_nexus5_framework-res.apk and /dev/null differ diff --git a/examples/tests/multidex/Makefile b/examples/tests/multidex/Makefile deleted file mode 100644 index 85adc515..00000000 --- a/examples/tests/multidex/Makefile +++ /dev/null @@ -1,7 +0,0 @@ -all: multidex.apk - -%.class: %.java - javac -source 1.7 -target 1.7 $^ - -%.apk: com/foobar/foo/Foobar.class com/blafoo/bar/Blafoo.class - /usr/lib/android-sdk/build-tools/debian/dx --dex --multi-dex --minimal-main-dex --main-dex-list=class_files.txt --output $@ $^ diff --git a/examples/tests/multidex/class_files.txt b/examples/tests/multidex/class_files.txt deleted file mode 100644 index 3176b20f..00000000 --- a/examples/tests/multidex/class_files.txt +++ /dev/null @@ -1 +0,0 @@ -com/foobar/foo/Foobar.class diff --git a/examples/tests/multidex/com/blafoo/bar/Blafoo.java b/examples/tests/multidex/com/blafoo/bar/Blafoo.java deleted file mode 100644 index de5f6721..00000000 --- a/examples/tests/multidex/com/blafoo/bar/Blafoo.java +++ /dev/null @@ -1,11 +0,0 @@ -package com.blafoo.bar; - -import com.foobar.foo.Foobar; - -public class Blafoo { - - public void othermethod() { - Foobar f = new Foobar(); - f.somemethod("hello world"); - } -} diff --git a/examples/tests/multidex/com/foobar/foo/Foobar.java b/examples/tests/multidex/com/foobar/foo/Foobar.java deleted file mode 100644 index 9455d362..00000000 --- a/examples/tests/multidex/com/foobar/foo/Foobar.java +++ /dev/null @@ -1,8 +0,0 @@ -package com.foobar.foo; -public class Foobar { - - public void somemethod(String x){ - System.out.println(x); - } - -} diff --git a/examples/tests/multidex/multidex.apk b/examples/tests/multidex/multidex.apk deleted file mode 100644 index 03326e25..00000000 Binary files a/examples/tests/multidex/multidex.apk and /dev/null differ diff --git a/examples/tests/okhttp.d8.038.dex b/examples/tests/okhttp.d8.038.dex deleted file mode 100644 index cbf5c042..00000000 Binary files a/examples/tests/okhttp.d8.038.dex and /dev/null differ diff --git a/examples/tests/okhttp.d8.039.dex b/examples/tests/okhttp.d8.039.dex deleted file mode 100644 index edd91be5..00000000 Binary files a/examples/tests/okhttp.d8.039.dex and /dev/null differ diff --git a/examples/tests/okhttp.dx.038.dex b/examples/tests/okhttp.dx.038.dex deleted file mode 100644 index c24a0d08..00000000 Binary files a/examples/tests/okhttp.dx.038.dex and /dev/null differ diff --git a/examples/tests/okhttp.dx.039.dex b/examples/tests/okhttp.dx.039.dex deleted file mode 100644 index b217bdb8..00000000 Binary files a/examples/tests/okhttp.dx.039.dex and /dev/null differ diff --git a/examples/tests/partialsignature.apk b/examples/tests/partialsignature.apk deleted file mode 100644 index 410210b1..00000000 Binary files a/examples/tests/partialsignature.apk and /dev/null differ diff --git a/examples/tests/urzip-πÇÇπÇÇ现代汉语通用字-български-عربي1234.apk b/examples/tests/urzip-πÇÇπÇÇ现代汉语通用字-български-عربي1234.apk deleted file mode 100644 index 0851e066..00000000 Binary files a/examples/tests/urzip-πÇÇπÇÇ现代汉语通用字-български-عربي1234.apk and /dev/null differ diff --git a/generators/README.md b/generators/README.md deleted file mode 100644 index 4d339684..00000000 --- a/generators/README.md +++ /dev/null @@ -1,2 +0,0 @@ -These tools are used to make data useable for androguard, which is stored in -other repositories, locations, formats etc. diff --git a/generators/axplorer_to_androguard.py b/generators/axplorer_to_androguard.py deleted file mode 100644 index b3f50fe9..00000000 --- a/generators/axplorer_to_androguard.py +++ /dev/null @@ -1,159 +0,0 @@ -# Convert the Mappings from axplorer to JSON and convert to the format androguard uses. - -from androguard.core.bytecodes.dvm_types import TYPE_DESCRIPTOR -import os -import sys -import re -from collections import defaultdict -from pprint import pprint -import json -import datetime -from lxml import etree -import time - -# Create a reverse mapping of the TYPE_DESCRIPTORS -R_TYPE_DESCRIPTOR = {v: k for k, v in TYPE_DESCRIPTOR.items()} - - -def name_to_androguard(n): - """ - Convert a object or primitive name into androguard syntax - - For example: - byte --> B - foo.bar.bla --> Lfoo/bar/bla; - [int --> [I - - There is also a special case, where some arrays are specified differently: - B[] --> [B - foo.bar.bla[] --> [Lfoo/bar/bla; - - :param n: - :return: - """ - if n == "": - return "" - is_array = "" - # FIXME what about n-dimensional arrays? - if n.startswith("["): - is_array = "[" - n = n[1:] - elif n.endswith("[]"): - # Another special array type... - # Probably a bug? See - if n[:-2] in TYPE_DESCRIPTOR: - return "[{}".format(n[0]) - else: - n = n[:-2] - is_array = "[" - if n in R_TYPE_DESCRIPTOR: - return "{}{}".format(is_array, R_TYPE_DESCRIPTOR[n]) - else: - # assume class - return "{}L{};".format(is_array, n.replace(".", "/")) - - -def convert_name(s): - """ - Converts a line of axplorer format into androguard method signature + permission - :param s: - :return: - """ - m = re.compile(r"^(.*)\.(.*)\((.*)\)(.*) :: (.*)$") - res = m.search(s) - if res: - clname, methodname, all_args, ret, perm = res.groups() - args = " ".join(map(name_to_androguard, all_args.split(","))) - - clname = name_to_androguard(clname) - ret = name_to_androguard(ret) - - # perm is actually a comma separated list of permissions - return "{}-{}-({}){}".format(clname, methodname, args, ret), perm.split(", ") - else: - raise ValueError("what?") - - -def generate_mappings(axplorerdir="libraries/axplorer", outfolder="androguard/core/api_specific_resources"): - """ - Generate the permission mappings from a axplorer root dir into a given folder. - For each API Level, separate json file will be created. - - :param axplorerdir: path to the axplorer dir - :param outfolder: path to the folder where the resulting json files are put - """ - res = dict() - for root, dirs, files in os.walk(os.path.join(axplorerdir, "permissions")): - for fi in files: - if fi.startswith("cp-map-"): - # We currently do not parse those files - print("ignored {}".format(fi)) - continue - elif fi.startswith("framework-map-") or fi.startswith("sdk-map-"): - sdk_version = fi.rsplit("-", 1)[1][:-4] - print("Found file:", fi, "for API level:", sdk_version) - if sdk_version not in res: - res[sdk_version] = defaultdict(list) - with open(os.path.join(root, fi), "r") as f: - for line in f.read().splitlines(): - meth, perm = convert_name(line) - for p in perm: - res[sdk_version][meth].append(p) - - for api, v in res.items(): - with open(os.path.join(outfolder, "api_permission_mappings", "permissions_{}.json".format(api)), "w") as fp: - json.dump(v, fp, indent=" ") - - # Next, we generate the permission lists, based on the AndroidManifest.xml files. - # Thise files typically reside in the platform_framework_base repository - # in the folder "master/core/res/". This AndroidManifest.xml file contains - # all the permissions that are defined by the android system. - # Of course, there are even more files (platform packages) - # but the question is always, if these should be put into this list as well... - # In this case, we collect all permissions that are extracted by axplorer as well. - res = defaultdict(dict) - XMLNS = '{http://schemas.android.com/apk/res/android}' - - re_api = re.compile(r".*manifests[\\/]api-([0-9]+)") - for root, dirs, files in os.walk(os.path.join(axplorerdir, "manifests")): - for fi in files: - reres = re_api.match(root) - if not reres: - continue - api = int(reres[1]) - p = os.path.join(root, fi) - - with open(p, "rb") as f: - tree = etree.XML(f.read()) - matches = tree.xpath('permission') - - def _get_attrib(elem, attr): - if XMLNS + attr in elem.attrib: - return elem.attrib[XMLNS + attr] - else: - return "" - - for match in matches: - name = match.attrib[XMLNS + "name"] - d = dict(permissionGroup=_get_attrib(match, "permissionGroup"), - description=_get_attrib(match, "description"), - protectionLevel=_get_attrib(match, "protectionLevel"), - label=_get_attrib(match, "label")) - - if name in res[api]: - print("Potential collision of permission in api {}: {}".format(api, name)) - res[api][name] = d - - for api, v in res.items(): - print("Permissions for API: {}, found {} permissions".format(api, len(v))) - with open(os.path.join(outfolder, "aosp_permissions", "permissions_{}.json".format(api)), "w") as fp: - json.dump(v, fp, indent=" ") - - - -if __name__ == "__main__": - if not os.path.isfile(os.path.join("libraries/axplorer", "README.md")): - print("It does not look like the axplorer repo is checked out!", file=sys.stderr) - sys.exit(1) - - generate_mappings() diff --git a/generators/publicattrs_to_androguard.py b/generators/publicattrs_to_androguard.py deleted file mode 100644 index 8aa5566d..00000000 --- a/generators/publicattrs_to_androguard.py +++ /dev/null @@ -1,24 +0,0 @@ -import requests -from lxml import etree -from collections import defaultdict -import json -import os - -# At this URL, there should be the public.xml file -url = "https://raw.githubusercontent.com/aosp-mirror/platform_frameworks_base/master/core/res/res/values/public.xml" - -r = requests.get(url) - -if r.status_code == 200: - res = defaultdict(dict) - tree = etree.fromstring(r.text.encode("UTF-8")) - - for m in tree.xpath('public'): - t = m.attrib['type'] - name = m.attrib['name'] - i = int(m.attrib['id'], 16) - - res[t][name] = i - - with open(os.path.join("androguard", "core", "resources", "public.json"), "w") as fp: - json.dump(res, fp, indent=" ") diff --git a/libraries/README.md b/libraries/README.md deleted file mode 100644 index 43b025cb..00000000 --- a/libraries/README.md +++ /dev/null @@ -1 +0,0 @@ -This folder contains external libraries used within Androguard. diff --git a/libraries/axplorer b/libraries/axplorer deleted file mode 160000 index e36ce54d..00000000 --- a/libraries/axplorer +++ /dev/null @@ -1 +0,0 @@ -Subproject commit e36ce54d6f9cd3604306f55e8d0d91e0c419ca2f diff --git a/androguard/cli/main.py b/main.py similarity index 96% rename from androguard/cli/main.py rename to main.py index edd04132..42c73f24 100644 --- a/androguard/cli/main.py +++ b/main.py @@ -9,8 +9,8 @@ from lxml import etree # internal modules from androguard.core import androconf -from androguard.core.bytecodes import apk -from androguard.core.bytecodes.axml import AXMLPrinter +from androguard.core import apk +from androguard.core.axml import AXMLPrinter from androguard.util import read from pygments import highlight @@ -415,7 +415,7 @@ def androlyze_main(session, filename): def androsign_main(args_apk, args_hash, args_all, show): - from androguard.core.bytecodes.apk import APK + from androguard.core.apk import APK from androguard.util import get_certificate_name_string import hashlib @@ -496,12 +496,13 @@ def androsign_main(args_apk, args_hash, args_all, show): print() -def androdis_main(offset, size, dex): - from androguard.core.bytecodes import dvm +def androdis_main(offset, size, dex_file): + from androguard.core.dex import DEX - with open(dex, "rb") as fp: + with open(dex_file, "rb") as fp: buf = fp.read() - d = dvm.DalvikVMFormat(buf) + + d = DEX(buf) if size == 0 and offset == 0: # Assume you want to just get a disassembly of all classes and methods @@ -514,17 +515,15 @@ def androdis_main(offset, size, dex): print() print() - - if size == 0: - size = len(buf) - - if d: - idx = offset - for nb, i in enumerate(d.disassemble(offset, size)): - print("%-8d(%08x)" % (nb, idx), end=' ') - i.show(idx) - print() - - idx += i.get_length() else: - print("Dex could not be loaded!", file=sys.stderr) + if size == 0: + size = len(buf) + + if d: + idx = offset + for nb, i in enumerate(d.disassemble(offset, size)): + print("%-8d(%08x)" % (nb, idx), end=' ') + i.show(idx) + print() + + idx += i.get_length() \ No newline at end of file diff --git a/setup.py b/setup.py deleted file mode 100644 index 98836f4d..00000000 --- a/setup.py +++ /dev/null @@ -1,106 +0,0 @@ -#!/usr/bin/env python3 -import sys -from androguard import __version__ - -from setuptools import setup, find_packages - - -# We do not support Python <3.5 (lxml and pyqt5 are not supported as well) -# py3.5 does not support format strings -if sys.version_info < (3, 6): - print("Unfortunately, your python version is not supported!\n" - "Please upgrade at least to Python 3.6!", file=sys.stderr) - sys.exit(1) - -with open('requirements.txt', 'r') as fp: - install_requires = fp.read().splitlines() - -# Find the right version for the magic package -if sys.platform in ('darwin', 'win32'): - magic_package = 'python-magic-bin>=0.4.14' -else: - magic_package = 'python-magic>=0.4.15' - - -# TODO add the permission mapping generation at a better place! -# from axplorer_to_androguard import generate_mappings -# generate_mappings() - -setup( - name='androguard', - description='Androguard is a full python tool to play with Android files.', - long_description="""Androguard is a tool and python library to interact with Android Files. - - Usually they come in the form of Android Packages (APK) or Dalvik Executeable (DEX) files. - Androguard has tools to read Android's binary format for XML files (AXML) and is also suited with a decompiler for DEX. - - Androguard might not only be used as a tool for reverse engineering single applications, but features a lot of functions - for automated analysis. It provides a pure python framework to build your own analysis tools. - - If you encounter bugs while using androguard, please feel free to report them in our bugtracker_. - - .. _bugtracker: https://github.com/androguard/androguard/issues - """, - version=__version__, - license="Apache Licence, Version 2.0", - url="https://github.com/androguard/androguard", - download_url="https://github.com/androguard/androguard/releases", - packages=find_packages(), - package_data={ - # add the json files, residing in the api_specific_resources package - "androguard.core.api_specific_resources": ["aosp_permissions/*.json", - "api_permission_mappings/*.json"], - "androguard.core.resources": ["public.xml"], - # Collect also the GUI files this way - "androguard.gui": ["annotation.ui", "search.ui", "androguard.ico"], - }, - entry_points={ - 'console_scripts': [ - # The "master" script, bundles all separate commands - 'androguard = androguard.cli.entry_points:entry_point', - # Providing the same scripts as before - 'androapkid = androguard.cli.entry_points:apkid', - 'androarsc = androguard.cli.entry_points:arsc', - 'androaxml = androguard.cli.entry_points:axml', - 'androcg = androguard.cli.entry_points:cg', - 'androdd = androguard.cli.entry_points:decompile', - 'androdis = androguard.cli.entry_points:disassemble', - 'androgui = androguard.cli.entry_points:gui', - 'androlyze = androguard.cli.entry_points:analyze', - 'androsign = androguard.cli.entry_points:sign', - ] - }, - install_requires=install_requires, - extras_require={ - 'GUI': ['pyperclip', 'PyQt5'], - 'magic': [magic_package], - 'docs': [ - 'sphinx', - 'sphinxcontrib-programoutput>0.8', - 'sphinx_rtd_theme' - ], - 'tests': [ - magic_package, - 'mock>=2.0', - 'nose', - 'codecov', - 'coverage', - 'nose-timer' - ], - }, - setup_requires=['setuptools'], - python_requires='>=3.6', - classifiers=[ - 'License :: OSI Approved :: Apache Software License', - 'Programming Language :: Python', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.6', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3 :: Only', - 'Topic :: Security', - 'Topic :: Software Development', - 'Topic :: Utilities', - ], - -) diff --git a/tools/README.md b/tools/README.md deleted file mode 100644 index 3e412fcf..00000000 --- a/tools/README.md +++ /dev/null @@ -1 +0,0 @@ -Other tools that are useful for androguard. diff --git a/tools/andromark.py b/tools/andromark.py deleted file mode 100644 index a7dca894..00000000 --- a/tools/andromark.py +++ /dev/null @@ -1,62 +0,0 @@ -#!/usr/bin/env python - -# This file is part of Androguard. -# -# Copyright (C) 2015, Tal Melamed -# All rights reserved. -# -# Androguard is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Androguard is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with Androguard. If not, see . - -import os, sys, hashlib - -from optparse import OptionParser -from androguard.core.bytecodes import apk -from androguard.core import androconf - - -option_0 = { 'name' : ('-i', '--input'), 'help' : 'filename input (dex, apk)', 'nargs' : 1 } -options = [option_0] - -def autograph( path ): - app = open(path, 'rb').read() - apk_name = os.path.basename( path ) - print "File: " + apk_name - print "Package :" + apk.APK(path).get_package() - print "MD5 :" + hashlib.md5(app).hexdigest() - print "SHA1: " + hashlib.sha1(app).hexdigest() - print "SHA224: " + hashlib.sha224(app).hexdigest() - print "SHA256: " + hashlib.sha256(app).hexdigest() - print "SHA384: " + hashlib.sha384(app).hexdigest() - print "SHA512: " + hashlib.sha512(app).hexdigest() - -def main(options, arguments) : - if options.input != None : - ret_type = androconf.is_android( options.input ) - if ret_type == "APK" or ret_type == "DEX" : - autograph( options.input ) - else: - print "input file should be apk/dex..." - return 0 - - -if __name__ == "__main__" : - parser = OptionParser() - for option in options : - param = option['name'] - del option['name'] - parser.add_option(*param, **option) - - options, arguments = parser.parse_args() - sys.argv[:] = arguments - main(options, arguments) diff --git a/tools/andrototal.py b/tools/andrototal.py deleted file mode 100644 index ce308e77..00000000 --- a/tools/andrototal.py +++ /dev/null @@ -1,234 +0,0 @@ -#!/usr/bin/env python - -# This file is part of Androguard. -# -# Copyright (C) 2015, Tal Melamed -# All rights reserved. -# -# Androguard is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Androguard is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with Androguard. If not, see . -# -# VT SCAN EULA -# ------------ -# By scanning new file , you consent to virustotal -# Terms of Service (https://www.virustotal.com/en/about/terms-of-service/) -# and allow VirusTotal to share this file with the security community. -# See virustotal Privacy Policy (https://www.virustotal.com/en/about/privacy/) for details. -# - -import sys, os -import hashlib, urllib, urllib2, json -try: - import requests -except: - print '[Warning] request module is missing. requests module is required in order to upload new files for scan.\nYou can install it by running: pip install requests.' - -from optparse import OptionParser -from androguard.core import androconf - -option_0 = { 'name' : ('-f', '--file'), 'help' : 'retreiving file scan report', 'nargs' : 1 } -option_1 = { 'name' : ('-x', '--hash'), 'help' : 'retreiving file scan report by hash [md5/sha1/sha256]', 'nargs' : 1 } -option_2 = { 'name' : ('-s', '--scan'), 'help' : 'sending a file for scan', 'nargs' : 1 } -option_3 = { 'name' : ('-c', '--comment'), 'help' : 'make comments on a file (file/hash, comment)', 'nargs' : 2 } -option_4 = { 'name' : ('-r', '--rescan'), 'help' : 'rescanning already submitted files by hash [md5/sha1/sha256]', 'nargs' : 1 } - -options = [option_0, option_1, option_2, option_3, option_4] - -api_key = '438aa3dbbcc4b451ac75c5bdf71f750bda86ae141ef948a4260ac1e462a71709' -api_url = 'https://www.virustotal.com/vtapi/v2/' -errmsg = 'Something went wrong. Please try again later, or contact us.' -reportfile = "scanreport.html" - -# handles http error codes from vt -def handleHTTPErros( code ): - if code == 404: - print self.errmsg + '\n[Error 404].' - return 0 - elif code == 403: - print 'You do not have permissions to make that call.\nThat should not have happened, please contact us.\n[Error 403].' - return 0 - elif code == 204: - print 'The quota limit has exceeded, please wait and try again soon.\nIf this problem continues, please contact us.\n[Error 204].' - return 0 - else: - print self.errmsg + '\n[Error '+str(code)+']' - return 0 - -def getSelected( options ): - # -f / --file - if options.file != None: - if os.path.isfile(options.file): - ret_type = androconf.is_android( options.file ) - if ret_type == "APK" or ret_type == "DEX" : - return ["file/report", options.file] - else: - print "input file should be apk/dex..." - return None - else: - print "Could not find file..." - return None - - # -x / --hash - elif options.hash != None: - return ["file/report", options.hash] - - # -s / --scan - elif options.scan != None: - if os.path.isfile(options.scan): - ret_type = androconf.is_android( options.scan ) - if ret_type == "APK" or ret_type == "DEX" : - return ["file/scan", options.scan] - else: - print "input file should be apk/dex..." - return None - else: - print "Could not find file..." - return None - - # -c / --comment - elif options.comment != None: - return ["comments/put", options.comment] - - # -r / --rescan - elif options.rescan != None: - return ["file/rescan", options.rescan] - - else: - return None - -# scan files -def doScan( method ): - url = api_url + method[0] - files = {'file': open(method[1], 'rb')} - headers = {"apikey": api_key} - try: - response = requests.post( url, files=files, data=headers ) - xjson = response.json() - response_code = xjson ['response_code'] - verbose_msg = xjson ['verbose_msg'] - if response_code == 1: - print verbose_msg - return xjson - else: - print verbose_msg - - except urllib2.HTTPError, e: - handleHTTPErros(e.code) - except urllib2.URLError, e: - print 'URLError: ' + str(e.reason) - except Exception: - import traceback - print 'generic exception: ' + traceback.format_exc() - -# get report, comment and rescan -def doElse( method ): - url = api_url + method[0] - if method[0] == "comments/put": - parameters = {"resource": method[1][0], "comment": method[1][1], "apikey": api_key} - else: - if os.path.isfile(method[1]): - f = open(method[1], 'rb').read() - method[1] = hashlib.sha256(f).hexdigest() - parameters = {"resource": method[1], "apikey": api_key} - - data = urllib.urlencode(parameters) - req = urllib2.Request(url, data) - try: - response = urllib2.urlopen(req) - xjson = response.read() - getResponse(xjson, method[0]) - - except urllib2.HTTPError, e: - handleHTTPErros(e.code) - except urllib2.URLError, e: - print 'URLError: ' + str(e.reason) - except Exception: - import traceback - print 'generic exception: ' + traceback.format_exc() - -# prints response message according to method -def getResponse( xjson, method ): - response_code = json.loads(xjson).get('response_code') - verbose_msg = json.loads(xjson).get('verbose_msg') - if method == "comments/put": - print verbose_msg - - elif method == "file/report": - if response_code == 1: - printScanResults(xjson) - else: - print verbose_msg - - else: # method == "file/rescan" - if response_code == 1: - print "Resource is now queued for rescan" - else: - print "Could not find resrouce" - -# prints resouce scan results -def printScanResults( xjson ): - avlist = [] - xjson = json.loads(xjson) - scan_date = xjson.get('scan_date') - total = xjson.get('total') - positive = xjson.get('positives') - print "\n------------------------------" - print 'Scan date: ' + scan_date - print 'Detection ratio: ' + str(positive) + "/" + str(total) - print "------------------------------" - scans = xjson.get('scans') - for av in scans.iterkeys(): - res = scans.get(av) - if res.get('detected') == True: - print '+ ' + av + ': ' + res.get('result') + " {" + res.get('version') + "}" - print "------------------------------" - createHTMLReport(xjson) - -# downloads full report to reportfile (default: scanreport.html) -def createHTMLReport( xjson ): - url = xjson.get('permalink') - try: - opener = urllib2.build_opener() - opener.addheaders = [('User-agent', 'Mozilla/5.0')] - res = opener.open(url).read() - html = res.replace('
', ' Exceuted by Tal Melamed [virustotal@appsec.it]
') - f = open(reportfile, "w") - f.write(html) - f.close() - print "For full scan report, open: " + reportfile - except: - pass - - -def main( options, arguments ) : - method = getSelected(options) - if method == None: - print "Use --help for help." - return 0 - # filescan - elif method[0] == "file/scan": - doScan(method) - else: - doElse(method) - -if __name__ == "__main__" : - parser = OptionParser() - for option in options : - param = option['name'] - del option['name'] - parser.add_option(*param, **option) - - options, arguments = parser.parse_args() - sys.argv[:] = arguments - main(options, arguments) - diff --git a/tools/test_androguard_apk_collection.py b/tools/test_androguard_apk_collection.py deleted file mode 100644 index ee0512f9..00000000 --- a/tools/test_androguard_apk_collection.py +++ /dev/null @@ -1,158 +0,0 @@ -from androguard.core.bytecodes.apk import APK -from androguard.core.bytecodes.dvm import DalvikVMFormat -from androguard.core.analysis.analysis import Analysis -from androguard.decompiler.dad.decompile import DvMethod - -import logging -import traceback -import sys -import os - -""" -This is a script to call several functions on APK and DEX files -and run the decompiler on all methods inside the DEX files. - -You just need some folder where you store APK files. -You can also adjust the function samples() by your needs. - -This script will create a logfile in the current directory, -and log all errors regarding those files in there. - -The list of functions to call, can be adjusted as well. -Note that you can currently only call functions that do not -take an argument. - -This script is not intended to be used on CI platforms, -as it can take ages to run! -A single APK takes already several minutes. -""" - -# Adjust those two variables to your own needs: -COLLECTION_PATH = r"G:\testset" -LOG_FILENAME = 'G:\ANDROGUARD_TESTS_BUGS.txt' - -logging.basicConfig(filename=LOG_FILENAME, level=logging.INFO) - - -def samples(): - for root, _, files in os.walk(COLLECTION_PATH): - for f in files: - yield os.path.join(root, f) - - -def main(): - for path in samples(): - print(path) - logging.error("Processing" + path) - - tests_apk = ["is_valid_APK", "get_filename", "get_app_name", "get_app_icon", - "get_package", "get_androidversion_code", "get_androidversion_name", - "get_files", "get_files_types", "get_files_crc32", "get_files_information", - "get_raw", "get_dex", "get_all_dex", "get_main_activity", - "get_activities", "get_services", "get_receivers", "get_providers", - "get_permissions", "get_details_permissions", "get_requested_aosp_permissions", - "get_requested_aosp_permissions_details", "get_requested_third_party_permissions", - "get_declared_permissions", "get_declared_permissions_details", "get_max_sdk_version", - "get_min_sdk_version", "get_target_sdk_version", "get_libraries", "get_android_manifest_axml", - "get_android_manifest_xml", "get_android_resources", "get_signature_name", "get_signature_names", - "get_signature", "get_signatures"] - - tests_dex = ["get_api_version", "get_classes_def_item", "get_methods_id_item", "get_fields_id_item", - "get_codes_item", "get_string_data_item", - "get_debug_info_item", "get_header_item", "get_class_manager", "show", - # "save", # FIXME broken - "get_classes_names", "get_classes", - "get_all_fields", "get_fields", "get_methods", "get_len_methods", - "get_strings", "get_format_type", "create_python_export", - "get_BRANCH_DVM_OPCODES", "get_determineNext", - "get_determineException", "print_classes_hierarchy", - "list_classes_hierarchy", "get_format"] - - try: - # Testing APK - a = APK(path) - for t in tests_apk: - print(t) - x = getattr(a, t) - try: - x() - except Exception as aaa: - print(aaa) - traceback.print_exc() - print(path, aaa, file=sys.stderr) - logging.exception("{} .. {}".format(path, t)) - - - # Testing DEX - dx = Analysis() - for dex in a.get_all_dex(): - d = DalvikVMFormat(dex) - dx.add(d) - - # Test decompilation - for c in d.get_classes(): - for m in c.get_methods(): - mx = dx.get_method(m) - ms = DvMethod(mx) - try: - ms.process(doAST=True) - except Exception as aaa: - print(aaa) - traceback.print_exc() - print(path, aaa, file=sys.stderr) - logging.exception("{} .. {} .. {}".format(path, c.get_name(), m.get_name())) - ms2 = DvMethod(mx) - try: - ms2.process(doAST=False) - except Exception as aaa: - print(aaa) - traceback.print_exc() - print(path, aaa, file=sys.stderr) - logging.exception("{} .. {} .. {}".format(path, c.get_name(), m.get_name())) - - # DEX tests - for t in tests_dex: - print(t) - x = getattr(d, t) - try: - x() - except Exception as aaa: - print(aaa) - traceback.print_exc() - print(path, aaa, file=sys.stderr) - logging.exception("{} .. {}".format(path, t)) - - # Analysis Tests - try: - dx.create_xref() - except Exception as aaa: - print(aaa) - traceback.print_exc() - print(path, aaa, file=sys.stderr) - logging.exception("{} .. {} at Analysis".format(path, t)) - - # MethodAnalysis tests - for m in dx.methods.values(): - for bb in m.get_basic_blocks(): - try: - list(bb.get_instructions()) - except Exception as aaa: - print(aaa) - traceback.print_exc() - print(path, aaa, file=sys.stderr) - logging.exception("{} .. {} at BasicBlock {}".format(path, t, m)) - - except KeyboardInterrupt: - raise - except FileNotFoundError: - pass - except Exception as e: - print(e) - traceback.print_exc() - print(path, e, file=sys.stderr) - logging.exception(path) - -if __name__ == "__main__": - main() - -