diff --git a/app/src/main/java/dev/ukanth/ufirewall/Api.java b/app/src/main/java/dev/ukanth/ufirewall/Api.java index cdba365a..57518fb7 100644 --- a/app/src/main/java/dev/ukanth/ufirewall/Api.java +++ b/app/src/main/java/dev/ukanth/ufirewall/Api.java @@ -1859,6 +1859,15 @@ private static boolean installBinariesMips() { return true; } + private static boolean installBinariesArm64() { + if (!installBinary(ctx, R.raw.busybox_arm64, "busybox")) return false; + if (!installBinary(ctx, R.raw.iptables_arm64, "iptables")) return false; + if (!installBinary(ctx, R.raw.ip6tables_arm64, "ip6tables")) return false; + if (!installBinary(ctx, R.raw.nflog_arm64, "nflog")) return false; + //if (!installBinary(ctx, R.raw.run_pie_arm64, "run_pie")) return false; + return true; + } + private static boolean installBinariesArm() { if (!installBinary(ctx, R.raw.busybox_arm, "busybox")) return false; if (!installBinary(ctx, R.raw.iptables_arm, "iptables")) return false; @@ -1873,6 +1882,8 @@ private static boolean installBinariesForAbi(String abi) { return installBinariesX86(); } else if (abi.startsWith("mips")) { return installBinariesMips(); + } else if (abi.startsWith("arm64")) { + return installBinariesArm64(); } else { return installBinariesArm(); } diff --git a/external/.gitignore b/external/.gitignore index 2f946e1c..37629350 100644 --- a/external/.gitignore +++ b/external/.gitignore @@ -1,3 +1,4 @@ +aarch64-linux-android/ arm-linux-androideabi/ i686-linux-android/ mipsel-linux-android/ diff --git a/external/Makefile b/external/Makefile index ecb2ee53..340a69ff 100644 --- a/external/Makefile +++ b/external/Makefile @@ -7,13 +7,19 @@ ARCH := arm GCCVER := 4.9 # You should be able to just 'make ARCH=x86' and it should DTRT. -ARCH_LIST := arm x86 mips +ARCH_LIST := arm arm64 x86 mips APIVER := 21 ifeq ($(ARCH),arm) TRIPLET := arm-linux-androideabi TOOLCHAIN := $(TRIPLET)-$(GCCVER) NDK_ABINAME := armeabi endif +ifeq ($(ARCH),arm64) +TRIPLET := aarch64-linux-android +TOOLCHAIN := $(TRIPLET)-$(GCCVER) +APIVER := 21 +NDK_ABINAME := arm64-v8a +endif ifeq ($(ARCH),x86) TRIPLET := i686-linux-android TOOLCHAIN := x86-$(GCCVER)