dex2jar fix

This commit is contained in:
Konloch 2019-04-13 14:44:37 -06:00
parent cbb642d21f
commit 668764d9c0
12 changed files with 4 additions and 35 deletions

Binary file not shown.

View file

@ -1 +0,0 @@
http://opensource.org/licenses/BSD-3-Clause

BIN
libs/d2jar-lib-obf.jar Normal file

Binary file not shown.

Binary file not shown.

View file

@ -1,30 +0,0 @@
/*
* Copyright (c) 1996-2004, Jon Meyer
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
* that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice, this list of conditions
* and the following disclaimer.
*
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
* and the following disclaimer in the documentation and/or other materials provided with the
* distribution.
*
* Neither the name of the Jon Meyer nor the names of its contributors may be used to
* endorse or promote products derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
* PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* Jasmin was written by Jon Meyer, www.cybergrain.com
* The Jasmin website is jasmin.sourceforge.net.
*/

Binary file not shown.

Binary file not shown.

View file

@ -1 +0,0 @@
http://opensource.org/licenses/BSD-3-Clause

View file

@ -35,6 +35,7 @@ public class Dex2Jar {
* @param output the output .jar file * @param output the output .jar file
*/ */
public static synchronized void dex2Jar(File input, File output) { public static synchronized void dex2Jar(File input, File output) {
System.out.println("TEST: " + input.getAbsolutePath()+", " +output.getAbsolutePath());
try { try {
com.googlecode.dex2jar.tools.Dex2jarCmd.main(new String[]{input.getAbsolutePath()}); com.googlecode.dex2jar.tools.Dex2jarCmd.main(new String[]{input.getAbsolutePath()});
String realOutput = input.getName().replaceAll("\\.dex", "-dex2jar.jar").replaceAll("\\.apk", "-dex2jar.jar"); String realOutput = input.getName().replaceAll("\\.dex", "-dex2jar.jar").replaceAll("\\.apk", "-dex2jar.jar");
@ -56,7 +57,7 @@ public class Dex2Jar {
*/ */
public static synchronized void saveAsDex(File input, File output) { public static synchronized void saveAsDex(File input, File output) {
try { try {
com.googlecode.dex2jar.tools.Jar2Dex.main(new String[]{input.getAbsolutePath()}); com.googlecode.dex2jar.tools.Dex2jarCmd.main(new String[]{input.getAbsolutePath()});
String realOutput = input.getName().replaceAll("\\.jar", "-jar2dex.dex"); String realOutput = input.getName().replaceAll("\\.jar", "-jar2dex.dex");
File realOutputF = new File(realOutput); File realOutputF = new File(realOutput);
realOutputF.renameTo(output); realOutputF.renameTo(output);

View file

@ -55,7 +55,7 @@ public class SmaliAssembler extends Compiler {
} }
try { try {
org.jf.smali.main.main(new String[]{tempSmaliFolder.getAbsolutePath(), "-o", tempDex.getAbsolutePath()}); com.googlecode.d2j.smali.SmaliCmd.main(new String[]{tempSmaliFolder.getAbsolutePath(), "-o", tempDex.getAbsolutePath()});
} catch (Exception e) { } catch (Exception e) {
new the.bytecode.club.bytecodeviewer.api.ExceptionUI(e); new the.bytecode.club.bytecodeviewer.api.ExceptionUI(e);
} }

View file

@ -65,7 +65,7 @@ public class SmaliDisassembler extends Decompiler {
Dex2Jar.saveAsDex(tempZip, tempDex); Dex2Jar.saveAsDex(tempZip, tempDex);
try { try {
org.jf.baksmali.main.main(new String[]{"-o", tempSmali.getAbsolutePath(), "-x", tempDex.getAbsolutePath()}); com.googlecode.d2j.smali.SmaliCmd.main(new String[]{"-o", tempSmali.getAbsolutePath(), "-x", tempDex.getAbsolutePath()});
} catch (Exception e) { } catch (Exception e) {
new the.bytecode.club.bytecodeviewer.api.ExceptionUI(e); new the.bytecode.club.bytecodeviewer.api.ExceptionUI(e);
} }