afwall icon indicating copy to clipboard operation
afwall copied to clipboard

Add configs for arm64 binary builds.

Open Fry-kun opened this issue 1 year ago • 2 comments

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 avatar Nov 28 '23 22:11 Fry-kun

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

Fry-kun avatar Dec 19 '23 00:12 Fry-kun

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)

Fry-kun avatar Dec 19 '23 01:12 Fry-kun

@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 !

ukanth avatar Mar 04 '24 16:03 ukanth

@ukanth Merged!

Fry-kun avatar Mar 04 '24 19:03 Fry-kun

@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.

devnoname120 avatar May 25 '24 12:05 devnoname120

@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 <repo_root>/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

NeroProtagonist avatar May 27 '24 20:05 NeroProtagonist

@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!

devnoname120 avatar May 28 '24 22:05 devnoname120