Skip to content

Commit 37875bd

Browse files
fix: resolve R8 missing stack map frame warnings
Use COMPUTE_FRAMES for generated deobfuscator class and copy existing frames from transformed classes to eliminate R8 verification warnings while maintaining low memory usage. Signed-off-by: androidacy-user <[email protected]>
1 parent 7f54218 commit 37875bd

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ plugins {
99

1010
allprojects {
1111
group = "com.github.Androidacy.LSParanoid"
12-
version = "0.9.3"
12+
version = "0.9.4"
1313

1414
plugins.withType(JavaPlugin::class.java) {
1515
extensions.configure(JavaPluginExtension::class.java) {

processor/src/main/kotlin/org/lsposed/lsparanoid/processor/DeobfuscatorGenerator.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class DeobfuscatorGenerator(
3737
) {
3838

3939
fun generateDeobfuscator(): ByteArray {
40-
val writer = StandaloneClassWriter(ClassWriter.COMPUTE_MAXS, classRegistry, fileRegistry)
40+
val writer = StandaloneClassWriter(ClassWriter.COMPUTE_MAXS or ClassWriter.COMPUTE_FRAMES, classRegistry, fileRegistry)
4141
writer.visit(
4242
Opcodes.V1_6,
4343
ACC_PUBLIC or ACC_SUPER,

processor/src/main/kotlin/org/lsposed/lsparanoid/processor/Patcher.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ class Patcher(
9292
logger.debug("Patching class {}", name)
9393
val reader = ClassReader(source.readFile(name))
9494
val writer = StandaloneClassWriter(
95+
reader,
9596
ClassWriter.COMPUTE_MAXS,
9697
classRegistry,
9798
fileRegistry
@@ -115,7 +116,7 @@ class Patcher(
115116
it
116117
)
117118
}
118-
reader.accept(patcher, ClassReader.SKIP_FRAMES)
119+
reader.accept(patcher, 0)
119120
jar.createFile(name, writer.toByteArray())
120121
return true
121122
}

0 commit comments

Comments
 (0)