Error: java.lang.ClassNotFoundException: Didn't find class "com.xxx" on path ...
如上报错时,可以尝试枚举类的方式来解决:
function hook1(clz){
// 后续操作
}
Java.perform(function(){
Java.choose("dalvik.system.PathClassLoader",{
onMatch: function(instance){
console.log(instance)
console.log(Java.ClassFactory)
var factory = Java.ClassFactory.get(instance)
try{
var myClass = factory.use("cn.adidas.confirmed.services.security.a")
hook1(myClass)
return "stop"
}catch(e){
console.log("next")
console.log(e)
}
},
onComplete:function(){
console.log("Done")
}
})
})
本文参考自看雪论坛@Monkeylord相关答复贴:Frida Hook ,Xposed模块无法拿到类-Android安全-看雪论坛-安全社区|安全招聘|bbs.pediy.com