diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..a4460729bb4ff35bc07d7b4b5206e2aa8acbbb42 Binary files /dev/null and b/.DS_Store differ diff --git a/README.md b/README.md index 0a72b4fe21c8d9ae07e11f9d89e1b75d445c84b3..7274c58f261ce635c2378484a9c1d3342a09c48a 100644 --- a/README.md +++ b/README.md @@ -12,8 +12,6 @@ Command line and GUI tools for produce Java source code from Android Dex and Apk ![jadx-gui screenshot](http://skylot.github.io/jadx/jadx-gui.png) -### add by qi -add: check file's type by file header ### Downloads - [unstable](https://drone.io/github.com/skylot/jadx/files) diff --git a/jadx-core/src/main/java/jadx/core/utils/files/FileUtils.java b/jadx-core/src/main/java/jadx/core/utils/files/FileUtils.java index 1a4e16e777e5494f79acbda8e4a92a59cc71a0ff..09c8536c09e42cc0eacfa2bc4a255b6828e19c94 100644 --- a/jadx-core/src/main/java/jadx/core/utils/files/FileUtils.java +++ b/jadx-core/src/main/java/jadx/core/utils/files/FileUtils.java @@ -106,7 +106,6 @@ public class FileUtils { return file; } - //add by qi public static String bytesToHex(byte[] bytes) { char[] hexArray = "0123456789abcdef".toCharArray(); if (bytes == null || bytes.length <= 0) { @@ -121,7 +120,6 @@ public class FileUtils { return new String(hexChars); } - //add by qi public static boolean isZipfile(File file) { boolean isZipfile = false; InputStream is = null; @@ -149,7 +147,6 @@ public class FileUtils { return isZipfile; } - //add by qi public static List getZipfileList(File file) { List filelist = new ArrayList(); ZipFile zipFile = null; @@ -170,7 +167,6 @@ public class FileUtils { return filelist; } - //add by qi public static boolean isApkfile(File file) { boolean isApkfile = false; if (isZipfile(file)) { @@ -182,7 +178,6 @@ public class FileUtils { return isApkfile; } - //add by qi public static boolean isZipDexfile(File file) { boolean isZipDexFile = false; if (isZipfile(file)) { diff --git a/jadx-core/src/main/java/jadx/core/utils/files/InputFile.java b/jadx-core/src/main/java/jadx/core/utils/files/InputFile.java index c2b0fc2edb05864a1bfd893a55a5c646ecd06216..bb32bab4736dd6117764bb7c716d2632b46f021c 100644 --- a/jadx-core/src/main/java/jadx/core/utils/files/InputFile.java +++ b/jadx-core/src/main/java/jadx/core/utils/files/InputFile.java @@ -54,7 +54,7 @@ public class InputFile { addDexFile(loadFromClassFile(file)); return; } - //modifed by qi:add isApkfile() and isZipdexfile() + if (fileName.endsWith(".apk") || fileName.endsWith(".zip") || isApkfile(file) || isZipDexfile(file)) { loadFromZip(".dex"); return;