Opened 10 months ago

Closed 10 months ago

Last modified 10 months ago

#31880 closed defect (fixed)

Disabling EME per configure option does not work on mobile anymore

Reported by: gk Owned by: tbb-team
Priority: High Milestone:
Component: Applications/Tor Browser Version:
Severity: Normal Keywords: tbb-rbm, ff68-esr, tbb-9.0-must-alpha, TorBrowserTeam201909R
Cc: boklm, sisbell Actual Points:
Parent ID: #30324 Points: 0.5
Reviewer: Sponsor:


While updating the mozconfig files for Android it turns out that ac_add_option --disable-eme does not work anymore.

We should investigate whether there is a suitable replacement and what the EME situation on Android is to make sure we still provide a DRM-free mobile experience.

Child Tickets

Change History (5)

comment:1 Changed 10 months ago by gk

Points: 0.5

comment:2 Changed 10 months ago by sysrqb

Configuring mobile/android/ with --disable-eme results in:

0:01.23 Traceback (most recent call last):
 0:01.23   File "/home/android/tor-browser/", line 132, in <module>
 0:01.23     sys.exit(main(sys.argv))
 0:01.23   File "/home/android/tor-browser/", line 38, in main
 0:01.23, 'moz.configure'))
 0:01.23   File "/home/android/tor-browser/python/mozbuild/mozbuild/configure/", line 441, in run
 0:01.23     self._value_for(option)
 0:01.23   File "/home/android/tor-browser/python/mozbuild/mozbuild/configure/", line 528, in _value_for
 0:01.23     return self._value_for_option(obj)
 0:01.23   File "/home/android/tor-browser/python/mozbuild/mozbuild/", line 947, in method_call
 0:01.23     cache[args] = self.func(instance, *args)
 0:01.23   File "/home/android/tor-browser/python/mozbuild/mozbuild/configure/", line 591, in _value_for_option
 0:01.23     % option_string.split('=', 1)[0])
 0:01.23 mozbuild.configure.options.InvalidOptionError: --disable-eme is not available in this configuration
 0:01.27 *** Fix above errors and then restart with\
 0:01.27                "./mach build"
 0:01.27 recipe for target 'configure' failed
 0:01.27 make: *** [configure] Error 1

--enable-eme only affects MOZ_EME_MODULES. The MODULES are only defined for browser. In FF67, enabling eme was restricted by OS, kernel, and CPU arch.

[ moz.configure}:

def eme_choices(target):
    if (target.kernel in ('Darwin', 'WINNT', 'Linux') and
        target.os not in ('Android', 'iOS') and
        target.cpu in ('x86', 'x86_64')):
        return ('widevine',)
    if target.kernel == 'WINNT' and target.cpu == 'aarch64':
        return ('widevine',)

       help='{Enable|Disable} support for Encrypted Media Extensions')

The "choices" returned by eme_choices is false-ish (I assume) on Android and iOS, and configure errors as a result of this.

        when = self._conditions.get(option)
        # If `when` resolves to a false-ish value, we always return None.
        # This makes option(..., when='--foo') equivalent to
        # option(..., when=depends('--foo')(lambda x: x)).
        if when and not self._value_for(when) and value is not None:
            # If the option was passed explicitly, we throw an error that
            # the option is not available. Except when the option was passed
            # from the environment, because that would be too cumbersome.
            if value.origin not in ('default', 'environment'):
                raise InvalidOptionError(
                    '%s is not available in this configuration'
                    % option_string.split('=', 1)[0])
            self._logger.log(TRACE, '%r = None', option)
            return None

comment:3 Changed 10 months ago by sysrqb

Keywords: TorBrowserTeam201909R added; TorBrowserTeam201909 removed
Status: newneeds_review

comment:4 Changed 10 months ago by gk

Resolution: fixed
Status: needs_reviewclosed

Thanks. Looks good to me.

comment:5 Changed 10 months ago by sysrqb

For reference, see ticket:16285#comment:34

On Android, it's more interesting. #31880 didn't yield any interesting results
because nothing is changed at compile-time. Fennec and GeckoView use the Android
system DRM support when it is available. This is controlled separately by
Note: See TracTickets for help on using tickets.