Package soot.dexpler

Class DexFileProvider


  • public class DexFileProvider
    extends Object
    Class providing dex files from a given source, e.g., jar, apk, dex, folder containing multiple dex files
    Author:
    Manuel Benz created on 16.10.17
    • Method Detail

      • getDexFromSource

        public List<DexFileProvider.DexContainer<? extends org.jf.dexlib2.iface.DexFile>> getDexFromSource​(File dexSource)
                                                                                                    throws IOException
        Returns all dex files found in dex source sorted by the default dex prioritizer
        Parameters:
        dexSource - Path to a jar, apk, dex, odex or a directory containing multiple dex files
        Returns:
        List of dex files derived from source
        Throws:
        IOException
      • getDexFromSource

        public List<DexFileProvider.DexContainer<? extends org.jf.dexlib2.iface.DexFile>> getDexFromSource​(File dexSource,
                                                                                                           Comparator<DexFileProvider.DexContainer<? extends org.jf.dexlib2.iface.DexFile>> prioritizer)
                                                                                                    throws IOException
        Returns all dex files found in dex source sorted by the default dex prioritizer
        Parameters:
        dexSource - Path to a jar, apk, dex, odex or a directory containing multiple dex files
        prioritizer - A comparator that defines the ordering of dex files in the result list
        Returns:
        List of dex files derived from source
        Throws:
        IOException
      • getDexFromSource

        public DexFileProvider.DexContainer<? extends org.jf.dexlib2.iface.DexFile> getDexFromSource​(File dexSource,
                                                                                                     String dexName)
                                                                                              throws IOException
        Returns the first dex file with the given name found in the given dex source
        Parameters:
        dexSource - Path to a jar, apk, dex, odex or a directory containing multiple dex files
        Returns:
        Dex file with given name in dex source
        Throws:
        CompilationDeathException - If no dex file with the given name exists
        IOException
      • acceptFile

        protected boolean acceptFile​(org.jf.dexlib2.iface.MultiDexContainer.DexEntry<? extends org.jf.dexlib2.iface.DexFile> entry)