PDA

View Full Version : [Palm OS] All installed apps gave gone from GVM desktop


dfinch
2008-07-17, 12:06
After running several apps under that latest GVM for many days, every one suddenly disappeared. This is how it happened:

I had one app open (Bible with you) and minimised and had closed the GVM desktop. (I could switch to and from my open app without problems). Then I wanted to use another GVM app (WiFile Pro) and so started Garnet again. I saw my normal GVM desktop with all my icons (about 13 apps) and selected the 'WiFile Pro' icon and the 'Launch' button. The GVM screen flashed, closed my open app and reappeared with just the basic six apps on the GVM desktop. EVERY ONE OF MY INSTALLED APPS HAS DISSAPPEARED.

I tried to refresh the icons, closed GVM and restarted again. I've rebooted the N810. All I have left is the 6 basic icons, no data/notes or any of my installed applications.

I have not tried a hotsync because my PC settings were 'do-nothing' for 'everything' last time I synced and most of the apps I have installed were put in after the hotsync. (I did the hotsync just to acquire the device name to allow me to install paid for apps).

I have also not tried to reinstall any app in case there is some way to 'magically' get them to reappear. I can't believe that all my apps were actually deleted because it happened so quickly - though I could be wrong.

Any ideas please?

TA-t3
2008-07-17, 13:03
No ideas, unfortunately. Is my understanding of the sequence that led to this correct?
- Palm app A running
- GVM desktop not running
- Starting GVM desktop
- Launching app B from GVM desktop
?
I don't remember if I have tried that. I _think_ I did it back with the first version of GVM, but I'm not certain. I haven't with the latest beta for sure.
The 'safe' way to switch to another app (when the desktop is stopped) is presumably:
- Palm app A running
- GVM desktop not running
- Click Palm home icon in app A
- Select app B

I haven't tested the latest beta as much as the first one, but back then I think I also experimented with starting app A from the command line and then app B, and that worked as far as I can remember. So it may all be that one method isn't better than any other and that your unfortunate problem was caused by some instability of the current beta.

As for restoring the apps and data.. unless FileZ can find something then I have no idea. I looked deep down into the gvm.store file a while ago and couldn't figure out anything. I have resorted to making a backup of the gvm.store file itself, so that I can just copy it back from the SD card in case of problems (the problems I used to have was that when launching applications which used mathlib.prc everything would burn and die and disappear. That's at least fixed in the latest beta).

PinCushionQueen
2008-07-17, 13:28
I've lost all my Palm Apps from GVM a few time now. I haven't found a consistent chain of events to induce this. I wasn't doing what you described above either. The only thing in common is that the app I was running crashed and when I went to launch GVM again - all was gone except the stock apps. Once this occurred when running an app without GVM running (ie: launched app from command line) and twice with GVM running.

It sure is a pain that if you get a little instability in one part of the GVM.store file it appears that it wipes the whole file. It's also quite a pain to reinstall everything. There is no magical way to make them retinstall themselves.

dfinch
2008-07-17, 13:39
No ideas, unfortunately. Is my understanding of the sequence that led to this correct?
- Palm app A running
- GVM desktop not running
- Starting GVM desktop
- Launching app B from GVM desktop
?


Yes exactly as I did it.

I don't remember if I have tried that. I _think_ I did it back with the first version of GVM, but I'm not certain. I haven't with the latest beta for sure.
The 'safe' way to switch to another app (when the desktop is stopped) is presumably:
- Palm app A running
- GVM desktop not running
- Click Palm home icon in app A
- Select app B


Yes I think that would do it.

I haven't tested the latest beta as much as the first one, but back then I think I also experimented with starting app A from the command line and then app B, and that worked as far as I can remember. So it may all be that one method isn't better than any other and that your unfortunate problem was caused by some instability of the current beta.

In your case the GVM desktop is not being statred - perhaps that makes the difference?

As for restoring the apps and data.. unless FileZ can find something then I have no idea. I looked deep down into the gvm.store file a while ago and couldn't figure out anything.

I had FileZ on there and I could see all the installed apps and databases etc. Maybe I'll reinstall that one and take a look.

I have resorted to making a backup of the gvm.store file itself, so that I can just copy it back from the SD card in case of problems (the problems I used to have was that when launching applications which used mathlib.prc everything would burn and die and disappear. That's at least fixed in the latest beta).

That sound like a good idea. Perhaps the backup command could be put into a simple shell script and then run after any new GVM install?

Thanks TA-t3 for your input.

dfinch
2008-07-17, 13:47
I've lost all my Palm Apps from GVM a few time now. I haven't found a consistent chain of events to induce this. I wasn't doing what you described above either. The only thing in common is that the app I was running crashed and when I went to launch GVM again - all was gone except the stock apps. Once this occurred when running an app without GVM running (ie: launched app from command line) and twice with GVM running.

It sure is a pain that if you get a little instability in one part of the GVM.store file it appears that it wipes the whole file. It's also quite a pain to reinstall everything. There is no magical way to make them retinstall themselves.

So it does look like everything extra was deleted? This must mean that there is some 'partition' within (or perhaps seperate from?) the gvm.store that contains all user installed applications.

lazuli
2008-07-17, 15:42
my gvm has crashed on me a lot too and i blame it on a faulty installation (can't read/can't connect to gvm errors, etc). it is really frustrating especially if each app has its own activation password/key and is composed of several pdb/prc files! but i think i have found a stable way of installing apps without using hotsync. here's how i did it.

format memory (64mb)
install one app
run any app (most crucial step! with an app running in the background there seems to be NO errors during install/uninstall)
go back to gvm WITHOUT closing the running app
install from file, select next prc/pdb file, install everything!
go back to emulator, hit home to refresh icons

just remember to open any app before you install something.

now my app list (17 apps) doesn't get erased anymore. dunno why but it seems to be more stable such that even if an app crashes the emulator, the list isn't corrupted and i can safely install/uninstall anything i want.

dfinch
2008-07-17, 16:02
Sounds like you might be onto something. I'll try this method as I reinstall everything.

You are right about the pain when apps have keys and multiple db's. And then there is all the configuration settings that we do after install that are lost. Hours of work gone!

Perhaps your info would help Access address this issue. Have you thought of letting them know?

lazuli
2008-07-17, 16:11
wrote a feedback on their site about this, i hope it gets fixed in the next release! i also discovered that sometimes the GVM desktop would say "can't connect to GVM" while refreshing the app list. i found out the refresh fails when metalayer-crawler (don't you just love it?!) is doing its thing.

what i do is just go to tools - clean icons until it refreshes successfully. :)

still, the backup script would be our safest fallback. hope someone makes it or at least teach us how to manually do it ourselves :p

TA-t3
2008-07-17, 16:50
just remember to open any app before you install something.
I read the thread about what you describe and noticed that it seemed to fix problems for some people, but for what it's worth, I have never done that, I have always (with the previous and the current version of GVM) just launched the gvm desktop alone, and installed prc and pdb files. Only after that have I actually opened the (new or old) application. I haven't actually had a single problem yet with my second GVM installation. YMMV.

I'm on OS2007 btw.

lazuli
2008-07-17, 17:27
maybe it's OS related. i'm on OS2008. actually i had no problems installing 2-3 apps but when the list goes up to 10 or more i start get errors.

dfinch
2008-07-20, 18:58
As for restoring the apps and data.. unless FileZ can find something then I have no idea. I looked deep down into the gvm.store file a while ago and couldn't figure out anything. I have resorted to making a backup of the gvm.store file itself, so that I can just copy it back from the SD card in case of problems (the problems I used to have was that when launching applications which used mathlib.prc everything would burn and die and disappear. That's at least fixed in the latest beta).

TA-t3

Would you mind pasting the command line to copy the gvm.store file. This will show its location and if you renamed etc. Do I need to gainroot first?
Thanks.

I've reinstalled several apps and so far everything is working again.
BTW filez found nothing extra except itself after restoring that app first.

TA-t3
2008-07-21, 10:23
That's easy enough. You don't need to be root, the file is in your home directory.
Open an xterm and do:

cp .gvm/gvm.store /media/mmc1/.

(or use some other location, e.g. mmc2.)
To restore:

cp /media/mmc1/gvm.store .gvm/.

Or, something that's probably a bit better: Include the small config files too:

tar cvf /media/mmc1/gvm-backup.tar .gvm

To restore:

tar xvf /media/mmc1/gvm-backup.tar


All of the above is executed from your home directory, just opening an xterm will put you in the right spot.
(The commands are simple enough that if you have e.g. load-applet-run installed you could use its 'Run' command with Save and have 2 commands in the applet, for backup and restore)

lazuli
2008-07-28, 07:22
i encourage all GVM users to backup their files as stated above. i can confirm it works, i had my app list wiped out after playing around with making direct shortcuts to gvm apps via terminal. after restoring my backup, all's well again, including registration data! whew!

:p

dfinch
2008-07-29, 17:10
lazuli,

What did you try exactly that wiped your apps? I have been playing around a lot with the command line and never lost them.

lazuli
2008-07-29, 22:43
/usr/bin/gvm/gvm -z 1.5 -L 0x0000,0x0000,0x0000

i made that shortcut on personal launcher. the shortcut worked but when i tried to launch the GVM desktop (most of my apps require registration data), it failed to refresh several times. after reboot only the default apps remain.

dfinch
2008-07-30, 04:27
That sounds similar to how I lost all my apps. I left one open and closed the desktop. Then opened the desktop to launch another app and everything crashed and wiped all the new installed apps.

I'm now careful to close any open app to return to the desktop and the close that.

Just a thought - since the Palm O/S is not really multitasking, perhaps when one app is open (w/o the desktop) and then the desktop is launced to open another app, it doesn't know about the previously open app and everything crashes. ie: it doesn't know that it is supposed to close the open one first?

lazuli
2008-07-30, 09:51
hmm.. if i remember correctly, with the gvm desktop closed, i launched the emulator directly from the shortcut i made on personal launcher, but i was turned off by the fact that all apps requiring hotsync id's and passwords are back to their trial period states so i closed the emulator. i didn't modify any registration data.

then when i opened the gvm desktop, all my apps disappeared and i kept getting failed to refresh errors. i'm thinking that directly launching apps that require registration data somehow conflicts with the settings of the gvm desktop.

so no shortcuts for me :(

dfinch
2008-07-30, 21:05
The main app that I use has a registration key which is in a .deb if I remember correctly. Anyway, I get no problems with this programme at all launching from the osso-statusbar app. I suppose different s/w vendors use different key systems but I'm surprised it conflicts. Can you use a command line launch for non-keyed apps withut problem?

I really like the quick launch - it makes a big difference for speed and simplicity of startup.

dfinch
2008-08-27, 13:47
I am trying to add the following command line to the command list in the osso-statusbar application (to backup my GVM). Running from xTerm it works fine and gives a 64MB file. Running it from the command list it stops after creating a 1kB file. I presume I need to add quotes or perhaps more fully specify the path(s). Anyone know what I need?

tar cvf /media/mmc1/gvm-backup.tar .gvm

I've found it:

tar cvf /media/mmc1/gvm-backup.tar /home/user/.gvm

TA-t3
2008-08-27, 14:18
It could be that it's blocking due to output from the command. Try removing the 'v', i.e.

tar cf /media/mmc1/gvm-backup.tar .gvm

(that'll make the command silent, unless there are errors)

dfinch
2008-08-27, 17:11
It could be that it's blocking due to output from the command. Try removing the 'v', i.e.

tar cf /media/mmc1/gvm-backup.tar .gvm

(that'll make the command silent, unless there are errors)

Interesting. I presume that 'v' is verbose mode? ie: report everything.

I did actualy get it to work by adding the path to the .gvm. I don't see any output of course but it's probably better (and maybe slightly quicker) to leave the v out.

I wonder if there is a slick way to pop up a 'completed' confirmation?

FYI if you have the target folder open in file manager, you can see the file size increase while it runs.

TA-t3
2008-08-28, 10:36
'v' is verbose mode. But it sounds like the real problem was that when osso-statusbar executes a command it doesn't do it from the $HOME directory. That's easily sorted out by specifying the full path, as you just did.

But I'm a bit worried about what happens when you try to restore the .gvm directory from a similar command. The tar file will not include the leading '/', even if you specify it, so a 'tar xvf' (or 'tar xf') to restore will try to unpack _in place_, which will be wherever osso-statusbar launches the command from. Say it is from /home/user/.osso-statusbar-workdirectory (I'm making that one up), it'll unpack the tar file as /home/user/.osso-statusbar-workdirectory/home/usr/.gvm, which is not what you want.

I think the safest way then is to create two scripts, one for backup, the other for restore. Example of backup script:

#!/bin/sh
cd /home/user
tar cf /media/mmc1/gvm-backup.tar .gvm

And for restore:

#!/bin/sh
cd /home/user
tar xf /media/mmc1/gvm-backup.tar

Give them names, e.g. backup-gvm.sh and restore-gvm.sh, put them somewhere (e.g. /home/user), and execute the scripts from osso-statusbar (either with 'sh /home/user/backup-gvm.sh' or withouth the leading 'sh' in case you have done 'chmod a+x' on the scripts. Likewise for the restore script.)

I wonder if there is a slick way to pop up a 'completed' confirmation?
There's probably many ways to pop up a message. But load-applet-run (which I use instead of osso-statusbar) pops up a window by itself, where it says 'Command completed with exit code 0' (if OK, or code 1 if not OK).

EDIT: Added the part about using scripts.

dfinch
2008-08-28, 11:48
Thanks TA-t3, I also wondered about the restore working. I hoped that perhaps it acquired the full path during backup and so would place it back in the correct place.

I think this would be a great exersise for me to dig a bit deeper and try the scripts you posted.

I have used chmod +x to create executables but what is a+x? will the +x suffice?

I have looked around for load-applet-run and it doesn't appear to be a native app or installable. Can you give a link to this?

Thanks for your excellent tutorials!

TA-t3
2008-08-28, 12:05
+x will suffice, a+x is just 'all'+x, i.e. user/group/other execute bits. It doesn't matter, as there are only two users: Root and user.
(there's +x, u+x, g+x, ug+x o+x, and ugo+x (which is the same as a+x. +x is the same as u+x.) You can see what's set with 'ls -l filename'


I hoped that perhaps it acquired the full path during backup and so would place it back in the correct place.
That would have worked with the old SysV tar program (as found on some Unix systems), but GNU tar as well as the NIT busybox tar will strip off the leading '/' character, if you specify one. Thus, you can't store absolute paths in the tar file (this is meant to be a security feature).
Example:

$ tar cvf etc.tar /etc/hosts
tar: Removing leading `/' from member names
/etc/hosts
$ tar tvf etc.tar
-rw-r--r-- root/root 1081 2008-04-30 13:35 etc/hosts
$

As you can see it stores "etc/hosts" and not "/etc/hosts" in the tar file. Thus, tar xvf etc.tar would create the etc/hosts directory/file in the directory I happen to be in, it wouldn't restore it to /etc/hosts (unless I did a 'cd /' before tar xvf)

load-applet-run is an applet I found for my OS2007 setup, I believe it used to be available for OS2008 as well.. but I can't find it anymore. Only old versions. :(

dfinch
2008-08-29, 21:06
TA-t3, I have completed all the steps (with a slight variation) and the backup does not work. (I tried from the osso-statusbar app and from xterm).

The difference is where I located the scripts. I decided for neatness to create a folder under MyDocs called scripts. No leading period. I chmod +x the scripts (named as suggested) and got no error (or confirmation). In xTerm in the folder scripts it will not execute the command (backup-gvm.sh) - it says not found.

I'm guessing it is related to the path and the 'scripts' folder is not in the predefined paths. Can I add this folder to be recognised (if this is the problem) or is there something else I need to do? Thanks.

TA-t3
2008-09-01, 12:05
You should be able to add that path to the standard path by editing (if necessary creating) a file .profile (dot profile) in your home directory.
Add a line like this:

PATH=$PATH:/home/user/MyDocs/scripts

(After that you'll have to reboot your device)

Or, you can instead simply specify the full path to your scripts:
/home/user/MyDocs/scripts/name-of-script.sh

dfinch
2008-09-01, 17:18
I think I must have some other issue because I can't execute the any script.sh even using the full path. I tried within the scripts folder and from MyDocs and each time it says file not found. I have been very careful checking spelling and syntax of the path and see no errors. I've also tried several times.

To make them executable, in xTerm I did:
chmod +x script-name.sh

The script-name.sh was created on my Win XP machine with EditPad Lite (saved with .sh append) and transferred wirelessly using N810 file manager. Sound ok so far?

I used your three line script verbatim (from # to tar) except I changed mmc1 to mmc2 as I have plenty of space internally right now (incredible, I know!!!).

BTW, I tried to create .profile but was denied permission. I presume I can do this after gaining root? (and reboot will release root privaleges?). Is this possibly a hidden file if it exists now? will ls -a reveal it if it exists (if I am in the correct location)?

I tried to create the .profile file with:
type 'some text' > .profile
('some text' is the path statement of course).
I know I could use vi but currently have zero experience so thought the redirection was simple enough.

So, any thoughts? And thanks again. (I'll have to give you my address so you can send me a bill!!)

TA-t3
2008-09-02, 10:58
You should be able to create .profile as user, no root access necessary. Specifically, it's /home/user/.profile, make sure that you didn't do e.g. 'cd /' or something before trying to edit it. Just launching xterm should land you in /home/user, as can be checked with

pwd
ls -ld

It should output something like

/home/user

and

drwxr-x--- <some number> user users <some date>

which means that you're in /home/user, which is owned by 'user' in the group 'users', and with write access for 'user' (yourself) (that first 'w').

As for the script execution:
It fails with 'MyDocs/scripts/script-name.sh' ?
Does it work with 'sh MyDocs/scripts/script-name.sh' ?
Does 'sh -x' instead of just 'sh' make some output?

zonki
2008-09-03, 16:18
Hi,
no solution to your +x and the other shell problems... my solution to the original problem looks like this.

I did the following to save my gvm.store file because I had the same problems in past. I've installed "personal menu" and created an entry for backup of my palm file (see below). It copies the file to sd card and give it a timestamp. I use this from time to time, especially after installing new palm-progs and sometimes I remove old copies. The palm gvm should be down if you start the backup-copy. If the gvm crashes and has deleted all my apps, I create a new vm with gvm (with 64MB RAM and the other parameters), start the vm and stopp it. Then I manually(!) copy the backup file to ~user/.gvm/gvm.store

I only need two taps for an backup!
Thats all and it runs perfectly for me.

Here's the entry of ~user/.personal_menu.rc

[21]
app name=gvm.store
icon name=qgn_list_backup
executable=/bin/cp /home/user/.gvm/gvm.store /media/mmc1/AKeg_downlod/gvm.store.`date +%Y%m%d%H%M` ; echo fertig mit gvm.store.`date +%Y%m%d%H%M`
run as root=false
run in term=true
service=

Additionaly I start the palm directly over 'personal menu', the entry look like this (ZLCR is zlauncher). It's very fast(I guess about 4-5sec. for complete VM) to start an app directly via such a command line:

[0]
app name=PalmOS
icon name=garnet-vm
executable=/usr/bin/gvm/gvm --hotsyncid=keg:12345 --dynheap=2048 --storageheap=64 --rotated=no --zoomFactor=1 --appcreator=ZLCR --bgimage=/usr/bin/gvm/gvm_bg.jpg
run as root=false
run in term=false
service=

Only a little note ...
Klaus

dfinch
2008-09-04, 03:09
You should be able to create .profile as user, no root access necessary. Specifically, it's /home/user/.profile, make sure that you didn't do e.g. 'cd /' or something before trying to edit it. Just launching xterm should land you in /home/user, as can be checked with

pwd
ls -ld

It should output something like

/home/user

and

drwxr-x--- <some number> user users <some date>

which means that you're in /home/user, which is owned by 'user' in the group 'users', and with write access for 'user' (yourself) (that first 'w').

As for the script execution:
It fails with 'MyDocs/scripts/script-name.sh' ?
Does it work with 'sh MyDocs/scripts/script-name.sh' ?
Does 'sh -x' instead of just 'sh' make some output?

Havent tried the first part yet but executing the backup in the ways you suggest gives the same response = can't open path/script-name.sh

so it seems to find it but cant execute.

Just typing in the file with path still says 'not found'

can I prove that they are executable?

TA-t3
2008-09-08, 12:27
ls -l
on the file should show you the 'x' for executable. It's not located on a card though, is it? Scripts on cards are never executable, if it's a vfat card (the normal case).

You should be able to run the script with 'sh scriptname'
If that still fails, try
sh -x scriptname
and look at the output. It'll print each line as it executes it.

dfinch
2008-09-09, 02:01
TA-t3 Thanks again!

It looks like the script is executable. This is the output from ls -l

~/MyDocs/Scripts $ ls -l backup-gvm.sh
-rwxr-xr-x 1 user users 64 Aug 29 16:24 backup-gvm.sh
~/MyDocs/Scripts $

(As you see I'm not working from a card)

Now, using sh backup-gvm.sh I get the following

~/MyDocs/Scripts $ sh backup-gvm.sh
backup-gvm.sh: cd: line 2: can't cd to /home/user
tar: .gvm: No such file or directory
tar: error exit delayed from previous errors
~/MyDocs/Scripts $


Strange that it can't cd to /home/user. If I execute this command from Scripts it takes me there no problem. Bear in mind that I have not yet added Scripts to the path. I want to proove it will run locally before going further.
Obviously tar won't work because it's in the wrong place to start.

This is my output with the -x

~/MyDocs/Scripts $ sh -x backup-gvm.sh
+ cd /home/user
backup-gvm.sh: cd: line 2: can't cd to /home/user
+ tar cf /media/mmc2/gvm-backup.tar .gvm
tar: .gvm: No such file or directory
tar: error exit delayed from previous errors
~/MyDocs/Scripts $

FWIW this script does create a file in mmc2 (internal memory) called gvm-backup.tar that is 1kb.

Is it possible that there is a slight error in the script you wrote? (no criticism - just wondering)

Cheers

TA-t3
2008-09-09, 08:08
OK, now I'm starting to suspect that the problem could be caused by how you made the scripts - you created them on Windows, right? They then probably have carriage return/line feed line endings, instead of just line feeds (as Unix use). I thought that wouldn't matter but now I'm not so sure.

OK I did a little test on my desktop - the CRLFs will confuse the issue.
Time to get rid of them.

cat backup-gvm.sh | tr -s '\r\n' '\n' > new.backup-gvm.sh
mv new.backup-gvm.sh backup-gvm.sh

Unless the 'tr' command (which is a busybox version) on the NIT is more retarted than I think the above should fix the script by changing CRLF to LF.

dfinch
2008-09-09, 19:22
WE HAVE LIFTOFF !!!

That did it. I'm really surprised because I was using EditPad lite to make the scripts. I got this a while ago because Notepad does not handle linefeeds and carriage returns properly.

(It also took a while to find the pipe character since I was typing on the screen kbd!)

Anyway it looks like I am in business and you can now get on with your life instead of tutoring me ;)

I really do appreciate you working with me, I have learned a lot (and remembered some from years ago).

Do you use EditPad lite? Is there a setting to overcome this problem? I was hoping to explore more scripting (using my PC) in the future but this is a pain to 'fix' every time on the tablet.

Cheers!

EDIT: I think I have broken something. Attempting to add the Scripts folder to the path I typed:

type 'PATH...' > .profile

Of course, if .profile already existed, I have overwritten the whole file with my single PATH statement. I should have used the append >>. Rats!

The reason I am concerned is because when I open xTerm, I get the message:
-sh: not: not found

Have I overwritten .profile?
Can I recover it?
How do I display the contents of a file in xTerm? (the equivalent of 'type filename' in DOS)

Thanks.

TA-t3
2008-09-10, 10:03
You have overwritten the .profile file, unfortunately. Unless you have an old copy as a .profile~ (which is what e.g. 'vi' leaves behind) there's no way to recover it.

To look at a file you can use either
cat filename
or
more filename

'cat' just dumps it all to screen in one go and you have to scroll up and down if it's long. (It's the equivalent of 'type' I guess)

'more' will page through the file, and you can go back with 'b'. 'less' does the same, but will also be able to page back if it's not a file (e.g. it could be the output from a pipe - 'cat file | less')

I don't normally use Windows and never for editing, so I'm not familiar with editpad.