astonbitecode / j4rs

Java for Rust
Apache License 2.0
641 stars 36 forks source link

is there way to hook java method at runtime #108

Closed andrewpedia closed 6 months ago

astonbitecode commented 6 months ago

Hi.

You have opened this issue before and I asked for more details...

I would kindly ask again: Can you please describe what you try to achieve? There is no way to answer some question if there are no details.

andrewpedia commented 6 months ago

for example, there is a jar file,which works for android os , I need to hook the unsupported method call in java code ,because that depends on native system api ,I just want to bypass it,

astonbitecode commented 6 months ago

You cannot change the behavior of a method. If the method calls a native function, it will call it regardless.