From ba1ce16b8bbca21aa2d0913dae7adc39b3566379 Mon Sep 17 00:00:00 2001 From: Shaka Huang Date: Mon, 22 Feb 2021 03:28:54 -0800 Subject: [PATCH] Fix error in pure 64-bit environment MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In Android S preview, there’s no 32-bit libraries in x86_64 system image for emulator. Signed-off-by: Shaka Huang --- app/src/main/java/com/topjohnwu/magisk/ui/MainActivity.kt | 2 +- native/jni/utils/selinux.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/topjohnwu/magisk/ui/MainActivity.kt b/app/src/main/java/com/topjohnwu/magisk/ui/MainActivity.kt index d319bf7f0..b54b132ea 100644 --- a/app/src/main/java/com/topjohnwu/magisk/ui/MainActivity.kt +++ b/app/src/main/java/com/topjohnwu/magisk/ui/MainActivity.kt @@ -223,7 +223,7 @@ open class MainActivity : BaseUIActivity( .cancellable(false) .reveal() } - }g + } private fun askForHomeShortcut() { if (isRunningAsStub && !Config.askedHome && diff --git a/native/jni/utils/selinux.cpp b/native/jni/utils/selinux.cpp index 9a84a7bc8..57329b3e8 100644 --- a/native/jni/utils/selinux.cpp +++ b/native/jni/utils/selinux.cpp @@ -110,7 +110,7 @@ void selinux_builtin_impl() { } void dload_selinux() { - if (access("/system/lib/libselinux.so", F_OK)) + if (access("/system/lib/libselinux.so", F_OK) && access("/system/lib64/libselinux.so", F_OK)) return; /* We only check whether libselinux.so exists but don't dlopen. * For some reason calling symbols returned from dlsym