Kwandroid
The kwandroid command allows you to obtain the build specification file for an Android project (versions 10, 11, 12, 13, 14).
To generate a build specification for Android 9 or previous versions, run the following bash script:
#!/bin/bash source build/envsetup.sh lunch aosp_arm-eng kwinject -o kwinject.out make
Usage
kwandroid --android-version <version> --output <output_file> --android <dir> --script <script_file> [optional arguments]
- <version> specifies the version of Android (For example: 10, 11, 12, 13, or 14)
- <output_file> specifies the name of the build specification file that is created
- <dir> is the location of your Android working directory
- <script_file> is the bash script used to run the Android build. For example:
#!/bin/bash source build/envsetup.sh lunch aosp_arm-eng m
- [optional arguments] are any additional options you may want to specify. See the 'Optional arguments' section below for more details.
kwandroid runs the Android build as defined in the specified <script_file>. It captures the build specification for java and stores it in the specified <output_file>. For example, you can use the following command to capture the build specification for an Android 11 project:
$<kw-intallation-dir>/bin/kwandroid --android-version 11 --output /tmp/kwinject.out --android /space/android-r --script /space/android-r-build.sh
The command above runs compilation for an Android-R project (android working directory is /space/android-r). The compilation command is defined in the /space/android-r-build.sh script file and the generated build specification is stored in the /tmp/kwinject.out file.
Options
Name (and short name) | Description |
---|---|
--android-version <version> | to specify the version of Android |
--android <dir> | location of your android working directory |
--bazel | supports analysis of Android Bazel builds |
--output <file> | the build specification <file> to create |
--script <file> | bash script to run Android build |