Skip to content

HOWTO Compile AFWall

CHEF-KOCH edited this page Jul 21, 2014 · 36 revisions

Index

Software

Advanced users can build the latest AFWall+.APK from the Command Line or see the next steps.

Build via Command Line

Choose the Android list targets - lists all your installed Android target e.g. API level 17 for the latest Android Version.

Select: "id: 4 or "Google Inc.:Google APIs:17" Name: Google APIs Type: Add-On Vendor: Google Inc. .... "

You also can use the "-t 4" argument.

After this we set our JAVA_HOME path:

  • export ANDROID_JAVA_HOME="/opt/sun-jdk-1.9.0__22"
  • mkdir afwall_build
  • cd afwall_build
  • git clone git://github.com/ukanth/afwall.git
  • cd afwall
  • git submodule init
  • git submodule update
  • android update project -p . -s
  • ant debug

This build the afwall-debug.apk and place it into /bin folder.

Compiling native binaries

On the host side you'll need to install:

  • NDK r9, nominally under /opt/android-ndk-r9
  • Host-side gcc, make, etc. (Red Hat "Development Tools" group or Debian build-essential)
  • autoconf, automake, and libtool

This command will build the Android binaries and copy them into res/raw/

make -C external NDK=/opt/android-ndk-r9

Via graphical user interface

  • Here is a Video Tutorial from a xda member for those users who want to use the graphical user interface (GUI) method. The tutorial is based on the needed software explained above.
  • Here you get the official build instructions.

For experts user only!

Create an unsigned .APK file with apkbuilder

Use apkbuilder (included in the Android Develop Kit)

apkbuilder ${output.apk.file} -u -z ${packagedresource.file} -f ${dex.file}

Sign an .APK file via jarsigner

Use jarsigner

jarsigner -keystore ${keystore} -storepass ${keystore.password} -keypass ${keypass} -signedjar ${signed.apkfile} ${unsigned.apkfile} ${keyalias}

Publish the latest .APK file

adb -d install -r ${signed.apk}

Useful links