Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
gk0749
jadx
提交
0f00fb9a
J
jadx
项目概览
gk0749
/
jadx
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
J
jadx
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
未验证
提交
0f00fb9a
编写于
12月 11, 2021
作者:
S
Skylot
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix: handle move-result after invoke-custom with string concat
上级
2d6f819c
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
28 addition
and
3 deletion
+28
-3
jadx-core/src/main/java/jadx/core/dex/visitors/ProcessInstructionsVisitor.java
...va/jadx/core/dex/visitors/ProcessInstructionsVisitor.java
+7
-0
jadx-core/src/test/java/jadx/tests/api/IntegrationTest.java
jadx-core/src/test/java/jadx/tests/api/IntegrationTest.java
+2
-0
jadx-core/src/test/java/jadx/tests/integration/others/TestStringConcatJava11.java
...jadx/tests/integration/others/TestStringConcatJava11.java
+13
-1
jadx-plugins/jadx-java-convert/src/main/java/jadx/plugins/input/javaconvert/JavaConvertLoader.java
...ava/jadx/plugins/input/javaconvert/JavaConvertLoader.java
+6
-2
未找到文件。
jadx-core/src/main/java/jadx/core/dex/visitors/ProcessInstructionsVisitor.java
浏览文件 @
0f00fb9a
...
...
@@ -80,6 +80,13 @@ public class ProcessInstructionsVisitor extends AbstractVisitor {
}
break
;
case
STR_CONCAT:
// invoke-custom with string concatenation translated directly to STR_CONCAT, merge next move-result
if
(
insn
.
getResult
()
==
null
)
{
mergeMoveResult
(
insnByOffset
,
offset
,
insn
,
ArgType
.
STRING
);
}
break
;
case
FILLED_NEW_ARRAY:
ArgType
arrType
=
((
FilledNewArrayNode
)
insn
).
getArrayType
();
mergeMoveResult
(
insnByOffset
,
offset
,
insn
,
arrType
);
...
...
jadx-core/src/test/java/jadx/tests/api/IntegrationTest.java
浏览文件 @
0f00fb9a
...
...
@@ -47,6 +47,7 @@ import jadx.core.utils.files.FileUtils;
import
jadx.core.xmlgen.ResourceStorage
;
import
jadx.core.xmlgen.entry.ResourceEntry
;
import
jadx.tests.api.compiler.DynamicCompiler
;
import
jadx.tests.api.compiler.JavaUtils
;
import
jadx.tests.api.compiler.StaticCompiler
;
import
jadx.tests.api.utils.TestUtils
;
...
...
@@ -490,6 +491,7 @@ public abstract class IntegrationTest extends TestUtils {
}
protected
void
useTargetJavaVersion
(
int
version
)
{
Assumptions
.
assumeTrue
(
JavaUtils
.
checkJavaVersion
(
version
),
"skip test for higher java version"
);
this
.
targetJavaVersion
=
version
;
}
...
...
jadx-core/src/test/java/jadx/tests/integration/others/TestStringConcatJava11.java
浏览文件 @
0f00fb9a
...
...
@@ -3,6 +3,8 @@ package jadx.tests.integration.others;
import
org.junit.jupiter.api.Test
;
import
jadx.tests.api.RaungTest
;
import
jadx.tests.api.extensions.inputs.InputPlugin
;
import
jadx.tests.api.extensions.inputs.TestWithInputPlugins
;
import
static
jadx
.
tests
.
api
.
utils
.
assertj
.
JadxAssertions
.
assertThat
;
...
...
@@ -40,7 +42,7 @@ public class TestStringConcatJava11 extends RaungTest {
}
@Test
public
void
testJava
()
{
public
void
testJava
8
()
{
noDebugInfo
();
assertThat
(
getClassNode
(
TestCls
.
class
))
.
code
()
...
...
@@ -49,4 +51,14 @@ public class TestStringConcatJava11 extends RaungTest {
"return str + \"test\" + str + 7;"
,
"return str + \"test\" + str + \"7\";"
);
// dynamic concat add const to string recipe
}
@TestWithInputPlugins
({
InputPlugin
.
DEX
,
InputPlugin
.
JAVA
})
public
void
testJava11
()
{
useTargetJavaVersion
(
11
);
noDebugInfo
();
assertThat
(
getClassNode
(
TestCls
.
class
))
.
code
()
.
containsOne
(
"return str + \"test\";"
)
.
containsOne
(
"return str + \"test\" + str + \"7\";"
);
}
}
jadx-plugins/jadx-java-convert/src/main/java/jadx/plugins/input/javaconvert/JavaConvertLoader.java
浏览文件 @
0f00fb9a
...
...
@@ -158,9 +158,13 @@ public class JavaConvertLoader {
try
{
DxConverter
.
run
(
path
,
tempDirectory
);
}
catch
(
Exception
e
)
{
}
catch
(
Throwable
e
)
{
LOG
.
warn
(
"DX convert failed, trying D8, path: {}"
,
path
);
D8Converter
.
run
(
path
,
tempDirectory
);
try
{
D8Converter
.
run
(
path
,
tempDirectory
);
}
catch
(
Throwable
ex
)
{
LOG
.
error
(
"D8 convert failed: {}"
,
ex
.
getMessage
());
}
}
LOG
.
debug
(
"Converted to dex: {}"
,
path
.
toAbsolutePath
());
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录