├── LICENSE ├── README.md ├── aapt ├── arm64-v8a │ ├── bin │ │ └── aapt │ ├── lib │ │ └── libaapt.so │ └── lib64 │ │ └── libaapt.so ├── armeabi-v7a │ ├── bin │ │ └── aapt │ └── lib │ │ ├── aaptcomplate.java │ │ ├── libaapt.so │ │ └── libaaptcomplete.so ├── x86 │ ├── bin │ │ └── aapt │ └── lib │ │ └── libaapt.so └── x86_64 │ ├── bin │ └── aapt │ ├── lib │ └── libaapt.so │ └── lib64 │ └── libaapt.so ├── aapt2 ├── arm64-v8a │ ├── bin │ │ └── aapt2 │ ├── lib │ │ ├── libaapt2.so │ │ └── libaapt2_jni.so │ └── lib64 │ │ ├── libaapt2.so │ │ └── libaapt2_jni.so ├── armeabi-v7a │ ├── bin │ │ └── aapt2 │ └── lib │ │ └── libaapt2.so ├── x86 │ ├── bin │ │ └── aapt2 │ └── lib │ │ ├── libaapt2.so │ │ └── libaapt2_jni.so └── x86_64 │ ├── bin │ └── aapt2 │ ├── lib │ ├── libaapt2.so │ └── libaapt2_jni.so │ └── lib64 │ ├── libaapt2.so │ └── libaapt2_jni.so ├── aapt_and_zipalign_old ├── AAPT_AND_ZIPALIGN_LICENSE ├── README.md ├── aapt ├── android-jar │ └── android.jar ├── lib │ ├── libandroid-base.so │ ├── libandroid-cutils.so │ ├── libandroid-fw.so │ ├── libandroid-utils.so │ └── libandroid-ziparchive.so └── zipalign ├── apksigner ├── apksigner ├── apksigner.jar └── control ├── d8 ├── README.md └── d8.jar ├── dx ├── README.md └── dx.jar ├── ecj ├── ECJ_LICENSE ├── README.md ├── android-24.jar ├── android.jar └── ecj.jar └── zipalign ├── arm64-v8a └── bin │ └── zipalign ├── armeabi-v7a └── bin │ └── zipalign ├── x86 └── bin │ └── zipalign └── x86_64 └── bin └── zipalign /LICENSE: -------------------------------------------------------------------------------- 1 | BSD 3-Clause License 2 | 3 | Copyright (c) 2021, OpenBlocks 4 | All rights reserved. 5 | 6 | Redistribution and use in source and binary forms, with or without 7 | modification, are permitted provided that the following conditions are met: 8 | 9 | 1. Redistributions of source code must retain the above copyright notice, this 10 | list of conditions and the following disclaimer. 11 | 12 | 2. Redistributions in binary form must reproduce the above copyright notice, 13 | this list of conditions and the following disclaimer in the documentation 14 | and/or other materials provided with the distribution. 15 | 16 | 3. Neither the name of the copyright holder nor the names of its 17 | contributors may be used to endorse or promote products derived from 18 | this software without specific prior written permission. 19 | 20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 23 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 24 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 26 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 27 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 28 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ### Android tools built for Android devices 2 | 3 | Android Build Tools collection that can be used on an Android Devices, Will be used for the [OpenBlocks](https://github.com/OpenBlocks/openblocks-app) project. 4 | 5 | This repository contains: 6 | - AAPT (Android Asset Packaging Tool) 7 | - ZipAlign (Zip Aligner) 8 | - Eclipse ECJ (Java Compiler) 9 | - ApkSigner (ApkSigner) 10 | - D8 (Java 8 Dexer) 11 | - DX (Java 7 Dexer) 12 | - R8 (Obfuscation, Code & Resources Shrinking) 13 | 14 | Thanks to [Termux](https://termux.com/) for providing a big portion of these tools! You can check the tools used by us at the [Termux's repository](https://10.via0.com/ipns/k51qzi5uqu5dg9vawh923wejqffxiu9bhqlze5f508msk0h7ylpac27fdgaskx/pool/main/). 15 | 16 | > Note: You may need to manually edit AAPT'S and ZipAligner's executable to match the path of where the shared objects are stored. 17 | -------------------------------------------------------------------------------- /aapt/arm64-v8a/bin/aapt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenBlocksTeam/android-build-tools/4a7e2b06b31cdf358ef69f3a88d82a134aecb685/aapt/arm64-v8a/bin/aapt -------------------------------------------------------------------------------- /aapt/arm64-v8a/lib/libaapt.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenBlocksTeam/android-build-tools/4a7e2b06b31cdf358ef69f3a88d82a134aecb685/aapt/arm64-v8a/lib/libaapt.so -------------------------------------------------------------------------------- /aapt/arm64-v8a/lib64/libaapt.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenBlocksTeam/android-build-tools/4a7e2b06b31cdf358ef69f3a88d82a134aecb685/aapt/arm64-v8a/lib64/libaapt.so -------------------------------------------------------------------------------- /aapt/armeabi-v7a/bin/aapt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenBlocksTeam/android-build-tools/4a7e2b06b31cdf358ef69f3a88d82a134aecb685/aapt/armeabi-v7a/bin/aapt -------------------------------------------------------------------------------- /aapt/armeabi-v7a/lib/aaptcomplate.java: -------------------------------------------------------------------------------- 1 | package com.duy; 2 | 3 | import java.io.File; 4 | import java.io.FileReader; 5 | import java.io.LineNumberReader; 6 | 7 | public class Aapt { 8 | 9 | public static final File dirLog = new File("/storage/emulated/0/.AaptJNI"); 10 | 11 | public static final File txtOut = new File(dirLog, "native_stdout.txt"); 12 | public static final File txtErr = new File(dirLog, "native_stderr.txt"); 13 | 14 | private static boolean bInitialized = false; 15 | 16 | public Aapt() { 17 | if (!bInitialized) { 18 | fnInit(); 19 | } 20 | } 21 | 22 | private static boolean fnInit() { 23 | try { 24 | dirLog.mkdirs(); 25 | System.out.println("Loading native library aaptcomplete..."); 26 | System.loadLibrary("aaptcomplete"); 27 | bInitialized = true; 28 | return true; 29 | } catch (Exception e) { 30 | System.err.println(e.getMessage()); 31 | return false; 32 | } 33 | } 34 | 35 | private native int JNImain(String args); 36 | 37 | public boolean isInitialized() { 38 | return bInitialized; 39 | } 40 | 41 | public synchronized int fnExecute(String args) { 42 | int rc = 99; 43 | System.out.println("Calling JNImain..."); 44 | rc = JNImain(args.replace(' ', '\t')); 45 | System.out.println("Result from native lib=" + rc); 46 | fnGetNativeOutput(); 47 | return rc; 48 | } 49 | 50 | private void fnGetNativeOutput() { 51 | LineNumberReader lnr; 52 | String st = ""; 53 | try { 54 | lnr = new LineNumberReader(new FileReader(txtOut)); 55 | st = ""; 56 | while (st != null) { 57 | st = lnr.readLine(); 58 | if (st != null) 59 | System.out.println(st); 60 | } 61 | lnr.close(); 62 | lnr = new LineNumberReader(new FileReader(txtErr)); 63 | st = ""; 64 | while (st != null) { 65 | st = lnr.readLine(); 66 | if (st != null) 67 | System.err.println(st); 68 | } 69 | lnr.close(); 70 | } catch (Exception e) { 71 | System.err.println(e.getMessage()); 72 | } 73 | } 74 | 75 | } -------------------------------------------------------------------------------- /aapt/armeabi-v7a/lib/libaapt.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenBlocksTeam/android-build-tools/4a7e2b06b31cdf358ef69f3a88d82a134aecb685/aapt/armeabi-v7a/lib/libaapt.so -------------------------------------------------------------------------------- /aapt/armeabi-v7a/lib/libaaptcomplete.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenBlocksTeam/android-build-tools/4a7e2b06b31cdf358ef69f3a88d82a134aecb685/aapt/armeabi-v7a/lib/libaaptcomplete.so -------------------------------------------------------------------------------- /aapt/x86/bin/aapt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenBlocksTeam/android-build-tools/4a7e2b06b31cdf358ef69f3a88d82a134aecb685/aapt/x86/bin/aapt -------------------------------------------------------------------------------- /aapt/x86/lib/libaapt.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenBlocksTeam/android-build-tools/4a7e2b06b31cdf358ef69f3a88d82a134aecb685/aapt/x86/lib/libaapt.so -------------------------------------------------------------------------------- /aapt/x86_64/bin/aapt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenBlocksTeam/android-build-tools/4a7e2b06b31cdf358ef69f3a88d82a134aecb685/aapt/x86_64/bin/aapt -------------------------------------------------------------------------------- /aapt/x86_64/lib/libaapt.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenBlocksTeam/android-build-tools/4a7e2b06b31cdf358ef69f3a88d82a134aecb685/aapt/x86_64/lib/libaapt.so -------------------------------------------------------------------------------- /aapt/x86_64/lib64/libaapt.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenBlocksTeam/android-build-tools/4a7e2b06b31cdf358ef69f3a88d82a134aecb685/aapt/x86_64/lib64/libaapt.so -------------------------------------------------------------------------------- /aapt2/arm64-v8a/bin/aapt2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenBlocksTeam/android-build-tools/4a7e2b06b31cdf358ef69f3a88d82a134aecb685/aapt2/arm64-v8a/bin/aapt2 -------------------------------------------------------------------------------- /aapt2/arm64-v8a/lib/libaapt2.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenBlocksTeam/android-build-tools/4a7e2b06b31cdf358ef69f3a88d82a134aecb685/aapt2/arm64-v8a/lib/libaapt2.so -------------------------------------------------------------------------------- /aapt2/arm64-v8a/lib/libaapt2_jni.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenBlocksTeam/android-build-tools/4a7e2b06b31cdf358ef69f3a88d82a134aecb685/aapt2/arm64-v8a/lib/libaapt2_jni.so -------------------------------------------------------------------------------- /aapt2/arm64-v8a/lib64/libaapt2.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenBlocksTeam/android-build-tools/4a7e2b06b31cdf358ef69f3a88d82a134aecb685/aapt2/arm64-v8a/lib64/libaapt2.so -------------------------------------------------------------------------------- /aapt2/arm64-v8a/lib64/libaapt2_jni.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenBlocksTeam/android-build-tools/4a7e2b06b31cdf358ef69f3a88d82a134aecb685/aapt2/arm64-v8a/lib64/libaapt2_jni.so -------------------------------------------------------------------------------- /aapt2/armeabi-v7a/bin/aapt2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenBlocksTeam/android-build-tools/4a7e2b06b31cdf358ef69f3a88d82a134aecb685/aapt2/armeabi-v7a/bin/aapt2 -------------------------------------------------------------------------------- /aapt2/armeabi-v7a/lib/libaapt2.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenBlocksTeam/android-build-tools/4a7e2b06b31cdf358ef69f3a88d82a134aecb685/aapt2/armeabi-v7a/lib/libaapt2.so -------------------------------------------------------------------------------- /aapt2/x86/bin/aapt2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenBlocksTeam/android-build-tools/4a7e2b06b31cdf358ef69f3a88d82a134aecb685/aapt2/x86/bin/aapt2 -------------------------------------------------------------------------------- /aapt2/x86/lib/libaapt2.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenBlocksTeam/android-build-tools/4a7e2b06b31cdf358ef69f3a88d82a134aecb685/aapt2/x86/lib/libaapt2.so -------------------------------------------------------------------------------- /aapt2/x86/lib/libaapt2_jni.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenBlocksTeam/android-build-tools/4a7e2b06b31cdf358ef69f3a88d82a134aecb685/aapt2/x86/lib/libaapt2_jni.so -------------------------------------------------------------------------------- /aapt2/x86_64/bin/aapt2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenBlocksTeam/android-build-tools/4a7e2b06b31cdf358ef69f3a88d82a134aecb685/aapt2/x86_64/bin/aapt2 -------------------------------------------------------------------------------- /aapt2/x86_64/lib/libaapt2.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenBlocksTeam/android-build-tools/4a7e2b06b31cdf358ef69f3a88d82a134aecb685/aapt2/x86_64/lib/libaapt2.so -------------------------------------------------------------------------------- /aapt2/x86_64/lib/libaapt2_jni.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenBlocksTeam/android-build-tools/4a7e2b06b31cdf358ef69f3a88d82a134aecb685/aapt2/x86_64/lib/libaapt2_jni.so -------------------------------------------------------------------------------- /aapt2/x86_64/lib64/libaapt2.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenBlocksTeam/android-build-tools/4a7e2b06b31cdf358ef69f3a88d82a134aecb685/aapt2/x86_64/lib64/libaapt2.so -------------------------------------------------------------------------------- /aapt2/x86_64/lib64/libaapt2_jni.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenBlocksTeam/android-build-tools/4a7e2b06b31cdf358ef69f3a88d82a134aecb685/aapt2/x86_64/lib64/libaapt2_jni.so -------------------------------------------------------------------------------- /aapt_and_zipalign_old/AAPT_AND_ZIPALIGN_LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | 3 | Version 2.0, January 2004 4 | 5 | http://www.apache.org/licenses/ 6 | 7 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 8 | 9 | 1. Definitions. 10 | 11 | "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. 12 | 13 | "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. 16 | 17 | "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. 18 | 19 | "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. 20 | 21 | "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. 22 | 23 | "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). 24 | 25 | "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. 26 | 27 | "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." 28 | 29 | "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 30 | 31 | 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 32 | 33 | 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was sbmitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 34 | 35 | 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: 36 | 37 | You must give any other recipients of the Work or Derivative Works a copy of this License; and 38 | You must cause any modified files to carry prominent notices stating that You changed the files; and 39 | You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and 40 | If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. 41 | 42 | You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 43 | 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 44 | 45 | 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 46 | 47 | 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 48 | 49 | 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 50 | 51 | 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. 52 | 53 | END OF TERMS AND CONDITIONSu 54 | -------------------------------------------------------------------------------- /aapt_and_zipalign_old/README.md: -------------------------------------------------------------------------------- 1 | For `zipalign`, The setup is basically the same thing as aapt, just replace aapt stuff with zipalign stuff 2 | 3 | # AAPT 4 | aapt is a tool that allows you to view, create, and update ZIP-compatible archives (ZIP, JAR, and APK). It can also compile resources into binary assets. It is the base builder for Android applications. ([Source](https://stackoverflow.com/questions/28234671/what-is-aapt-android-asset-packaging-tool-and-how-does-it-work)) 5 | 6 | ## How to 7 | To run aapt, you **must** put everything in this folder into the path that you get from `getFilesDir()` (Yes it can be a subdirectory). 8 | 9 | Steps to use it: 10 | - chmod (change permission) the file so we can actually execute it 11 | ```java 12 | Runtime.getRuntime().exec("chmod u+x path/to/aapt"); // u = user, x = execute, + = add. "User add permission to execute" NOTE: This will NOT work on files outside getFilesDir() 13 | ``` 14 | - well, run it 15 | ``` 16 | Runtime.getRuntime().exec("path/to/aapt --arguments"); 17 | ``` 18 | 19 | > Replace the `/path/to/aapt` to the path of aapt, and replace the `--arguments` to be the arguments that you want to put 20 | 21 | Original `control` file: 22 | ```yml 23 | Package: aapt 24 | Architecture: aarch64 25 | Installed-Size: 4524 26 | Maintainer: Termux members @termux 27 | Version: 7.1.2.33-11 28 | Homepage: https://elinux.org/Android_aapt 29 | Depends: libc++, libexpat, libpng, libzopfli, zlib 30 | Description: Android Asset Packaging Tool 31 | ``` 32 | 33 | Thanks to Termux for providing this binary! 34 | -------------------------------------------------------------------------------- /aapt_and_zipalign_old/aapt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenBlocksTeam/android-build-tools/4a7e2b06b31cdf358ef69f3a88d82a134aecb685/aapt_and_zipalign_old/aapt -------------------------------------------------------------------------------- /aapt_and_zipalign_old/android-jar/android.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenBlocksTeam/android-build-tools/4a7e2b06b31cdf358ef69f3a88d82a134aecb685/aapt_and_zipalign_old/android-jar/android.jar -------------------------------------------------------------------------------- /aapt_and_zipalign_old/lib/libandroid-base.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenBlocksTeam/android-build-tools/4a7e2b06b31cdf358ef69f3a88d82a134aecb685/aapt_and_zipalign_old/lib/libandroid-base.so -------------------------------------------------------------------------------- /aapt_and_zipalign_old/lib/libandroid-cutils.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenBlocksTeam/android-build-tools/4a7e2b06b31cdf358ef69f3a88d82a134aecb685/aapt_and_zipalign_old/lib/libandroid-cutils.so -------------------------------------------------------------------------------- /aapt_and_zipalign_old/lib/libandroid-fw.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenBlocksTeam/android-build-tools/4a7e2b06b31cdf358ef69f3a88d82a134aecb685/aapt_and_zipalign_old/lib/libandroid-fw.so -------------------------------------------------------------------------------- /aapt_and_zipalign_old/lib/libandroid-utils.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenBlocksTeam/android-build-tools/4a7e2b06b31cdf358ef69f3a88d82a134aecb685/aapt_and_zipalign_old/lib/libandroid-utils.so -------------------------------------------------------------------------------- /aapt_and_zipalign_old/lib/libandroid-ziparchive.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenBlocksTeam/android-build-tools/4a7e2b06b31cdf358ef69f3a88d82a134aecb685/aapt_and_zipalign_old/lib/libandroid-ziparchive.so -------------------------------------------------------------------------------- /aapt_and_zipalign_old/zipalign: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenBlocksTeam/android-build-tools/4a7e2b06b31cdf358ef69f3a88d82a134aecb685/aapt_and_zipalign_old/zipalign -------------------------------------------------------------------------------- /apksigner/apksigner: -------------------------------------------------------------------------------- 1 | #!/usr/bin/sh 2 | dalvikvm -Xcompiler-option --compiler-filter=speed -cp apksigner.jar com.android.apksigner.ApkSignerTool $@ 3 | -------------------------------------------------------------------------------- /apksigner/apksigner.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenBlocksTeam/android-build-tools/4a7e2b06b31cdf358ef69f3a88d82a134aecb685/apksigner/apksigner.jar -------------------------------------------------------------------------------- /apksigner/control: -------------------------------------------------------------------------------- 1 | Package: apksigner 2 | Architecture: all 3 | Installed-Size: 368 4 | Maintainer: Termux members @termux 5 | Version: 30.0.3-1 6 | Homepage: https://developer.android.com/studio/command-line/apksigner 7 | Description: APK signing tool 8 | -------------------------------------------------------------------------------- /d8/README.md: -------------------------------------------------------------------------------- 1 | # D8 2 | D8 is a tool used to convert a java bytecode into dalvik code, making it possible to run java classes on android. It is similar to dx, but D8 runs faster and produces smaller .dex files with equivalent or better runtime performance when compared to dx. 3 | 4 | ## How to 5 | To run d8, you **must** put the `d8.jar` file into the path that you get from `getFilesDir()`. Then, to execute it, use 6 | ```java 7 | Runtime.getRuntime().exec("dalvikvm -Xcompiler-option --compiler-filter=speed -Xmx256m -cp /path/to/d8.jar com.android.tools.r8.D8 \"!arguments!\""); 8 | ``` 9 | > Replace the `/path/to/d8.jar` to the path of d8.jar, and replace the `!arguments!` to be the arguments that you want to put 10 | 11 | This jar is built from source at version 2.1.89 and converted into dex code using d8 itself, click [here](https://r8.googlesource.com/r8/+/refs/tags/2.1.89) to view the source 12 | -------------------------------------------------------------------------------- /d8/d8.jar: -------------------------------------------------------------------------------- 1 | PK -------------------------------------------------------------------------------- /dx/README.md: -------------------------------------------------------------------------------- 1 | # Dx 2 | Dx is an old tool used to convert a java bytecode into dalvik (If you want a newer one, use d8), making it possible to run java classes on android. 3 | 4 | ## How to 5 | To run dx, you **must** put the `dex.jar` file into the path that you get from `getFilesDir()`. Then, to execute it, use 6 | ```java 7 | Runtime.getRuntime().exec("dalvikvm -Xcompiler-option --compiler-filter=speed -Xmx256m -cp /path/to/dx.jar dx.dx.command.Main \"!arguments!\""); 8 | ``` 9 | > Replace the `/path/to/dx.jar` to the path of dx.jar, and replace the `!arguments!` to be the arguments that you want to put 10 | 11 | > To merge dexes, replace the `dx.dx.command.Main` to be `dx.dx.merge.DexMerger` 12 | 13 | Original `control` file: 14 | ```yml 15 | Package: dx 16 | Architecture: all 17 | Installed-Size: 1472 18 | Maintainer: @termux 19 | Version: 1:1.16-6 20 | Homepage: http://developer.android.com/tools/help/index.html 21 | Description: Command which takes in Java class files and converts them to format executable by Dalvik VM 22 | ``` 23 | -------------------------------------------------------------------------------- /dx/dx.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenBlocksTeam/android-build-tools/4a7e2b06b31cdf358ef69f3a88d82a134aecb685/dx/dx.jar -------------------------------------------------------------------------------- /ecj/ECJ_LICENSE: -------------------------------------------------------------------------------- 1 | Eclipse Public License - v 2.0 2 | 3 | THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE 4 | PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION 5 | OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. 6 | 7 | 1. DEFINITIONS 8 | 9 | "Contribution" means: 10 | 11 | a) in the case of the initial Contributor, the initial content 12 | Distributed under this Agreement, and 13 | 14 | b) in the case of each subsequent Contributor: 15 | i) changes to the Program, and 16 | ii) additions to the Program; 17 | where such changes and/or additions to the Program originate from 18 | and are Distributed by that particular Contributor. A Contribution 19 | "originates" from a Contributor if it was added to the Program by 20 | such Contributor itself or anyone acting on such Contributor's behalf. 21 | Contributions do not include changes or additions to the Program that 22 | are not Modified Works. 23 | 24 | "Contributor" means any person or entity that Distributes the Program. 25 | 26 | "Licensed Patents" mean patent claims licensable by a Contributor which 27 | are necessarily infringed by the use or sale of its Contribution alone 28 | or when combined with the Program. 29 | 30 | "Program" means the Contributions Distributed in accordance with this 31 | Agreement. 32 | 33 | "Recipient" means anyone who receives the Program under this Agreement 34 | or any Secondary License (as applicable), including Contributors. 35 | 36 | "Derivative Works" shall mean any work, whether in Source Code or other 37 | form, that is based on (or derived from) the Program and for which the 38 | editorial revisions, annotations, elaborations, or other modifications 39 | represent, as a whole, an original work of authorship. 40 | 41 | "Modified Works" shall mean any work in Source Code or other form that 42 | results from an addition to, deletion from, or modification of the 43 | contents of the Program, including, for purposes of clarity any new file 44 | in Source Code form that contains any contents of the Program. Modified 45 | Works shall not include works that contain only declarations, 46 | interfaces, types, classes, structures, or files of the Program slely 47 | in each case in order to link to, bind by name, or subclass the Program 48 | or Modified Works thereof. 49 | 50 | "Distribute" means the acts of a) distributing or b) making available 51 | in any manner that enables the transfer of a copy. 52 | 53 | "Source Code" means the form of a Program preferred for making 54 | modifications, including but not limited to software source code, 55 | documentation source, and configuration files. 56 | 57 | "Secondary License" means either the GNU General Public License, 58 | Version 2.0, or any later versions of that license, including any 59 | exceptions or additional permissions as identified by the initial 60 | Contributor. 61 | 62 | 2. GRANT OF RIGHTS 63 | 64 | a) Subject to the terms of this Agreement, each Contributor hereby 65 | grants Recipient a non-exclusive, worldwide, royalty-free copyright 66 | license to reproduce, prepare Derivative Works of, publicly display, 67 | publicly perform, Distribute and sublicense the Contribution of such 68 | Contributor, if any, and such Derivative Works. 69 | 70 | b) Subject to the terms of this Agreement, each Contributor hereby 71 | grants Recipient a non-exclusive, worldwide, royalty-free patent 72 | license under Licensed Patents to make, use, sell, offer to sell, 73 | import and otherwise transfer the Contribution of such Contributor, 74 | if any, in Source Code or other form. This patent license shall 75 | apply to the combination of the Contribution and the Program if, at 76 | the time the Contribution is added by the Contributor, such addition 77 | of the Contribution causes such combination to be covered by the 78 | Licensed Patents. The patent license shall not apply to any other 79 | combinations which include the Contribution. No hardware per se is 80 | licensed hereunder. 81 | 82 | c) Recipient understands that although each Contributor grants the 83 | licenses to its Contributions set forth herein, no assurances are 84 | provided by any Contributor that the Program does not infringe the 85 | patent or other intellectual property rights of any other entity. 86 | Each Contributor disclaims any liability to Recipient for claims 87 | brought by any other entity based on infringement of intellectual 88 | property rights or otherwise. As a condition to exercising the 89 | rights and licenses granted hereunder, each Recipient hereby 90 | assumes sole responsibility to secure any other intellectual 91 | property rights needed, if any. For example, if a third party 92 | patent license is required to allow Recipient to Distribute the 93 | Program, it is Recipient's responsibility to acquire that license 94 | before distributing the Program. 95 | 96 | d) Each Contributor represents that to its knowledge it has 97 | sufficient copyright rights in its Contribution, if any, to grant 98 | the copyright license set forth in this Agreement. 99 | 100 | e) Notwithstanding the terms of any Secondary License, no 101 | Contributor makes additional grants to any Recipient (other than 102 | those set forth in this Agreement) as a result of such Recipient's 103 | receipt of the Program under the terms of a Secondary License 104 | (if permitted under the terms of Section 3). 105 | 106 | 3. REQUIREMENTS 107 | 108 | 3.1 If a Contributor Distributes the Program in any form, then: 109 | 110 | a) the Program must also be made available as Source Code, in 111 | accordance with section 3.2, and the Contributor must accompany 112 | the Program with a statement that the Source Code for the Program 113 | is available under this Agreement, and informs Recipients how to 114 | obtain it in a reasonable manner on or through a medium customarily 115 | used for software exchange; and 116 | 117 | b) the Contributor may Distribute the Program under a license 118 | different than this Agreement, provided that such license: 119 | i) effectively disclaims on behalf of all other Contributors all 120 | warranties and conditions, express and implied, including 121 | warranties or conditions of title and non-infringement, and 122 | implied warranties or conditions of merchantability and fitness 123 | for a particular purpose; 124 | 125 | ii) effectively excludes on behalf of all other Contributors all 126 | liability for damages, including direct, indirect, special, 127 | incidental and consequential damages, such as lost profits; 128 | 129 | iii) does not attempt to limit or alter the recipients' rights 130 | in the Source Code under section 3.2; and 131 | 132 | iv) requires any subsequent distribution of the Program by any 133 | party to be under a license that satisfies the requirements 134 | of this section 3. 135 | 136 | 3.2 When the Program is Distributed as Source Code: 137 | 138 | a) it must be made available under this Agreement, or if the 139 | Program (i) is combined with other material in a separate file or 140 | files made available under a Secondary License, and (ii) the initial 141 | Contributor attached to the Source Code the notice described in 142 | Exhibit A of this Agreement, then the Program may be made available 143 | under the terms of such Secondary Licenses, and 144 | 145 | b) a copy of this Agreement must be included with each copy of 146 | the Program. 147 | 148 | 3.3 Contributors may not remove or alter any copyright, patent, 149 | trademark, attribution notices, disclaimers of warranty, or limitations 150 | of liability ("notices") contained within the Program from any copy of 151 | the Program which they Distribute, provided that Contributors may add 152 | their own appropriate notices. 153 | 154 | 4. COMMERCIAL DISTRIBUTION 155 | 156 | Commercial distributors of software may accept certain responsibilities 157 | with respect to end users, business partners and the like. While this 158 | license is intended to facilitate the commercial use of the Program, 159 | the Contributor who includes the Program in a commercial product 160 | offering should do so in a manner which does not create potential 161 | liability for other Contributors. Therefore, if a Contributor includes 162 | the Program in a commercial product offering, such Contributor 163 | ("Commercial Contributor") hereby agrees to defend and indemnify every 164 | other Contributor ("Indemnified Contributor") against any losses, 165 | damages and costs (collectively "Losses") arising from claims, lawsuits 166 | and other legal actions brought by a third party against the Indemnified 167 | Contributor to the extent caused by the acts or omissions of such 168 | Commercial Contributor in connection with its distribution of the Program 169 | in a commercial product offering. The obligations in this section do not 170 | apply to any claims or Losses relating to any actual or alleged 171 | intellectual property infringement. In order to qualify, an Indemnified 172 | Contributor must: a) promptly notify the Commercial Contributor in 173 | writing of such claim, and b) allow the Commercial Contributor to control, 174 | and cooperate with the Commercial Contributor in, the defense and any 175 | related settlement negotiations. The Indemnified Contributor may 176 | participate in any such claim at its own expense. 177 | 178 | For example, a Contributor might include the Program in a commercial 179 | product offering, Product X. That Contributor is then a Commercial 180 | Contributor. If that Commercial Contributor then makes performance 181 | claims, or offers warranties related to Product X, those performance 182 | claims and warranties are such Commercial Contributor's responsibility 183 | alone. Under this section, the Commercial Contributor would have to 184 | defend claims against the other Contributors related to those performance 185 | claims and warranties, and if a court requires any other Contributor to 186 | pay any damages as a result, the Commercial Contributor must pay 187 | those damages. 188 | 189 | 5. NO WARRANTY 190 | 191 | EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT 192 | PERMITTED BY APPLICABLE LAW, THE PROGRAM IS PROVIDED ON AN "AS IS" 193 | BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR 194 | IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF 195 | TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR 196 | PURPOSE. Each Recipient is solely responsible for determining the 197 | appropriateness of using and distributing the Program and assumes all 198 | risks associated with its exercise of rights under this Agreement, 199 | including but not limited to the risks and costs of program errors, 200 | compliance with applicable laws, damage to or loss of data, programs 201 | or equipment, and unavailability or interruption of operations. 202 | 203 | 6. DISCLAIMER OF LIABILITY 204 | 205 | EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT 206 | PERMITTED BY APPLICABLE LAW, NEITHER RECIPIENT NOR ANY CONTRIBUTORS 207 | SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 208 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST 209 | PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 210 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 211 | ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE 212 | EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE 213 | POSSIBILITY OF SUCH DAMAGES. 214 | 215 | 7. GENERAL 216 | 217 | If any provision of this Agreement is invalid or unenforceable under 218 | applicable law, it shall not affect the validity or enforceability of 219 | the remainder of the terms of this Agreement, and without further 220 | action by the parties hereto, such provision shall be reformed to the 221 | minimum extent necessary to make such provision valid and enforceable. 222 | 223 | If Recipient institutes patent litigation against any entity 224 | (including a cross-claim or counterclaim in a lawsuit) alleging that the 225 | Program itself (excluding combinations of the Program with other software 226 | or hardware) infringes such Recipient's patent(s), then such Recipient's 227 | rights granted under Section 2(b) shall terminate as of the date such 228 | litigation is filed. 229 | 230 | All Recipient's rights under this Agreement shall terminate if it 231 | fails to comply with any of the material terms or conditions of this 232 | Agreement and does not cure such failure in a reasonable period of 233 | time after becoming aware of such noncompliance. If all Recipient's 234 | rights under this Agreement terminate, Recipient agrees to cease use 235 | and distribution of the Program as soon as reasonably practicable. 236 | However, Recipient's obligations under this Agreement and any licenses 237 | granted by Recipient relating to the Program shall continue and survive. 238 | 239 | Everyone is permitted to copy and distribute copies of this Agreement, 240 | but in order to avoid inconsistency the Agreement is copyrighted and 241 | may only be modified in the following manner. The Agreement Steward 242 | reserves the right to publish new versions (including revisions) of 243 | this Agreement from time to time. No one other than the Agreement 244 | Steward has the right to modify this Agreement. The Eclipse Foundation 245 | is the initial Agreement Steward. The Eclipse Foundation may assign the 246 | responsibility to serve as the Agreement Steward to a suitable separate 247 | entity. Each new version of the Agreement will be given a distinguishing 248 | version number. The Program (including Contributions) may always be 249 | Distributed subject to the version of the Agreement under which it was 250 | received. In addition, after a new version of the Agreement is published, 251 | Contributor may elect to Distribute the Program (including its 252 | Contributions) under the new version. 253 | 254 | Except as expressly stated in Sections 2(a) and 2(b) above, Recipient 255 | receives no rights or licenses to the intellectual property of any 256 | Contributor under this Agreement, whether expressly, by implication, 257 | estoppel or otherwise. All rights in the Program not expressly granted 258 | under this Agreement are reserved. Nothing in this Agreement is intended 259 | to be enforceable by any entity that is not a Contributor or Recipient. 260 | No third-party beneficiary rights are created under this Agreement. 261 | 262 | Exhibit A - Form of Secondary Licenses Notice 263 | 264 | "This Source Code may also be made available under the following 265 | Secondary Licenses when the conditions for such availability set forth 266 | in the Eclipse Public License, v. 2.0 are satisfied: {name license(s), 267 | version(s), and exceptions or additional permissions here}." 268 | 269 | Simply including a copy of this Agreement, including this Exhibit A 270 | is not sufficient to license the Source Code under Secondary Licenses. 271 | 272 | If it is not possible or desirable to put the notice in a particular 273 | file, then You may include the notice in a location (such as a LICENSE 274 | file in a relevant directory) where a recipient would be likely to 275 | look for such a notice. 276 | 277 | You may add additional accurate notices of copyright ownership. 278 | -------------------------------------------------------------------------------- /ecj/README.md: -------------------------------------------------------------------------------- 1 | # Eclipse Java Compiler 2 | Eclipse Java Compiler (ecj) is a tool made by the Eclipse Foundation used to compile a java source code into java bytecode. Why use ecj instead of javac? Some said that ecj is easier to port into android compared to javac. At the time I'm writing this, noone has ever ported javac into android. 3 | 4 | ## How to 5 | To run ecj, you **must** put the `ecj.jar` and `android.jar` (or the `android-24.jar` aswell, if you wanted to) file into the path that you get from `getFilesDir()`. Example use: 6 | ```java 7 | String arguments = ""; // The arguments that we want to put 8 | String android_jar_path = "android.jar"; // The path of android.jar we put, not sure what this is for, but well, termux put it sooo, we might aswell do it. 9 | 10 | // -proc:none to disable annotation processing. 11 | // -7 for java 1.7 compatibility. 12 | 13 | String command = 14 | "dalvikvm -Xmx256m -Xcompiler-option --compiler-filter=speed -cp ecj.jar org.eclipse.jdt.internal.compiler.batch.Main -proc:none -7 -cp " + android_jar_path + " " + arguments; 15 | 16 | Runtime.getRuntime().exec(command); 17 | ``` 18 | 19 | Original `control` file: 20 | ``` 21 | Package: ecj 22 | Architecture: all 23 | Installed-Size: 8192 24 | Maintainer: Termux members @termux 25 | Version: 1:4.12-3 26 | Homepage: http://www.eclipse.org/jdt/core/ 27 | Conflicts: ecj4.6 28 | Description: Eclipse Compiler for Java 29 | ``` 30 | -------------------------------------------------------------------------------- /ecj/android-24.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenBlocksTeam/android-build-tools/4a7e2b06b31cdf358ef69f3a88d82a134aecb685/ecj/android-24.jar -------------------------------------------------------------------------------- /ecj/android.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenBlocksTeam/android-build-tools/4a7e2b06b31cdf358ef69f3a88d82a134aecb685/ecj/android.jar -------------------------------------------------------------------------------- /ecj/ecj.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenBlocksTeam/android-build-tools/4a7e2b06b31cdf358ef69f3a88d82a134aecb685/ecj/ecj.jar -------------------------------------------------------------------------------- /zipalign/arm64-v8a/bin/zipalign: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenBlocksTeam/android-build-tools/4a7e2b06b31cdf358ef69f3a88d82a134aecb685/zipalign/arm64-v8a/bin/zipalign -------------------------------------------------------------------------------- /zipalign/armeabi-v7a/bin/zipalign: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenBlocksTeam/android-build-tools/4a7e2b06b31cdf358ef69f3a88d82a134aecb685/zipalign/armeabi-v7a/bin/zipalign -------------------------------------------------------------------------------- /zipalign/x86/bin/zipalign: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenBlocksTeam/android-build-tools/4a7e2b06b31cdf358ef69f3a88d82a134aecb685/zipalign/x86/bin/zipalign -------------------------------------------------------------------------------- /zipalign/x86_64/bin/zipalign: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenBlocksTeam/android-build-tools/4a7e2b06b31cdf358ef69f3a88d82a134aecb685/zipalign/x86_64/bin/zipalign --------------------------------------------------------------------------------