Commit 675db9f5 authored by Roumen Petrov's avatar Roumen Petrov

build non-pie executable for old devices

parent 7869f790
......@@ -36,3 +36,24 @@ target_link_libraries(
libexec-t1plus.so
-pie
)
# used if ABI < 16
add_executable(
libexeo-t1plus.so
main/jni/appcmd.c
main/jni/socket.c
main/jni/atomicio.c
)
target_compile_definitions(
libexeo-t1plus.so
PRIVATE
PACKAGE_NAME="${APPLICATION_ID}"
)
target_compile_options(
libexeo-t1plus.so
PRIVATE
)
target_link_libraries(
libexeo-t1plus.so
-nopie
)
......@@ -16,6 +16,8 @@
package com.termoneplus;
import android.os.Build;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
......@@ -28,7 +30,14 @@
public class Installer {
public static final String APPINFO_COMMAND = "libexec-t1plus.so";
public static final String APPINFO_COMMAND;
static {
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN /*API level 16*/)
APPINFO_COMMAND = "libexeo-t1plus.so";
else
APPINFO_COMMAND = "libexec-t1plus.so";
}
public static boolean install_directory(File dir, boolean share) {
if (!(dir.exists() || dir.mkdir())) return false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment