Skip to content
This repository has been archived by the owner on Dec 25, 2023. It is now read-only.

Commit

Permalink
修复android 7.x dlsym找不到的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
smartdone committed Mar 3, 2018
1 parent fe0cdb7 commit f526c92
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions app/src/main/java/com/smartdone/dexdump/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ protected void onCreate(Bundle savedInstanceState) {
selected = Config.getConfig();
appinfos = new ArrayList<>();

listView = (ListView) findViewById(R.id.applist);
listView = findViewById(R.id.applist);
adapter = new AppAdapter(appinfos);
listView.setAdapter(adapter);
getInstallAppList();
Expand Down Expand Up @@ -83,7 +83,7 @@ private void getInstallAppList() {
Appinfo appinfo = new Appinfo();
appinfo.setIcon(zoomDrawable(resolveInfo.loadIcon(pm), DensityUtil.dip2px(this, 128), DensityUtil.dip2px(this, 128)));
appinfo.setAppName(resolveInfo.loadLabel(pm).toString());
appinfo.setAppPackage(resolveInfo.resolvePackageName);
appinfo.setAppPackage(resolveInfo.activityInfo.packageName);

if (Config.contains(selected, appinfo.getAppPackage())) {
appinfo.setChecked(true);
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/jni/dump.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ void hook_21_22() {
}

void hook_23_plus() {
void *handle = ndk_dlopen("libart.so", RTLD_GLOBAL | RTLD_LAZY);
void *handle = ndk_dlopen("libart.so", RTLD_NOW);
if (handle == NULL) {
__android_log_print(ANDROID_LOG_ERROR, TAG, "Error: unable to find the SO : libart.so");
return;
Expand Down
2 changes: 2 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.0'
Expand All @@ -14,6 +15,7 @@ buildscript {

allprojects {
repositories {
google()
jcenter()
}
}
Expand Down

0 comments on commit f526c92

Please sign in to comment.