-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
支持dex反编译,原生已经支持apk伪加密包,不再处理.修复带-o参数,目录并存在的情况下无-f参数,异常信息错误问题
- Loading branch information
1 parent
081c8a0
commit 888db37
Showing
8 changed files
with
47 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
dependencies { | ||
compile project(':brut.apktool:apktool-cli') | ||
|
||
testCompile group: 'junit', name: 'junit', version: '4.+' | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,23 @@ | ||
package com.rover12421.ApkTest; | ||
|
||
import brut.apktool.Main; | ||
|
||
|
||
public class Test { | ||
public static void main(String[] args) { | ||
public static void main(String[] args) throws Exception { | ||
System.out.println("APK-Test Project"); | ||
|
||
String path = "TestFile/"; | ||
|
||
//dex file test | ||
String input = path + "test.dex"; | ||
String output = path + "test.dex_out"; | ||
// Main.main(new String[]{"d", input, "-o", output}); | ||
|
||
//伪加密测试 | ||
input = path + "jiamiFlag.apk"; | ||
output = path + "jiamiFlag_out"; | ||
Main.main(new String[]{"d", input, "-f", "-o", output}); | ||
|
||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,6 +16,16 @@ | |
|
||
package brut.androlib; | ||
|
||
import java.io.File; | ||
import java.io.IOException; | ||
import java.util.Arrays; | ||
import java.util.LinkedHashMap; | ||
import java.util.Map; | ||
import java.util.Set; | ||
import java.util.zip.ZipEntry; | ||
|
||
import org.apache.commons.compress.archivers.zip.ZipArchiveEntry; | ||
|
||
import brut.androlib.err.InFileNotFoundException; | ||
import brut.androlib.err.OutDirExistsException; | ||
import brut.androlib.res.AndrolibResources; | ||
|
@@ -26,12 +36,6 @@ | |
import brut.directory.DirectoryException; | ||
import brut.directory.ZipExtFile; | ||
import brut.util.OS; | ||
import org.apache.commons.compress.archivers.zip.ZipArchiveEntry; | ||
|
||
import java.io.File; | ||
import java.io.IOException; | ||
import java.util.*; | ||
import java.util.zip.ZipEntry; | ||
|
||
/** | ||
* @author Ryszard Wiśniewski <[email protected]> | ||
|
@@ -80,6 +84,11 @@ public void decode() throws AndrolibException, IOException { | |
throw new AndrolibException(ex); | ||
} | ||
outDir.mkdirs(); | ||
|
||
if (mApkFile.getAbsolutePath().endsWith(".dex")) { | ||
mAndrolib.decodeSourcesSmali(mApkFile, outDir, mDebug, mDebugLinePrefix, mBakDeb); | ||
return; | ||
} | ||
|
||
if (hasSources()) { | ||
switch (mDecodeSources) { | ||
|