Commit dc933337 authored by Martin Byrenheid's avatar Martin Byrenheid
Browse files

Adapted configuration for native code to support different ABIs

parent 4f61b0b8
......@@ -28,9 +28,12 @@ endif
# Android NDK setup
ANDROID_NDK_HOME ?= /opt/android-ndk
NDK_PLATFORM_LEVEL ?= 16
NDK_PLATFORM_LEVEL ?= 21
#NDK_PLATFORM_LEVEL ?= 16
NDK_TOOLCHAIN_VERSION=4.9
APP_ABI ?= armeabi
#APP_ABI ?= arm64-v8a
APP_ABI ?= x86
#APP_ABI ?= armeabi-v7a
NDK_ABI ?= $(APP_ABI)
# PIEFLAGS for SDK 16/Android L must be set to -fPIE -pie, but can override for earlier targets
......@@ -283,9 +286,8 @@ assets: tor polipo pluto
-zip ../orbotservice/src/main/assets/$(APP_ABI)/tor.mp3 bin/tor
-$(STRIP) bin/obfs4proxy
-zip ../orbotservice/src/main/assets/$(APP_ABI)/obfs4proxy.mp3 bin/obfs4proxy
-$(STRIP) ../orbotservice/src/main/libs/$(APP_ABI)/pdnsd
-zip ../orbotservice/src/main/assets/$(APP_ABI)/pdnsd.mp3 ../orbotservice/src/main/libs/$(APP_ABI)/pdnsd
-rm ../orbotservice/src/main/libs/$(APP_ABI)/pdnsd
-$(STRIP) ../orbotservice/build/intermediates/ndkBuild/debug/obj/local/$(APP_ABI)/pdnsd
-zip ../orbotservice/src/main/assets/$(APP_ABI)/pdnsd.mp3 ../orbotservice/build/intermediates/ndkBuild/debug/obj/local//$(APP_ABI)/pdnsd
assets-clean:
-rm ../orbotservice/src/main/assets/$(APP_ABI)/polipo.mp3
......
......@@ -24,12 +24,19 @@ android {
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
externalNativeBuild {
ndkBuild {
path 'src/main/jni/Android.mk'
}
}
productFlavors {
}
}
dependencies {
compile project(':jsocksAndroid')
compile 'com.android.support:appcompat-v7:25.0.0'
compile 'com.jrummyapps:android-shell:1.0.1'
compile fileTree(dir: 'libs', include: ['*.jar','*.so'])
compile fileTree(include: ['*.jar', '*.so'], dir: 'libs')
testCompile 'junit:junit:4.12'
}
......@@ -69,7 +69,8 @@ public class TorResourceInstaller implements TorServiceConstants {
InputStream is;
File outFile;
String cpuPath = "armeabi";
String cpuPath = Build.CPU_ABI;
Log.e("torResources","CPU ABI is " + cpuPath);
if (Build.CPU_ABI.contains("x86"))
cpuPath = "x86";
......
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