for (const auto& dex_file : dex_files_) {
ScopedObjectAccess soa(self);
dex_caches_.push_back(soa.AddLocalReference(
class_linker->RegisterDexFile(*dex_file,
soa.Decode<:classloader>(class_loader_))));
//dex2oat脱壳-----添加开始
std::string dex_name = dex_file->GetLocation();
LOG(INFO) <" <
//注释掉过滤.jiagu文件可以脱其它壳 真机不影响运行速度
//if(dex_name.find("jiagu")!=std::string::npos)
//{
int len =dex_file->Size();
char filename[150] = {0};
sprintf(filename,"%s_%d.dex",dex_name.c_str(),len);
int fd = open(filename,O_WRONLY | O_CREAT | O_TRUNC, S_IRWXU);
if(fd > 0)
{
if(write(fd,(char*)dex_file->Begin(),len) <= 0)
{
LOG(INFO) <" <
}
LOG(INFO) <" <
close(fd);
}else LOG(INFO) <" <
//}
//------添加结束
}
有问题可以加Q群讨论: 228410663