Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2506)

Unified Diff: build/android/pylib/utils/apk_helper.py

Issue 167643002: android: Don't require aapt to be on the path during builds and tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rietfail Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: build/android/pylib/utils/apk_helper.py
diff --git a/build/android/pylib/utils/apk_helper.py b/build/android/pylib/utils/apk_helper.py
index fbcc595738f7664275e7410b3f5dba7d6c1db46b..d5dff9ab5d8e302b597cdf9feac5f2a8bcc742da 100644
--- a/build/android/pylib/utils/apk_helper.py
+++ b/build/android/pylib/utils/apk_helper.py
@@ -9,10 +9,11 @@ import re
from pylib import cmd_helper
-def GetPackageName(apk_path):
+def GetPackageName(android_sdk_tools, apk_path):
"""Returns the package name of the apk."""
+ aapt = os.path.join(android_sdk_tools, 'aapt')
aapt_output = cmd_helper.GetCmdOutput(
- ['aapt', 'dump', 'badging', apk_path]).split('\n')
+ [aapt, 'dump', 'badging', apk_path]).split('\n')
package_name_re = re.compile(r'package: .*name=\'(\S*)\'')
for line in aapt_output:
m = package_name_re.match(line)

Powered by Google App Engine
This is Rietveld 408576698