Search code examples
operating-systemsystemgoogle-chrome-os

Access system level functionality on ChromeOS


I have created an application for both Windows and MacOS which allows for enterprise asset monitoring. However, I seem to be unable to locate any way of accessing functionality like system sleep, battery statistics, etc. on ChromeOS. Obviously I have created an extension that accesses some of the functionality I require via the chrome.system and chrome.display, etc. APIs but access to functionality like putting the system to sleep etc. is just not available via the Chrome extension APIs. I have flirted with pnacl, but that seems to be deprecated for all intents and purposes. Btw, I looked at trying to call system() calls from within a cpp method in order to access this in a very shanky fashion, but even that is only available via pnacl as far as I can tell (if even there). So I am hoping that some bright person out there can give me a helpful hint on the way forward. Help! Thanks in advance!


Solution

  • Sorry, but by design, you're SOL. The only things you have access to are the extension APIs you can find at https://developer.chrome.com/docs/extensions/.

    CrOS is specifically design to not allow random extensions to execute random programs or snoop random filesystem paths. That would fundamentally violate security principles.

    NaCl/PNaCl wouldn't help you in this regard as they are completely sandboxed too.

    There are some APIs being developed specifically for enterprise users, but they would only be available to those admins, and not to extensions. So I'm guessing that doesn't help you.