首页
社区
课程
招聘
[求助]关于DexHunter 移植的问题
发表于: 2016-9-21 16:38 4221

[求助]关于DexHunter 移植的问题

2016-9-21 16:38
4221
想搞个在各系统通用的DexHunter,通过修改core.jar  loadClassBinaryName注入我的程序
public Class loadClassBinaryName(String paramString, ClassLoader paramClassLoader)
  {
    defineClasss(paramString, paramClassLoader, this.mCookie);
    return defineClass(paramString, paramClassLoader, this.mCookie);
  }
但是当运行到
bool need_extra=false;
      ClassObject * clazz=NULL;
      const u1* data=NULL;
      DexClassData* pData = NULL;
      bool pass=false;
      const DexClassDef *pClassDef = dexGetClassDef(pDvmDex->pDexFile, i);
      const char *descriptor = dexGetClassDescriptor(pDvmDex->pDexFile,pClassDef);
      ALOGI("--- dumpclass classIdx my %s",descriptor);
      if(!strncmp(header,descriptor,8)||!pClassDef->classDataOff)
      {
          pass=true;
          goto classdef;
      }

      clazz =(ClassObject *) mydvmDefineClass(pDvmDex,descriptor,loader);
      ALOGI("--- ifieldCount %d",clazz); 程序出错
这里dvmDefineClass是通过
mydvmDefineClass=(void * (*)(DvmDex *,char const*,Object *)) dlsym(lib, "_Z14dvmDefineClassP6DvmDexPKcP6Object");
获得的 求大神指点下到底哪出错了

[注意]传递专业知识、拓宽行业人脉——看雪讲师团队等你加入!

收藏
免费 0
支持
分享
最新回复 (2)
雪    币: 57
活跃值: (386)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
2
出错代码
Fatal signal 11 (SIGSEGV) at 0x00000074 (code=1), thread 1606 (odu.FileManager)
Process 1574 terminated by signal (11)
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Build fingerprint: 'samsung/samsung/samsung:4.2.2/JDQ39E/eng.se.infra.20150612.220855:userdebug/release-keys'
Revision: '0'
pid: 1606, tid: 1606, name: odu.FileManager >>> com.microdu.FileManager <<<
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 00000074
eax 00000000 ebx b6723ff4 ecx 3f697993 edx 0000001d
esi 9901321b edi 00000000
xcs 00000073 xds 0000007b xes 0000007b xfs 00000000 xss 0000007b
eip b66c14fd ebp b6724cc0 esp bfc18fe0 flags 00010246

backtrace:
#00 pc 000c44fd /system/lib/libdvm.so (dvmFindClassNoInit(char const*, Object*)+269)
#01 pc 00005a70 [heap]
#02 pc 2f6d6574 <unknown>

stack:
bfc18fa0 00000000
bfc18fa4 00000000
bfc18fa8 00000000
bfc18fac 00000000
bfc18fb0 00000000
bfc18fb4 00000000
bfc18fb8 00000000
bfc18fbc 00000000
bfc18fc0 00000000
bfc18fc4 00000000
bfc18fc8 00000000
bfc18fcc 00000000
bfc18fd0 00000000
bfc18fd4 00000000
bfc18fd8 00000000
bfc18fdc 00000000
#00 bfc18fe0 b7e4c1e8 [heap]
........ ........
#01 b6724cc8 00400000
b6724ccc 10000000
b6724cd0 10000000
b6724cd4 00000000
b6724cd8 3fe00000
b6724cdc 00080000
b6724ce0 00200000
b6724ce4 00004000
b6724ce8 00006000
b6724cec 00000001
b6724cf0 00000101
b6724cf4 00000002
b6724cf8 00000001
b6724cfc 00000000
b6724d00 00000000
b6724d04 00000000
........ ........
#02 b7d06a88 6d617266
b7d06a8c 726f7765
b7d06a90 6f632f6b
b7d06a94 6a2e6572
b7d06a98 2f3a7261
b7d06a9c 74737973
b7d06aa0 662f6d65
b7d06aa4 656d6172
b7d06aa8 6b726f77
b7d06aac 726f632f
b7d06ab0 756a2d65
b7d06ab4 2e74696e
b7d06ab8 3a72616a
b7d06abc 7379732f
b7d06ac0 2f6d6574
b7d06ac4 6d617266
Copying /data/tombstones/tombstone_05 to DropBox (SYSTEM_TOMBSTONE)
GC_FOR_ALLOC freed 459K, 15% free 5348K/6280K, paused 6ms, total 6ms
Process com.microdu.FileManager (pid 1606) has died.
Start proc com.microdu.FileManager for activity com.microdu.FileManager/.Splash: pid=1638 uid=10028 gids={50028, 1015, 3003, 1028}
2016-9-21 17:09
0
雪    币: 57
活跃值: (386)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
3
顶上去。
2016-9-22 17:24
0
游客
登录 | 注册 方可回帖
返回
//