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/20/2009, 07:43 PM   #101 (permalink)
Member
 
Join Date: Oct 2009
Posts: 29
Likes Received: 0
Thanks: 2
Thanked 0 Times in 0 Posts
Default

Drew if you need someone to test your app I volunteer. The lower part of my screen cracked today. I was able to get DevMode turned on and was planing to transfer everything out of my USB partition to my Comp and use QI to install EPR. Going to the sprint store tomorrow. Even if something goes wrong and I lose my data, Im no worse for wear because, I would have lost it all, without your app.
Aerode120 is offline   Reply With Quote
Old 11/20/2009, 09:57 PM   #102 (permalink)
Member
 
Join Date: Jul 2009
Posts: 795
Likes Received: 0
Thanks: 22
Thanked 105 Times in 92 Posts
Default

So, I've read through all the posts in this thread, and I'm confused on one point. Is it possible to just take a copy of PalmDatabase.db3 and use it as a "backup"? Assuming no version change (or at least a "compatible" version change), if you wipe your phone and then copy the PalmDatabase.db3 back on, will all of your contacts and calendar (and memos and tasks?) be restored? Just browsing through a copy of the file with sqlite, it seems that a *lot* of what people want save is in this one file.

It looked like one post claimed that there are some pointers that won't match, and possibly some contact photos might be mis-matched. The reason I ask, is that it seems like a very easy/simple "backup" to just take a copy of this database file using WOSQI ... and then if you have a problem just copy it back to your Pre (or Pixi) ... yes?
davis.rob is offline   Reply With Quote
Old 11/20/2009, 11:49 PM   #103 (permalink)
Member
 
grndslm's Avatar
 
Join Date: Jan 2004
Posts: 2,874
Likes Received: 4
Thanks: 162
Thanked 217 Times in 143 Posts
Default

PalmDatabase.db3 is definitely a good start to backing up. It should have most of the things that people deem to be "critical".

But restoring that information is a whole 'nother task. Hopefully enough database guys can figure this out.
__________________

Get Homebrew Apps, Tweaks, & Patches Working In Less Than 5 Minutes

Cross-Platform Meta-Doctor Guide -- Bypass carrier-specific activation & MORE!
grndslm is offline   Reply With Quote
Old 11/21/2009, 08:40 AM   #104 (permalink)
Member
 
Join Date: Jun 2009
Posts: 950
Likes Received: 33
Thanks: 128
Thanked 131 Times in 104 Posts
Default

I know this is a big question, but has anybody tried a restore on 1.3.1 (even on emulator) coming from a Backup of a 1.1.3 (GSM-EU) Pre?
The release of 1.3.1 is EU in right around the corner and i don't want to lose all my contacts/memos/sms/tasks AGAIN if something goes wrong.
__________________
Palm Pre 3 webOS 2.2.4 3175 EU UMTS
Palm Pre 2 webOS 2.2.4 160 EU UMTS
Palm Pre - webOS 1.4.5 EU UMTS

Found a bug or miss a feature in webOS, just use this form: Feedback & Feature Requests | Palm USA
-- Oops, sorry HP does not offer a Feedback form anymore send feature request to CEO
gizmo21 is offline   Reply With Quote
Old 11/21/2009, 11:12 AM   #105 (permalink)
Member
 
rrob13's Avatar
 
Join Date: Aug 2007
Location: Nashville
Posts: 287
Likes Received: 0
Thanks: 68
Thanked 58 Times in 42 Posts
Default

DrewPre, thanks for all this hard work. I'm looking forward to seeing this in Preware and to giving it a try. I'm definitely planning to donate to support your work.

What's the latest news?

Rob
__________________
Rob Robinson
Treo 600 >> Treo 650 >> Treo 755p >> Palm Pre
rrob13 is offline   Reply With Quote
Old 11/22/2009, 02:02 AM   #106 (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

The app is done.

For the most part anyway. The only things left is a file picker which I haven't implemented yet for archives built manually or through some other process, and a sanity check to make sure that the archive that is referred to in the SQLite DB actually exists.

The only bug I have noticed is a pretty big one in my mind. The GUI will hang on larger backups. The backup completes successfuly but the GUI never updates to completion. You can back gesture or close/re-open the app and it will show up in the 'restore list' tho.

I am sorry that I didn't have this available when I said I would two days ago. I guess it really didn't matter anyway, I don't have control over whether or not it's posted on Preware. The powers that BE in this thread and elsewhere will determine whether it will be provided via Preware or not.

My guess, as is, it will not.

Anyway, I was learning SQL queries and how to implement them to generate lists for the Restore GUI, and that was why there was a delay.

The Restore GUI supports swipe to delete function to delete an archive and free up disk space. I guess in a sense, that's youre sanity check for the existence of a file. sorta.

I'll post screens later Sunday.
DrewPre is offline   Reply With Quote
Old 11/22/2009, 02:06 AM   #107 (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

...and I am thinking about whether to build a separate app for the Pre to GMail migration tool.

Seems to me that if there was a separate app, it would be used once and then never used again.

I may incorporate it into this one.
DrewPre is offline   Reply With Quote
Old 11/22/2009, 02:22 AM   #108 (permalink)
Developer
 
rwhitby's Avatar
 
Join Date: Apr 2003
Location: Adelaide, Australia - follow @webosinternals on Twitter visit www.webos-internals.org and www.facebook.com/webosinternals
Posts: 10,220
Likes Received: 546
Thanks: 90
Thanked 8,534 Times in 2,806 Posts
Default

Quote:
Originally Posted by DrewPre View Post
I am sorry that I didn't have this available when I said I would two days ago. I guess it really didn't matter anyway, I don't have control over whether or not it's posted on Preware. The powers that BE in this thread and elsewhere will determine whether it will be provided via Preware or not.

My guess, as is, it will not.
You're the "powers that BE" for this application. If you say the app is ready for wide-spread usage through Preware, then we'll go with your determination. You've already addressed the security issues that I raised, so I have no problems with your latest service implementation from that point of view (it can no longer execute a random rogue command as far as I can see).

If instead, you just want a limited alpha test using people who are ready and willing to work with you to iron out any problems, then we can put it in the alpha testing feed instead of the public feed, and then people can install the ipkgs from there to test it out.

Let me know what you'd prefer. The preware.org autobuilder is pretty much ready to build whatever you upload to the GIT source code repository.

-- Rod
__________________
WebOS Internals and Preware Founder and Developer
You may wish to donate by Paypal to donations @ webos-internals.org if you find our work useful.
All donations go back into development.
www.webos-internals.org twitter.com/webosinternals facebook.com/webosinternals
rwhitby is offline   Reply With Quote
Old 11/22/2009, 12:45 PM   #109 (permalink)
Member
 
rrob13's Avatar
 
Join Date: Aug 2007
Location: Nashville
Posts: 287
Likes Received: 0
Thanks: 68
Thanked 58 Times in 42 Posts
Default

Quote:
Originally Posted by DrewPre View Post
I am sorry that I didn't have this available when I said I would two days ago. I guess it really didn't matter anyway, I don't have control over whether or not it's posted on Preware. The powers that BE in this thread and elsewhere will determine whether it will be provided via Preware or not.
I don't think you owe anyone an apology. This is a complicated app, and you're doing excellent work at a very fast pace. Keep up the great work!

If you decide to alpha test, I'm definitely interested.

Rob
__________________
Rob Robinson
Treo 600 >> Treo 650 >> Treo 755p >> Palm Pre
rrob13 is offline   Reply With Quote
Old 11/22/2009, 01:29 PM   #110 (permalink)
Member
 
Join Date: Jul 2009
Posts: 30
Likes Received: 0
Thanks: 5
Thanked 3 Times in 3 Posts
Default

replacement phone came in a few days ago and i have to send the old one back, would be happy to test things out - i have nothing to lose.
jmelan is offline   Reply With Quote
Old 11/22/2009, 01:44 PM   #111 (permalink)
Member
 
grndslm's Avatar
 
Join Date: Jan 2004
Posts: 2,874
Likes Received: 4
Thanks: 162
Thanked 217 Times in 143 Posts
Default

Ditto. I'm always ready to be a DUMMY [tester]. Especially on an app like this.
__________________

Get Homebrew Apps, Tweaks, & Patches Working In Less Than 5 Minutes

Cross-Platform Meta-Doctor Guide -- Bypass carrier-specific activation & MORE!
grndslm is offline   Reply With Quote
Old 11/22/2009, 02:42 PM   #112 (permalink)
Member
 
Join Date: Oct 2009
Posts: 29
Likes Received: 0
Thanks: 2
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by jmelan View Post
replacement phone came in a few days ago and i have to send the old one back, would be happy to test things out - i have nothing to lose.
Im in the same boat. Ready and willing.
Aerode120 is offline   Reply With Quote
Old 11/22/2009, 02:45 PM   #113 (permalink)
jut
Member
 
Join Date: May 2009
Posts: 46
Likes Received: 0
Thanks: 10
Thanked 9 Times in 5 Posts
Default

I am also willing to test. My power button quit working so I need a replacement.... was waiting for this app to be released before I got one sent to me
jut is offline   Reply With Quote
Old 11/22/2009, 04:07 PM   #114 (permalink)
Member
 
Join Date: Nov 2009
Posts: 3
Likes Received: 0
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by Aerode120 View Post
Drew if you need someone to test your app I volunteer. The lower part of my screen cracked today. I was able to get DevMode turned on and was planing to transfer everything out of my USB partition to my Comp and use QI to install EPR. Going to the sprint store tomorrow. Even if something goes wrong and I lose my data, Im no worse for wear because, I would have lost it all, without your app.
How were you able to get DEV mode turned on with a cracked screen? Did the top of the screen still work? I've been trying to figure out a way to get Pres' that have broken screens into DEV mode so I can copy the database file so I can restore contacts and whatnot since Palm doesn't seem to have a reliable 'cloud' system.

Any help would rock my box.
npaulseth is offline   Reply With Quote
Old 11/22/2009, 04:31 PM   #115 (permalink)
Member
 
Join Date: Sep 2009
Location: Bardstown, KY, USA
Posts: 286
Likes Received: 0
Thanks: 128
Thanked 33 Times in 24 Posts
Default

Hope it hits PreWare soon! My sister might have to replace her Pre and doesn't want to lose her texts.

/Kevin
commonplace is offline   Reply With Quote
Old 11/22/2009, 04:45 PM   #116 (permalink)
Member
 
Join Date: Oct 2009
Posts: 29
Likes Received: 0
Thanks: 2
Thanked 0 Times in 0 Posts
Default

I got lucky and the top part of my screen still worked intermittently. A bunch of trial and error and finally I got it. I am kinda surprised no one has put together a patch for keyboard commands. One thing I did find was that if I put the pre to sleep and then woke it up (tap power button) that I could usually get 1-2 screen taps before it was unresponsive again. Notifications and the Volume display helped me move the screen up so the buttoms were in screen areas that would work. Sorry I couldnt be more help.
Aerode120 is offline   Reply With Quote
Old 11/22/2009, 08:31 PM   #117 (permalink)
Member
 
Join Date: Jun 2009
Location: Atlanta, GA, USA
Posts: 61
Likes Received: 0
Thanks: 130
Thanked 9 Times in 6 Posts
Default

Speaking of which... what a coincidence: my screen just stopped working two nights ago. Not cracked. Was using it fine... set it down and twenty seconds later it wouldn't work anymore.

Two questions.
1) DOES ANYONE have any resources on keyboard combos? I know
OPT + SYM + R -- for reboot &
OPT + SYM + U -- for usb. That came in handy.
How about hanging up the phone without touchscreen?

2) @DREW: Can I get some pointers on what to back up Drew? I know linux inside and out (I teach Red Hat classes) and I have a rooted Pre, but I haven't taken the time to see where things are stored yet. It sounds like you already know, so could you share what you've found? Or perhaps share your script? It'd be greatly appreciated. I'd love to get this backed up tonight or tomorrow morning, so I can take it in and get it replaced.
ryran is offline   Reply With Quote
Old 11/22/2009, 11:03 PM   #118 (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

Quote:
Originally Posted by NormanRoss...........When you go directly to sql and pull out an entire table (or to any other object and zip it up) it will restore fine AS LONG AS Palm doesn't change the structure of the table (or object) from release to release. So when you restored from 1.2.1 to 1.3.1 without problems it just means that Palm didn't make these changes. But if Palm does decide in the future to restructure the way that they save contact information in the database and for example split information that was in one table into two tables (or join two table into one), then the restore will fail.
First of all thank you for the detailed response. It is very clear and I understood it all. I went out last night for some much needed fun and got in late and my bed was calling me tho or I would have responded sooner. Anyway, your response generates some questions... Namely, and most important would of course be, what method of exatracting data using api's would allow for insertion of the same data and be a process that would still function properly across a schema change like the one you describe or any other for that matter? It sounds like it would involve a lot of work, but could garauntee the safety of the data.

I guess to answer that question you'd have to nail down exactly what specific changes you think Palm is going to make. Then plan accordingly. My issue is that I am a bit leary about trying to play the game of 'what is palm going to do next?' I understand some considerations should be allotted, but to develop programs expecting Palm to zig, only to have them zag, [metaphorically speaking], just seems fruitless as you would end up in a situation where you're going to have to provide updates and patches to your app in order to compensate for the unanticipated change(s). Which isn't much different than situation you'd be in if you tarballed / {root}. Then you have to also consider that phones are usually only popular for a couple, three years. We're already six months into this one. I suppose that if the data is what's valuable here then extracting the data from it's current state into one that has the highest possible compatibiltiy with future technologies would be the goal.


So if 'API calls' are the way to acheive that goal then it makes sense to move toward that. Especially if it's virtually 100% compatible with any schema changes from Palm in the next couple of years. The good thing about all of this is that Palm has used 'the cloud' as a marketing tool. So, I would think, and my uneducation opinion means absolutely nothing, that because of it being on the cloud there is a certain standard that they are committing to. So as long as the information can be easily exported into CSV, XML, or some other format standard [via APIs, sqlite scripts or some other method] it can always be imported into Excel, gMail, or Outlook [or back into SQLite] and will remain "In the Cloud"

Having said all of that... I am ready to submit my app. The screen shots are below. I am not going to be able to stay up tonight to go through the steps [whateve those may be] to get it on Preware. I am fading fast, but I have attached them to this post. So if you're here in this community, on this forum, and in this thread you're probably using a 'rooted' Pre. You can copy the attachments to your Pre's filesystem and extract the service to "root" and 'ipkg-opt install' the ipk file to install the application.

Rod, at some point over the next day or two, I am going to have to catch up with you and sit down and iron out the step by step process for access to the git repo. Very much thanks to you and Jason.

As for the app, it still hangs during the processing phase. It appears that it is very much a memory hog! I have played around with some memory settings in the luna conf file described in this thread.

http://forums.precentral.net/web-os-...rds-error.html

namely,
Code:
tmpfs   /media/ram      tmpfs   size=64M
in /etc/fstab

and,
Code:
FreeSwapThreshold=64
MaxApplicationMemory=16MB
in /etc/palm/luna.conf

I got more stable results following these mods. I also disabled gzipping the tarball. gzip was consuming as much as 83% while /opt/tar alone was using only 13% tops and seemed like it finished faster. The obvious cost of that speed increase and lower timeslice is diskspace. The archive consumes 2-2.5 times more space than the gzip counterpart. [75M -> 165M]

and finally, the app is dependant on GNU Tar. So you'll need to install that if you haven't already. Taht's already on Preware so you may already have it, if not get it from Preware or simply type 'ipkg-opt install tar' from the shell.

That's it!! here are the screenies!!






Last edited by DrewPre; 04/30/2010 at 05:32 AM.
DrewPre is offline   Reply With Quote
Thanked by grndslm, ms2474
Old 11/22/2009, 11:08 PM   #119 (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

ryran, attached is the Excel spreadsheets of the directories taht I am using.

It's missing one.....

/media/internal/.appstorage..... I included that one in the app, just didn't document it cuz I found it after that spreadsheet was created.

Quote:
Originally Posted by ryran View Post
Speaking of which... what a coincidence: my screen just stopped working two nights ago. Not cracked. Was using it fine... set it down and twenty seconds later it wouldn't work anymore.

Two questions.
1) DOES ANYONE have any resources on keyboard combos? I know
OPT + SYM + R -- for reboot &
OPT + SYM + U -- for usb. That came in handy.
How about hanging up the phone without touchscreen?

2) @DREW: Can I get some pointers on what to back up Drew? I know linux inside and out (I teach Red Hat classes) and I have a rooted Pre, but I haven't taken the time to see where things are stored yet. It sounds like you already know, so could you share what you've found? Or perhaps share your script? It'd be greatly appreciated. I'd love to get this backed up tonight or tomorrow morning, so I can take it in and get it replaced.
Attached Files
File Type: zip PalmPreDirectories.zip (6.3 KB, 35 views) Email Attachment
DrewPre is offline   Reply With Quote
Old 11/23/2009, 12:31 AM   #120 (permalink)
Developer
 
rwhitby's Avatar
 
Join Date: Apr 2003
Location: Adelaide, Australia - follow @webosinternals on Twitter visit www.webos-internals.org and www.facebook.com/webosinternals
Posts: 10,220
Likes Received: 546
Thanks: 90
Thanked 8,534 Times in 2,806 Posts
Default

Quote:
Originally Posted by DrewPre View Post
Rod, at some point over the next day or two, I am going to have to catch up with you and sit down and iron out the step by step process for access to the git repo.
I'll check this final code into the existing repos, and push ipkgs to the alpha test feeds, including the screenshots. Can you please supply a description for each of the packages to be displayed in Preware?

Quote:
and finally, the app is dependant on GNU Tar. So you'll need to install that if you haven't already. Taht's already on Preware so you may already have it, if not get it from Preware or simply type 'ipkg-opt install tar' from the shell.
I'm finishing up packaging GNU tar into Preware right now, and will make it a dependency of the backup utility service.

-- Rod
__________________
WebOS Internals and Preware Founder and Developer
You may wish to donate by Paypal to donations @ webos-internals.org if you find our work useful.
All donations go back into development.
www.webos-internals.org twitter.com/webosinternals facebook.com/webosinternals
rwhitby is offline   Reply With Quote
Reply

 

Tags
backup app

Thread Tools
Display Modes



 


Content Relevant URLs by vBSEO 3.6.0