Closed
Bug 1504154
Opened 6 years ago
Closed 6 years ago
Port mozrunner.grant_runtime_permissions to mozdevice.ADBAndroid
Categories
(Testing :: Mozbase, enhancement)
Testing
Mozbase
Tracking
(firefox65 fixed)
RESOLVED
FIXED
mozilla65
Tracking | Status | |
---|---|---|
firefox65 | --- | fixed |
People
(Reporter: bc, Assigned: bc)
References
Details
Attachments
(1 file)
5.67 KB,
patch
|
gbrown
:
review+
|
Details | Diff | Splinter Review |
mozrunner.grant_runtime_permissions <https://searchfox.org/mozilla-central/source/testing/mozbase/mozrunner/mozrunner/devices/android_device.py#376> is used to allow the granting of permissions to apps without the need for installation via adb install -g. The usage of adb install -g appears to be the root cause of the fennec crashes such as Bug 1496627 comment 8. ADBAndroid.install_app should handle this.
Assignee | ||
Comment 1•6 years ago
|
||
<https://treeherder.mozilla.org/#/jobs?repo=try&tier=1%2C2%2C3&group_state=expanded&revision=f8a6345d87fceff2e818964da12c388fa263e2e9> This is redundant with the mozrunner.grant_runtime_permissions() but it eliminates the use of adb install -g and would allow us to eliminate any uses of mozrunner.grant_runtime_permissions() as long as we using ADBAndroid.launch_application().
Attachment #9022100 -
Flags: review?(gbrown)
Assignee | ||
Comment 2•6 years ago
|
||
<https://treeherder.mozilla.org/#/jobs?repo=try&tier=1%2C2%2C3&group_state=expanded&revision=f8a6345d87fceff2e818964da12c388fa263e2e9> wlach: This might help with the reported rooting related crashes in mozregression. We should make sure to include this with the changes in bug 1504117.
Blocks: 1504117
Comment 3•6 years ago
|
||
Comment on attachment 9022100 [details] [diff] [review] ADBAndroid-grant-permissions.patch Review of attachment 9022100 [details] [diff] [review]: ----------------------------------------------------------------- ::: testing/mozbase/mozdevice/mozdevice/adb_android.py @@ +449,5 @@ > if fail_if_running and self.process_exist(app_name, timeout=timeout): > raise ADBError("Only one instance of an application may be running " > "at once") > > + if grant_runtime_permissions and self.version >= version_codes.M: grant_runtime_permissions() already checks for version >= version_codes.M, so perhaps eliminate this check?
Attachment #9022100 -
Flags: review?(gbrown) → review+
Assignee | ||
Comment 4•6 years ago
|
||
Right. Thanks.
Pushed by bclary@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/41cabeaa42e7 [mozdevice] Add ADBAndroid.grant_runtime_permissions() and use when launching applications, r=gbrown.
Comment 6•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/41cabeaa42e7
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
status-firefox65:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla65
Comment 7•6 years ago
|
||
This broke Android 7.0 x86 geckoview-junit (tier 3): It was already perma-fail for a couple of tests, but it began crashing on startup with this change. Adding back "-g" to install_app avoids the crash: https://treeherder.mozilla.org/#/jobs?repo=try&tier=1%2C2%2C3&revision=df125efc7c5822de8840982bd68182d317a3163a Maybe we need to grant additional permissions?
Depends on: 1504931
You need to log in
before you can comment on or make changes to this bug.
Description
•