From 2dc1b755cdbff3dca13e89ac81f59d8d40ecbe8a Mon Sep 17 00:00:00 2001 From: eventlOwOp <3064273390@qq.com> Date: Sat, 11 May 2024 16:45:47 +0800 Subject: [PATCH] ndk met problems --- .github/workflows/build-gcc.yml | 10 +++++----- magisk/service.sh | 17 ++++++----------- 2 files changed, 11 insertions(+), 16 deletions(-) diff --git a/.github/workflows/build-gcc.yml b/.github/workflows/build-gcc.yml index 2564e69..3877eef 100644 --- a/.github/workflows/build-gcc.yml +++ b/.github/workflows/build-gcc.yml @@ -53,7 +53,7 @@ jobs: cd .. cd ZeroTierOne - make --silent -j $(nproc) ZT_STATIC=1 ZT_DEBUG=0 CC=$CC CXX=$CXX LDFLAGS="-L../libnatpmp -s" DEFS="-I../libnatpmp" + make --silent -j $(nproc) ZT_SSO_SUPPORTED=0 ZT_STATIC=1 ZT_DEBUG=0 CC=$CC CXX=$CXX LDFLAGS="-L../libnatpmp -s" DEFS="-I../libnatpmp" cd .. mkdir -p magisk/zerotier/lib @@ -78,16 +78,13 @@ jobs: cd ZeroTierOne make clean # sed -i "s/armv7ve/armv7a/g" make-linux.mk - make -j $(nproc) ZT_STATIC=1 ZT_DEBUG=0 CC=$CC CXX=$CXX LDFLAGS="-L../libnatpmp -s" DEFS="-I../libnatpmp" + make -j $(nproc) ZT_SSO_SUPPORTED=0 ZT_STATIC=1 ZT_DEBUG=0 CC=$CC CXX=$CXX LDFLAGS="-L../libnatpmp -s" DEFS="-I../libnatpmp" cd .. cp ZeroTierOne/zerotier-one magisk/zerotier/ cd magisk zip -q -r ../zerotier-magisk-arm-gcc.zip . - # - name: Debugging with tmate - # uses: mxschmitt/action-tmate@v3.18 - - name: Get Date id: date run: echo "::set-output name=date::$(date +'%Y-%m-%d')" @@ -104,3 +101,6 @@ jobs: name: SNAPSHOT-GCC-${{ steps.date.outputs.date }} draft: false prerelease: true + + - name: Debugging with tmate + uses: mxschmitt/action-tmate@v3.18 diff --git a/magisk/service.sh b/magisk/service.sh index f867eb0..e2707ab 100644 --- a/magisk/service.sh +++ b/magisk/service.sh @@ -22,8 +22,6 @@ _stop() { kill -9 $pid ret=$? - rm -rf ./run/pid - if [ $ret -eq 0 ]; then log "stopped zerotier-one" return 0 @@ -37,7 +35,7 @@ _stop() { _join() { nid=$(cat $network_id_path) - ./zerotier-cli -D./home join $nid > $zerotier_log 2>&1 + ./zerotier-cli -D./home join $nid >> $zerotier_log 2>&1 if [ $? -ne 0 ]; then log "join network failed" @@ -52,7 +50,7 @@ _join() { _leave() { nid=$(cat $network_id_path) - ./zerotier-cli -D./home leave $nid > $zerotier_log 2>&1 + ./zerotier-cli -D./home leave $nid >> $zerotier_log 2>&1 if [ $? -ne 0 ]; then log "leave network failed" @@ -64,13 +62,11 @@ _leave() { return 0 } __start() { - nohup ./zerotier-one -d home > $zerotier_log 2>&1 & + nohup ./zerotier-one -d home >> $zerotier_log 2>&1 & sleep 1 pid=$(pidof zerotier-one) - - echo $pid > ./run/pid } _start() { if pid=$(pidof zerotier-one); then @@ -84,7 +80,9 @@ _start() { } cd /data/adb/zerotier -rm -f $daemon_log +rm -f ./run/* +mkfifo $pipe + ip rule add from all lookup main pref 1 export LD_LIBRARY_PATH=/data/adb/zerotier/lib @@ -92,9 +90,6 @@ __start sleep 1 _join -rm -f $pipe -mkfifo $pipe - while true do if read line < $pipe; then