Commit Graph

616 Commits

Author SHA1 Message Date
Nico Mexis
cc9861bbd4 Fix bug Nico found randomly
cherry-pick f90e6bf77f
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
Bob Pan
d90f4ef65d
Merge pull request #598 from pxb1988/apply-misc-fixes
Apply miscellaneous fixes
2023-09-01 14:12:00 +08:00
Bob Pan
ee63470357
update antlr to 4.9.3 (#599)
Co-authored-by: Nico Mexis <nico.mexis@kabelmail.de>
2023-09-01 14:08:25 +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
Nico Mexis
7fafa42fa6 Add serialVersionUIDs
# Conflicts:
#	dex-reader/src/main/java/com/googlecode/d2j/reader/DexFileReader.java
2023-09-01 12:21:22 +08:00
Bob Pan
d66af7dc8e
update github actions (#597)
* Update GitHub Actions


---------

Co-authored-by: Nico Mexis <nico.mexis@kabelmail.de>
2023-08-31 21:20:00 +08:00
Bob Pan
482af4a26f
typo similar with ffa0574dff (#596) 2023-08-31 20:42:39 +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
Bob Pan
ef29be194c
Merge pull request #594 from pxb1988/improve-handling-large-arrays
Improve handling large arrays
2023-08-31 18:49:46 +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
c7e1c5064a
Merge pull request #593 from pxb1988/dex038
support dex 038
2023-08-31 18:20:51 +08:00
Bob Pan
0862aaeb39 support dex 038 2023-08-31 18:17:43 +08:00
Bob Pan
caf241d635
Merge pull request #592 from pxb1988/dex040
* support dex039 & dex040

support read/write/smali/baksmali dex039.

support const-mothod-type and const-method-handler, syntax is same as google's smali fork. (google 's smali 3.0.3 can't assemble the two instruction back to dex)

dex040 support space and other unicode in SimpleName, d2j-smali will escape space char to unicode.
2023-08-31 13:07:19 +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
Nico Mexis
326d47c35b Migrate to Google's smali fork
# Conflicts:
#	build.gradle
#	d2j-smali/build.gradle
#	d2j-smali/src/test/java/a/SmaliTest.java
2023-08-31 11:26:04 +08:00
Nico Mexis
f30b40c31e Better warning
# Conflicts:
#	dex-reader/src/main/java/com/googlecode/d2j/reader/DexFileReader.java
2023-08-31 11:22:18 +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
Bob Pan
b004967677 fix ClassCastException
NewTransformer#findInvokeExpr attempts to cast InvokePolymorphicExpr to InvokeExpr under certain inputs, which causes a ClassCastException.

this patch is similar with

9c6cde4f59
9c0db1d636
2021-10-31 03:32:55 +08:00
Nico Mexis
441d045797 Fix grammar & typo 2021-10-31 02:33:21 +08:00
Nico Mexis
121f727d37 Fix NPE
(cherry picked from commit 9335d9d945)
2021-10-31 02:09:48 +08:00
Nico Mexis
4720fb87c9 Remove Java 6 compat
It didn't work anyways.... Besides, you should definetly NOT use Java 6 nowadays

(cherry picked from commit 3a13f99df3)
2021-10-31 02:02:46 +08:00
Nico Mexis
1f94f4760f Delete Mercurial stuff 2021-10-31 01:59:05 +08:00
Nico Mexis
5e4c90f715 Add workaround for invalid signatures
cherry-pick from

f1da047322
2021-10-31 01:55:07 +08:00
Nico Mexis
c577db0da3 cherry-pick form
85e41523ee
ffa0574dff
56e6c8602c
2021-10-31 01:38:00 +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
a202f4a951 skip param annotation if out of range
fixes https://github.com/pxb1988/dex2jar/issues/485
2021-10-30 16:27:16 +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
Bob Pan
7a9bf1960e java 8 now 2021-10-30 00:31:35 +08:00
Bob Pan
97f9882123 start v2.2 2021-10-30 00:21:19 +08:00
Bob Pan
b12d69cb64 set version to 2.1 2021-10-30 00:21:19 +08:00
Bob Pan
6f30d4bb29
move to github (#512)
* move to github
2021-10-29 23:33:24 +08:00
Bob Pan
0f16a77a16 update to gradle 6.9.1 2021-10-29 23:04:52 +08:00
Bob Pan
43e9e862c6
Merge pull request #219 from ayyrickay/2.x
Add clearer usage instructions and do some minor formatting
2021-10-29 22:24:40 +08:00
Bob Pan
8d836c537c
Merge branch '2.x' into 2.x 2021-10-29 22:23:12 +08:00
Bob Pan
4d30f5dc2a
Merge pull request #128 from jschmid/patch-1
Fixed README formatting
2021-10-29 22:16:32 +08:00
Bob Pan
b92ee55e6f
Merge pull request #386 from paulo-raca/largerHeap
Increase heap size
2021-10-29 22:13:21 +08:00
Bob Pan
f5e8f37acb
Merge pull request #217 from claui/fix-format-exception
Fix IllegalFormatConversionException
2021-10-29 22:11:59 +08:00