frida-java-bridge
frida-java-bridge copied to clipboard
How to call super.onCreate()
Hi, I have this decompiled Java snippet
public void onCreate(Bundle bundle) {
super.onCreate(bundle);
[....SOME_UNWATED_CODE....]
startActivity(a());
finish();
}
and would like to replay it without executing the [....SOME_UNWATED_CODE....] block. Thats what I tried:
Java.perform(function () {
Bhi.onCreate.overload("android.os.Bundle").implementation = function (bundle) {
this.super.onCreate(bundle);
this.startActivity(this.a());
this.finish();
}
});
It breaks with error, this.super is undefined. Any ideas how to make this working? Kind regards, Markus
Hi,I am from China,I can resolve it. You should do it like this: Java.perform(function () { Bhi.onCreate.overload("android.os.Bundle").implementation = function (bundle) { this.onCreate(bundle);//remove super,then it works! this.startActivity(this.a()); this.finish(); } });
Hi,I am from China,I can resolve it. You should do it like this: Java.perform(function () { Bhi.onCreate.overload("android.os.Bundle").implementation = function (bundle) { this.onCreate(bundle);//remove super,then it works! this.startActivity(this.a()); this.finish(); } });
This is not a fundamental solution,I think what the publisher wants is how to call the method of the parent class
this.super
doesn't exist because you should use this.$super
instead.
I'm not sure if it's documented somewhere