Created
February 21, 2022 01:20
-
-
Save SeeFlowerX/09383286f4e70c114e415cb4a248db55 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Java.perform(function() { | |
const System = Java.use('java.lang.System'); | |
const Runtime = Java.use('java.lang.Runtime'); | |
const SystemLoad_2 = System.loadLibrary.overload('java.lang.String'); | |
const VMStack = Java.use('dalvik.system.VMStack'); | |
SystemLoad_2.implementation = function(library) { | |
send("Loading dynamic library => " + library); | |
try { | |
const loaded = Runtime.getRuntime().loadLibrary0(VMStack.getCallingClassLoader(), library); | |
if(library === 'myLib') { | |
//do my stuff | |
} | |
return loaded; | |
} catch(ex) { | |
console.log(ex); | |
} | |
}; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment