Add the --rename-manifest-package option to aapt.

It allows you to force override the manifest
package listed in the AndroidManifest.xml when
creating an APK file.

Change-Id: I7eac7943c4e56610b65728ae54773a273634fd9d
diff --git a/tools/aapt/Main.cpp b/tools/aapt/Main.cpp
index 1e6b52e..6675ac2 100644
--- a/tools/aapt/Main.cpp
+++ b/tools/aapt/Main.cpp
@@ -436,6 +436,15 @@
                 } else if (strcmp(cp, "-utf16") == 0) {
                     bundle.setEncodingSpecified(true);
                     bundle.setUTF8(false);
+                } else if (strcmp(cp, "-rename-manifest-package") == 0) {
+                    argc--;
+                    argv++;
+                    if (!argc) {
+                        fprintf(stderr, "ERROR: No argument supplied for '--rename-manifest-package' option\n");
+                        wantUsage = true;
+                        goto bail;
+                    }
+                    bundle.setManifestPackageNameOverride(argv[0]);
                 } else {
                     fprintf(stderr, "ERROR: Unknown option '-%s'\n", cp);
                     wantUsage = true;