AAPT2: Variety of small fixes to get the build working
- Add option to rename package in AndroidManifest.xml
- Support default versionName and versionCode
- Accept True and False as valid booleans
Change-Id: I400e350b9dcd0fd1c197d1929144299c7823617d
diff --git a/tools/aapt2/Debug.cpp b/tools/aapt2/Debug.cpp
index 5fce2c1..b4e75f9 100644
--- a/tools/aapt2/Debug.cpp
+++ b/tools/aapt2/Debug.cpp
@@ -210,4 +210,19 @@
std::cout << "}" << std::endl;
}
+void Debug::dumpHex(const void* data, size_t len) {
+ const uint8_t* d = (const uint8_t*) data;
+ for (size_t i = 0; i < len; i++) {
+ std::cerr << std::hex << std::setfill('0') << std::setw(2) << (uint32_t) d[i] << " ";
+ if (i % 8 == 7) {
+ std::cerr << "\n";
+ }
+ }
+
+ if (len - 1 % 8 != 7) {
+ std::cerr << std::endl;
+ }
+}
+
+
} // namespace aapt