fix(script): add example script for resources rename (#2126)
This commit is contained in:
+11
@@ -3,11 +3,22 @@ package jadx.plugins.script.runtime.data
|
||||
import jadx.core.dex.nodes.BlockNode
|
||||
import jadx.core.dex.nodes.InsnNode
|
||||
import jadx.core.dex.nodes.MethodNode
|
||||
import jadx.core.dex.nodes.RootNode
|
||||
import jadx.core.dex.regions.Region
|
||||
import jadx.plugins.script.runtime.JadxScriptInstance
|
||||
|
||||
class Stages(private val jadx: JadxScriptInstance) {
|
||||
|
||||
fun prepare(block: (RootNode) -> Unit) {
|
||||
jadx.addPass(object : ScriptPreparePass(jadx, "StagePrepare") {
|
||||
override fun init(root: RootNode) {
|
||||
jadx.debug.catchExceptions("Prepare init block") {
|
||||
block.invoke(root)
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
fun rawInsns(block: (MethodNode, Array<InsnNode?>) -> Unit) {
|
||||
jadx.addPass(object : ScriptOrderedDecompilePass(
|
||||
jadx,
|
||||
|
||||
Reference in New Issue
Block a user