I haven’t looked into it, but I would assume that’s just a protected method. You wouldn’t want any app to be able to power off or reboot your device, right? In the old days, your app would need to be in the com.palm.appdomain to get access to all the system APIs. That’s what some of us homebrew developers did to get around it. I don’t know if that’s still true for webOS OSE.
Previously you could “fool” it a bit by either giving your app an appid that starts with com.palm or com.webos. Alternatively you could try to pretend to be sending the command from another app.
Best would be to try with the luna-send command in ssh.
luna-send accepts -a and -h parameters if I recall correctly to put the caller. Some mor example of luna-send can be found on WebOS Internals site: http://www.webos-internals.org/wiki/Luna_Send
This is legacy webOS used on phones, but should work similarly.
I had to create a dynamic JS service running as root that uses a shell command to luna-send to get around the private restriction. I guess you could recompile the whole image changing up the compat.api.json file that was mentioned before as well.
Speaking of which doesn't webOS have any capability similar to what Android has with their Device Administration feature?
I was working on writing a webOS agent for an EMM product some time back and this struck me as odd considering how valuable it would be for use cases such as TVs in hotels.