diff options
author | 2018-12-14 15:46:27 -0800 | |
---|---|---|
committer | 2019-01-26 09:48:40 -0800 | |
commit | 70edfa8c31309032b27277f1b897a374dbbd6f23 (patch) | |
tree | 29b14fa9dec09570b70b19a044bbc0549b8e6795 /tools/bit/aapt.cpp | |
parent | ce0bd06d174460b69594518e5cf35a85e13b73f8 (diff) |
[bit] Use aapt2 instead of aapt, and don't also adb install apps on the system partition
Test: bit services
Change-Id: I7d44ffbb2745b1a6265bbc77f24f885e5f1d3981
Diffstat (limited to 'tools/bit/aapt.cpp')
-rw-r--r-- | tools/bit/aapt.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tools/bit/aapt.cpp b/tools/bit/aapt.cpp index 961b47cdfecd..cee0cd52a546 100644 --- a/tools/bit/aapt.cpp +++ b/tools/bit/aapt.cpp @@ -159,10 +159,11 @@ int inspect_apk(Apk* apk, const string& filename) { // Load the manifest xml - Command cmd("aapt"); + Command cmd("aapt2"); cmd.AddArg("dump"); cmd.AddArg("xmltree"); cmd.AddArg(filename); + cmd.AddArg("--file"); cmd.AddArg("AndroidManifest.xml"); int err; @@ -217,11 +218,11 @@ inspect_apk(Apk* apk, const string& filename) if (current != NULL) { Attribute attr; string str = match[2]; - size_t colon = str.find(':'); + size_t colon = str.rfind(':'); if (colon == string::npos) { attr.name = str; } else { - attr.ns = scope->namespaces[string(str, 0, colon)]; + attr.ns.assign(str, 0, colon); attr.name.assign(str, colon+1, string::npos); } attr.value = match[3]; |