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