From 5f9dc424b35e4d3b03c5e7f261f421825410ea15 Mon Sep 17 00:00:00 2001 From: Jeff Sharkey Date: Thu, 6 Jul 2017 12:13:42 -0600 Subject: [PATCH] Have bit grant permissions to installed APKs. Otherwise unit tests fail spectacularly when they don't get the runtime permissions that they expect. Bug: 63391323 Test: bit FrameworksServicesTests:com.android.server.NetworkPolicyManagerServiceTest Change-Id: I5307e0456865387ac14178268f543e2007b97096 --- tools/bit/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/bit/main.cpp b/tools/bit/main.cpp index d056ba53ca841..5fb84c8b81919 100644 --- a/tools/bit/main.cpp +++ b/tools/bit/main.cpp @@ -731,7 +731,7 @@ run_phases(vector targets, const Options& options) InstallApk& apk = installApks[i]; if (!apk.file.fileInfo.exists || apk.file.HasChanged()) { // It didn't exist before or it changed, so int needs install - err = run_adb("install", "-r", apk.file.filename.c_str(), NULL); + err = run_adb("install", "-r", "-g", apk.file.filename.c_str(), NULL); check_error(err); apk.installed = true; } else {