With the latest changes on mozilla-central, now "mach install" does *not*
automatically grant permissions. (We're back to 'adb install <apk>' -- no
-g.)

Instead, permissions are granted at test time, via 'mach
robocop|mochitest|reftest|...' When these test commands are run on an
Android 6 device, mach should report something like 'Granting important
runtime permissions to org.mozilla.fennec' before starting the tests;
behind the scenes, 'adb shell pm grant ... ' commands are issued.

Tests run in autophone and with mozharness (those on treeherder) continue
to install Firefox with -g.

This way permissions won't get in the way of expected test behavior while
local installs are simple and hide no surprises: You can install with 'mach
install', have no permissions granted and trigger permission prompts
manually.

 - Geoff

On Fri, Jan 22, 2016 at 1:54 AM, Sebastian Kaspari <[email protected]>
wrote:

> To unblock Autophone and test automation in general we landed a patch that
> will change "mach install" in a way that it will automatically grant all
> permissions at install time (adb install *-g* <apk>). So if you are using
> "mach install" you wont see any permission prompts because your app already
> has all the needed permissions. You'll need to manually revoke them - if
> you want to.
>
> For gradle builds nothing has changed.
>
> However if you grant permissions at install time, uninstall the app, do a
> fresh new install, then the app will still have some permissions. Android
> does cache some of those as it seems. Anyways: If you are adding or
> changing code that requires a permission then take care of testing this
> part with and without permissions: You magically might have the needed
> permissions already - without being prompted ever.
>
> We (or more: gbrown) is looking into automatically granting permissions
> when running "mach roboccop|mochitest" (adb shell pm grant ..). After that
> we might be able to restore the old "mach install" behavior and reduce the
> confusion a bit.
>
> Relevant bugs:
> https://bugzilla.mozilla.org/show_bug.cgi?id=1234799
> https://bugzilla.mozilla.org/show_bug.cgi?id=1241267
>
>
_______________________________________________
mobile-firefox-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/mobile-firefox-dev

Reply via email to