function a(){
Java.perform(function () {
Java.enumerateClassLoaders({
"onMatch"
: function(loader) {
console.log()
console.log(
"loader:"
+
loader)
if
(loader.toString().startsWith(
"e.d"
)) {
Java.classFactory.loader
=
loader;
/
/
将当前
class
factory中的loader指定为我们需要的
}
},
"onComplete"
: function() {
console.log(
"------------------------"
)
console.log(
"success :"
+
Java.classFactory.loader);
console.log(
"--------------------------"
)
}
});
if
(Java.classFactory.loader.toString().startsWith(
"e.d"
)){
Java.enumerateLoadedClasses({
/
/
每一次回调此函数时其参数className就是类的信息
onMatch: function (className)
{
/
/
输出类字符串
console.log("",className);
},
/
/
枚举完毕所有类之后的回调函数
onComplete: function ()
{
/
/
输出类字符串
console.log(
"输出完毕"
);
}
});
}
});
/
/
Java.perform(function () {
/
/
Java.enumerateClassLoadersSync().forEach(function (classloader) {
/
/
try
{
/
/
console.log(
"classloader"
, classloader);
/
/
classloader.loadClass(
"com.yensbcyabet.cmsnaygeste.mvp.model.entity.AdListBean"
);
/
/
Java.classFactory.loader
=
classloader;
/
/
var mainActivityClass
=
Java.use(
"com.yensbcyabet.cmsnaygeste.mvp.model.entity.AdListBean"
);
/
/
console.log(
"mainActivityClass"
, mainActivityClass);
/
/
} catch (error) {
/
/
console.log(
"error"
, error);
/
/
}
/
/
});
/
/
})
}
setImmediate(a)