-
Notifications
You must be signed in to change notification settings - Fork 30
Usage
ARTful is an open-source tool that allows users to manipulate the Android runtime. It works by hooking ArtMethod objects for two specified methods and swapping their values to entirely overwrite the target
"targetMethod" is the destination method that will be replaced. "newMethod" is the method whose code will actually be executed anytime a call to targetMethod is made after swapping.
Method signatures must match and methods must be static
Example:
MainActivity.class.getDeclaredMethod("maliciousMethod")
Example:
replaceAppMethodBySignature("com/app/artful/MainActivity", "benignMethod", "()Ljava/lang/String;")
You can replace any static method located inside the Android Framework with your own method inside of your app. A pre-coded list of multiple Android APIs that ARTful can automatically replace can be found below. If you would like to replace one not already added to ARTful, you could instead call the replaceAppMethodBySignature or replaceAppMethodByObject methods and simply pass in the references to the Android Framework method.