Skip to content

Commit fb985b5

Browse files
committed
Fixed: java.lang.RuntimeException: Cannot find any executable for this device's ABIs [armeabi-v7a, armeabi] on Samsung SM-A310F(Galaxy A3(2016))
1 parent a6d2312 commit fb985b5

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

main/src/main/java/de/blinkt/openvpn/core/VPNLaunchHelper.java

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,13 @@ public class VPNLaunchHelper {
2424

2525
private static String writeMiniVPN(Context context) {
2626
String nativeAPI = NativeUtils.getNativeAPI();
27-
/* Q does not allow executing binaries written in temp directory anymore */
28-
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P)
29-
return new File(context.getApplicationInfo().nativeLibraryDir, "libovpnexec.so").getPath();
27+
28+
File nativeLibDir = new File(context.getApplicationInfo().nativeLibraryDir);
29+
File libOvpnExec = new File(nativeLibDir, "libovpnexec.so");
30+
31+
if (libOvpnExec.exists() && libOvpnExec.canExecute()) {
32+
return libOvpnExec.getAbsolutePath();
33+
}
3034

3135
String[] abis = Build.SUPPORTED_ABIS;
3236

0 commit comments

Comments
 (0)