From aaf250f3c5290f07251544764f1540fe6a553879 Mon Sep 17 00:00:00 2001 From: evilsocket Date: Sat, 9 Mar 2019 13:46:07 +0100 Subject: [PATCH] new: hid module is now available for Android --- build.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/build.sh b/build.sh index 7edd5cfc..ca95dfe4 100755 --- a/build.sh +++ b/build.sh @@ -65,6 +65,24 @@ build_windows_amd64() { scp -C winvm:$DIR/bettercap.exe . > /dev/null } +build_android_arm() { + host_dep 'shield' + + THEPATH="/data/data/com.termux/files/usr/bin:/data/data/com.termux/files/usr/bin/applets:/system/xbin:/system/bin" + LPATH="/data/data/com.termux/files/usr/lib" + GPATH=/data/data/com.termux/files/home/go + DIR=/data/data/com.termux/files/home/go/src/github.com/bettercap/bettercap + + echo "@ Updating repo on Android host ..." + ssh -p 8022 root@shield "su -c 'export PATH=$THEPATH && export LD_LIBRARY_PATH="$LPATH" && cd "$DIR" && rm -rf bettercap* && git pull && export GOPATH=$GPATH && go get ./...'" + + echo "@ Building android/arm ..." + ssh -p 8022 root@shield "su -c 'export PATH=$THEPATH && export LD_LIBRARY_PATH="$LPATH" && cd "$DIR" && export GOPATH=$GPATH && go build -o bettercap . && setenforce 0'" + + echo "@ Downloading bettercap ..." + scp -C -P 8022 root@shield:$DIR/bettercap . +} + rm -rf $BUILD_FOLDER mkdir $BUILD_FOLDER cd $BUILD_FOLDER @@ -72,6 +90,7 @@ cd $BUILD_FOLDER build_linux_amd64 && create_archive bettercap_linux_amd64_$VERSION.zip build_macos_amd64 && create_archive bettercap_macos_amd64_$VERSION.zip build_windows_amd64 && create_exe_archive bettercap_windows_amd64_$VERSION.zip +build_android_arm && create_archive bettercap_android_arm_$VERSION.zip sha256sum * > checksums.txt