Solution to App Catalog Installation Limit

From WebOS Internals
Revision as of 17:50, 2 October 2009 by Hparsons (talk | contribs)
Jump to navigation Jump to search

Based on rwhitby's findings that temporarily moving /var/usr/palm/applications will allow installing apps from the App Catalog, here's a permanent way to keep the apps on (much larger) /media/internal by using links. This will permanently save space on /var.

It's unfortunate that Palm has not resolved the issue in the 1.2 update. This is a workaround that could work long term, also saving space on /var, but this needs support by the homebrew community to add in the homebrew installer apps.


This solution involves creating a (hidden) directory in the /media/internal area, moving selected applications to the newly created directory, and then creating a symbolic link in the /var/usr/palm/applications directory pointing to the new location. This frees up the disk space from the relatively limited /var volume to the larger /media/internal. The included script (which must be created) will move the files and create the appropriate link. It will also provide information on the size of the applications stored in the /var/usr/palm/applications directory.


- create a script to move apps to new home and create link

vi /usr/bin/mvapp


# This code is open for re-use with no restrictions.  xorg

# Usage: mvapp - mvapp app to destination
# Usage: mvapp list - list all apps sorted by size

# can change destination to anything you want, but use a leading . - props to emoney_33

cd $ORG

# list app directory with size, props to daventx
if [ $APP == "list" ]
  du -s $ORG/* | sort -n
  exit 0

if [ -d $DEST ]
  echo "Directory exists..."
  mkdir $DEST

if [ -h $APP ]
  echo "Link already exists for... ${APP}"
  exit 1

if [ -d $APP ]
  echo "Moving $APP to $DEST..."
  echo "Not a valid application directory."
  echo "Usage: mvapp "
  echo "Usage: mvapp list"
  exit 2

mount -o remount,rw /

cd $ORG
echo "Size of $ORG before move... "
du -sh .

# move over to USB drive
cp -r  $ORG/$APP $DEST
if [ $? != 0 ]
  echo "Copy failed. Leaving app in $ORG."
  exit 3

rm -r $ORG/$APP
if [ $? != 0 ]
  echo "Remove failed. Leaving app in $ORG."
  rm -r $DEST/$APP
  exit 4

# create the symbolic link
ln -s $DEST/$APP $ORG/$APP

# rescan luna in case it's needed
luna-send -n 1 palm://com.palm.applicationManager/rescan {}

echo "$APP moved and linked."
echo "Size of $ORG after move... "
du -sh .

chmod 777 /usr/bin/mvapp

To use, find the largest apps in /var/usr/palm/applications...

mvapp list

It shows the largest apps last... IE....
6720 com.accuweather.palm
6720 net.likeme
7232 com.apps.forwebos.ahs
8352 com.apnews.webos
10304 com.shortcovers.palm.pre
10432 com.fusioncreativestudios.deadman
To move, use the script...


It should now work in the new location thanks to the link. Test each app to make sure it works before doing another. I don't recommend looping the script to do every app in the dir or to link the entire app dir. File attributes are lost on the move, which some apps may need. You need to test each app after a move.

If you have issues with an app, remove it and reinstall through the respective app catalog or homebrew installer app.


Would like to propose that PreWare, WebOS Quick Install and other Pre installer apps provide an option to move any app in /var to the /media fs and create a link per the code above. Also provide option to move back. Could make a backup retaining file attributes using tar and restore that way.

Risks, Issues, Dependencies

- File attributes of linux fs are not copied over to fat fs. May not work with apps that rely on file attributes.