ukanth / afwall

AFWall+ (Android Firewall +) - iptables based firewall for Android
GNU General Public License v3.0
2.68k stars 447 forks source link

Add configs for arm64 binary builds. #1365

Closed Fry-kun closed 1 month ago

Fry-kun commented 6 months ago

Adding configs for building arm64 binaries & installing them on a device as needed. This might fix #1364 :shrug:

Not sure how to build the binaries locally (didn't go through the setup docs yet), but maybe this is sufficient to build them in an action..?

Fry-kun commented 5 months ago

Looks like this will fail because building the binaries is not part of this workflow..?? How do you build them?

Fry-kun commented 5 months ago

Built nflog_arm64 locally (with latest fix commit), tested working on the phone (rest of binaries failed to build, but for now using "system binaries" for those)

ukanth commented 2 months ago

@Fry-kun , I recently merged config change to add support for nflog from @NeroProtagonist. Can you please check on that and update this PR if required ? Thanks !

Fry-kun commented 2 months ago

@ukanth Merged!

devnoname120 commented 1 week ago

@ukanth Could you build the new binaries? arm64 binaries are missing from here and it breaks the build.

/Users/paul/dev/afwall/app/src/main/java/dev/ukanth/ufirewall/Api.java:1863: error: cannot find symbol
        if (!installBinary(ctx, R.raw.busybox_arm64, "busybox")) return false;
                                     ^
  symbol:   variable busybox_arm64
  location: class raw

I tried building them on my own but after 1+ hour of fighting with ndk, compiler, and linker issues I gave up.

NeroProtagonist commented 5 days ago

@devnoname120 What is your host platform, NDK version, build command line, error message, etc?

Took me a while too due to issues building on Windows but can build on Linux

I can build for, e.g. armeabi, by running the following in /external.

cd ~/src/afwall/external
make NDK=~/usr/android-ndk-r10e NDK_PROJECT_PATH=~/src/afwall ARCH=arm nflog
make NDK=~/usr/android-ndk-r10e NDK_PROJECT_PATH=~/src/afwall ARCH=arm busybox
make NDK=~/usr/android-ndk-r10e NDK_PROJECT_PATH=~/src/afwall ARCH=arm iptables
devnoname120 commented 4 days ago

@NeroProtagonist Thanks for the help. At that point I don't plan to contribute/use it more, so I won't bother making it work. I appreciate your spontaneous advice though!