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.bclinthall.AndroidApkMaker:android_apkmaker:v0.2-beta'
//for java_apkmaker. use more recent release if available
compile 'com.github.bclinthall.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.javafor an help with usingjava_apkmakerfrom 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_apkmakerto build an apk To make this work, you need include theandroid.jarfile against which you wish to compile in theassetsdirectory. 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.jarin<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.jarzipio-lib-1.8.jarkellinwood-logging-lib-1.1.jarzipsigner-lib-1.17.jarkellinwood-logging-log4j-1.0.jar
-
apkmaker_tester
A simple android application for testingandroid_apkmaker. Included in the assests directory of this project is atest.zipfile. You may replace it with your own, as you see fit.test.zipshould include anAndroidManifest.xml, aresdirectory, ajavadirectory, and (optionally) anassetsdirectory.MainActivity.APP_PACKAGE_NAMEshould be set to the package name specified in theAndroidManifest.xmlintest.zip.