Merge pull request #344 from ThexXTURBOXx/dex2jar

Dex2jar fixes
This commit is contained in:
Konloch 2021-08-12 05:15:49 -07:00 committed by GitHub
commit e4543ea817
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
46 changed files with 75 additions and 68 deletions

View file

@ -19,7 +19,7 @@ Some dependencies may have been modified or could be released by their author in
#### Modifications
- `JD-GUI`: Removed ASM and RSyntaxTextArea
- `JD-GUI`: Removed ASM, RSyntaxTextArea, ANTLR, and TreeLayout
- `APKTool`: Recompiled with the newest dependency versions, removed prebuilt folder
- `DX`: Just taken from build-tools without modifications
- `D2Jar`: Compiled from scratch
- `dx`: Just taken from build-tools without modifications
- `Dex2Jar`: Compiled from scratch ([This fork](https://github.com/ThexXTURBOXx/dex2jar)); download the `all` artifact from [GitHub actions](https://github.com/ThexXTURBOXx/dex2jar/actions)

View file

@ -1 +0,0 @@
27ccd6872887a6fa467c9f773f9fd218

View file

@ -1 +0,0 @@
ee70c208b9469e07dff48294d37ca4dfd009216c

View file

@ -1,8 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>com.android</groupId>
<artifactId>dx</artifactId>
<version>30.0.3</version>
</project>

View file

@ -1 +0,0 @@
1c8d965abdb64d5e7869fe7abd0f8f16

View file

@ -1 +0,0 @@
e0c4f44b6eff749939e1cd6f2d2aa5ba2d9281d7

View file

@ -1,12 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<metadata>
<groupId>com.android</groupId>
<artifactId>dx</artifactId>
<versioning>
<release>30.0.3</release>
<versions>
<version>30.0.3</version>
</versions>
<lastUpdated>20210809171340</lastUpdated>
</versioning>
</metadata>

View file

@ -1 +0,0 @@
9fc6457b2aaaca1869f9e0f1aab372d4

View file

@ -1 +0,0 @@
5e542c95e397f2b4c3f2b150360e39aa519f0863

View file

@ -1 +0,0 @@
81084e179c8ac7f9638de6fb749f1a0e

View file

@ -1 +0,0 @@
a517e7a01c6d60dab4ea1645504c9ed9887a9190

View file

@ -1 +0,0 @@
c2145a55e8a96475489adebd58ea4968

View file

@ -1 +0,0 @@
e45f03179f6fc5a3becb4eda787c34fae28f93e5

View file

@ -0,0 +1 @@
470df084337b7ef8e5fd9ada8359973d

View file

@ -0,0 +1 @@
8c993a8b2dd652532c11b57d917e49c8d33efa45

View file

@ -4,5 +4,5 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.googlecode</groupId>
<artifactId>D2Jar-obf</artifactId>
<version>1.0bcv</version>
<version>2.1v19</version>
</project>

View file

@ -0,0 +1 @@
a738eb686cce7603fda0d7225d911bbb

View file

@ -0,0 +1 @@
d65e7ca6e8c1db7e923e9520f08a2c88b654ff11

View file

@ -3,10 +3,10 @@
<groupId>com.googlecode</groupId>
<artifactId>D2Jar-obf</artifactId>
<versioning>
<release>1.0bcv</release>
<release>2.1v19</release>
<versions>
<version>1.0bcv</version>
<version>2.1v19</version>
</versions>
<lastUpdated>20210809231039</lastUpdated>
<lastUpdated>20210812114713</lastUpdated>
</versioning>
</metadata>

View file

@ -1 +1 @@
d54ac62e2043b2db34f2fcaad089de7c
5e0be1e48a1190b21b4514f83a1a2167

View file

@ -1 +1 @@
51083035146a191d5a37266136f5a19a3b2d78c9
4c3d40803e18e8b752368e2140a4e61a570b09f6

View file

@ -1 +0,0 @@
65e4fe5688630ec32c2c78d9e5c30e74

View file

@ -1 +0,0 @@
dcb766ec3af6a0d2af5deb8aa5200552c3e47422

View file

@ -1 +0,0 @@
045d93571840130425280acf44d0b1c4

View file

@ -1 +0,0 @@
e02d9bcadc36628f908f5c5cc7dbb73593a6e5e2

View file

@ -1 +0,0 @@
69423fd3d1b2f3a0ceef4fd7410c1c37

View file

@ -1 +0,0 @@
06ba4857ceb9120126431234133b607486389758

View file

@ -0,0 +1 @@
27038a07a27a96680c00ce9bc2e7ecf9

View file

@ -0,0 +1 @@
d2e0687046e7e343b1150f23976c718b8f05d017

View file

@ -2,7 +2,7 @@
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>com.jd</groupId>
<groupId>org.jd</groupId>
<artifactId>jd-gui</artifactId>
<version>1.6.6bcv</version>
</project>

View file

@ -0,0 +1 @@
746c99600f2e54d10b6edadf901583ae

View file

@ -0,0 +1 @@
a66b8df4397ea3f2985e811de4f1a6b06d2899b6

View file

@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<metadata>
<groupId>com.jd</groupId>
<groupId>org.jd</groupId>
<artifactId>jd-gui</artifactId>
<versioning>
<release>1.6.6bcv</release>
<versions>
<version>1.6.6bcv</version>
</versions>
<lastUpdated>20210622184950</lastUpdated>
<lastUpdated>20210810090109</lastUpdated>
</versioning>
</metadata>

View file

@ -0,0 +1 @@
3bacc3a2d75ec55b4a342685c525a242

View file

@ -0,0 +1 @@
7ccb5c6496569cac765190873996c27dc28361f0

29
pom.xml
View file

@ -107,7 +107,7 @@
<dependency>
<groupId>org.jboss.windup.decompiler</groupId>
<artifactId>decompiler-fernflower</artifactId>
<version>5.1.4.Final</version>
<version>5.2.0.Final</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
@ -130,7 +130,7 @@
<version>3.1.6</version>
</dependency>
<dependency>
<groupId>com.jd</groupId>
<groupId>org.jd</groupId>
<artifactId>jd-gui</artifactId>
<version>1.6.6bcv</version>
</dependency>
@ -209,15 +209,10 @@
<artifactId>JADX-Android</artifactId>
<version>5.1bcv</version>
</dependency>
<dependency>
<groupId>com.android</groupId>
<artifactId>dx</artifactId>
<version>30.0.3</version>
</dependency>
<dependency>
<groupId>com.googlecode</groupId>
<artifactId>D2Jar-obf</artifactId>
<version>1.0bcv</version>
<version>2.1v19</version>
</dependency>
<dependency>
<groupId>com.github.weisj</groupId>
@ -239,6 +234,22 @@
<artifactId>semantic-version</artifactId>
<version>2.1.0</version>
</dependency>
<dependency>
<groupId>org.abego.treelayout</groupId>
<artifactId>org.abego.treelayout.core</artifactId>
<version>1.0.3</version>
</dependency>
<dependency>
<groupId>org.antlr</groupId>
<artifactId>antlr4</artifactId>
<version>4.9.2</version>
<exclusions>
<exclusion>
<groupId>com.ibm.icu</groupId>
<artifactId>icu4j</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- TODO Re-add for Graal.JS support -->
<!--<dependency>
@ -312,4 +323,4 @@
</plugins>
</build>
</project>
</project>

View file

@ -163,7 +163,7 @@ public class SettingsSerializer
save("deprecated");
save("deprecated");
save("deprecated");
save(BytecodeViewer.viewer.fontSpinner.getValue());
save(BytecodeViewer.viewer.getFontSize());
save(Configuration.deleteForeignLibraries);
if (BytecodeViewer.viewer.apkConversionGroup.isSelected(BytecodeViewer.viewer.apkConversionDex.getModel()))
@ -200,6 +200,7 @@ public class SettingsSerializer
save(Configuration.lastPluginDirectory);
save(Configuration.python2Extra);
save(Configuration.python3Extra);
save(BytecodeViewer.viewer.getMinSdkVersion());
} catch (Exception e) {
BytecodeViewer.handleException(e);
}
@ -396,6 +397,7 @@ public class SettingsSerializer
Configuration.lastPluginDirectory = asString(138);
Configuration.python2Extra = asBoolean(139);
Configuration.python3Extra = asBoolean(140);
BytecodeViewer.viewer.minSdkVersionSpinner.setValue(asInt(141));
}
catch (IndexOutOfBoundsException e)
{
@ -426,4 +428,4 @@ public class SettingsSerializer
{
return Integer.parseInt(DiskReader.loadString(settingsName, lineNumber, false));
}
}
}

View file

@ -266,7 +266,11 @@ public class MainViewerGUI extends JFrame
public final JCheckBoxMenuItem recoveryTypehInts = new TranslatedJCheckBoxMenuItem("Recover Type Hints", TranslatedComponents.RECOVER_TYPE__HINTS);
public final JCheckBoxMenuItem forceTurningIFs = new TranslatedJCheckBoxMenuItem("Force Returning IFs", TranslatedComponents.FORCE_RETURNING_IFS);
public final JCheckBoxMenuItem forLoopAGGCapture = new TranslatedJCheckBoxMenuItem("For Loop AGG Capture", TranslatedComponents.FOR_LOOP_AGG_CAPTURE);
//Smali/D2Jar
public final JMenu minSdkVersionMenu = new TranslatedJMenu("Minimum SDK version", TranslatedComponents.MIN_SDK_VERSION);
public final JSpinner minSdkVersionSpinner = new JSpinner();
//obfuscation
public final JMenu obfuscate = new JMenu("Obfuscate");
public final JMenuItem renameFields = new JMenuItem("Rename Fields");
@ -611,6 +615,13 @@ public class MainViewerGUI extends JFrame
bytecodeDecompilerSettingsSecondaryMenu.add(appendBracketsToLabels);
bytecodeDecompilerSettingsDialog = new SettingsDialog(bytecodeDecompilerSettingsSecondaryMenu, new JPanel());
bytecodeDecompilerSettings.addActionListener((e)-> bytecodeDecompilerSettingsDialog.showDialog());
//Smali minSdkVersion
minSdkVersionSpinner.setPreferredSize(new Dimension(60, 24));
minSdkVersionSpinner.setMinimumSize(new Dimension(60, 24));
minSdkVersionSpinner.setModel(new SpinnerNumberModel(26, 1, null, 1));
minSdkVersionMenu.add(minSdkVersionSpinner);
settingsMainMenu.add(minSdkVersionMenu);
deleteForeignOutdatedLibs.addActionListener(arg0 -> showForeignLibraryWarning());
forcePureAsciiAsText.addActionListener(arg0 -> SettingsSerializer.saveSettingsAsync());
@ -798,6 +809,11 @@ public class MainViewerGUI extends JFrame
{
return (int) fontSpinner.getValue();
}
public int getMinSdkVersion()
{
return (int) minSdkVersionSpinner.getValue();
}
public synchronized void clearBusyStatus()
{
@ -968,4 +984,4 @@ public class MainViewerGUI extends JFrame
}
public static final long serialVersionUID = 1851409230530948543L;
}
}

View file

@ -250,6 +250,7 @@ public enum TranslatedComponents
DESC,
RESULTS,
REFRESH,
MIN_SDK_VERSION,
;
@ -265,4 +266,4 @@ public enum TranslatedComponents
{
return componentReference;
}
}
}

View file

@ -1,9 +1,8 @@
package the.bytecode.club.bytecodeviewer.util;
import com.googlecode.d2j.dex.Dex2jar;
import the.bytecode.club.bytecodeviewer.BytecodeViewer;
import java.io.File;
import the.bytecode.club.bytecodeviewer.BytecodeViewer;
/***************************************************************************
* Bytecode Viewer (BCV) - Java & Android Reverse Engineering Suite *
@ -60,7 +59,9 @@ public class Dex2Jar {
public static synchronized void saveAsDex(File input, File output, boolean delete) {
try {
com.googlecode.dex2jar.tools.Jar2Dex.main(input.getAbsolutePath(), "-o", output.getAbsolutePath());
com.googlecode.dex2jar.tools.Jar2Dex.main(input.getAbsolutePath(),
"-o", output.getAbsolutePath(),
"-s", BytecodeViewer.viewer.getMinSdkVersion() + "");
if (delete)
input.delete();
} catch (Exception e) {

View file

@ -279,5 +279,6 @@
"SAVE": "Save...",
"SAVE_AS": "Save As...",
"RESULTS": "Results",
"REFRESH": "Refresh"
}
"REFRESH": "Refresh",
"MIN_SDK_VERSION": "Minimum SDK version"
}

View file

@ -254,5 +254,6 @@
"CLOSE_ALL_BUT_THIS": "Alle außer diesen schließen",
"CLOSE_TAB": "Tab schließen",
"PLEASE_SEND_THIS_ERROR_LOG_TO": "Bitte senden Sie dieses Fehlerprotokoll an",
"PLEASE_SEND_RESOURCES": "Wenn Sie entsprechende gesetzliche Rechte an der jeweiligen Klasse besitzen"
"PLEASE_SEND_RESOURCES": "Wenn Sie entsprechende gesetzliche Rechte an der jeweiligen Klasse besitzen",
"MIN_SDK_VERSION": "Minimale SDK-Version"
}