These must be provided by the OS. But various OSes do these differently, some only for native apps. We propose to make every one of these a web-app-facing API, and standardize or use extant standards -- and include security up front and all along, not "add it later".
No one has done this, and saying that you don't have to build an OS does not address how web apps might come to have such device APIs.
What's more, Firefox is locked out of many mobile OSes (I do not mean iOS in particular), but the commoditizing hardware can support a fully open OS and web-based "home" and open web apps environment.
The increasing vertical lock-in and tying among all OS vendors (Android included) and the at best half-open- / delayed-open-source status (ChromeOS excluded, bless it -- but it won't support other browsers than Chrome) are problems for Firefox.