alibaba / dexposed

dexposed enable 'god' mode for single android application.
4.51k stars 1.07k forks source link

集成报错 java.lang.UnsatisfiedLinkError #49

Closed XuNeal closed 9 years ago

XuNeal commented 9 years ago

单独新建一个项目的时候可以在该小米机型上hook成功。

作为一个library之后无论如何都不能注入成功。 放到library相关的app项目内还是无法注入成功。

错误如下 java.lang.UnsatisfiedLinkError: Couldn't load dexposed from loader dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com..apk"],nativeLibraryDirectories=[/data/app-lib/com.app-1, /vendor/lib, /system/lib]]]: findLibrary returned null

另外请问如何启用5.0和5.1下的注入,我看有5.0和5.1的Lib文件了。但是测试不成功。

另外dexposed 0.1.7也试过了,还是不行。将文件解包考到jniLibs目录下还是一样的错误。

环境 AS 1.4.1 手机 小米4c 4.4.4 build.gradle:

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:1.3.0'
    }
}
apply plugin: 'com.android.application'

repositories {
    jcenter()
}

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.1"

    defaultConfig {
        applicationId "com..app"
        minSdkVersion 15
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }

    packagingOptions {
        exclude 'META-INF/DEPENDENCIES.txt'
        exclude 'META-INF/LICENSE.txt'
        exclude 'META-INF/NOTICE.txt'
        exclude 'META-INF/NOTICE'
        exclude 'META-INF/LICENSE'
        exclude 'META-INF/DEPENDENCIES'
        exclude 'META-INF/notice.txt'
        exclude 'META-INF/license.txt'
        exclude 'META-INF/dependencies.txt'
        exclude 'META-INF/LGPL2.1'
    }
}

repositories {
    maven { url "https://jitpack.io" }
}

dependencies {

    compile "com.mixpanel.android:mixpanel-android:4.6.4"
    compile "com.android.support:appcompat-v7:23.1.0"
    compile "com.android.support:design:23.1.0"
    compile 'com.android.support:cardview-v7:23.1.0'
    compile "com.android.support:recyclerview-v7:23.1.0"
    compile 'com.github.PhilJay:MPAndroidChart:v2.1.3'
    compile 'joda-time:joda-time:2.8.2'
    compile 'com.facebook.fresco:fresco:0.7.0+'
    compile 'com.taobao.android:dexposed:0.1.8@aar'
    compile 'com.squareup.retrofit:converter-jackson:2.0.0-beta2'
    compile 'com.squareup.retrofit:retrofit:2.0.0-beta2'
}
XuNeal commented 9 years ago

新建了一个空的项目ok了,可能是和原有项目的某个lib冲突了