webOS Nation Forums >  webOS apps and software >  webOS development > Running bash/sh scripts from a webos app
Running bash/sh scripts from a webos app

  Reply
 
LinkBack Thread Tools Display Modes
Old 11/25/2009, 10:03 AM   #181 (permalink)
Member
 
DrewPre's Avatar
 
Join Date: Aug 2009
Location: The HARD Streets of Alpharetta, GA
Posts: 829
Likes Received: 2
Thanks: 44
Thanked 176 Times in 92 Posts
Default

Aerode120, this is actually a different error.

Please make sure the files, ppbku, pprstr, bldExList, & bldIncList are set to executable.

Use 'chmod 755 /opt/bin/pp*' and 'chmod 755 /opt/bin/bld*'

from the commandline.

Then re-run the command below....

Quote:
Originally Posted by Aerode120 View Post
There has to be something I am missing. GNU TAR is isntalled. are there other pre reqs? I am getting the same error. Also says sudo not found.

Code:
root@castle: sudo -i
  sudo: not found
root@castle: luna-send -n 1 palm://com.tntservices.ppbkuservice/runExList {\"param\":\"/var/luna\\\\n/var/palm\\\\n/opt/bin\"}
  ** Message: serviceResponse Handling: 2, {"errorCode":"ErrorGenericMethodException", "errorText":"Service Method Exception: java.io.IOException: The creation of the Process has just failed: \"/opt/bin/bldExList\" /var/luna\\n/var/palm\\n/opt/bin"}
root@castle: param=\"/var/luna\\\\n/var/palm\\\\n/opt/bin\echo $param
root@castle: luna-send -n 1 palm://com.tntservices.ppbkuservice/runExList {\"param\":\"/var/luna\\\\n/var/palm\\\\n/opt/bin\"}
  ** Message: serviceResponse Handling: 2, {"errorCode":"ErrorGenericMethodException", "errorText":"Service Method Exception: java.io.IOException: The creation of the Process has just failed: \"/opt/bin/bldExList\" /var/luna\\n/var/palm\\n/opt/bin"}
root@castle:
Sorry I havent done any of this stuff since college and I fear that it was much more basic than the levels you guys are on.
DrewPre is offline   Reply With Quote
Old 11/25/2009, 10:13 AM   #182 (permalink)
Member
 
Join Date: Oct 2009
Posts: 29
Likes Received: 0
Thanks: 2
Thanked 0 Times in 0 Posts
Default

Yes I see what you mean. After I reread SirWill's post I checked the error more closely. But new commands didnt seem to help.

Code:
root@castle: 'chmod 755 /opt/bin/pp*'
  chmod 755 /opt/bin/pp*: not found
root@castle: 'chmod 755 /opt/bin/bld*'
  chmod 755 /opt/bin/bld*: not found
Aerode120 is offline   Reply With Quote
Old 11/25/2009, 10:16 AM   #183 (permalink)
Member
 
DrewPre's Avatar
 
Join Date: Aug 2009
Location: The HARD Streets of Alpharetta, GA
Posts: 829
Likes Received: 2
Thanks: 44
Thanked 176 Times in 92 Posts
Default

So when you type, 'ls -l /opt/bin/pp*' and 'ls -l /opt/bin/bld*'

Do you not get a result similar to what's below?

Code:
lq(root@castle)-(11:14:29)->
mq(/)--> # ls -l /opt/bin/pp*                                                                                     
-rwxr-xr-x    1 root     root          697 Nov 24 22:39 /opt/bin/ppbku
-rwxr-xr-x    1 root     root          354 Nov 25 07:46 /opt/bin/pprstr

lq(root@castle)-(11:14:39)->
mq(/)--> # ls -l /opt/bin/bld*                                                                                    
-rwxr-xr-x    1 root     root          237 Nov 14 05:56 /opt/bin/bldExList
-rwxr-xr-x    1 root     root          236 Nov 14 05:56 /opt/bin/bldIncList
DrewPre is offline   Reply With Quote
Old 11/25/2009, 10:19 AM   #184 (permalink)
Member
 
DrewPre's Avatar
 
Join Date: Aug 2009
Location: The HARD Streets of Alpharetta, GA
Posts: 829
Likes Received: 2
Thanks: 44
Thanked 176 Times in 92 Posts
Default

You may want to download the service files again and put those 4 files from the archive into your /opt/bin directory.


SCRATCH THAT......

did you type those CHMOD commands with the quotes????


OMIT the quotes!!!

Last edited by DrewPre; 04/30/2010 at 05:32 AM.
DrewPre is offline   Reply With Quote
Old 11/25/2009, 10:22 AM   #185 (permalink)
Member
 
Join Date: Oct 2009
Posts: 29
Likes Received: 0
Thanks: 2
Thanked 0 Times in 0 Posts
Default

It says no such file or directory. I have installed the IPKs you last posted using QI. Device Managment in QI also confirms that GNU tar is installed. But it appears I am missing something.
Unfortunately I have to go to work. I will be back at it when I get home tonight. I have a replacement phone sitting here waiting to do a restore and test your App 100% if I can just get it to work. Thanks for you help!!!

Noticed the quotes issue already. But files arent found.
Aerode120 is offline   Reply With Quote
Old 11/25/2009, 10:32 AM   #186 (permalink)
Member
 
DrewPre's Avatar
 
Join Date: Aug 2009
Location: The HARD Streets of Alpharetta, GA
Posts: 829
Likes Received: 2
Thanks: 44
Thanked 176 Times in 92 Posts
Default

okay when you get the chance, upzip that archive and manually copy those 4 files to the /opt/bin directory.

Something must have been wrong with the installation script for the service. Maybe there weren't sufficient permissions during the install to allow it to copy those files over.

You can also type ......

Code:
/usr/bin/luna-send -n 1 palm://com.tntservices.ppbkuservice/status {}

or

/usr/bin/luna-send -n 1 palm://com.tntservices.ppbkuservice/version {}
to make sure the service is running. But for the backup to run, youll need those 4 files from the archive.
DrewPre is offline   Reply With Quote
Old 11/25/2009, 10:37 AM   #187 (permalink)
Member
 
SirWill's Avatar
 
Join Date: Jun 2009
Location: Everett, WA
Posts: 441
Likes Received: 0
Thanks: 63
Thanked 48 Times in 41 Posts
Default

Quote:
Originally Posted by DrewPre View Post
Ultimately, I hear what you're saying, tho SirWill. I may have to omit /var/usr/palm/applications and just backup /usr/palm/applications. I think the latter is App Catalog apps and the former are the homebrew apps.

I think /usr/palm/applications are applications shipped on the pre and are included in webos. No need to back this up.

App store and homebrew are both in /var/usr/palm/applications

However, you shouldn't have to backup app catalog at all, because palm profile should restore app catalog applications when you log in to your profile. (Did for me last week)

Somewhere there has to be a db that tracks what is installed.

A hunting I am going.
__________________
-----------------
Palm III, Palm IIIc, TT, T3, T5, TX, Pre from Day 1.
SirWill is offline   Reply With Quote
Old 11/25/2009, 11:07 AM   #188 (permalink)
Member
 
Join Date: Jul 2009
Posts: 157
Likes Received: 0
Thanks: 4
Thanked 4 Times in 4 Posts
Default

Maybe this has been covered, I'll go back and look in a second, and appologize if so....

I have v1.0.1121 installed and seemingly working on my phone. If I go and update, what must I do? Just load both of these .ipk's into webosqi and install or must I delete something first.

Then, may I ask what is the utility service? Maybe a dumb question and I don't need the workings of it, just curious as to it's use. As I see that is one of the .ipk's above seems to be this and I know to load it into QI, but my question is that I DL'd a .zip file and it loaded a folder on my pc that I can't seem to use. Should I just delete that folder? ...it has an opt and a usr folder inside!

Thanks again for this program. Should make doctoring the phone a painless task.
Master Brian is offline   Reply With Quote
Old 11/25/2009, 11:13 AM   #189 (permalink)
Member
 
SirWill's Avatar
 
Join Date: Jun 2009
Location: Everett, WA
Posts: 441
Likes Received: 0
Thanks: 63
Thanked 48 Times in 41 Posts
Default

The zip file for the service is the service not in an ipkg. The application zip file has an ipkg for the application. I would recommend you simply use the 2 ipkg files you link to, and install them through webosqi. If it's already working you will be in good shape. It adds the file picker for restore.
__________________
-----------------
Palm III, Palm IIIc, TT, T3, T5, TX, Pre from Day 1.
SirWill is offline   Reply With Quote
Old 11/25/2009, 11:14 AM   #190 (permalink)
Member
 
DrewPre's Avatar
 
Join Date: Aug 2009
Location: The HARD Streets of Alpharetta, GA
Posts: 829
Likes Received: 2
Thanks: 44
Thanked 176 Times in 92 Posts
Default

Go ahead and delete what you have. Don't download from the links until further notice.

I am updating again..... Gonna exclude /var/usr/palm/applications & /usr/palm/applications/org.webosinternals.*

I'll update the existing attachments to reflect this.... The links i will work on later.
DrewPre is offline   Reply With Quote
Old 11/25/2009, 11:19 AM   #191 (permalink)
Member
 
Join Date: Jul 2009
Posts: 157
Likes Received: 0
Thanks: 4
Thanked 4 Times in 4 Posts
Default

Quote:
Originally Posted by DrewPre View Post
Go ahead and delete what you have. Don't download from the links until further notice.

I am updating again..... Gonna exclude /var/usr/palm/applications & /usr/palm/applications/org.webosinternals.*

I'll update the existing attachments to reflect this.... The links i will work on later.
Let me get this straight, you are saying to hang tight and not update?
Master Brian is offline   Reply With Quote
Old 11/25/2009, 11:21 AM   #192 (permalink)
Member
 
DrewPre's Avatar
 
Join Date: Aug 2009
Location: The HARD Streets of Alpharetta, GA
Posts: 829
Likes Received: 2
Thanks: 44
Thanked 176 Times in 92 Posts
Default

http://forums.precentral.net/web-os-...ml#post2061790

Okay, that post has the updated files. This files on the link should work but they are including patches which prevent the reinstallation of them after a restore.
DrewPre is offline   Reply With Quote
Old 11/25/2009, 11:26 AM   #193 (permalink)
Member
 
DrewPre's Avatar
 
Join Date: Aug 2009
Location: The HARD Streets of Alpharetta, GA
Posts: 829
Likes Received: 2
Thanks: 44
Thanked 176 Times in 92 Posts
Default

yea, so unzip the backup utility service.zip file. It's directory structure dictates where each file goes on your Pre.

Then the com.tntservices.palmprebackup_1.0.1124_all.zip unzips into an ipk file that you can use webOS Quick Install to install.

After a reboot, as root, [sudo -i] make sure GNU Tar is installed [ls -l /opt/bin/tar], Make sure ppbku, pprstr, bldExList, & bldIncList have executable permissions [chmod 755 /opt/bin/pp* & chmod 755 /opt/bin/bld*], make sure the service is active, [luna-send -n 1 palm://com.tntservices.ppbkuservice/status {}] and if all that checks out then run the backup and restore.
DrewPre is offline   Reply With Quote
Old 11/25/2009, 02:09 PM   #194 (permalink)
Member
 
Join Date: Oct 2009
Posts: 29
Likes Received: 0
Thanks: 2
Thanked 0 Times in 0 Posts
Default

Ok Drew Im taking some personal time at work. I got the files copied into the /opt/bin directory. Ran the CHMOD commands and received a True When I called the service. However when I checked for the tar in the opt/bin it wasnt there. When I use the device management function on WebOSQI it shows GNU Tar as being installed.
Also when using the Version {} command it returns the older verison 16 rather then the new one I installed today 24.

Last edited by Aerode120; 11/25/2009 at 02:38 PM.
Aerode120 is offline   Reply With Quote
Old 11/25/2009, 02:43 PM   #195 (permalink)
Member
 
DrewPre's Avatar
 
Join Date: Aug 2009
Location: The HARD Streets of Alpharetta, GA
Posts: 829
Likes Received: 2
Thanks: 44
Thanked 176 Times in 92 Posts
Default

In Preware, when you list installed apps and Gnu Tar shows up. Tap it and view the application details. When you do an option to remove appears. Uninstall it. Then close and reopen PreWare and reinstall GNU Tar.

Then see if it shows up in /opt/bin.... If not it may just reside in a different place when installed via PreWare.

I am checking that now.
DrewPre is offline   Reply With Quote
Old 11/25/2009, 02:54 PM   #196 (permalink)
Member
 
DrewPre's Avatar
 
Join Date: Aug 2009
Location: The HARD Streets of Alpharetta, GA
Posts: 829
Likes Received: 2
Thanks: 44
Thanked 176 Times in 92 Posts
Default

Nope, if it is installed via PreWare is should NOT be in a different location.

So uninstall it, then re-install it.
DrewPre is offline   Reply With Quote
Old 11/25/2009, 03:08 PM   #197 (permalink)
Member
 
Join Date: Oct 2009
Posts: 29
Likes Received: 0
Thanks: 2
Thanked 0 Times in 0 Posts
Default

Is it on QI? My screen is cracked and cant get to the install button
Aerode120 is offline   Reply With Quote
Old 11/25/2009, 03:12 PM   #198 (permalink)
Member
 
SirWill's Avatar
 
Join Date: Jun 2009
Location: Everett, WA
Posts: 441
Likes Received: 0
Thanks: 63
Thanked 48 Times in 41 Posts
Default

Quote:
Originally Posted by Aerode120 View Post
Is it on QI? My screen is cracked and cant get to the install button
That sucks. Try downloading the ipkg from here Index of /feeds/optware/armv7

and then installing that with QI (Do the uninstall bit first)
__________________
-----------------
Palm III, Palm IIIc, TT, T3, T5, TX, Pre from Day 1.
SirWill is offline   Reply With Quote
Thanked By: Aerode120
Old 11/25/2009, 03:19 PM   #199 (permalink)
Member
 
Join Date: Oct 2009
Posts: 29
Likes Received: 0
Thanks: 2
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by SirWill View Post
That sucks. Try downloading the ipkg from here Index of /feeds/optware/armv7

and then installing that with QI (Do the uninstall bit first)
Thanks I got it installed but...

Code:
root@castle: ls -l /opt/bin/tar
  ls: /opt/bin/tar: No such file or directory
Aerode120 is offline   Reply With Quote
Old 11/25/2009, 03:21 PM   #200 (permalink)
Member
 
Join Date: Oct 2009
Posts: 29
Likes Received: 0
Thanks: 2
Thanked 0 Times in 0 Posts
Default

I noticed that there are two version of the Tar on the index page. One just modified today. Would that cause an issue?
Aerode120 is offline   Reply With Quote
Reply

 

Tags
backup app

Thread Tools
Display Modes



 


Content Relevant URLs by vBSEO 3.6.0