chdir / aria2-android

This repository is obsolete. Much better frontends for aria2 have been written and can be found in F-Droid
GNU General Public License v3.0
66 stars 15 forks source link

How can build Android Smaller #16

Closed AheadSnail closed 4 years ago

AheadSnail commented 6 years ago

Under the environment of the android compilation how to compile a website to provide with the same size,I try to use compiled android guidelines provided by the aria2 website, compiled is much bigger than provided by the website,

This is my profile

PREFIX=$ANDROID_HOME/usr/local TOOLCHAIN=$ANDROID_HOME/toolchain PATH=$TOOLCHAIN/bin:$PATH

./configure \ --host=arm-linux-androideabi \ --build=dpkg-architecture -qDEB_BUILD_GNU_TYPE \ --disable-nls \ --without-gnutls \ --with-openssl \ --without-sqlite3 \ --without-libxml2 \ --with-libexpat \ --with-libcares \ --with-libz \ --with-libssh2 \ CC="$TOOLCHAIN"/bin/arm-linux-androideabi-clang \ CXX="$TOOLCHAIN"/bin/arm-linux-androideabi-clang++ \ CXXFLAGS="-Os -g" \ CFLAGS="-Os -g" \ CPPFLAGS="-fPIE" \ LDFLAGS="-fPIE -pie -L$PREFIX/lib" \ PKG_CONFIG_LIBDIR="$PREFIX/lib/pkgconfig"

Can you tell me? thanks!

Alexander-- commented 6 years ago

@AheadSnail use strip. Also use upx (build upx from git, they recently added Android support). This will make your binary much smaller.

AheadSnail commented 6 years ago

@Alexander-- First of all thank you for your answer first I found android-config.sh wrote that --enable-libaria2 it can build a executable program? I found that by writing this, compiled aria2c much smaller