Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
J
jadx
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open-source
jadx
Commits
a046f1ca
Commit
a046f1ca
authored
Feb 28, 2018
by
Skylot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
core: ignore dex loading errors (#233)
parent
c25f918c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
2 deletions
+16
-2
InputFile.java
jadx-core/src/main/java/jadx/core/utils/files/InputFile.java
+16
-2
No files found.
jadx-core/src/main/java/jadx/core/utils/files/InputFile.java
View file @
a046f1ca
...
...
@@ -13,6 +13,7 @@ import java.util.zip.ZipFile;
import
com.android.dex.Dex
;
import
org.apache.commons.io.IOUtils
;
import
org.jetbrains.annotations.Nullable
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
...
...
@@ -105,8 +106,11 @@ public class InputFile {
||
entryName
.
endsWith
(
instantRunDexSuffix
))
{
switch
(
ext
)
{
case
".dex"
:
index
++;
addDexFile
(
entryName
,
new
Dex
(
inputStream
));
Dex
dexBuf
=
makeDexBuf
(
entryName
,
inputStream
);
if
(
dexBuf
!=
null
)
{
addDexFile
(
entryName
,
dexBuf
);
index
++;
}
break
;
case
".jar"
:
...
...
@@ -140,6 +144,16 @@ public class InputFile {
return
index
>
0
;
}
@Nullable
private
Dex
makeDexBuf
(
String
entryName
,
InputStream
inputStream
)
{
try
{
return
new
Dex
(
inputStream
);
}
catch
(
Exception
e
)
{
LOG
.
error
(
"Failed to load file: {}, error: {}"
,
entryName
,
e
.
getMessage
(),
e
);
return
null
;
}
}
private
static
Dex
loadFromJar
(
File
jarFile
)
throws
DecodeException
{
JavaToDex
j2d
=
new
JavaToDex
();
try
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment