Skip to content

Commit

Permalink
Merge pull request #521 from ascottAtPsiphon/master
Browse files Browse the repository at this point in the history
Add x86 and x86_64 native library for Android.
  • Loading branch information
rod-hynes authored Jul 30, 2019
2 parents 7f3a744 + 76fbe22 commit d07085a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
Binary file not shown.
Binary file not shown.
5 changes: 4 additions & 1 deletion MobileLibrary/Android/make.bash
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ echo " Gomobile version: ${GOMOBILEVERSION}"
echo " Dependencies: ${DEPENDENCIES}"
echo ""

gomobile bind -v -x -target=android/arm,android/arm64 -tags="${BUILD_TAGS}" -ldflags="$LDFLAGS" github.com/Psiphon-Labs/psiphon-tunnel-core/MobileLibrary/psi
# Note: android/386 is x86 and android/amd64 is x86_64
gomobile bind -v -x -target=android/arm,android/arm64,android/386,android/amd64 -tags="${BUILD_TAGS}" -ldflags="$LDFLAGS" github.com/Psiphon-Labs/psiphon-tunnel-core/MobileLibrary/psi
if [ $? != 0 ]; then
echo "..'gomobile bind' failed, exiting"
exit $?
Expand All @@ -66,6 +67,8 @@ unzip -o psi.aar -d build-tmp/psi
yes | cp -f PsiphonTunnel/AndroidManifest.xml build-tmp/psi/AndroidManifest.xml
yes | cp -f PsiphonTunnel/libs/armeabi-v7a/libtun2socks.so build-tmp/psi/jni/armeabi-v7a/libtun2socks.so
yes | cp -f PsiphonTunnel/libs/arm64-v8a/libtun2socks.so build-tmp/psi/jni/arm64-v8a/libtun2socks.so
yes | cp -f PsiphonTunnel/libs/x86/libtun2socks.so build-tmp/psi/jni/x86/libtun2socks.so
yes | cp -f PsiphonTunnel/libs/x86_64/libtun2socks.so build-tmp/psi/jni/x86_64/libtun2socks.so

javac -d build-tmp -bootclasspath $ANDROID_HOME/platforms/android-23/android.jar -source 1.7 -target 1.7 -classpath build-tmp/psi/classes.jar:$ANDROID_HOME/platforms/android-23/optional/org.apache.http.legacy.jar PsiphonTunnel/PsiphonTunnel.java
if [ $? != 0 ]; then
Expand Down

0 comments on commit d07085a

Please sign in to comment.