Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
R
RatelApi
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
ratel
RatelApi
Commits
9ad23731
Commit
9ad23731
authored
Oct 10, 2020
by
Administrator
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bugfix: 脱壳机可能遇到apk组装失败
parent
cdc2191a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
3 deletions
+11
-3
UnPackerToolKit.java
src/main/java/com/virjar/ratel/api/UnPackerToolKit.java
+11
-3
No files found.
src/main/java/com/virjar/ratel/api/UnPackerToolKit.java
View file @
9ad23731
...
...
@@ -12,6 +12,7 @@ import com.virjar.ratel.api.rposed.RposedHelpers;
import
java.io.File
;
import
java.io.FileOutputStream
;
import
java.io.IOException
;
import
java.io.InputStream
;
import
java.lang.reflect.Constructor
;
import
java.lang.reflect.Method
;
import
java.util.Enumeration
;
...
...
@@ -177,8 +178,10 @@ public class UnPackerToolKit {
continue
;
}
zipOutputStream
.
putNextEntry
(
zipEntry
);
IOUtils
.
copy
(
zipFile
.
getInputStream
(
zipEntry
),
zipOutputStream
);
zipOutputStream
.
putNextEntry
(
new
ZipEntry
(
zipEntry
.
getName
()));
try
(
InputStream
inputStream
=
zipFile
.
getInputStream
(
zipEntry
))
{
IOUtils
.
copy
(
inputStream
,
zipOutputStream
);
}
if
(
zipEntry
.
getName
().
startsWith
(
"classes"
))
{
Matcher
matcher
=
classesIndexPattern
.
matcher
(
zipEntry
.
getName
());
...
...
@@ -192,7 +195,12 @@ public class UnPackerToolKit {
}
// append dex
for
(
byte
[]
dexData
:
dumpedDex
)
{
zipOutputStream
.
putNextEntry
(
new
ZipEntry
(
"classes"
+
maxIndex
+
".dex"
));
if
(
dexData
==
null
)
{
continue
;
}
String
classesFileName
=
"classes"
+
maxIndex
+
".dex"
;
Log
.
i
(
TAG_UNPACK
,
"append new dex: "
+
classesFileName
);
zipOutputStream
.
putNextEntry
(
new
ZipEntry
(
classesFileName
));
zipOutputStream
.
write
(
dexData
);
maxIndex
++;
}
...
...
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