webOS Nation Forums >  webOS Developers >  webOS Development > How to modify an app while keeping the original
How to modify an app while keeping the original
  Reply
 
Thread Tools Display Modes
Old 06/16/2009, 03:19 PM   #1 (permalink)
Member
 
Posts: 633
I've been able to copy a pre-existing app, rename it and keep the original. Now able to launch either original or the modified app. Both show up in the Launcher. I'm also doing it from the USB mounted drive. This allows keeping your mod apps running even if updating the original from the app catalog.

First setup the ability to copy app to /media/internal (the usb drive). Props to dsevil.
Edit /etc/palm/luna.conf
Look for this...
ApplicationPath=/usr/lib/luna/applications:/var/luna/applications:/var/usr/lib/luna/applications:/usr/palm/applications:/var/usr/palm/applications

Add this to end of line above...
:/media/internal/applications

Now let's copy the Today Show app...

# mkdir /media/internal/applications (if it doesn't already exist)
# cd /var/usr/palm/applications
# cp -rp com.zumobi.todayshow /media/internal/applications
# cd /media/internal/applications/

We are going to mark modified apps with an 'x' before the app name to distinguish it from the original. Note the 'x' before appname.

# mv com.zumobi.todayshow com.zumobi.xtodayshow
# cd *show
# vi appinfo.json (add x in title and x App as id)

{
"title": "x Today Show",
"id": "com.zumobi.xtodayshow",
keep other lines the same
}


You could edit this in Linux or with a Windows tool if USB mounting the drive.

# reboot (or orange-sym-r)

Should appear in your app list with both the original App and one ready to modify (press x from launcher). Now you can mount the app copy from Windows and use Windows based tools to edit. Reboot for changes to take effect. Do this with virtually any existing app, internal or 3rd party. If the original apps are updated, you can still keep your mod copy working.

Now you can modify the app, but don't distribute code to others that isn't your own.

To copy internal apps, grab them from /usr/palm/applications .

Use info at your own risk.

Last edited by xorg; 06/18/2009 at 06:37 PM.
xorg is offline   Reply With Quote
Thanked by jack87, socca1157
Old 06/18/2009, 09:50 AM   #2 (permalink)
Member
 
Posts: 633
I've posted on dev wiki... Check if others have made contributions.
pre dev wiki: Modify stock App while keeping original

Last edited by xorg; 06/18/2009 at 09:50 PM.
xorg is offline   Reply With Quote
Old 06/18/2009, 06:39 PM   #3 (permalink)
Member
 
Posts: 633
Here is an example with the Amazon app. Notice the "x" in front of the modified app. If the original is updated, you'll still have you modded app.

xorg is offline   Reply With Quote
Old 06/19/2009, 06:11 PM   #4 (permalink)
Member
 
Posts: 633
If you've done this before the PalmOS 1.0.3 update, you'll need update luna.conf after the PalmOS update. Then all of your apps store on USB drive will come back...

Edit /etc/palm/luna.conf
Look for this...
ApplicationPath=/usr/lib/luna/applications:/var/luna/applications:/var/usr/lib/luna/applications:/usr/palm/applications:/var/usr/palm/applications

Add this to end of line above...
:/media/internal/applications
xorg is offline   Reply With Quote
Old 06/24/2009, 08:58 PM   #5 (permalink)
Member
 
edgarwong's Avatar
 
Posts: 165
I have followed the steps verbatim, but the phone does not find apps located in /media/internal/applications. I tried copying apps, and also the "hello world" app from the wiki. none of them show up after the luna refresh or a reboot.

I would really appreciate any tips or pointers as to what might be going wrong. I am running 1.03 and followed the steps while on 1.03. Below is what my luna.conf looks like after the vi edit.

Thanks so much for your tutorial and your help

Edgar


Code:
[General]
ApplicationPath=/usr/lib/luna/applications:/var/luna/applications:/var/usr/lib/luna/applications:/usr/palm/applications:/var/usr/palm/applications:/media/internal/applications 
SystemPath=/usr/lib/luna/system/luna-systemui
SystemResourcesPath=/usr/palm/sysmgr/images
edgarwong is offline   Reply With Quote
Old 06/24/2009, 09:16 PM   #6 (permalink)
Member
 
Eguy's Avatar
 
Posts: 2,525
The directory is /usr/palm/applications not media/internal.
__________________
Palm History: Palm III>IIIc>CLIÉ NR70v>CLIÉ TG50>Tungsten C>Treo 650>Treo 700p>Centro>Pre!! 6/5/09
Phone History: Way too long

Sorry Timmy, SERO does not work with the Pre.
If you have an iTouch click me.
Eguy is offline   Reply With Quote
Old 06/24/2009, 09:33 PM   #7 (permalink)
Member
 
tuxpower's Avatar
 
Posts: 5
Quote:
Originally Posted by xorg View Post
If you've done this before the PalmOS 1.0.3 update, you'll need update luna.conf after the PalmOS update. Then all of your apps store on USB drive will come back...

Edit /etc/palm/luna.conf
Look for this...
ApplicationPath=/usr/lib/luna/applications:/var/luna/applications:/var/usr/lib/luna/applications:/usr/palm/applications:/var/usr/palm/applications

Add this to end of line above...
:/media/internal/applications
Just a thought, but if you don't want to change the name of your applications, you can always change the path from

ApplicationPath=/usr/lib/luna/applications:/var/luna/applications:/var/usr/lib/luna/applications:/usr/palm/applications:/var/usr/palm/applications

to this:

ApplicationPath=/usr/lib/luna/applications:/var/luna/applications:/var/usr/lib/luna/applications:/media/internal/applications:/usr/palm/applications:/var/usr/palm/applications

Note I placed /media/internal/applications in front of the default /usr/palm/applications... it'll search your apps in that order.
tuxpower is offline   Reply With Quote
Old 06/25/2009, 09:30 PM   #8 (permalink)
Member
 
edgarwong's Avatar
 
Posts: 165
Quote:
Originally Posted by Eguy View Post
The directory is /usr/palm/applications not media/internal.
I was trying to add the /media/internal/applictions path per the tutorial above. that way you can just copy the apps over the usb mode and not have to ssh and login everytime you wan to test something on your app. But thanks for checking it out.

have you tried adding the /media/int path? does it work for you?
edgarwong is offline   Reply With Quote
Reply

 

Thread Tools
Display Modes



 


Content Relevant URLs by vBSEO 3.6.0