Skip to content

Commit e4b58f1

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 e4b58f1

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,10 @@ public class VPNLaunchHelper {
2424

2525
private static String writeMiniVPN(Context context) {
2626
String nativeAPI = NativeUtils.getNativeAPI();
27+
File libOvpnExec = new File(context.getApplicationInfo().nativeLibraryDir, "libovpnexec.so");
2728
/* Q does not allow executing binaries written in temp directory anymore */
2829
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P)
29-
return new File(context.getApplicationInfo().nativeLibraryDir, "libovpnexec.so").getPath();
30+
return libOvpnExec.getPath();
3031

3132
String[] abis = Build.SUPPORTED_ABIS;
3233

@@ -43,6 +44,11 @@ private static String writeMiniVPN(Context context) {
4344
}
4445
}
4546

47+
// Fixed: java.lang.RuntimeException: Cannot find any executable for this device's ABIs [armeabi-v7a, armeabi] on Samsung SM-A310F(Galaxy A3(2016))
48+
if (libOvpnExec.exists() && libOvpnExec.canExecute()) {
49+
return libOvpnExec.getAbsolutePath();
50+
}
51+
4652
throw new RuntimeException("Cannot find any executable for this device's ABIs " + Arrays.toString(abis));
4753
}
4854

0 commit comments

Comments
 (0)