I developed this apkmaker project as part of IconEffects, and I am releasing it under Apache License v 2.0. It is a gradle project that contains three modules.
You can include the library modules in your project using jitpack. In your build.gradle
file:
repositories {
...
maven { url "https://jitpack.io" }
}
dependencies {
//for android_apkmaker. use more recent release if available
compile 'com.github.theaetetus.AndroidApkMaker:android_apkmaker:v0.2-beta'
//for java_apkmaker. use more recent release if available
compile 'com.github.theaetetus.AndroidApkMaker:java_apkmaker:v0.2-beta'
}
java_apkmaker
A java application that makes an unsigned android apk. To use it as such, rungradle :java_apkmaker:installDist
. The application will be installed atjava_apkmaker/build/install/java_apkmaker/
with runnables injava_apkmaker/build/install/java_apkmaker/bin/
. Seejava_apkmaker/src/main/java/com/theaetetuslabs/java_apkmaker/Help.java
for an help with usingjava_apkmaker
from the command line. There is a script to run it atjava_apkmaker/BuildApk.sh
- modify paths as appropriate for your system.
Relies on or includes
sdklib
, copyright The Android Open Source Project, 2010, Apache License v 2.0.
An extremely pared down version of sdklib is included here in the source.ecj
, copryright The Eclipse Foundation, 2015, Eclipse Public License Version 1.0.
Included as a dependency injava_apkmaker/build.gradle
.dx
, copyright The Android Open Source Project, 2006, Apache License v 2.0.
Included as a dependency injava_apkmaker/build.gradle
.aapt
, copyright The Android Open Source Project, 2006, Apache License v 2.0.
Included as binary executables. Built from source modified by Tom Arn (https://github.com/t-arn/java-ide-droid/tree/master/jni), and B. Clint Hall (https://github.com/theaetetus/java-ide-droid/tree/master/jni)
-
android_apkmaker
An android library which relies onjava_apkmaker
to build an apk To make this work, you need include theandroid.jar
file against which you wish to compile in theassets
directory. So, for example, if the apk you wish to build will target android API 21, you need to use the Android SDK manager to download the SDK Platform for API 21. You can then findandroid.jar
in<path-to-sdk>/platforms/android-21/
. Copy that file toandroid_apkmaker/src/main/assets/android.jar
.Relies on or includes the following jars. All copyright Ken Ellingwood, 2010, licensed under Apache License v 2.0, and included in
android_apkmaker/libs
.kellinwood-logging-android-1.4.jar
zipio-lib-1.8.jar
kellinwood-logging-lib-1.1.jar
zipsigner-lib-1.17.jar
kellinwood-logging-log4j-1.0.jar
-
apkmaker_tester
A simple android application for testingandroid_apkmaker
. Included in the assests directory of this project is atest.zip
file. You may replace it with your own, as you see fit.test.zip
should include anAndroidManifest.xml
, ares
directory, ajava
directory, and (optionally) anassets
directory.MainActivity.APP_PACKAGE_NAME
should be set to the package name specified in theAndroidManifest.xml
intest.zip
.