Command Line Arguments for aapt Explained

The information provided in this section is intended to aid you in entering the proper arguments to the command line utility aapt, which is a part of the Android SDK. This information is not an exhaustive discussion on the utility itself, but rather is intended the specific needs of branding the Agentry Client for Android. This information is provided in support of the procedure “Branding Agentry Clients for Android.”

Some of the values for the command line arguments come from files found in the Agentry Client Branding SDK for Android. The files buildinfo and projects.properties, which can be found in the root directory of the extracted files of this SDK, should be opened in a text editor to obtain these values, as described in the following list.

Arguments List for appt

  • <version_code>: This value is found in the buildinfo file for the setting version_code. In this setting, version_code= “--version-code 12345”, the proper value is the numeric portion of this setting (“12345” from this example).
  • <version_name>: This value is found in the buildinfo file, in the setting version_name. In this setting, version_name= “--version-name 1.2.3.45”, the proper value is the numeric portion of this setting (“1.2.3.45” from this example).
  • <target>: This value is found in the projects.properties file for the setting target. In this setting, target=anroid-15, the proper value is the full value for this setting (android-15 from this example).
  • <pkg_name>: This value is set by you to change the package name of the client from the default value of com.syclo.agentry.client.android. Package names for Android applications follow the same conventions as Java packages. The package name must be unique for all Android applications installed on the system. It is therefore recommended that the reverse of your company’s domain be used to begin the package name, as in com.mycompany.myapp.
  • <res_include>: This value is based on the folders found within the folder otherres. Here you will find a list of folders with numeric values for names, such as 01 or 08.01, etc. Within each of these folders are the subfolders res and bin\res. Each of these paths must be referenced with a -S argument to aapt. There will be multiple instances of the switch -S followed by a relative path. There will always be a -S bin/res followed by a -S res. After these there will be two additional instances each for each res and bin\res folder within one of the numeric folders. See the section “Example Resource Includes (<res_include>) Arguments” below for more details.

Example Resource (<res_includes>) Includes Arguments

The command line parameters and arguments related to the -S option would appear as follows (other arguments omitted for this example):
$aapt <other arguments> 
-S bin/res -S res 
-S otherres/01/bin/res -S otherres/01/res
-S otherres/01.01/bin/res -S otherres/01.01/res
-S otherres/02/bin/res -S otherres/02/res 
-S otherres/03/bin/res -S otherres/03/res 
-S otherres/04/bin/res -S otherres/04/res 
-S otherres/05/bin/res -S otherres/05/res 
-S otherres/06/bin/res -S otherres/06/res 
-S otherres/07/bin/res -S otherres/07/res 
-S otherres/08/bin/res -S otherres/08/res
-S otherres/08.01/bin/res -S otherres/08.01/res

The paths for each of the arguments to the -S parameter are relative to the location in which the resources of the branding SDK for Android have been extracted. Note that there may be additional folders within the otherres folder which are numerically named as those above are and should also have corresponding arguments following the pattern above.