File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
main/src/main/java/de/blinkt/openvpn/core Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments