03/04/2011, 09:58 AM
|
#1 (permalink) |
|
Legend
![]() Join Date: May 2005
Location: Winnipeg, MB, Canada
Posts: 3,883
Likes Received: 496
Thanks: 801
Thanked 12,954 Times in 1,495 Posts
|
Homebrew JS Service Framework v1.0.0
HP webOS 2.0 brought with it javascript system services. These services are run via Node.js and are amazingly powerful. So naturally, HP locked down third party services with a jailer. For homebrew however, full system root access is a must. This homebrew js service framework remedies the situation. It adds a custom script to /var/usr/bin/run-homebrew-js-service All a homebrew service needs to do different from standard service format is to include a custom dbus file which uses the custom script. The end result is that the service will run as root, with full system access (needed for services like FileMgr and SysToolsMgr). SOURCE: homebrew-js-service-framework - Project Hosting on Google Code P|C Homebrew Gallery: Homebrew JS Service Framework | PreCentral.net | The #1 Palm Pre and Pixi Community Change Log v1.0.0 - March 4, 2011 - Initial public release!
__________________
If you've liked my software, please consider to towards future development.Developer of many apps such as: WebOS Quick Install, WebOS Theme Builder, Ipk Packager, Unified Diff Creator, Internalz Pro, ComicShelf HD, LED Torch, over 70 patches and more. @JayCanuck @CanuckCoding Facebook |
09/09/2011, 02:57 AM
|
#2 (permalink) |
|
Member
![]() Join Date: Aug 2011
Posts: 108
Likes Received: 40
Thanks: 6
Thanked 84 Times in 29 Posts
|
Here's a good tutorial on using this. Helped me out a lot:
Using the Homebrew Javascript Service Framework « Coding for Mobile Platforms One thing it doesn't seem to mention is that you need to reboot? to get dbus to pick up the new files. |
09/09/2011, 10:35 AM
|
#3 (permalink) |
|
Member
![]() Join Date: May 2010
Posts: 9
Likes Received: 0
Thanks: 2
Thanked 1 Time in 1 Post
|
Ok, I'm missing something here:
# ipkg install /media/internal/ca.canucksoftware.js-service-framework_1.0.1_all.ipk -force-depends Begin installation of ca.canucksoftware.js-service-framework Installing ca.canucksoftware.js-service-framework (1.0.1) to root... Configuring ca.canucksoftware.js-service-framework rmdir: 'media/cryptofs/apps/usr/palm/applications/ca.canucksoftware.js-service-framework': No such file or directory install: can't stat 'media/cryptofs/apps/usr/bin/run-homebrew-js-service': No such file or directory |
09/09/2011, 12:24 PM
|
#4 (permalink) |
|
Member
![]() Join Date: Aug 2011
Posts: 108
Likes Received: 40
Thanks: 6
Thanked 84 Times in 29 Posts
|
It doesn't have an app per say - all it really does is install the run-homebrew-js-service script. The one in Preware installs, not sure if it's different.
FileMgr depends on it. |
09/09/2011, 12:32 PM
|
#5 (permalink) | |
|
Legend
![]() Join Date: May 2005
Location: Winnipeg, MB, Canada
Posts: 3,883
Likes Received: 496
Thanks: 801
Thanked 12,954 Times in 1,495 Posts
|
Quote:
__________________
If you've liked my software, please consider to towards future development.Developer of many apps such as: WebOS Quick Install, WebOS Theme Builder, Ipk Packager, Unified Diff Creator, Internalz Pro, ComicShelf HD, LED Torch, over 70 patches and more. @JayCanuck @CanuckCoding Facebook |
|
09/11/2011, 04:15 PM
|
#6 (permalink) |
|
Homebrew Developer
![]() Join Date: Jan 2008
Posts: 21
Likes Received: 4
Thanks: 0
Thanked 23 Times in 8 Posts
|
I've started working on a minor little app that needs root command line access to get its job done, and was pointed to this framework. I think I have everything set up according to the steps in the tutorial linked above, but even after a restart, running the id command from my service returns a uid of prisoner in group jailusers. Any suggestions on how/where to start troubleshooting this?
Last edited by FoxFireX; 09/11/2011 at 04:44 PM. |
09/11/2011, 04:21 PM
|
#7 (permalink) | |
|
Legend
![]() Join Date: May 2005
Location: Winnipeg, MB, Canada
Posts: 3,883
Likes Received: 496
Thanks: 801
Thanked 12,954 Times in 1,495 Posts
|
Quote:
__________________
If you've liked my software, please consider to towards future development.Developer of many apps such as: WebOS Quick Install, WebOS Theme Builder, Ipk Packager, Unified Diff Creator, Internalz Pro, ComicShelf HD, LED Torch, over 70 patches and more. @JayCanuck @CanuckCoding Facebook |
|
09/11/2011, 04:45 PM
|
#8 (permalink) |
|
Homebrew Developer
![]() Join Date: Jan 2008
Posts: 21
Likes Received: 4
Thanks: 0
Thanked 23 Times in 8 Posts
|
Looks like what I was missing was actually adding the script files to the IPK before installing. Didn't know that they wouldn't be automatically included by palm-package, though in retrospect I'm not sure why I thought they would be. Now that I'm adding those, things seem to be working better.
|
11/06/2011, 10:02 AM
|
#9 (permalink) |
|
Member
![]() Join Date: Oct 2011
Posts: 34
Likes Received: 2
Thanks: 1
Thanked 3 Times in 3 Posts
|
Hi Jason: I was wondering if homebrew-js-framework needs an update for 3.0.4 compatibility? I am trying to get TouchPlayer to work, and its install validation states that the homebrew-js-service could not be found and that it's not running as root.
I have tried installing it with both preware and webosquickinstaller 4.3.1. Same results with both. Used to work with TouchPlayer (older versions) with 3.0.2, this is why I am checking to see if 3.0.4 changed something because the script was updated before the release of 3.0.4 Thanks! |
11/07/2011, 06:10 AM
|
#10 (permalink) |
|
Member
![]() Join Date: Oct 2011
Posts: 34
Likes Received: 2
Thanks: 1
Thanked 3 Times in 3 Posts
|
root@HPTouchPad:/var/usr/bin# run-homebrew-js-service
Failure writing to tasks file "/var/palm/ls2" : {"message":"EBADF, Bad file descriptor '/var/palm/ls2'","stack":"Error: EBADF, Bad file descriptor '/var/palm/ls2'\n at Object.openSync (fs.js:221:18)\n at Object.writeFileSync (fs.js:483:15)\n at writeGroupFile (/usr/palm/services/jsservicelauncher/bootstrap-node.js:54:13)\n at Object.<anonymous> (/usr/palm/services/jsservicelauncher/bootstrap-node.js:131:9)\n at Module._compile (module.js:408:26)\n at Object..js (module.js:414:10)\n at Module.load (module.js:340:31)\n at Function._load (module.js:301:12)\n at Array.0 (module.js:427:10)\n at EventEmitter._tickCallback (node.js:136:26)","errno":9,"code":"EBADF","path":"/var/palm/ls2"} parsing services.json failed with:SyntaxError: Unexpected end of input node.js:144 throw e; // process.nextTick error, or 'error' event on first tick ^ TypeError: Cannot read property 'length' of undefined at Object.<anonymous> (/usr/palm/services/jsservicelauncher/bootstrap-node.js:160:32) at Module._compile (module.js:408:26) at Object..js (module.js:414:10) at Module.load (module.js:340:31) at Function._load (module.js:301:12) at Array.<anonymous> (module.js:427:10) at EventEmitter._tickCallback (node.js:136:26) root@HPTouchPad:/var/usr/bin# |
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|



