webOS Nation Forums >  webOS Developer Forums >  Canuck Coding > Homebrew JS Service Framework
Homebrew JS Service Framework
  Reply
 
Thread Tools Display Modes
Old 03/04/2011, 10:58 AM   #1 (permalink)
Legend
 
Jason Robitaille's Avatar
 
Posts: 3,856
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
Jason Robitaille is offline   Reply With Quote
Old 09/09/2011, 03:57 AM   #2 (permalink)
Member
 
Posts: 108
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.
GyroJoe is offline   Reply With Quote
Thanked By: Jason Robitaille
Old 09/09/2011, 11:35 AM   #3 (permalink)
Member
 
Posts: 9
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
hemisphire is offline   Reply With Quote
Old 09/09/2011, 01:24 PM   #4 (permalink)
Member
 
Posts: 108
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.
GyroJoe is offline   Reply With Quote
Old 09/09/2011, 01:32 PM   #5 (permalink)
Legend
 
Jason Robitaille's Avatar
 
Posts: 3,856
Quote:
Originally Posted by hemisphire View 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
Try installing with WOSQI
__________________
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
Jason Robitaille is offline   Reply With Quote
Thanked By: hemisphire
Old 09/11/2011, 05:15 PM   #6 (permalink)
Homebrew Developer
 
Posts: 21
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 05:44 PM.
foxfirex is offline   Reply With Quote
Old 09/11/2011, 05:21 PM   #7 (permalink)
Legend
 
Jason Robitaille's Avatar
 
Posts: 3,856
Quote:
Originally Posted by FoxFireX View Post
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?
You'll want to check and make sure the replacement dbus is being put in place. May need to doublecheck that you packaged it correctly
__________________
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
Jason Robitaille is offline   Reply With Quote
Old 09/11/2011, 05:45 PM   #8 (permalink)
Homebrew Developer
 
Posts: 21
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.
foxfirex is offline   Reply With Quote
Old 11/06/2011, 11:02 AM   #9 (permalink)
Member
 
Posts: 34
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!
Technarch is offline   Reply With Quote
Old 11/07/2011, 07:10 AM   #10 (permalink)
Member
 
Posts: 34
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#
Technarch is offline   Reply With Quote
Old 07/30/2012, 07:33 PM   #11 (permalink)
Member
 
Posts: 1
Palm Pixi, 1.4.5.

I'm trying to install HJSF 1.0.2_a using WOSQI and all I'm getting is "Installing..."

Anyone out there still use these outdated phones other than me? I'm essentially just trying to get my contacts copied out so I can move to a newer phone. My plan is,
- Javascript Framework
- FileMgr
- Internalz Pro

Unfortunately, I can't get past step 1.
NoUserName1 is offline   Reply With Quote
Old 12/14/2012, 09:32 PM   #12 (permalink)
Member
 
michelle822's Avatar
 
Posts: 1
I'm having the same problem as above. Same phone, Pixi.

Keeps saying it's "installing" but never gets anywhere.

Any ideas for this? Is there an older version of the software that works with webos 1.4.5?

Thanks!
michelle822 is offline   Reply With Quote
Reply

 

Thread Tools
Display Modes



 


Content Relevant URLs by vBSEO 3.6.0