Examples of Dex


Examples of com.android.dex.Dex

  }

  private Dex loadDexBuffer() throws IOException, DecodeException {
    String fileName = file.getName();
    if (fileName.endsWith(".dex")) {
      return new Dex(file);
    }
    if (fileName.endsWith(".class")) {
      return loadFromClassFile(file);
    }
    if (fileName.endsWith(".apk")) {
      Dex dex = loadFromZip(file);
      if (dex == null) {
        throw new IOException("File 'classes.dex' not found in file: " + file);
      }
      return dex;
    }
    if (fileName.endsWith(".jar")) {
      // check if jar contains 'classes.dex'
      Dex dex = loadFromZip(file);
      if (dex != null) {
        return dex;
      }
      return loadFromJar(file);
    }
View Full Code Here

Examples of com.android.dex.Dex

      if (ba.length == 0) {
        throw new JadxException(j2d.isError() ? j2d.getDxErrors() : "Empty dx output");
      } else if (j2d.isError()) {
        LOG.warn("dx message: {}", j2d.getDxErrors());
      }
      return new Dex(ba);
    } catch (Throwable e) {
      throw new DecodeException("java class to dex conversion error:\n " + e.getMessage(), e);
    }
  }
View Full Code Here

Examples of com.android.dex.Dex

      if (in != null) {
        in.close();
      }
      zf.close();
    }
    return new Dex(bytesOut.toByteArray());
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.