Grant all permissions to installed app by default
Use the "grant permissions" flag when installing an app through adb.
Accepting the permissions through the UI is then useless.
Change-Id: I738ef37dcaf5facd733f1d36719c243a96ccf498
diff --git a/deploy.py b/deploy.py
index 080be06..ba2b8b8 100755
--- a/deploy.py
+++ b/deploy.py
@@ -238,7 +238,7 @@
DeviceCommandError: If the install command failed.
"""
path = os.path.join(prebuilts_dir, filename)
- adb('install', '-r', path, serial=serial)
+ adb('install', '-g', '-r', path, serial=serial)
def configure_wifi_networks(dut, networks):
@@ -352,19 +352,6 @@
# Grant the permissions through the UI
def configure_perms(dut):
- dut() \
- .child_by_text('You need to grant access for the Permissions Group '
- 'Calendar Camera Contacts Microphone SMS Storage Telephone Location',
- resourceId='android:id/content') \
- .child(text='OK', className='android.widget.Button') \
- .click()
-
- # Accept any permission that is asked for
- prompt = dut(resourceId='com.android.packageinstaller:id/permission_allow_button',
- className='android.widget.Button')
- while prompt.exists:
- prompt.click()
-
# Input the credentials
dut(resourceId='android:id/content') \
.child(text='Username') \