From 636752255876778cfedd704028d007fe12d520cf Mon Sep 17 00:00:00 2001 From: liuyong Date: Wed, 18 Oct 2017 21:52:49 +0800 Subject: [PATCH] fix https://github.com/alibaba/AndFix/issues/353 --- src/com/alipay/euler/andfix/Compat.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/com/alipay/euler/andfix/Compat.java b/src/com/alipay/euler/andfix/Compat.java index b1ae6e1..a9c0878 100644 --- a/src/com/alipay/euler/andfix/Compat.java +++ b/src/com/alipay/euler/andfix/Compat.java @@ -57,6 +57,7 @@ public static synchronized boolean isSupport() { private static boolean isYunOS() { String version = null; String vmName = null; + boolean yunosLibExists = false; try { Method m = Class.forName("android.os.SystemProperties").getMethod( "get", String.class); @@ -65,8 +66,14 @@ private static boolean isYunOS() { } catch (Exception e) { // nothing todo } + try { + yunosLibExists = new File("/system/lib/libaoc.so").exists() + || new File("/system/lib/libvmkid_lemur.so").exists(); + } catch (Exception e) { + // nothing todo + } if ((vmName != null && vmName.toLowerCase().contains("lemur")) - || (version != null && version.trim().length() > 0)) { + || (version != null && version.trim().length() > 0) || yunosLibExists) { return true; } else { return false;