Commit Graph

235 Commits

Author SHA1 Message Date
Nico Mexis
9510b74dca Workaround for #25 2023-10-03 19:43:10 +08:00
Bob Pan
476e64c6e9
remove hidden access flags (#600)
* remove hidden access flags

cherry-pick f6dc51e578

* move removeHiddenAccess to Dex2Asm
2023-09-01 20:09:35 +08:00
Bob Pan
5f70fefdc0
bring back asm bridge (#601)
* revert AsmBridge

* Update dependencies

* Apply miscellaneous fixes

* Reformat code

* Reformat

* Reformat code based on CheckStyle

* clean up

---------

Co-authored-by: Nico Mexis <nico.mexis@kabelmail.de>
2023-09-01 19:50:47 +08:00
Nico Mexis
a3f93f5e2c Apply miscellaneous fixes
Most of these are from some fork

# Conflicts:
#	build.gradle
#	d2j-j6/build.gradle
#	d2j-jasmin/build.gradle
#	d2j-smali/build.gradle
#	d2j-smali/src/test/java/a/SmaliTest.java
#	dex-reader-api/src/main/java/com/googlecode/d2j/DexConstants.java
#	dex-reader/build.gradle
#	dex-reader/src/main/java/com/googlecode/d2j/reader/DexFileReader.java
#	dex-tools/build.gradle
#	dex-tools/src/main/java/com/googlecode/d2j/tools/jar/InitOut.java
#	dex-tools/src/main/java/com/googlecode/d2j/tools/jar/InvocationWeaver.java
#	dex-translator/build.gradle
#	dex-translator/src/main/java/com/googlecode/d2j/dex/Dex2Asm.java
#	dex-translator/src/main/java/org/objectweb/asm/AsmBridge.java
#	gradle/wrapper/gradle-wrapper.properties
2023-09-01 14:02:38 +08:00
Bob Pan
2dd92907c5
Fix issues with J2IRConverter (#595)
* Fix issues with J2IRConverter

cherry-pick 09273cdb36

---------

Co-authored-by: Nico Mexis <nico.mexis@kabelmail.de>
2023-08-31 20:39:34 +08:00
Wei He
9f5c16537e fix typos of hex strings decoding 2023-08-31 18:35:56 +08:00
Mike Anderson
e9e05f8936 Extract Hex class resource logic to a separate method (#20)
* feat: Extract Hex class resource logic to a separate method

Sorry for the weird commit message, I couldn't find a way to word it better. Anyways..

This commit extracts the `getResourceAsStream` call to a separate, protected method so it can be overrided, and we can provide the Hex class from a different source.

* fix: Check if Hex class stream is null
2023-08-31 18:34:46 +08:00
Nico Mexis
f3fc040a09 Finally fix handling of large arrays
# Conflicts:
#	dex-translator/src/main/java/com/googlecode/d2j/dex/Dex2Asm.java
2023-08-31 18:33:38 +08:00
Nico Mexis
6a798f7518 Improve handling of large arrays
# Conflicts:
#	dex-translator/src/main/java/com/googlecode/d2j/dex/Dex2Asm.java
2023-08-31 18:31:19 +08:00
Bob Pan
0862aaeb39 support dex 038 2023-08-31 18:17:43 +08:00
Bob Pan
aebd9ebd05 support dex 039 and 040 2023-08-31 12:54:53 +08:00
Bob Pan
8363e21e2b upgrade to dx-30.0.2.jar 2023-08-31 11:27:55 +08:00
Bob Pan
17ae98fe74
Update ASM to 9.5, drop AsmBridge (#591)
* Update ASM to 9.5, drop AsmBridge

asm may introduce incompatible between versions, the `api` pass to ClassVisitor() is for compatible.
i believe keep the `api` separately is better than global constant. as we can upgrade asm without touching/review all dex2jar codes.

AsmBridge is a tricky to 'Method Code too large', drop it.

cherry-pick 600f04ade3 from https://github.com/ThexXTURBOXx/dex2jar

* upgrade to new asm api

---------

Co-authored-by: Nico Mexis <nico.mexis@kabelmail.de>
2023-08-30 21:25:55 +08:00
Bob Pan
e938cf0b65 clean up before TypeTransformer
https://github.com/pxb1988/dex2jar/issues/477
2021-11-03 17:28:24 +08:00
Bob Pan
e9a3ab06e2 check signature before pass to visitor
if signature is invalid, pass null to visitor.
class,method,field signature are checked

this patch revert commit 5e4c90f715

fixes https://github.com/pxb1988/dex2jar/issues/455
2021-10-31 21:45:14 +08:00
Nico Mexis
441d045797 Fix grammar & typo 2021-10-31 02:33:21 +08:00
Nico Mexis
5e4c90f715 Add workaround for invalid signatures
cherry-pick from

f1da047322
2021-10-31 01:55:07 +08:00
Bob Pan
62eba635fd
fix Method code to large (#513)
* fix Method code to large

* format
2021-10-31 01:15:29 +08:00
Bob Pan
80a81b317f the exception handler is dead cause NPE in unssa
fix https://github.com/pxb1988/dex2jar/issues/477
2021-10-30 18:47:53 +08:00
Bob Pan
f028437d46 also parse method is summary.txt
https://github.com/pxb1988/dex2jar/issues/495
2021-10-30 16:58:01 +08:00
Bob Pan
8fb7843370 add test case for https://github.com/pxb1988/dex2jar/issues/501 2021-10-30 16:00:22 +08:00
Bob Pan
fa30b84cd3 fix https://github.com/pxb1988/dex2jar/issues/501 2021-10-30 15:56:20 +08:00
Bob Pan
7da8850a0f https://github.com/pxb1988/dex2jar/issues/500 2021-10-30 14:43:23 +08:00
Bob Pan
00e9d9e6b7 auto test d2j-error-zips/*-error.zip 2021-10-30 00:33:25 +08:00
陈艺玲
e39b41f8e5 fix issue #207 2019-12-05 10:18:23 +08:00
Bob Pan
d7a86110ba fix crash on pattern empty-try-catch-with-goto-head 2019-09-05 15:21:28 +08:00
Bob Pan
9cfc8ba805 support method handle of type INVOKE_CONSTRUCTOR/INVOKE_DIRECT/INVOKE_INTERFACE 2018-09-05 17:23:07 +08:00
Bob Pan
b5771406a9 translate DEX_037 to V1_8
fix https://github.com/pxb1988/dex2jar/issues/194
2018-07-04 20:13:22 +08:00
Bob Pan
f5855ebfcb fix test fail 2018-06-14 13:51:42 +08:00
Bob Pan
6e085153cf insert a Nop between two LabelStmt if both have phis
fixes https://github.com/pxb1988/dex2jar/issues/186
2018-06-06 17:49:28 +08:00
Bob Pan
85b1b3b8dd [dex038] write class version 1.7 if dex version > DEX_037 2018-06-06 11:48:28 +08:00
Bob Pan
b006a5c9ca find test file by resource 2018-06-06 11:12:53 +08:00
Bob Pan
ffd6e395b8 fix build error 2018-04-02 18:19:23 +08:00
Bob Pan
24b0643dd5 remove maven pom.xml 2018-04-02 16:44:36 +08:00
Bob Pan
ac1f325f43 add test case for method code too large 2018-04-02 11:26:29 +08:00
Bob Pan
90f8d1eb80 null safe in LambadaNameSafeClassAdapter 2018-04-02 10:37:32 +08:00
Bob Pan
5a2f61965c fix search for smalis on ideaj 2018-03-27 11:40:08 +08:00
Bob Pan
1238d14b14 skip exception 2018-03-21 12:08:35 +08:00
Bob Pan
1d515072d5 handle InvokePolymorphicExpr as java8 style 2017-08-02 16:33:14 +08:00
Bob Pan
bac5d542a6 support translate INVOKE_POLYMORPHIC 2017-07-26 02:04:15 +08:00
Bob Pan
6b08884da9 'dex 038' support 2017-07-16 00:28:05 +08:00
Bob Pan
14ecdee422 [type] merge all array values
fix https://github.com/pxb1988/dex2jar/issues/101
2017-01-18 13:27:48 +08:00
Bob Pan
5eebfbc642 fix type descriptor 2017-01-17 17:03:55 +08:00
Bob Pan
0d48e49275 fix type detect on arrays
fix https://github.com/pxb1988/dex2jar/issues/28
2016-03-04 19:55:13 +08:00
Bob Pan
a6298932f8 prevent endless loop on enclosingClass
apply patch from ChaeHoon Lim, with modification
2016-01-07 19:31:39 +08:00
Bob Pan
a21374153a Fix issue 1 on bitbucket
https://bitbucket.org/pxb1988/dex2jar/issues/1/javalangruntimeexception-can-not-merge-i
return int when merge int and boolean
2016-01-06 12:58:00 +08:00
Bob Pan
afdf5959bb Fix issue 5 on bitbucket
https://bitbucket.org/pxb1988/dex2jar/issues/5/there-are-2-methods-fail-to-translate

implement getOpcode for customize type descriptor
2016-01-06 11:19:30 +08:00
Bob Pan
83ea8a24dc Merge
--HG--
branch : 2.x
2015-12-03 10:22:31 +08:00
Bob Pan
09824bbb94 fix compile error with dx-23.0.0
--HG--
branch : 2.x
2015-12-02 22:42:55 +08:00
Bob Pan
60599ef4e4 fix crash on negative arraysize, https://bitbucket.org/pxb1988/dex2jar/issues/2/decompiler-error
--HG--
branch : 2.x
2015-12-02 21:57:03 +08:00