Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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));
}

Expand Down