You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Java.use(xxx).implementation = function()
Java.choose(xxx, {})
when Java.use and Java.choose is used in the same time, Java.use(xxx).implementation will not take effect
The text was updated successfully, but these errors were encountered:
You maybe Used the wrong Class And Method
Because First of all you must Enumerate the classes and Methods using Frida from the Application And after that You look for the right Method With it's True Class Then try hooking them directly So, In your case it's: Java.use(xxx).implementation = function() Java.choose(xxx, {})
But, make sure that the Class xxx And the function {} Are correctly defined And Available in the target app Or if you are Injecting Custom class as xxx Or function as {} you should use this Script :
`Java.perform(() => {
console.log("[*] Injecting custom class and function into the target app...");
// Create a custom class named 'xxx'
const xxx = Java.registerClass({
name: 'com.custom.xxx', // Fully qualified class name
implements: [], // If implementing any interfaces, specify here
methods: {
// Define your custom method
customMethod: [{
returnType: 'void', // Return type of the method
argumentTypes: ['java.lang.String'], // Argument types
implementation: function (arg) {
console.log(`[+] customMethod called with argument: ${arg}`);
}
}],
}
});
// Inject the custom function `{}` into the target application
const customFunction = function (arg) {
console.log(`[+] Custom function '{}' called with argument: ${arg}`);
xxx.$new().customMethod(arg); // Optional: Call the method of 'xxx' class
};
// Test the custom class and function in the injected script
console.log("[*] Testing custom class and function...");
const instance = xxx.$new(); // Create an instance of the custom class
instance.customMethod("Hello from customMethod!"); // Call the custom method
customFunction("Hello from customFunction!"); // Call the custom function
console.log("[*] Injection complete. Custom class and function are ready.");
});`
Also, Please Describe the Nature of the App that you are Modifying and What you want to achieve into it Then I'll be able to Help you further As well into it.
Java.use(xxx).implementation = function()
Java.choose(xxx, {})
when Java.use and Java.choose is used in the same time, Java.use(xxx).implementation will not take effect
The text was updated successfully, but these errors were encountered: