diff --git a/main/src/main/java/de/blinkt/openvpn/core/VPNLaunchHelper.java b/main/src/main/java/de/blinkt/openvpn/core/VPNLaunchHelper.java index 0784361cf5..86efe0febe 100644 --- a/main/src/main/java/de/blinkt/openvpn/core/VPNLaunchHelper.java +++ b/main/src/main/java/de/blinkt/openvpn/core/VPNLaunchHelper.java @@ -24,9 +24,10 @@ public class VPNLaunchHelper { private static String writeMiniVPN(Context context) { String nativeAPI = NativeUtils.getNativeAPI(); + File libOvpnExec = new File(context.getApplicationInfo().nativeLibraryDir, "libovpnexec.so"); /* Q does not allow executing binaries written in temp directory anymore */ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) - return new File(context.getApplicationInfo().nativeLibraryDir, "libovpnexec.so").getPath(); + return libOvpnExec.getPath(); String[] abis = Build.SUPPORTED_ABIS; @@ -43,6 +44,11 @@ private static String writeMiniVPN(Context context) { } } + // Fixed: java.lang.RuntimeException: Cannot find any executable for this device's ABIs [armeabi-v7a, armeabi] on Samsung SM-A310F(Galaxy A3(2016)) + if (libOvpnExec.exists() && libOvpnExec.canExecute()) { + return libOvpnExec.getAbsolutePath(); + } + throw new RuntimeException("Cannot find any executable for this device's ABIs " + Arrays.toString(abis)); }