<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://wiki.webos-internals.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Odontastic</id>
	<title>WebOS Internals - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.webos-internals.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Odontastic"/>
	<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/wiki/Special:Contributions/Odontastic"/>
	<updated>2026-04-17T12:44:33Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.35.1</generator>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=How_To_Recover&amp;diff=10008</id>
		<title>How To Recover</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=How_To_Recover&amp;diff=10008"/>
		<updated>2010-05-21T23:48:28Z</updated>

		<summary type="html">&lt;p&gt;Odontastic: /* Pre not booting? webOS Doctor How-To */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Pre not booting? webOS Doctor How-To =&lt;br /&gt;
{{tux|Tux_with_Broken_Pre.png|float:right;}}&lt;br /&gt;
Fortunately, Palm has created a tool called webOS Doctor intended for users to easily restore their devices in the event that they cannot boot for one reason or another.&lt;br /&gt;
&lt;br /&gt;
Note: Before Trying the following steps below. Try removing the battery first and reinsert the battery and turn on the device this will determine whether or not you need to perform the following steps.&lt;br /&gt;
&lt;br /&gt;
Note 2: As of WebOS 1.3.1 your USB data (Pictures, Videos, etc.) is no longer deleted during the process.  Older versions of WebOS Doctor WILL DELETE ALL YOUR PERSONAL DATA ON THE DEVICE.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Palm webOS Doctor:''' [http://www.palm.com/us/support/downloads/pre/recoverytool/deviceselector_en.html http://www.palm.com/us/support/downloads/pre/recoverytool/deviceselector_en.html]&lt;br /&gt;
&lt;br /&gt;
'''All Palm WebOS Doctor Versions:''' [http://www.webos-internals.org/wiki/Webos_Doctor_Versions http://www.webos-internals.org/wiki/Webos_Doctor_Versions]&lt;br /&gt;
&lt;br /&gt;
After the download is complete, launch webOS Doctor:&lt;br /&gt;
&lt;br /&gt;
# Select you language&lt;br /&gt;
# Accept the license agreement&lt;br /&gt;
# Connect your Pre to you PC via USB and select &amp;quot;Next&amp;quot; when it becomes available&lt;br /&gt;
{{tux|Tux_with_Pre_and_Screwdriver.png|float:right;}}&lt;br /&gt;
After completion the device will reboot and present you with the activation set-up.&lt;br /&gt;
&lt;br /&gt;
If your PC does not recognize your Pre and you cannot go past step 3 above, try the following steps:&lt;br /&gt;
&lt;br /&gt;
# With the USB cable connected, completely power off the Pre (hold down the power button until the option to power off appears)&lt;br /&gt;
# Hold down the Up button on the volume rocker&lt;br /&gt;
# While holding the Up button, power on the Pre&lt;br /&gt;
# &amp;quot;Next&amp;quot; should now be enabled - proceed with the recovery&lt;br /&gt;
{{tux|Tux_with_Pre.png|float:right;}}&lt;br /&gt;
The above steps will put the Pre into bootloader recovery mode and should allow the PC to recognize your device and proceed with the restore. In this mode the screen will display a giant USB logo instead of the usual Palm startup logo.&lt;br /&gt;
&lt;br /&gt;
The process usually proceeds as follows:&lt;br /&gt;
&lt;br /&gt;
(If you're on a Mac, you can follow the progress in /var/log/system.log)&lt;br /&gt;
&lt;br /&gt;
# WebOS Doctor begins&lt;br /&gt;
# At 3%, a ramdisk is transferred to the phone, and the phone is rebooted &lt;br /&gt;
# At 4%, the screen changes to the palm logo&lt;br /&gt;
# At 9%, the screen changes to a big arrow pointing down to an integrated circuit&lt;br /&gt;
# Novaterm access is available from 12% onwards&lt;br /&gt;
# The progress bar advances by 2% increments every 20 seconds or so&lt;br /&gt;
# If it gets stuck at 52% for more than 30 seconds, it's not going to progress further and you will need to try again.&lt;br /&gt;
# Around 54% the filesystems are being partitioned&lt;br /&gt;
# Around 64% the modem firmware is being reflashed&lt;br /&gt;
# Around 72% the carrier apps are being installed&lt;br /&gt;
# Around 82% the ROM is being verified&lt;br /&gt;
&lt;br /&gt;
If the process fails at 84% or later, the flash and modem have actually been written, so if you reboot you will get what you were flashing.&lt;br /&gt;
&lt;br /&gt;
== Modifications to the recovery process ==&lt;br /&gt;
&lt;br /&gt;
Between about 18% and 54% complete, you can novaterm into the device while it is being flashed, and modify the filesystem that will be run after the phone reboots (e.g. to touch /var/luna/preferences/ran-first-use).&lt;br /&gt;
&lt;br /&gt;
If you stay in a mounted directory, you can even cause the flashing to abort after the carrier apps are installed and just before the ROM is verified.  This is another point where manual modifications can be made.&lt;br /&gt;
&lt;br /&gt;
After you have made your modifications, unmount any filesystems you have mounted and &amp;quot;tellbootie reboot&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Can't boot into recovery mode? ==&lt;br /&gt;
&lt;br /&gt;
In the very unlikely event that your Pre will not boot into recovery mode (indicating that your boot loader on the flash disk may be damaged or corrupted) you can try booting bootie into recovery mode over USB instead: [[Last_Resort_Emergency_BootLoader_Recovery]] '''Note that there has not been a single reported incidence of this being required, we do not recommend that you attempt this unless you have tried all the steps above exactly as described at least 10 times.'''&lt;br /&gt;
&lt;br /&gt;
Short of hardware damage, it should not be possible to &amp;quot;brick&amp;quot; a Pre.&lt;/div&gt;</summary>
		<author><name>Odontastic</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=How_To_Recover&amp;diff=10007</id>
		<title>How To Recover</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=How_To_Recover&amp;diff=10007"/>
		<updated>2010-05-21T23:46:45Z</updated>

		<summary type="html">&lt;p&gt;Odontastic: /* Pre not booting? webOS Doctor How-To */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Pre not booting? webOS Doctor How-To =&lt;br /&gt;
{{tux|Tux_with_Broken_Pre.png|float:right;}}&lt;br /&gt;
Fortunately, Palm has created a tool called webOS Doctor intended for users to easily restore their devices in the event that they cannot boot for one reason or another.&lt;br /&gt;
&lt;br /&gt;
Note: Before Trying the following steps below. Try removing the battery first and reinsert the battery and turn on the device this will determine whether or not you need to perform the following steps.&lt;br /&gt;
&lt;br /&gt;
Note 2: As of WebOS 1.3.1 your USB data (Pictures, Videos, etc.) is no longer deleted during the process.  Older versions of WebOS Doctor WILL DELETE ALL YOUR PERSONAL DATA ON THE DEVICE.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Palm webOS Doctor:''' [http://www.palm.com/us/support/downloads/pre/recoverytool/deviceselector_en.html http://www.palm.com/us/support/downloads/pre/recoverytool/deviceselector_en.html]&lt;br /&gt;
&lt;br /&gt;
'''All Palm WebOS Doctor Versions:''' [http://www.webos-internals.org/wiki/Webos_Doctor_Versions http://www.webos-internals.org/wiki/Webos_Doctor_Versions]&lt;br /&gt;
&lt;br /&gt;
After the download is complete, launch webOS Doctor:&lt;br /&gt;
&lt;br /&gt;
# Select you language&lt;br /&gt;
# Accept the license agreement&lt;br /&gt;
# Connect your Pre to you PC via USB and select &amp;quot;Next&amp;quot; when it becomes available&lt;br /&gt;
{{tux|Tux_with_Pre_and_Screwdriver.png|float:right;}}&lt;br /&gt;
After completion the device will reboot and present you with the activation set-up.&lt;br /&gt;
&lt;br /&gt;
If your PC does not recognize your Pre and you cannot go past step 3 above, try the following steps:&lt;br /&gt;
&lt;br /&gt;
# With the USB cable connected, completely power off the Pre (hold down the power button until the option to power off appears)&lt;br /&gt;
# Hold down the Up button on the volume rocker&lt;br /&gt;
# While holding the Up button, power on the Pre&lt;br /&gt;
# &amp;quot;Next&amp;quot; should now be enabled - proceed with the recovery&lt;br /&gt;
{{tux|Tux_with_Pre.png|float:right;}}&lt;br /&gt;
The above steps will put the Pre into bootloader recovery mode and should allow the PC to recognize your device and proceed with the restore. In this mode the screen will display a giant USB logo instead of the usual Palm startup logo.&lt;br /&gt;
&lt;br /&gt;
The process usually proceeds as follows:&lt;br /&gt;
&lt;br /&gt;
(If you're on a Mac, you can follow the progress in /var/log/system.log)&lt;br /&gt;
&lt;br /&gt;
# WebOS Doctor begins&lt;br /&gt;
# At 3%, a ramdisk is transferred to the phone, and the phone is rebooted &lt;br /&gt;
# At 4%, the screen changes to the palm logo&lt;br /&gt;
# At 9%, the screen changes to a big arrow pointing down to an integrated circuit&lt;br /&gt;
# Novaterm access is available from 12% onwards&lt;br /&gt;
# The progress bar advances by 2% increments every 20 seconds or so&lt;br /&gt;
# If it gets stuck at 52% for more than 30 seconds, it's not going to progress further and you will need to try again.&lt;br /&gt;
# Around 54% the filesystems are being partitioned&lt;br /&gt;
# Around 64% the modem firmware is being reflashed&lt;br /&gt;
# Around 72% the carrier apps are being installed&lt;br /&gt;
# Around 84% the ROM is being verified&lt;br /&gt;
&lt;br /&gt;
If the process fails at 84% or later, the flash and modem have actually been written, so if you reboot you will get what you were flashing.&lt;br /&gt;
&lt;br /&gt;
== Modifications to the recovery process ==&lt;br /&gt;
&lt;br /&gt;
Between about 18% and 54% complete, you can novaterm into the device while it is being flashed, and modify the filesystem that will be run after the phone reboots (e.g. to touch /var/luna/preferences/ran-first-use).&lt;br /&gt;
&lt;br /&gt;
If you stay in a mounted directory, you can even cause the flashing to abort after the carrier apps are installed and just before the ROM is verified.  This is another point where manual modifications can be made.&lt;br /&gt;
&lt;br /&gt;
After you have made your modifications, unmount any filesystems you have mounted and &amp;quot;tellbootie reboot&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Can't boot into recovery mode? ==&lt;br /&gt;
&lt;br /&gt;
In the very unlikely event that your Pre will not boot into recovery mode (indicating that your boot loader on the flash disk may be damaged or corrupted) you can try booting bootie into recovery mode over USB instead: [[Last_Resort_Emergency_BootLoader_Recovery]] '''Note that there has not been a single reported incidence of this being required, we do not recommend that you attempt this unless you have tried all the steps above exactly as described at least 10 times.'''&lt;br /&gt;
&lt;br /&gt;
Short of hardware damage, it should not be possible to &amp;quot;brick&amp;quot; a Pre.&lt;/div&gt;</summary>
		<author><name>Odontastic</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=How_To_Recover&amp;diff=10006</id>
		<title>How To Recover</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=How_To_Recover&amp;diff=10006"/>
		<updated>2010-05-21T23:43:42Z</updated>

		<summary type="html">&lt;p&gt;Odontastic: /* Pre not booting? webOS Doctor How-To */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Pre not booting? webOS Doctor How-To =&lt;br /&gt;
{{tux|Tux_with_Broken_Pre.png|float:right;}}&lt;br /&gt;
Fortunately, Palm has created a tool called webOS Doctor intended for users to easily restore their devices in the event that they cannot boot for one reason or another.&lt;br /&gt;
&lt;br /&gt;
Note: Before Trying the following steps below. Try removing the battery first and reinsert the battery and turn on the device this will determine whether or not you need to perform the following steps.&lt;br /&gt;
&lt;br /&gt;
Note 2: As of WebOS 1.3.1 your USB data (Pictures, Videos, etc.) is no longer deleted during the process.  Older versions of WebOS Doctor WILL DELETE ALL YOUR PERSONAL DATA ON THE DEVICE.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Palm webOS Doctor:''' [http://www.palm.com/us/support/downloads/pre/recoverytool/deviceselector_en.html http://www.palm.com/us/support/downloads/pre/recoverytool/deviceselector_en.html]&lt;br /&gt;
&lt;br /&gt;
'''All Palm WebOS Doctor Versions:''' [http://www.webos-internals.org/wiki/Webos_Doctor_Versions http://www.webos-internals.org/wiki/Webos_Doctor_Versions]&lt;br /&gt;
&lt;br /&gt;
After the download is complete, launch webOS Doctor:&lt;br /&gt;
&lt;br /&gt;
# Select you language&lt;br /&gt;
# Accept the license agreement&lt;br /&gt;
# Connect your Pre to you PC via USB and select &amp;quot;Next&amp;quot; when it becomes available&lt;br /&gt;
{{tux|Tux_with_Pre_and_Screwdriver.png|float:right;}}&lt;br /&gt;
After completion the device will reboot and present you with the activation set-up.&lt;br /&gt;
&lt;br /&gt;
If your PC does not recognize your Pre and you cannot go past step 3 above, try the following steps:&lt;br /&gt;
&lt;br /&gt;
# With the USB cable connected, completely power off the Pre (hold down the power button until the option to power off appears)&lt;br /&gt;
# Hold down the Up button on the volume rocker&lt;br /&gt;
# While holding the Up button, power on the Pre&lt;br /&gt;
# &amp;quot;Next&amp;quot; should now be enabled - proceed with the recovery&lt;br /&gt;
{{tux|Tux_with_Pre.png|float:right;}}&lt;br /&gt;
The above steps will put the Pre into bootloader recovery mode and should allow the PC to recognize your device and proceed with the restore. In this mode the screen will display a giant USB logo instead of the usual Palm startup logo.&lt;br /&gt;
&lt;br /&gt;
The process usually proceeds as follows:&lt;br /&gt;
&lt;br /&gt;
(If you're on a Mac, you can follow the progress in /var/log/system.log)&lt;br /&gt;
&lt;br /&gt;
# WebOS Doctor begins&lt;br /&gt;
# At 3%, a ramdisk is transferred to the phone, and the phone is rebooted &lt;br /&gt;
# At 4%, the screen changes to the palm logo&lt;br /&gt;
# At 9%, the screen changes to a big arrow pointing down to an integrated circuit&lt;br /&gt;
# Novaterm access is available from 12% onwards&lt;br /&gt;
# The progress bar advances by 2% increments every 20 seconds or so&lt;br /&gt;
# If it gets stuck at 52% for more than 30 seconds, it's not going to progress further and you will need to try again.&lt;br /&gt;
# Around 54% the filesystems are being partitioned&lt;br /&gt;
# Around 64% the modem firmware is being reflashed&lt;br /&gt;
# Around 74% the carrier apps are being installed&lt;br /&gt;
# Around 84% the ROM is being verified&lt;br /&gt;
&lt;br /&gt;
If the process fails at 84% or later, the flash and modem have actually been written, so if you reboot you will get what you were flashing.&lt;br /&gt;
&lt;br /&gt;
== Modifications to the recovery process ==&lt;br /&gt;
&lt;br /&gt;
Between about 18% and 54% complete, you can novaterm into the device while it is being flashed, and modify the filesystem that will be run after the phone reboots (e.g. to touch /var/luna/preferences/ran-first-use).&lt;br /&gt;
&lt;br /&gt;
If you stay in a mounted directory, you can even cause the flashing to abort after the carrier apps are installed and just before the ROM is verified.  This is another point where manual modifications can be made.&lt;br /&gt;
&lt;br /&gt;
After you have made your modifications, unmount any filesystems you have mounted and &amp;quot;tellbootie reboot&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Can't boot into recovery mode? ==&lt;br /&gt;
&lt;br /&gt;
In the very unlikely event that your Pre will not boot into recovery mode (indicating that your boot loader on the flash disk may be damaged or corrupted) you can try booting bootie into recovery mode over USB instead: [[Last_Resort_Emergency_BootLoader_Recovery]] '''Note that there has not been a single reported incidence of this being required, we do not recommend that you attempt this unless you have tried all the steps above exactly as described at least 10 times.'''&lt;br /&gt;
&lt;br /&gt;
Short of hardware damage, it should not be possible to &amp;quot;brick&amp;quot; a Pre.&lt;/div&gt;</summary>
		<author><name>Odontastic</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=How_To_Recover&amp;diff=10005</id>
		<title>How To Recover</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=How_To_Recover&amp;diff=10005"/>
		<updated>2010-05-21T23:38:11Z</updated>

		<summary type="html">&lt;p&gt;Odontastic: /* Pre not booting? webOS Doctor How-To */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Pre not booting? webOS Doctor How-To =&lt;br /&gt;
{{tux|Tux_with_Broken_Pre.png|float:right;}}&lt;br /&gt;
Fortunately, Palm has created a tool called webOS Doctor intended for users to easily restore their devices in the event that they cannot boot for one reason or another.&lt;br /&gt;
&lt;br /&gt;
Note: Before Trying the following steps below. Try removing the battery first and reinsert the battery and turn on the device this will determine whether or not you need to perform the following steps.&lt;br /&gt;
&lt;br /&gt;
Note 2: As of WebOS 1.3.1 your USB data (Pictures, Videos, etc.) is no longer deleted during the process.  Older versions of WebOS Doctor WILL DELETE ALL YOUR PERSONAL DATA ON THE DEVICE.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Palm webOS Doctor:''' [http://www.palm.com/us/support/downloads/pre/recoverytool/deviceselector_en.html http://www.palm.com/us/support/downloads/pre/recoverytool/deviceselector_en.html]&lt;br /&gt;
&lt;br /&gt;
'''All Palm WebOS Doctor Versions:''' [http://www.webos-internals.org/wiki/Webos_Doctor_Versions http://www.webos-internals.org/wiki/Webos_Doctor_Versions]&lt;br /&gt;
&lt;br /&gt;
After the download is complete, launch webOS Doctor:&lt;br /&gt;
&lt;br /&gt;
# Select you language&lt;br /&gt;
# Accept the license agreement&lt;br /&gt;
# Connect your Pre to you PC via USB and select &amp;quot;Next&amp;quot; when it becomes available&lt;br /&gt;
{{tux|Tux_with_Pre_and_Screwdriver.png|float:right;}}&lt;br /&gt;
After completion the device will reboot and present you with the activation set-up.&lt;br /&gt;
&lt;br /&gt;
If your PC does not recognize your Pre and you cannot go past step 3 above, try the following steps:&lt;br /&gt;
&lt;br /&gt;
# With the USB cable connected, completely power off the Pre (hold down the power button until the option to power off appears)&lt;br /&gt;
# Hold down the Up button on the volume rocker&lt;br /&gt;
# While holding the Up button, power on the Pre&lt;br /&gt;
# &amp;quot;Next&amp;quot; should now be enabled - proceed with the recovery&lt;br /&gt;
{{tux|Tux_with_Pre.png|float:right;}}&lt;br /&gt;
The above steps will put the Pre into bootloader recovery mode and should allow the PC to recognize your device and proceed with the restore. In this mode the screen will display a giant USB logo instead of the usual Palm startup logo.&lt;br /&gt;
&lt;br /&gt;
The process usually proceeds as follows:&lt;br /&gt;
&lt;br /&gt;
(If you're on a Mac, you can follow the progress in /var/log/system.log)&lt;br /&gt;
&lt;br /&gt;
# WebOS Doctor begins&lt;br /&gt;
# At 3%, a ramdisk is transferred to the phone, and the phone is rebooted &lt;br /&gt;
# At 4%, the screen changes to the palm logo&lt;br /&gt;
# At 9%, the screen changes to a big arrow pointing down to an integrated circuit&lt;br /&gt;
# Novaterm access is available from 12% onwards&lt;br /&gt;
# The progress bar advances by 2% increments every 20 seconds or so&lt;br /&gt;
# If it gets stuck at 52% for more than 30 seconds, it's not going to progress further and you will need to try again.&lt;br /&gt;
# Around 54% the filesystems are being partitioned&lt;br /&gt;
# Around 66% the modem firmware is being reflashed&lt;br /&gt;
# Around 74% the carrier apps are being installed&lt;br /&gt;
# Around 84% the ROM is being verified&lt;br /&gt;
&lt;br /&gt;
If the process fails at 84% or later, the flash and modem have actually been written, so if you reboot you will get what you were flashing.&lt;br /&gt;
&lt;br /&gt;
== Modifications to the recovery process ==&lt;br /&gt;
&lt;br /&gt;
Between about 18% and 54% complete, you can novaterm into the device while it is being flashed, and modify the filesystem that will be run after the phone reboots (e.g. to touch /var/luna/preferences/ran-first-use).&lt;br /&gt;
&lt;br /&gt;
If you stay in a mounted directory, you can even cause the flashing to abort after the carrier apps are installed and just before the ROM is verified.  This is another point where manual modifications can be made.&lt;br /&gt;
&lt;br /&gt;
After you have made your modifications, unmount any filesystems you have mounted and &amp;quot;tellbootie reboot&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Can't boot into recovery mode? ==&lt;br /&gt;
&lt;br /&gt;
In the very unlikely event that your Pre will not boot into recovery mode (indicating that your boot loader on the flash disk may be damaged or corrupted) you can try booting bootie into recovery mode over USB instead: [[Last_Resort_Emergency_BootLoader_Recovery]] '''Note that there has not been a single reported incidence of this being required, we do not recommend that you attempt this unless you have tried all the steps above exactly as described at least 10 times.'''&lt;br /&gt;
&lt;br /&gt;
Short of hardware damage, it should not be possible to &amp;quot;brick&amp;quot; a Pre.&lt;/div&gt;</summary>
		<author><name>Odontastic</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=External_Battery_Pack&amp;diff=9561</id>
		<title>External Battery Pack</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=External_Battery_Pack&amp;diff=9561"/>
		<updated>2010-04-09T23:30:32Z</updated>

		<summary type="html">&lt;p&gt;Odontastic: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[image:Charger-pack.png|thumb|left|150px|Finished device by Ryan]]&lt;br /&gt;
&lt;br /&gt;
Pre owners have been cursed with the problem of insufficient battery life since the day the phone was released.  With the rise of 3d gaming, battery life has again taken a hit as the GPU sucks your power down.  Additionally, the Verizon battery features the &amp;quot;mifi like&amp;quot; wifi router tethering feature, and the european 1.3.5.2 features bluetooth tethering that both result in batteries draining in 3 to 4 hours.  &lt;br /&gt;
&lt;br /&gt;
So, an external battery pack becomes a useful addition to the webOS owner's toolkit. &lt;br /&gt;
&lt;br /&gt;
WebOS devices can accept up to a 1 amp charge from an external USB supply.  &lt;br /&gt;
&lt;br /&gt;
The USB spec says that voltage supplied to a USB port must be in the range 4.75 to 5.25 volts.  [http://www.hardwarebook.info/Universal_Serial_Bus_(USB)]&lt;br /&gt;
&lt;br /&gt;
New NiMH (Nickle Metal Hydride) rechargable batteries have a nominal voltage of 1.2 volts, so four of them in series have a nominal voltage of 4.8 volts. A freshly charged NiMH battery in good condition has a starting voltage of 1.4 volts, so four of them have a potential voltage of 5.6 volts, but this is unlikely in real life.  In any event, this voltage falls rapidly to about 1.25 volts at 10% Depth of Discharge (DOD) and then remains almost constant until the cell is over 80% discharged. The voltage then falls rapidly from about 1.2 volts down to 0.8-1.0 volts at which the cell is considered &amp;quot;flat&amp;quot; in most devices. Mid-discharge at a load of 1 amp, the output is about 1.2 volts; at 2 amps, about 1.15 volts; the total effective differential internal resistance is about 0.05 ohms. Nickel metal hydride batteries provide a relatively constant voltage for most of the discharge cycle, unlike a standard alkaline where the voltage falls steadily during discharge. [http://en.wikipedia.org/wiki/Nickel-metal_hydride_battery]&lt;br /&gt;
&lt;br /&gt;
High capacity rechargable NiMH AA batteries have a capacity of 2900 mAH. &lt;br /&gt;
&lt;br /&gt;
Consider the power comparison then.  The battery in the Pre has a capacity of 1150 mAH at 3.2 volts, or a total energy capacity of 3.68 watt-hours.  4 NiMH AA batteries provide 2900 mAH of power at 4.8V or 13.92 watt-hours of energy. This amounts to 3.78 full charges of the Pre or Pixi internal battery.  &lt;br /&gt;
&lt;br /&gt;
Clearly, the project is worth doing.  &lt;br /&gt;
&lt;br /&gt;
Four NiMH batteries will (just) fit sideways in a standard Altoids mint tin with a USB female plug placed through the end.  Radio shack sells a 4xAA battery holder which can be glued into the tin with a little trimming for $1.79 [http://www.radioshack.com/product/index.jsp?productId=2062244] Keystone electronics sells a USB female socket that can be run through the end of the tin for $1.41  [http://www.alliedelec.com/search/productdetail.aspx?SKU=8396501]  &lt;br /&gt;
&lt;br /&gt;
The resulting power pack merely needs the addition of a usb to micro usb cable as came with the pre.  &lt;br /&gt;
&lt;br /&gt;
Connect the positive end of the batteries to pin 1 of the USB socket, and the negative end to pin 4.  &lt;br /&gt;
&lt;br /&gt;
The Pre or Pixi will notice that a high current (1 amp) charge can be obtained from the device if you short the data pins (2 and 3)  of the socket.  &lt;br /&gt;
&lt;br /&gt;
The resulting package is simple, effective, and &amp;quot;neato&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
[[image:AltoidsTin battery pack.png|thumb|left|150px|Finished device]] [[image:radioshack_battpack.png|thumb|right|150px|Radio Shack enclosed pack]]&lt;br /&gt;
&lt;br /&gt;
If you don't want to mess with an altoids tin, Radio shack makes an enclosed 4 AA battery pack with a switch which can be directly soldered to a sacrificed micro USB cable for $1.99.  [http://www.radioshack.com/product/index.jsp?productId=2062253]&lt;br /&gt;
&lt;br /&gt;
If you want to skip all this there is a [http://www.amazon.com/Tekkeon-TekCharge-Mobile-Battery-Charger/dp/B0014KLX9C/ref=pd_sim_e_2 Commercial version built by Tekkon available from Amazon which includes a battery charger for approximately $22.]&lt;br /&gt;
[[image:tekkon1.png|thumb|left|150px|Tekkon pack with cover on]] [[image:tekkon2.png|thumb|right|150px|Tekkon pack with cover off]]&lt;/div&gt;</summary>
		<author><name>Odontastic</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Luna_Send&amp;diff=9311</id>
		<title>Luna Send</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Luna_Send&amp;diff=9311"/>
		<updated>2010-03-08T04:52:48Z</updated>

		<summary type="html">&lt;p&gt;Odontastic: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;NOTE: You have to run with root perms.&lt;br /&gt;
&lt;br /&gt;
Using luna-send to refresh the Launcher panel.&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
luna-send -n 1 palm://com.palm.applicationManager/rescan {}&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Get a list of all installed apps:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
luna-send -n 1 &amp;quot;palm://com.palm.applicationManager/listLaunchPoints&amp;quot; &amp;quot;{}&amp;quot;&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using luna-send to launch an application:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
luna-send -n 1 palm://com.palm.applicationManager/launch {\&amp;quot;id\&amp;quot;:\&amp;quot;com.palm.app.browser\&amp;quot;}&lt;br /&gt;
luna-send -n 1 palm://com.palm.applicationManager/launch {\&amp;quot;id\&amp;quot;:\&amp;quot;com.palm.app.browser\&amp;quot;,\&amp;quot;params\&amp;quot;:{\&amp;quot;scene\&amp;quot;:\&amp;quot;page\&amp;quot;,\&amp;quot;target\&amp;quot;:\&amp;quot;http://www.google.com\&amp;quot;}}&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The second command shows how to open www.google.com when the browser is launched.&lt;br /&gt;
&lt;br /&gt;
Using luna-send to download a file to /media/internal/downloads/:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
luna-send -n 1 palm://com.palm.downloadmanager/download {\&amp;quot;target\&amp;quot;:\&amp;quot;http://www.google.com/index.html\&amp;quot;}  &lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Replace www.google.com/index.html with whatever file you want downloaded.&lt;br /&gt;
&lt;br /&gt;
Using luna-send to first import and then set the wallpaper image:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
luna-send -n 1 palm://com.palm.systemservice/wallpaper/importWallpaper {&amp;quot;target&amp;quot;: &amp;quot;/media/internal/wallpapers/your_file.jpg&amp;quot; }&lt;br /&gt;
luna-send -n 1 palm://com.palm.systemservice/setPreferences {&amp;quot;wallpaper&amp;quot;: {&amp;quot;wallpaperName&amp;quot;: &amp;quot;your_file.jpg&amp;quot;, &amp;quot;wallpaperFile&amp;quot;: &amp;quot;/media/internal/wallpapers/your_file.jpg&amp;quot;}}&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Replace your_file.jpg with whatever file in the wallpapers folder you want for your next wallpaper.&lt;br /&gt;
&lt;br /&gt;
Using luna-send to control the palm progress animation (The pulsing &amp;quot;palm&amp;quot; logo seen at boot):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
luna-send -n 1 palm://com.palm.systemmanager/runProgressAnimation {\&amp;quot;state\&amp;quot;:\&amp;quot;start\&amp;quot;}&lt;br /&gt;
luna-send -n 1 palm://com.palm.systemmanager/runProgressAnimation {\&amp;quot;state\&amp;quot;:\&amp;quot;stop\&amp;quot;}&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
TODO: These should probably be plugged into the Tracker app.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
luna-send -n 1 palm://com.palm.location/setUseGps {\&amp;quot;useGps\&amp;quot;:\&amp;quot;true\&amp;quot;}&lt;br /&gt;
luna-send -n 1 palm://com.palm.location/setAutoLocate {\&amp;quot;autoLocate\&amp;quot;:\&amp;quot;true\&amp;quot;}&lt;br /&gt;
luna-send -n 1 palm://com.palm.location/getCurrentPosition {}&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
List all of the processes which are running:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
sudo luna-send -n 1 palm://com.palm.applicationManager/running {}&lt;br /&gt;
** Message: serviceResponse Handling: 2, { &amp;quot;running&amp;quot;: [ { &amp;quot;id&amp;quot;: &amp;quot;com.palm.launcher&amp;quot;, &amp;quot;processid&amp;quot;: &amp;quot;1006&amp;quot; }, { &amp;quot;id&amp;quot;: &amp;quot;com.palm.systemui&amp;quot;, &amp;quot;processid&amp;quot;: &amp;quot;1007&amp;quot; }, { &amp;quot;id&amp;quot;: &amp;quot;com.palm.app.email&amp;quot;, &amp;quot;processid&amp;quot;: &amp;quot;1000&amp;quot; }, { &amp;quot;id&amp;quot;: &amp;quot;com.palm.app.phone&amp;quot;, &amp;quot;processid&amp;quot;: &amp;quot;1001&amp;quot; }, { &amp;quot;id&amp;quot;: &amp;quot;com.palm.app.contacts&amp;quot;, &amp;quot;processid&amp;quot;: &amp;quot;1002&amp;quot; }, { &amp;quot;id&amp;quot;: &amp;quot;com.palm.app.camera&amp;quot;, &amp;quot;processid&amp;quot;: &amp;quot;1003&amp;quot; }, { &amp;quot;id&amp;quot;: &amp;quot;com.palm.app.messaging&amp;quot;, &amp;quot;processid&amp;quot;: &amp;quot;1004&amp;quot; }, { &amp;quot;id&amp;quot;: &amp;quot;com.palm.app.calendar&amp;quot;, &amp;quot;processid&amp;quot;: &amp;quot;1005&amp;quot; }, { &amp;quot;id&amp;quot;: &amp;quot;com.palm.app.phone&amp;quot;, &amp;quot;processid&amp;quot;: &amp;quot;1008&amp;quot; }, { &amp;quot;id&amp;quot;: &amp;quot;com.palm.app.camera&amp;quot;, &amp;quot;processid&amp;quot;: &amp;quot;1014&amp;quot; } ] }&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
Interesting note:&lt;br /&gt;
Seems everything with a processid below 1008 are static.  As seen above, open camera app has pid 1014 and startup app is pid 1003&lt;br /&gt;
&lt;br /&gt;
Close a process:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
luna-send -n 1 &amp;quot;palm://com.palm.applicationManager/close&amp;quot; &amp;quot;{\&amp;quot;processId\&amp;quot;:\&amp;quot;1058\&amp;quot;}&amp;quot;&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Activate the vibrator:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
luna-send -n 1 palm://com.palm.vibrate/vibrate {\&amp;quot;period\&amp;quot;:1,\&amp;quot;duration\&amp;quot;:1000\}&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
The duration value is in milliseconds and can be adjusted as desired.&lt;br /&gt;
&lt;br /&gt;
Photos Info - list album and image from mediadb.db3:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
luna-send -n 1 luna://com.palm.mediadb/image/listalbums {}&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
luna-send -n 1 luna://com.palm.mediadb/image/listimages {}&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Set system volume - &amp;quot;volume&amp;quot; range is 0-100&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
luna-send -n 1 palm://com.palm.audio/system/setVolume '{&amp;quot;volume&amp;quot;:80}'&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Set ringtone volume - &amp;quot;volume&amp;quot; range is 0-100&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
luna-send -n 1 palm://com.palm.audio/ringtone/setVolume '{&amp;quot;volume&amp;quot;:100}'&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Dial a number - this actually calls the number, not just setup&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
luna-send -n 1 palm://com.palm.telephony/dial '{&amp;quot;number&amp;quot;:&amp;quot;8001234567&amp;quot;}'&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Hang up a phone call :-) There are ways to end specific types of calls but I think this is good enough for now. Let me know if you want the other methods.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
luna-send -n 1 palm://com.palm.telephony/hangupAll {}&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Send a text message - only need to change phone &amp;quot;value&amp;quot; and &amp;quot;messageText&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
luna-send -n 1 palm://com.palm.messaging/sendMessageFromCompose '{&amp;quot;recipientJSONArray&amp;quot;: [{&amp;quot;lastName&amp;quot;: &amp;quot;&amp;quot;, &amp;quot;pictureLoc&amp;quot;: &amp;quot;&amp;quot;, &amp;quot;contactCount&amp;quot;: 1, &amp;quot;displayText&amp;quot;: &amp;quot;&amp;quot;, &amp;quot;firstName&amp;quot;: &amp;quot;&amp;quot;, &amp;quot;pictureLocBig&amp;quot;: &amp;quot;&amp;quot;, &amp;quot;imAvailability&amp;quot;: 6, &amp;quot;pictureLocSquare&amp;quot;: &amp;quot;&amp;quot;, &amp;quot;contactDisplay&amp;quot;: &amp;quot;&amp;quot;, &amp;quot;Person_id&amp;quot;: &amp;quot;&amp;quot;, &amp;quot;personId&amp;quot;: &amp;quot;&amp;quot;, &amp;quot;type&amp;quot;: &amp;quot;phone&amp;quot;, &amp;quot;value&amp;quot;: &amp;quot;8165551234&amp;quot;, &amp;quot;alreadyValidated&amp;quot;: true, &amp;quot;prefix&amp;quot;: &amp;quot;to$A&amp;quot;, &amp;quot;identifier&amp;quot;: &amp;quot;&amp;quot;}], &amp;quot;messageText&amp;quot;: &amp;quot;Content of message here&amp;quot;}'&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
set phone to no roam (home network only)&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
luna-send -n 1 palm://com.palm.telephony//roamModeSet '{&amp;quot;mode&amp;quot;:&amp;quot;homeonly&amp;quot;}'&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
set phone to auto roam&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
luna-send -n 1 palm://com.palm.telephony//roamModeSet '{&amp;quot;mode&amp;quot;:&amp;quot;any&amp;quot;}'&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
set phone to roam only&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
luna-send -n 1 palm://com.palm.telephony//roamModeSet '{&amp;quot;mode&amp;quot;:&amp;quot;roamonly&amp;quot;}'&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Applications==&lt;br /&gt;
&lt;br /&gt;
Notes (view notes):&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
luna-send -n 1 palm://com.palm.notes/getNotes {}&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Storage==&lt;br /&gt;
&lt;br /&gt;
Enter usb storage mode:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
luna-send -n 1 palm://com.palm.storage/diskmode/enterMSM {\&amp;quot;user-confirmed\&amp;quot;:true,\&amp;quot;enterIMasq\&amp;quot;:false}&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Exit usb storage mode (toggle):&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
luna-send -n 1 palm://com.palm.storage/diskmode/enterMSM {\&amp;quot;user-confirmed\&amp;quot;:true,\&amp;quot;enterIMasq\&amp;quot;:false}&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
--WOOT--&lt;br /&gt;
&lt;br /&gt;
==Airplane Mode==&lt;br /&gt;
&lt;br /&gt;
Enable Airplane Mode:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
luna-send -n 1 palm://com.palm.systemservice/setPreferences '{&amp;quot;airplaneMode&amp;quot;:true}'&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Disable Airplane Mode:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
luna-send -n 1 palm://com.palm.systemservice/setPreferences '{&amp;quot;airplaneMode&amp;quot;:false}'&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Finding luna-send Command==&lt;br /&gt;
&lt;br /&gt;
These commands come from inside given applications. The best way to find luna-send commands is to do a search for the term &amp;quot;method:&amp;quot; in the Applications code.  Once you find method: you might see parameters: which is also used by luna-send here is an example.&lt;br /&gt;
&lt;br /&gt;
searched for &amp;quot;method:&amp;quot; in the com.app.palm.AppYouAreTesting&lt;br /&gt;
&lt;br /&gt;
found&lt;br /&gt;
&lt;br /&gt;
&amp;quot;method: test&amp;quot;&lt;br /&gt;
&lt;br /&gt;
luna-send command based on example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
luna-send -n 1 palm://com.palm.AppYouAreTesting/test {}&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
General luna-send command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
luna-send -n 1 palm://ApplicationName/MethodValue {ParameterValues}&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Searching for services with dbus==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Run dbus-util capture and search for services/methods/parameters. - xorg&lt;br /&gt;
&lt;br /&gt;
# dbus-util --capture 2&amp;gt;&amp;amp;1 |tee /tmp/dbus.dump&lt;br /&gt;
&lt;br /&gt;
Perform functions on device that you want to trap, such as setting phone to automatic roaming.&lt;br /&gt;
Ctrl-c from dbus.&lt;br /&gt;
&lt;br /&gt;
Searches to try...&lt;br /&gt;
# grep // /tmp/dbus.dump&lt;br /&gt;
# grep com.palm /tmp/dbus.dump&lt;br /&gt;
# grep palm:// tmp/dbus.dump&lt;br /&gt;
# grep roam /tmp/dbus.dump&lt;br /&gt;
&lt;br /&gt;
This is found in the dump...&lt;br /&gt;
  com.palm.luna2  com.palm.telephony      //roamModeSet   Â«string=â{&amp;quot;mode&amp;quot;: &amp;quot;homeonly&amp;quot;}&lt;br /&gt;
&lt;br /&gt;
com.palm.telophony is the service&lt;br /&gt;
//roamModeSet is the method&lt;br /&gt;
&amp;quot;mode&amp;quot;:&amp;quot;homeonly&amp;quot; is the parameter&lt;br /&gt;
&lt;br /&gt;
Translate to luna-send...&lt;br /&gt;
&lt;br /&gt;
luna-send -n 1 palm://com.palm.telephony/roamModeSet '{&amp;quot;mode&amp;quot;:&amp;quot;homeonly&amp;quot;}'&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Odontastic</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Application:Luna_Manager&amp;diff=7200</id>
		<title>Application:Luna Manager</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Application:Luna_Manager&amp;diff=7200"/>
		<updated>2009-11-17T02:59:11Z</updated>

		<summary type="html">&lt;p&gt;Odontastic: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{application&lt;br /&gt;
|name=Luna Manager&lt;br /&gt;
|type=webOS&lt;br /&gt;
|version=Version: 0.0.3&lt;br /&gt;
|tag=Utilities&lt;br /&gt;
|screenshot=LunaManager.png&lt;br /&gt;
|description=&lt;br /&gt;
&lt;br /&gt;
== Summary == &lt;br /&gt;
{{icon|Icon_WebOSInternals_StopLight.png|float:right;}}&lt;br /&gt;
Luna Manager is one of the handiest apps for homebrewers allowing you to control multiple aspects of Luna with a simple GUI&lt;br /&gt;
&lt;br /&gt;
=== Info ===&lt;br /&gt;
Luna Manager can be installed via [http://www.webos-internals.org/wiki/Preware Preware] or [http://forums.precentral.net/canuck-software/206905-webos-quick-install-v2-9-a.html WebOS Quick Install]&lt;br /&gt;
&lt;br /&gt;
Luna Manager requires the package manager service (that preware uses) to be installed to work.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Buttons == &lt;br /&gt;
=== Rescan ===&lt;br /&gt;
Rescan Option allows you to rescan your launcher. So when you install a new app and icon doesn't show up this will generally fix that.&lt;br /&gt;
&lt;br /&gt;
=== Restart Luna ===&lt;br /&gt;
Restarting Luna is a good solution when you install patches, themes and some advanced homebrew apps to apply the changes without the need of a full reboot of the phone. It is a lot faster then an entire reboot and comes in quite handy. Keep in mind that it will close all your currently open applications.  &lt;br /&gt;
&lt;br /&gt;
=== Restart Java ===&lt;br /&gt;
Restarting Java is used for advanced home brew applications and installations for new services to take effect. Much easier then an entire reboot of the phone. Keep in mind This will cause your phone to lose network connection and be pretty sluggish until it is done restarting.&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Odontastic</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Avahi&amp;diff=6560</id>
		<title>Avahi</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Avahi&amp;diff=6560"/>
		<updated>2009-10-19T01:28:45Z</updated>

		<summary type="html">&lt;p&gt;Odontastic: /* Avahi Installation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Avahi=&lt;br /&gt;
[http://avahi.org Avahi] is a Linux service for providing multicast-DNS/DNS-SD (also known as [http://en.wikipedia.org/wiki/Bonjour_%28software%29 Bonjour] or mDNS/DNS-SD). Avahi allows for simple service discovery and advertisement on a local network and provides name resolution for all hosts running a mDNS/DNS-SD service.&lt;br /&gt;
&lt;br /&gt;
Using Avahi allows for easy SSH access over a local wireless network. Once installed and started, users can ssh to their device using their mDNS assigned hostname.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Avahi Installation==&lt;br /&gt;
&lt;br /&gt;
First, mount the root filesystem as writable and install the Avahi ipkg.&lt;br /&gt;
&lt;br /&gt;
 $&amp;gt; sudo mount -o remount,rw /&lt;br /&gt;
 $&amp;gt; sudo /opt/bin/ipkg-opt install avahi&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Avahi currently attempts to access a different dbus system socket than the one provided by the Pre's dbus, so we need to turn off dbus access for the time being. Edit &amp;lt;tt&amp;gt;/opt/etc/avahi/avahi-daemon.conf&amp;lt;/tt&amp;gt; and make the following change:&lt;br /&gt;
&lt;br /&gt;
 Replace this line:&lt;br /&gt;
 #enable-dbus=yes&lt;br /&gt;
 &lt;br /&gt;
 With this line:&lt;br /&gt;
 enable-dbus=no&lt;br /&gt;
&lt;br /&gt;
Avahi seems to want to run as a user named &amp;quot;avahi&amp;quot;.  To create the user, run the following command:&lt;br /&gt;
&lt;br /&gt;
 $&amp;gt; adduser -h /opt/var/run/avahi avahi&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At this point, the Avahi daemon can be started with the following command:&lt;br /&gt;
&lt;br /&gt;
 $&amp;gt; sudo /opt/sbin/avahi-daemon -D&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you would like Avahi to start up at boot, create the following two files: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''/opt/etc/init.d/S60avahi'''&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 &lt;br /&gt;
 [ -e /opt/etc/default/avahi ] &amp;amp;&amp;amp; . /opt/etc/default/avahi&lt;br /&gt;
 &lt;br /&gt;
 if [ &amp;quot;$AVAHI_ENABLE&amp;quot; = &amp;quot;no&amp;quot; ]; then&lt;br /&gt;
     exit&lt;br /&gt;
 fi&lt;br /&gt;
 &lt;br /&gt;
 if [ -n &amp;quot;`pidof /opt/sbin/avahi-daemon`&amp;quot; ]; then &lt;br /&gt;
     killall /opt/sbin/avahi 2&amp;gt;/dev/null&lt;br /&gt;
 fi&lt;br /&gt;
 &lt;br /&gt;
 /opt/sbin/avahi-daemon -D&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''/opt/etc/default/avahi'''&lt;br /&gt;
 AVAHI_ENABLE=yes&lt;br /&gt;
&lt;br /&gt;
Make sure you set the startup script to executable:&lt;br /&gt;
&lt;br /&gt;
 $&amp;gt; sudo chmod 755 /opt/etc/init.d/S60avahi&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can create an upstart script at '''/etc/event.d/avahi''':&lt;br /&gt;
&lt;br /&gt;
 start on started PmConnectionManager                                            &lt;br /&gt;
                                                                                &lt;br /&gt;
 console output                                                                  &lt;br /&gt;
                                                                                &lt;br /&gt;
 exec /opt/sbin/avahi-daemon -D                                                  &lt;br /&gt;
 respawn &lt;br /&gt;
&lt;br /&gt;
NOTE: This script is not being stored in the /opt directory. You may have to replace it after an update, and it may cause problems with your Pre.&lt;br /&gt;
&lt;br /&gt;
==Connecting via SSH using mDNS==&lt;br /&gt;
&lt;br /&gt;
mDNS uses the system's hostname and appends it to the &amp;lt;tt&amp;gt;local.&amp;lt;/tt&amp;gt; domain. Using the Pre's default &amp;lt;tt&amp;gt;castle&amp;lt;/tt&amp;gt; hostname, the following command would be used to SSH to your Pre on port 222:&lt;br /&gt;
&lt;br /&gt;
 $&amp;gt; ssh -P 222 castle.local.&lt;br /&gt;
&lt;br /&gt;
'''Note: The system that you are connecting from MUST have a mDNS service also running, else the hostname will not resolve'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Current Issues==&lt;br /&gt;
&lt;br /&gt;
* The ipkg binary of Avahi attempts to find the dbus socket at &amp;lt;tt&amp;gt;/opt/var/run/dbus/system_bus_socket&amp;lt;/tt&amp;gt;, but the Pre's dbus socket is at &amp;lt;tt&amp;gt;/var/run/dbus/system_bus_socket&amp;lt;/tt&amp;gt;. I haven't investigated tying these two together too much, but the expanded functionality of accessing mDNS via dbus is preferred.&lt;br /&gt;
* The avahi-daemon seems to have issues keeping the mDNS name resolution running for more than a few minutes. I don't know if this is a power management issue or something else at this point.&lt;/div&gt;</summary>
		<author><name>Odontastic</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Patch_webOS_Random_Wallpaper_Switching&amp;diff=6548</id>
		<title>Patch webOS Random Wallpaper Switching</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Patch_webOS_Random_Wallpaper_Switching&amp;diff=6548"/>
		<updated>2009-10-18T02:04:03Z</updated>

		<summary type="html">&lt;p&gt;Odontastic: /* The Wallpaper Switcher Script */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{template:patch}}&lt;br /&gt;
===Homebrew App for Random Wallpaper Switching===&lt;br /&gt;
&lt;br /&gt;
There is now a homebrew application (no rooting required) that allows this same function without performing the patch below.  It can be found at http://forums.precentral.net/homebrew-apps/195990-switcharoo-random-wallpaper-switching-v0-9-0-7-30-a.html&lt;br /&gt;
&lt;br /&gt;
=== Goal===&lt;br /&gt;
&lt;br /&gt;
On my desktop I have installed desktop drapes and my wallpaper switches every few hours to a random image in a wallpapers folder.  I wanted to have the same functionality on my pre.&lt;br /&gt;
&lt;br /&gt;
=== Requirements===&lt;br /&gt;
&lt;br /&gt;
* [[Portal:Accessing_Linux | Access to Linux]] on your Pre.&lt;br /&gt;
* [[Next_steps | Installed backdoor with sudo]]&lt;br /&gt;
* The PATH variable should be set up in your .profile in your backdoor account, for example mine is set as follows: &lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;export PATH=$PATH:/bin:/sbin:/usr/bin:/usr/sbin/:/usr/local/bin:/opt/bin:/opt/sbin&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Procedure===&lt;br /&gt;
&lt;br /&gt;
Note: I prefer doing everything with sudo and not logging in as root via the backdoor.  I would recommend getting into the same habit.&lt;br /&gt;
&lt;br /&gt;
==== Transfering Wallpapers====&lt;br /&gt;
&lt;br /&gt;
* Connect your Pre to your computer as a USB drive.&lt;br /&gt;
* Create a folder named 'wallpapers' on the Pre (if its not already there).&lt;br /&gt;
* Put all your wallpapers there.&lt;br /&gt;
* Disconnect the Pre from your PC.  You might want to make sure to disconnect it safely so everything writes to storage okay.&lt;br /&gt;
&lt;br /&gt;
Make sure to remove any wallpapers which you don't want to show up, though, since the switcher will pick a random one.&lt;br /&gt;
&lt;br /&gt;
==== Enable Write Access====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;sudo mount -o remount,rw /&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Enabling Cron====&lt;br /&gt;
&lt;br /&gt;
Go [[Crond | here ]] to enable crond.&lt;br /&gt;
&lt;br /&gt;
==== The Wallpaper Switcher Script====&lt;br /&gt;
&lt;br /&gt;
First lets make a place for the script:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;sudo mkdir /opt/share/wallswitcher&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Edit wallswitcher.sh inside /opt/share/wallswitcher directory and place the following code there:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
main()&lt;br /&gt;
{&lt;br /&gt;
  DIR='/media/internal/wallpapers/'&lt;br /&gt;
  IFS=&amp;quot; &lt;br /&gt;
&amp;quot;&lt;br /&gt;
  NUM_FILES=0&lt;br /&gt;
  for cur in `ls -1 $DIR`; do&lt;br /&gt;
    if [ -f &amp;quot;$DIR$cur&amp;quot; ]&lt;br /&gt;
    then&lt;br /&gt;
      NUM_FILES=$((NUM_FILES+1))&lt;br /&gt;
      eval &amp;quot;FILE_$NUM_FILES=$cur&amp;quot;&lt;br /&gt;
    fi&lt;br /&gt;
  done&lt;br /&gt;
&lt;br /&gt;
  RANDOM_NUMBER=`awk &amp;quot;BEGIN{srand();print int($NUM_FILES * rand()) + 1;}&amp;quot;`&lt;br /&gt;
  eval &amp;quot;RANDOM_FILE=\$FILE_$((RANDOM_NUMBER))&amp;quot;&lt;br /&gt;
  IMPORT_STRING=&amp;quot;{ \&amp;quot;target\&amp;quot;: \&amp;quot;$DIR$RANDOM_FILE\&amp;quot; }&amp;quot;&lt;br /&gt;
  SET_STRING=&amp;quot;{ \&amp;quot;wallpaper\&amp;quot;: { \&amp;quot;wallpaperName\&amp;quot;: \&amp;quot;$RANDOM_FILE\&amp;quot;, \&amp;quot;wallpaperFile\&amp;quot;: \&amp;quot;$DIR$RANDOM_FILE\&amp;quot; } }&amp;quot;&lt;br /&gt;
&lt;br /&gt;
  echo &amp;quot;Found $NUM_FILES in $DIR&amp;quot;&lt;br /&gt;
  echo &amp;quot;Using random file: $RANDOM_FILE&amp;quot;&lt;br /&gt;
  echo &amp;quot;JSON Import String: $IMPORT_STRING&amp;quot;&lt;br /&gt;
  echo &amp;quot;JSON Set String: $SET_STRING&amp;quot;&lt;br /&gt;
  &lt;br /&gt;
  eval &amp;quot;luna-send -n 1 palm://com.palm.systemservice/wallpaper/importWallpaper '$IMPORT_STRING'&amp;quot;&lt;br /&gt;
  &lt;br /&gt;
  eval &amp;quot;luna-send -n 1 palm://com.palm.systemservice/setPreferences '$SET_STRING'&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
main&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Save the file and make sure it has execute permissions. The following command will insure that:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;sudo chmod 755 /opt/share/wallswitcher/wallswitcher.sh&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Some notes on the script:&lt;br /&gt;
* I am a Java/Groovy developer mostly and am not as good at shell scripting as I would like.  Any improvements on the script itself are welcome&lt;br /&gt;
* The main piece of code that performs the switch are the two luna-send commands. T he first command is required if a wallpaper has never been used before and will generate some thumbnails and copy the main image into /media/internal/.wallpapers.  The second luna-send command actually performs the switch.&lt;br /&gt;
* This method currently only supports wallpapers sized to exactly 320 x 480 px.  The import luna-send call can take more parameters in its JSON string, such as scaling and x/y offsets from center.  I have not used these yet since all my wallpapers are correctly sized.&lt;br /&gt;
* Again, being a not-so-good shell developer, the way I obtain random numbers and use them is a bit wrong.  Awk is used to get a random number.  Instead of arrays (as in bash), dynamic variable naming is used.&lt;br /&gt;
* The DIR variable controls where the script looks for wallpapers—you can change it to where your pictures are instead.  Currently the scan is not recursive.&lt;br /&gt;
&lt;br /&gt;
==== Testing the Script====&lt;br /&gt;
&lt;br /&gt;
If you have more then one wallpaper in /media/internal/wallpapers, you can test the switcher with the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;sudo /opt/share/wallswitcher/wallswitcher.sh&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The response should look something like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
Found 24 in /media/internal/wallpapers/&lt;br /&gt;
Using random file: wall_409.jpg&lt;br /&gt;
JSON Import String: { &amp;quot;target&amp;quot;: &amp;quot;/media/internal/wallpapers/wall_409.jpg&amp;quot; }&lt;br /&gt;
JSON Set String: { &amp;quot;wallpaper&amp;quot;: { &amp;quot;wallpaperName&amp;quot;: &amp;quot;wall_409.jpg&amp;quot;, &amp;quot;wallpaperFile&amp;quot;: &amp;quot;/media/internal/wallpapers/wall_409.jpg&amp;quot; } }&lt;br /&gt;
** Message: serviceResponse Handling: 2, { &amp;quot;returnValue&amp;quot;: true, &amp;quot;wallpaper&amp;quot;: { &amp;quot;wallpaperName&amp;quot;: &amp;quot;wall_409.jpg&amp;quot;, &amp;quot;wallpaperFile&amp;quot;: &amp;quot;\/media\/internal\/.wallpapers\/wall_409.jpg&amp;quot;, &amp;quot;wallpaperThumbFile&amp;quot;: &amp;quot;\/media\/internal\/.wallpapers\/thumbs\/wall_409.jpg&amp;quot; } }&lt;br /&gt;
** Message: serviceResponse Handling: 2, { &amp;quot;returnValue&amp;quot;: true }&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the two service calls are not returning correctly, something is wrong. Contact me (fxdemolisher[at]gmail[dawt]com) if you are stuck debugging it.&lt;br /&gt;
&lt;br /&gt;
==== Schedule the Script====&lt;br /&gt;
&lt;br /&gt;
This step is pretty easy. Since you have an empty root crontab set up all that needs to be done is a scheduling command.  Edit /etc/cron/crontabs/root and place the following scheduling test line:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;*/1 * * * * /opt/share/wallswitcher/wallswitcher.sh &amp;gt; /opt/share/wallswitcher/wallswitcher.log 2&amp;gt;&amp;amp;1&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will execute the switcher every minute and log to the /opt/share/wallswitcher/wallswitcher.log log.  After you have it switching correctly every minute you can edit the cron definition to run as often as you like.  Mine is set to run at the top of the hour using this line:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;0 * * * * /opt/share/wallswitcher/wallswitcher.sh &amp;gt; /opt/share/wallswitcher/wallswitcher.log 2&amp;gt;&amp;amp;1&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NOTE: Do not use crontab -e as this does not really write to /etc/cron/crontabs/root and will be overriden when the device restarts.&lt;br /&gt;
&lt;br /&gt;
==== Restore Read-Only Filesystem====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;sudo mount -o remount,ro /&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Tested and verified as written by optik678.&lt;br /&gt;
&lt;br /&gt;
=== Alternate Uses===&lt;br /&gt;
Modifications to original script for other uses&lt;br /&gt;
==== &amp;quot;Missing Pre&amp;quot; Wallpaper ====&lt;br /&gt;
This is a simple alternate use to create a wallpaper indicating the Pre is &amp;quot;missing&amp;quot; (&amp;quot;stolen&amp;quot; sounds rather harsh...)&lt;br /&gt;
&lt;br /&gt;
'''1.''' Create a PNG file and put in a directory of your choosing ( &amp;lt;YOUR-DIRECTORY&amp;gt; ) naming it &amp;quot;missingpre.png&amp;quot;&lt;br /&gt;
&lt;br /&gt;
'''2.''' Create a script file in a location of your choosing, naming it missingpre.sh (I use &amp;quot;/home/scripts&amp;quot;) using the following script (be sure to change &amp;lt;YOUR-DIRECTORY&amp;gt; to the actual directory where you stored your missingpre.png file):&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
main()&lt;br /&gt;
{&lt;br /&gt;
  MYFILE='&amp;lt;YOUR-DIRECTORY&amp;gt;/missingpre.png'&lt;br /&gt;
&lt;br /&gt;
  IMPORT_STRING=&amp;quot;{ \&amp;quot;target\&amp;quot;: \&amp;quot;$MYFILE\&amp;quot; }&amp;quot;&lt;br /&gt;
  SET_STRING=&amp;quot;{ \&amp;quot;wallpaper\&amp;quot;: { \&amp;quot;wallpaperName\&amp;quot;: \&amp;quot;mypre.png\&amp;quot;, \&amp;quot;wallpaperFile\&amp;quot;: \&amp;quot;$MYFILE\&amp;quot; } }&amp;quot;&lt;br /&gt;
&lt;br /&gt;
  echo &amp;quot;JSON Import String: $IMPORT_STRING&amp;quot;&lt;br /&gt;
  echo &amp;quot;JSON Set String: $SET_STRING&amp;quot;&lt;br /&gt;
  &lt;br /&gt;
  eval &amp;quot;luna-send -n 1 palm://com.palm.systemservice/wallpaper/importWallpaper '$IMPORT_STRING'&amp;quot;&lt;br /&gt;
  eval &amp;quot;luna-send -n 1 palm://com.palm.systemservice/setPreferences '$SET_STRING'&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
main&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''3.''' Add the following to /etc/cron/crontabs/root file (using the directory you chose for your script):&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;*/1 * * * * /home/scripts/missingpre.sh&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''4.''' Restart crond&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;/sbin/stop crond &amp;amp;&amp;amp; /sbin/start crond&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Result.''' Every minute this will over-ride whatever wallpaper was set.&lt;br /&gt;
Obviously, this won't force anyone to return your device, nor will it work if someone knows what they're doing with the Pre, but if your wallpaper is obnoxious enough, you might get lucky and have them call you back.&lt;br /&gt;
&lt;br /&gt;
[[image:Missingpre.png]]&lt;br /&gt;
&lt;br /&gt;
=== Acknowledgements===&lt;br /&gt;
&lt;br /&gt;
I would like to thank this site and the wonderful hackers on it. I would not be able to do this without various examples from other pages.&lt;/div&gt;</summary>
		<author><name>Odontastic</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Solution_to_App_Catalog_Installation_Limit&amp;diff=6411</id>
		<title>Solution to App Catalog Installation Limit</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Solution_to_App_Catalog_Installation_Limit&amp;diff=6411"/>
		<updated>2009-10-09T22:26:04Z</updated>

		<summary type="html">&lt;p&gt;Odontastic: /* Solution (symbolic link method) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;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.&lt;br /&gt;
&lt;br /&gt;
It's unfortunate that Palm has not resolved the issue in the 1.2 update. This is a tactical workaround that could potentially work long term, also saving space on /var, but this needs support by the homebrew community to add in the homebrew installer apps.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Solution (symbolic link method) ==&lt;br /&gt;
&lt;br /&gt;
Create a script to move apps to new home and create link.  You can use an editor or use the following cat command to paste the code, for those not familiar with editors.&lt;br /&gt;
&lt;br /&gt;
Here's how to do it for those comfortable with accessing Linux...&lt;br /&gt;
&lt;br /&gt;
- Enter Linux mode on Pre through a computer (linux commands are in bold)&lt;br /&gt;
&lt;br /&gt;
- Set read/write to allow creating script&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;'''mount -o remount,rw / '''&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- create a script using cat command, paste the code below and then do 'ctrl c' on the keyboard to break out.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;'''cat &amp;gt;/usr/bin/mvapp''' &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- paste the code below here, press ctrl-c on keyboard to exit after pasting the code.&lt;br /&gt;
&lt;br /&gt;
- when you see a linux prompt, set command to be executable&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt; '''chmod 755 /usr/bin/mvapp''' &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
code:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
# This code is open for re-use with no restrictions.  xorg&lt;br /&gt;
# This is a working proof of concept script still in development.&lt;br /&gt;
# Intent is for someone to port to a webOS app.&lt;br /&gt;
# Use at your own risk.&lt;br /&gt;
&lt;br /&gt;
#-------------------------------------------------------------------------#&lt;br /&gt;
# versions:&lt;br /&gt;
# 0.1.0 - original (xorg)&lt;br /&gt;
# 0.1.1 - added unlink and clean functions (daventx)&lt;br /&gt;
# 0.1.2 - added bulkmv function, allows moving many apps (xorg)&lt;br /&gt;
# 0.1.3 - added option for tar backups (xorg)&lt;br /&gt;
# 0.1.4 - added listmoved function to show apps already moved (xorg)&lt;br /&gt;
# 0.1.5 - added restoreall function, couple cleanup items (xorg)&lt;br /&gt;
# 0.1.6 - fixed to show usage if no appname supplied to link/unlink (xorg)&lt;br /&gt;
# 0.1.7 - added cleanexit (w/mount ro /) &lt;br /&gt;
#       - added exit code documentation for javascripts calling this (xorg)&lt;br /&gt;
# 0.2.0 - will not move apps that would have permission issues (xorg)&lt;br /&gt;
#       - will not move apps that have no json file&lt;br /&gt;
#       - improved error handling, improved listing shows actual app names&lt;br /&gt;
#-------------------------------------------------------------------------#&lt;br /&gt;
&lt;br /&gt;
#-------------------------------------------------------------------------#&lt;br /&gt;
# variables: these are globally available to all functions&lt;br /&gt;
#-------------------------------------------------------------------------#&lt;br /&gt;
COMMAND=$1&lt;br /&gt;
APP=$2&lt;br /&gt;
MEDIA=/media/internal/.apps&lt;br /&gt;
VAR=/var/usr/palm/applications&lt;br /&gt;
&lt;br /&gt;
# Backup keeps file attributes but uses more /media space. Recommend doing backups.&lt;br /&gt;
BACKUP=1  # set to 1 for tar backups, 0 to disable&lt;br /&gt;
BACKUPDIR=/media/internal/.appbackups&lt;br /&gt;
&lt;br /&gt;
# This should be turned on.  Only turn off if javascript is calling this script.&lt;br /&gt;
PROMPTS=1&lt;br /&gt;
&lt;br /&gt;
#-------------------------------------------------------------------------#&lt;br /&gt;
# exit codes for javascripts:&lt;br /&gt;
# function usage:&lt;br /&gt;
# 1 - normal usage error&lt;br /&gt;
#&lt;br /&gt;
# function cleanapp:&lt;br /&gt;
# 0 - normal exit&lt;br /&gt;
#&lt;br /&gt;
# function linkapp:&lt;br /&gt;
# 10 - app name not supplied&lt;br /&gt;
# 11 - link already exists&lt;br /&gt;
# 12 - app does not exit in VAR&lt;br /&gt;
# 13 - copy failed from VAR to MEDIA&lt;br /&gt;
# 14 - removing app from VAR failed&lt;br /&gt;
# 15 - APP needs permissions not supported on FAT, did not move to MEDIA&lt;br /&gt;
# 16 - APP has no json file, did not move to MEDIA&lt;br /&gt;
#&lt;br /&gt;
# function unlinkapp:&lt;br /&gt;
# 20 - app name not supplied&lt;br /&gt;
# 21 - app doesn't exit on MEDIA&lt;br /&gt;
# 22 - tar restore failed&lt;br /&gt;
# 23 - copy failed&lt;br /&gt;
# 24 - remove failed&lt;br /&gt;
#&lt;br /&gt;
#-------------------------------------------------------------------------#&lt;br /&gt;
&lt;br /&gt;
#-------------------------------------------------------------------------#&lt;br /&gt;
# function: cleanexit - exit with cleanup items&lt;br /&gt;
#-------------------------------------------------------------------------#&lt;br /&gt;
&lt;br /&gt;
cleanexit () {&lt;br /&gt;
 code=$1&lt;br /&gt;
&lt;br /&gt;
# put / back to read only&lt;br /&gt;
#  mount -o remount,ro /&lt;br /&gt;
&lt;br /&gt;
# Uncomment if you want verbose exit codes&lt;br /&gt;
# echo &amp;quot;exit code: $code&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 exit $code&lt;br /&gt;
}&lt;br /&gt;
# end of cleanexit function&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
#-------------------------------------------------------------------------#&lt;br /&gt;
# function: usage - show command usage options&lt;br /&gt;
#-------------------------------------------------------------------------#&lt;br /&gt;
usage () {&lt;br /&gt;
   exitcode=$1&lt;br /&gt;
   if [ ! $exitcode ]&lt;br /&gt;
   then&lt;br /&gt;
     exitcode=1  # default exit code for usage, otherwise exit with incode&lt;br /&gt;
   fi&lt;br /&gt;
&lt;br /&gt;
   echo &amp;quot;Usage: mvapp link domain.appname    - move app to media and link&amp;quot;&lt;br /&gt;
   echo &amp;quot;Usage: mvapp unlink domain.appname  - restore app to var, remove link&amp;quot;&lt;br /&gt;
   echo &amp;quot;Usage: mvapp clean domain.appname   - remove app dir and links&amp;quot;&lt;br /&gt;
   echo &amp;quot;Usage: mvapp list                   - list all apps sorted by size&amp;quot;&lt;br /&gt;
   echo &amp;quot;Usage: mvapp bulkmv                 - move/link bulk apps&amp;quot;&lt;br /&gt;
   echo &amp;quot;Usage: mvapp listmoved              - list apps that have been moved&amp;quot;&lt;br /&gt;
   echo &amp;quot;Usage: mvapp restoreall             - restore all apps to original&amp;quot;&lt;br /&gt;
&lt;br /&gt;
  cleanexit $exitcode&lt;br /&gt;
}&lt;br /&gt;
# end of usage function&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
#-------------------------------------------------------------------------#&lt;br /&gt;
# function: cleanapp - removes symbolic links and folder in media and var&lt;br /&gt;
#-------------------------------------------------------------------------#&lt;br /&gt;
&lt;br /&gt;
cleanapp () {&lt;br /&gt;
&lt;br /&gt;
 mount -o remount,rw /&lt;br /&gt;
&lt;br /&gt;
 # exit to usage if no app name supplied&lt;br /&gt;
 if [ ! $APP ]&lt;br /&gt;
 then&lt;br /&gt;
   usage 1&lt;br /&gt;
 fi&lt;br /&gt;
&lt;br /&gt;
# Continue on if PROMPTS turned off (call from outside app) &lt;br /&gt;
 if [ $PROMPTS ]  &lt;br /&gt;
 then&lt;br /&gt;
  echo &amp;quot;This will remove $APP from both $VAR and $MEDIA.&amp;quot;&lt;br /&gt;
  echo &amp;quot;You should first attempt to remove the app using the official Pre methods.&amp;quot;&lt;br /&gt;
  echo &amp;quot;Are you sure you want to remove $APP? [y/N]: &amp;quot;&lt;br /&gt;
  read answer&lt;br /&gt;
  case $answer in&lt;br /&gt;
   [Yy]*) continue;;&lt;br /&gt;
       *) cleanexit 0;;&lt;br /&gt;
  esac&lt;br /&gt;
 fi&lt;br /&gt;
&lt;br /&gt;
 if [ -h $VAR/$APP ]&lt;br /&gt;
 then&lt;br /&gt;
   echo &amp;quot;Removing all traces of $APP.&amp;quot;&lt;br /&gt;
 else&lt;br /&gt;
   echo &amp;quot;$APP does not exist...&amp;quot;&lt;br /&gt;
   usage 10&lt;br /&gt;
 fi&lt;br /&gt;
&lt;br /&gt;
 echo &amp;quot;Size of $VAR before cleanup... &amp;quot;&lt;br /&gt;
 du -sh $VAR&lt;br /&gt;
&lt;br /&gt;
 if [ -d $MEDIA/$APP ]&lt;br /&gt;
 then&lt;br /&gt;
     rm -r $MEDIA/$APP&lt;br /&gt;
      echo &amp;quot;Removed directory&amp;quot; $MEDIA/$APP&lt;br /&gt;
 fi&lt;br /&gt;
 if [ -d $VAR/$APP ]&lt;br /&gt;
 then&lt;br /&gt;
      rm -r $VAR/$APP&lt;br /&gt;
      echo &amp;quot;Removed directory&amp;quot; $VAR/$APP&lt;br /&gt;
 fi&lt;br /&gt;
 if [ -L $VAR/$APP ]&lt;br /&gt;
 then&lt;br /&gt;
      rm -r $VAR/$APP&lt;br /&gt;
      echo &amp;quot;Removed link&amp;quot; $VAR/$APP&lt;br /&gt;
 fi&lt;br /&gt;
 if [ -f $BACKUPDIR/$APP.tgz ]&lt;br /&gt;
 then&lt;br /&gt;
      rm -r $BACKUPDIR/$APP.tgz&lt;br /&gt;
      echo &amp;quot;Removed tar backup&amp;quot; $BACKUPDIR/$APP.tgz&lt;br /&gt;
 fi&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 # rescan luna in case it's needed&lt;br /&gt;
 luna-send -n 1 palm://com.palm.applicationManager/rescan {} &amp;gt;/dev/null 2&amp;gt;&amp;amp;1&lt;br /&gt;
 echo &amp;quot;$APP directories and links removed.&amp;quot;&lt;br /&gt;
 echo &amp;quot;Size of $VAR after cleanup... &amp;quot;&lt;br /&gt;
 du -sh $VAR&lt;br /&gt;
 cleanexit 0&lt;br /&gt;
}&lt;br /&gt;
# end of cleanup function&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
#-------------------------------------------------------------------------#&lt;br /&gt;
# function: listapps - list the size of each app, sort showing largest last&lt;br /&gt;
#-------------------------------------------------------------------------#&lt;br /&gt;
listapps () {&lt;br /&gt;
 cd $VAR&lt;br /&gt;
 for i in `du -s * | sort -n |cut -f 2`&lt;br /&gt;
 do&lt;br /&gt;
    APP=$i&lt;br /&gt;
    SIZE=`du -s $VAR/$APP |cut -f1`&lt;br /&gt;
    TITLE=&amp;quot;&amp;quot;&lt;br /&gt;
    if [ -f $VAR/$APP/appinfo.json ]&lt;br /&gt;
    then&lt;br /&gt;
      TITLE=`grep title $VAR/$APP/appinfo.json |cut -d: -f2 |cut -d\&amp;quot; -f2`&lt;br /&gt;
    fi&lt;br /&gt;
    echo &amp;quot;$SIZE - $APP - $TITLE&amp;quot;&lt;br /&gt;
 done&lt;br /&gt;
 &lt;br /&gt;
 cleanexit 0&lt;br /&gt;
}&lt;br /&gt;
# end of listapps function&lt;br /&gt;
&lt;br /&gt;
#-------------------------------------------------------------------------#&lt;br /&gt;
# function: listmoved - list apps moved/linked, sort showing largest last&lt;br /&gt;
#-------------------------------------------------------------------------#&lt;br /&gt;
listmoved () {&lt;br /&gt;
 #du -sk $MEDIA/* | sort -n  #doesn't show proper size on FAT fs, removing&lt;br /&gt;
 cd $MEDIA&lt;br /&gt;
 for i in `du -s * | sort -n |cut -f 2`&lt;br /&gt;
 do&lt;br /&gt;
    APP=$i&lt;br /&gt;
    # Not sure why du reports incorrectly on FAT fs&lt;br /&gt;
    #SIZE=`du -s $MEDIA/$APP |cut -f1`&lt;br /&gt;
    SIZE=&amp;quot;&amp;quot;&lt;br /&gt;
    TITLE=&amp;quot;&amp;quot;&lt;br /&gt;
    if [ -f $MEDIA/$APP/appinfo.json ]&lt;br /&gt;
    then&lt;br /&gt;
      TITLE=`grep title $MEDIA/$APP/appinfo.json |cut -d: -f2 |cut -d\&amp;quot; -f2`&lt;br /&gt;
    fi&lt;br /&gt;
    echo &amp;quot;$SIZE - $APP - $TITLE&amp;quot;&lt;br /&gt;
 done&lt;br /&gt;
 cleanexit 0&lt;br /&gt;
}&lt;br /&gt;
# end of listmoved function&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
#-------------------------------------------------------------------------#&lt;br /&gt;
# function: linkapp - move the app to media and create symbolic link&lt;br /&gt;
#-------------------------------------------------------------------------#&lt;br /&gt;
linkapp () {&lt;br /&gt;
&lt;br /&gt;
 if [ ! $APP ]&lt;br /&gt;
 then&lt;br /&gt;
      echo &amp;quot;No application supplied...&amp;quot;&lt;br /&gt;
      usage 10&lt;br /&gt;
 fi&lt;br /&gt;
 &lt;br /&gt;
 if [ ! -f $VAR/$APP/appinfo.json ]&lt;br /&gt;
 then&lt;br /&gt;
    echo &amp;quot;$APP has no json file.  Will not be moved.&amp;quot;&lt;br /&gt;
    code=16&lt;br /&gt;
    return 16&lt;br /&gt;
 fi   &lt;br /&gt;
&lt;br /&gt;
 if [ ! -d $MEDIA ]&lt;br /&gt;
 then&lt;br /&gt;
      mkdir $MEDIA&lt;br /&gt;
 fi&lt;br /&gt;
&lt;br /&gt;
 if [ -h $VAR/$APP ]&lt;br /&gt;
 then&lt;br /&gt;
      echo &amp;quot;Link already exists for... ${APP}&amp;quot;&lt;br /&gt;
      cleanexit 11&lt;br /&gt;
 fi&lt;br /&gt;
&lt;br /&gt;
 TITLE=`grep title $VAR/$APP/appinfo.json |cut -d: -f2 |cut -d\&amp;quot; -f2`&lt;br /&gt;
 &lt;br /&gt;
 mount -o remount,rw /&lt;br /&gt;
&lt;br /&gt;
 if [ -d $VAR/$APP ]&lt;br /&gt;
 then&lt;br /&gt;
   echo &amp;quot;Moving $APP $TITLE to $MEDIA...&amp;quot;&lt;br /&gt;
 else&lt;br /&gt;
   echo &amp;quot;$APP does not exist...&amp;quot;&lt;br /&gt;
   usage 12&lt;br /&gt;
 fi&lt;br /&gt;
&lt;br /&gt;
 # Backup using tar if enabled&lt;br /&gt;
 if [ $BACKUP ]&lt;br /&gt;
 then&lt;br /&gt;
   if [ ! -d $BACKUPDIR ]&lt;br /&gt;
   then&lt;br /&gt;
    mkdir $BACKUPDIR&lt;br /&gt;
   fi&lt;br /&gt;
   echo &amp;quot;Backing up $APP $TITLE to $BACKUPDIR...&amp;quot;&lt;br /&gt;
   tar czf $BACKUPDIR/${APP}.tgz $VAR/$APP&lt;br /&gt;
 fi&lt;br /&gt;
&lt;br /&gt;
 mount -o remount,rw /&lt;br /&gt;
&lt;br /&gt;
 echo &amp;quot;Size of $VAR before move... &amp;quot;&lt;br /&gt;
 du -sh $VAR&lt;br /&gt;
&lt;br /&gt;
 # move over to USB drive&lt;br /&gt;
 cp -rp  $VAR/$APP $MEDIA &amp;gt;/tmp/cpresult.out 2&amp;gt;&amp;amp;1&lt;br /&gt;
 if [ $? != 0 ]&lt;br /&gt;
 then&lt;br /&gt;
  grep &amp;quot;cannot preserve ownership&amp;quot; /tmp/cpresult.out &amp;gt;/dev/null 2&amp;gt;&amp;amp;1&lt;br /&gt;
  if [ $? = 0 ]&lt;br /&gt;
  then&lt;br /&gt;
   echo&lt;br /&gt;
   echo &amp;quot;$APP cannot be moved as it requires special permissions.&amp;quot;&lt;br /&gt;
   echo &amp;quot;Leaving app in $VAR.&amp;quot;&lt;br /&gt;
   code=15&lt;br /&gt;
   return $code&lt;br /&gt;
  else&lt;br /&gt;
   echo &amp;quot;Copy failed. Leaving app in $VAR.&amp;quot;&lt;br /&gt;
   code=13&lt;br /&gt;
  fi&lt;br /&gt;
  rm -r $MEDIA/$APP&lt;br /&gt;
  rm /tmp/cpresult.out&lt;br /&gt;
  cleanexit $code&lt;br /&gt;
 fi&lt;br /&gt;
&lt;br /&gt;
 rm -r $VAR/$APP&lt;br /&gt;
 if [ $? != 0 ]&lt;br /&gt;
 then&lt;br /&gt;
  echo &amp;quot;Remove failed. Leaving app in $VAR.&amp;quot;&lt;br /&gt;
  rm -r $MEDIA/$APP&lt;br /&gt;
  cleanexit 14&lt;br /&gt;
 fi&lt;br /&gt;
&lt;br /&gt;
 # create the symbolic link&lt;br /&gt;
 ln -s $MEDIA/$APP $VAR/$APP&lt;br /&gt;
&lt;br /&gt;
 # rescan luna in case it's needed&lt;br /&gt;
 luna-send -n 1 palm://com.palm.applicationManager/rescan {} &amp;gt;/dev/null 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
 echo &amp;quot;$APP moved and linked.&amp;quot;&lt;br /&gt;
 echo &amp;quot;Size of $VAR after move... &amp;quot;&lt;br /&gt;
 du -sh $VAR&lt;br /&gt;
}&lt;br /&gt;
# end of linkapp function&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
#-------------------------------------------------------------------------#&lt;br /&gt;
# function: unlinkapp -  restore the app to var and remove symbolic link&lt;br /&gt;
#-------------------------------------------------------------------------#&lt;br /&gt;
unlinkapp () {&lt;br /&gt;
&lt;br /&gt;
 if [ ! $APP ]&lt;br /&gt;
 then&lt;br /&gt;
   echo &amp;quot;No application supplied...&amp;quot;&lt;br /&gt;
   usage 20&lt;br /&gt;
 fi&lt;br /&gt;
&lt;br /&gt;
 mount -o remount,rw /&lt;br /&gt;
&lt;br /&gt;
 if [ -d $MEDIA/$APP ]&lt;br /&gt;
 then&lt;br /&gt;
   echo &amp;quot;Restoring $APP...&amp;quot;&lt;br /&gt;
 else&lt;br /&gt;
   echo &amp;quot;$APP does not exist...&amp;quot;&lt;br /&gt;
   usage 21&lt;br /&gt;
 fi&lt;br /&gt;
&lt;br /&gt;
 echo &amp;quot;Size of $VAR before move... &amp;quot;&lt;br /&gt;
 du -sh $VAR&lt;br /&gt;
&lt;br /&gt;
 # remove the old symbolic link&lt;br /&gt;
 rm -r $VAR/$APP&lt;br /&gt;
&lt;br /&gt;
 # move to original location or restore from tar if it exists&lt;br /&gt;
 if [ -f $BACKUPDIR/$APP.tgz ]&lt;br /&gt;
 then&lt;br /&gt;
  cd /&lt;br /&gt;
  tar xzf $BACKUPDIR/$APP.tgz&lt;br /&gt;
  if [ $? != 0 ]&lt;br /&gt;
 then&lt;br /&gt;
   echo &amp;quot;Tar restore failed. Remove and restore app using official webOS/Pre methods.&amp;quot;&lt;br /&gt;
   cleanexit 22&lt;br /&gt;
  else&lt;br /&gt;
   rm -r $BACKUPDIR/$APP.tgz&lt;br /&gt;
  fi&lt;br /&gt;
 else&lt;br /&gt;
  cp -r  $MEDIA/$APP $VAR&lt;br /&gt;
  if [ $? != 0 ]&lt;br /&gt;
  then&lt;br /&gt;
   echo &amp;quot;Copy failed. Leaving app in $MEDIA.&amp;quot;&lt;br /&gt;
   cleanexit 23&lt;br /&gt;
  fi&lt;br /&gt;
 fi&lt;br /&gt;
&lt;br /&gt;
 rm -r $MEDIA/$APP&lt;br /&gt;
 if [ $? != 0 ]&lt;br /&gt;
 then&lt;br /&gt;
  echo &amp;quot;Remove failed. Leaving app in $MEDIA.&amp;quot;&lt;br /&gt;
  rm -r $VAR/$APP&lt;br /&gt;
  cleanexit 24&lt;br /&gt;
 fi&lt;br /&gt;
&lt;br /&gt;
 # rescan luna in case it's needed&lt;br /&gt;
 luna-send -n 1 palm://com.palm.applicationManager/rescan {} &amp;gt;/dev/null 2&amp;gt;&amp;amp;1&lt;br /&gt;
&lt;br /&gt;
 echo &amp;quot;$APP moved and unlinked.&amp;quot;&lt;br /&gt;
 echo &amp;quot;Size of $VAR after move... &amp;quot;&lt;br /&gt;
 du -sh $VAR&lt;br /&gt;
}&lt;br /&gt;
# end of unlinkapp function&lt;br /&gt;
&lt;br /&gt;
#-------------------------------------------------------------------------#&lt;br /&gt;
# function: bulkmv -  move/link many apps&lt;br /&gt;
#-------------------------------------------------------------------------#&lt;br /&gt;
bulkmv() {&lt;br /&gt;
 echo&lt;br /&gt;
 echo&lt;br /&gt;
 echo &amp;quot;This allows moving many apps, asking which you'd like to move.&amp;quot;&lt;br /&gt;
 echo &amp;quot;Starting with the largest apps.&amp;quot;&lt;br /&gt;
 echo&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 mount -o remount,rw /&lt;br /&gt;
 cd $VAR&lt;br /&gt;
&lt;br /&gt;
 for i in `du -s * | sort -nr |cut -f 2`&lt;br /&gt;
 do&lt;br /&gt;
    export APP=$i&lt;br /&gt;
    SIZE=`du -sh $APP |cut -f 1`&lt;br /&gt;
    TITLE=`grep title $VAR/$APP/appinfo.json |cut -d: -f2 |cut -d\&amp;quot; -f2`&lt;br /&gt;
    echo &amp;quot;Size of $APP - $TITLE is $SIZE.&amp;quot;&lt;br /&gt;
    echo &amp;quot;Would you like to move and link... $TITLE? [y/N/q]: &amp;quot;&lt;br /&gt;
    read answer&lt;br /&gt;
    case $answer in&lt;br /&gt;
    [Yy]*) linkapp;;&lt;br /&gt;
    [Qq]*) cleanexit 0;;&lt;br /&gt;
        *) echo &amp;quot;$APP not moved.&amp;quot;&lt;br /&gt;
           continue;;&lt;br /&gt;
    esac&lt;br /&gt;
&lt;br /&gt;
    echo&lt;br /&gt;
 done&lt;br /&gt;
}&lt;br /&gt;
# end of bulkmv function&lt;br /&gt;
&lt;br /&gt;
#-------------------------------------------------------------------------#&lt;br /&gt;
# function: restoreall - restore all apps, back to /var&lt;br /&gt;
#-------------------------------------------------------------------------#&lt;br /&gt;
restoreall() {&lt;br /&gt;
&lt;br /&gt;
#Only confirm if PROMPT turned on. (allows outside app to call) &lt;br /&gt;
  if [ $PROMPT ]&lt;br /&gt;
  then&lt;br /&gt;
   echo &amp;quot;This will restore all applications back to original location&amp;quot;&lt;br /&gt;
   echo &amp;quot;and remove the links.  Are you sure you want to continue? [y/N]:&amp;quot;&lt;br /&gt;
   read answer&lt;br /&gt;
   case $answer in&lt;br /&gt;
    [Yy]*) continue;;&lt;br /&gt;
        *) cleanexit 0;;&lt;br /&gt;
   esac&lt;br /&gt;
  fi&lt;br /&gt;
&lt;br /&gt;
  ls $MEDIA | while read APP&lt;br /&gt;
  do&lt;br /&gt;
    echo &amp;quot;Restoring $APP and unlinking...&amp;quot;&lt;br /&gt;
    unlinkapp&lt;br /&gt;
  done&lt;br /&gt;
}&lt;br /&gt;
# end of restoreall function&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
#-------------------------------------------------------------------------#&lt;br /&gt;
# main - begins here&lt;br /&gt;
#-------------------------------------------------------------------------#&lt;br /&gt;
&lt;br /&gt;
case $COMMAND in&lt;br /&gt;
&amp;quot;clean&amp;quot;)&lt;br /&gt;
   cleanapp&lt;br /&gt;
   ;;&lt;br /&gt;
&amp;quot;list&amp;quot;)&lt;br /&gt;
   listapps&lt;br /&gt;
   ;;&lt;br /&gt;
&amp;quot;listmoved&amp;quot;)&lt;br /&gt;
   listmoved&lt;br /&gt;
   ;;&lt;br /&gt;
&amp;quot;link&amp;quot;)&lt;br /&gt;
   linkapp&lt;br /&gt;
   ;;&lt;br /&gt;
&amp;quot;unlink&amp;quot;)&lt;br /&gt;
   unlinkapp&lt;br /&gt;
   ;;&lt;br /&gt;
&amp;quot;bulkmv&amp;quot;)&lt;br /&gt;
   bulkmv&lt;br /&gt;
   ;;&lt;br /&gt;
&amp;quot;restoreall&amp;quot;)&lt;br /&gt;
   restoreall&lt;br /&gt;
   ;;&lt;br /&gt;
*)&lt;br /&gt;
   usage 1&lt;br /&gt;
   ;;&lt;br /&gt;
esac&lt;br /&gt;
&lt;br /&gt;
cleanexit $code&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
- Be sure to set execute permissions if you missed the step above...&lt;br /&gt;
&amp;lt;code&amp;gt;chmod 755 /usr/bin/mvapp&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Precautions ==&lt;br /&gt;
&lt;br /&gt;
So far, no one has reported an app that has issues due to linking.  These are best practices to avoid issues.&lt;br /&gt;
&lt;br /&gt;
- Be selective about what you move.  You may not want to move apps that store important information to you such as password lockers, memo apps, EverNote, Agenda, etc. Games, web content apps and information viewing apps should be safer to move as there is no data at risk.&lt;br /&gt;
&lt;br /&gt;
- Close apps before moving them.  Do not move an app while it is open and running.  I actually tested this and figured some apps would break but none have yet.  It is still not wise to move apps while they are open and running.&lt;br /&gt;
&lt;br /&gt;
== Commands ==&lt;br /&gt;
&lt;br /&gt;
'''To find the largest apps in /var/usr/palm/applications'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;mvapp list&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It shows the largest apps last... IE....&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
8352 com.apnews.webos&amp;lt;br&amp;gt;&lt;br /&gt;
8512 com.fandango.app.fandango&amp;lt;br&amp;gt;&lt;br /&gt;
8672 com.palm.app.musicplayerremix&amp;lt;br&amp;gt;&lt;br /&gt;
10304 com.shortcovers.palm.pre&amp;lt;br&amp;gt;&lt;br /&gt;
10432 com.fusioncreativestudios.deadman&amp;lt;br&amp;gt;&lt;br /&gt;
10656 com.ulocate.app.where&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''To move and link an app to /media'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;mvapp link domain.appname&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:  mvapp link com.ulocate.app.where&lt;br /&gt;
&lt;br /&gt;
The app should now work in the new location thanks to the link. Test each app to make sure it works before doing another. Looping the script to do every app in the dir or to link the entire app dir is not recommended. File attributes are lost on the move, which some apps may need. You need to test each app after a move.&lt;br /&gt;
&lt;br /&gt;
Continue moving apps until it reports that /var.../applications is about 25MB or less.&lt;br /&gt;
&lt;br /&gt;
There is an option to turn on/off tar-based backups.  See the BACKUP variable in the script.  If set to 1, it will perform a tar backup.  This takes up more space on /media but if you need to restore, it puts it back with full file attributes.  Recommend keeping this on.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''To move and link many apps''' &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;mvapp bulkmv&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will show largest app first, ask if you want to move/link and then moves on to the next largest app.  If you answer no to an app, it will skip to the next.  Answer 'q' to quit.  Is easiest to use this method directly on a device using the Terminal app.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''To revert the move and delete the link'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;mvapp unlink domain.appname&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The application will be moved back to the original directory. File attributes are lost on the move if tar backup is turned off, which some apps may need. You need to test each app after a move.  If tar backup is turned on (default - see BACKUP variable in script), file attributes will be restored.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''To list apps that have been moved and linked...'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;mvapp listmoved&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This shows a list of apps that have been moved and linked to /media.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''To restore all moved apps back to original location'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;mvapp restoreall&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If backup was turned on, this will restore ALL applications that have been moved/linked, back to the original location in /var with original attributes (using tar).  If backup was not turned on, it will still attempt to move the applications back to /var using the files in /media, but without original file attributes.  This may take several minutes to complete.  It will show each application progress.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''To cleanup and remove directories and symlinks'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;mvapp clean domain.appname&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you have any issues, first attempt to remove the app from the App Catalog or Homebrew app installer.  Then issue the 'clean' command to remove the applications directories at both locations and also the symlink.  You can then reinstall the app from the App Catalog or any Homebrew App installer.&lt;br /&gt;
&lt;br /&gt;
== Contingency Plan==&lt;br /&gt;
&lt;br /&gt;
If you have problems with an application, follow these steps...&amp;lt;br&amp;gt;&lt;br /&gt;
-- Close the application if open&amp;lt;br&amp;gt;&lt;br /&gt;
-- mvapp unlink domain.appname&amp;lt;br&amp;gt;&lt;br /&gt;
-- Try using the App&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the application still does now work correctly...&amp;lt;br&amp;gt;&lt;br /&gt;
-- Remove the App using official methods&amp;lt;br&amp;gt;&lt;br /&gt;
-- mvapp clean domain.appname&amp;lt;br&amp;gt;&lt;br /&gt;
-- Reinstall through the App Catalog or Homebrew installer app&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Proposal to Dev Community ==&lt;br /&gt;
&lt;br /&gt;
This is a formal proposal to the Dev Community suggesting 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 similar to the code above.  &lt;br /&gt;
&lt;br /&gt;
The Homebrew Community somewhat created part of the storage problem so needs to come up with their own solution. The symbolic link proponents propose that Homebrew apps be moved with a link to /media/internal by default and physically use /var only if needed (per conditions stated below). The developer would put a flag in the package (or some other method during submission) to state their app is able to run linked to /media or if it specifically needs to physically be on /var.  Will propose additions to Packing Standards to support /media links.  The homebrew installer apps could then automatically do the move/link if the package is flagged for it.&lt;br /&gt;
&lt;br /&gt;
Candidate apps for moving to /media&amp;lt;br&amp;gt;&lt;br /&gt;
- apps that do not depend on file attributes (such as executable bit)&amp;lt;br&amp;gt;&lt;br /&gt;
- apps that do not perform data operations to home app directory when device is USB mounted&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Exceptions for maintaining apps on /var&amp;lt;br&amp;gt;&lt;br /&gt;
- apps that depend on file attributes&amp;lt;br&amp;gt;&lt;br /&gt;
- apps that won't work well when device is USB mounted, such as performing data or DB operations in home app directory&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(Please update with other known candidates/exceptions)&lt;br /&gt;
&lt;br /&gt;
== Benefits over other methods ==&lt;br /&gt;
&lt;br /&gt;
''Resizing /var''  &amp;lt;br&amp;gt;&lt;br /&gt;
One challenge with resizing /var is that it will still have a fixed static limit - how do you decide how much to increase it? Many will still probably hit the limit or waste space if setting too high.  There is also the warning from Palm that resizing var may interfere with future updates.  The link method allows to dynamically use the /media partition, so there is no need to set a specific size dedicated to apps. If the USB drive is filled, users can decide if they use the space for media or apps on the fly.&lt;br /&gt;
&lt;br /&gt;
''AppPath in /etc/luna.conf'' &amp;lt;br&amp;gt;&lt;br /&gt;
I proposed a while back adding an AppPath to luna.conf to include apps stored on /media.  Some apps would not work because some apparently reference /var.  IE, the vampire/mafia/quest series could not access graphics.  The symbolic link fixed this because apps think they are in /var.&lt;br /&gt;
&lt;br /&gt;
''Link/mount [[all]] of /var/usr/palm/applications/ to /media/internal'' &amp;lt;BR&amp;gt;&lt;br /&gt;
If some apps rely on file attributes this won't work since file attributes are lost when moved to FAT fs.  While this is rare, it probably isn't wise to force all /var apps to /media.  Selectively moving apps one at a time is less risky.  Update:  Have found that &amp;quot;PDF View&amp;quot; app does not allow to be linked, so it appears that selectively moving apps is necessary.&lt;br /&gt;
&lt;br /&gt;
''Creating a loopback filesystem to a virtual file located on /media/internal'' &amp;lt;br&amp;gt;&lt;br /&gt;
This has been worked on [http://www.webos-internals.org/wiki/Tutorials_Linux_opt_on_loopback here] and still has potential.  Unfortunately it locks out USB mount and media sync altogether.  If a workaround can be found with low risk, this may be the most ideal solution.&lt;br /&gt;
&lt;br /&gt;
== Risks, Issues, Dependencies ==&lt;br /&gt;
&lt;br /&gt;
- File attributes of linux fs are not copied over to fat fs.  May not work with apps that rely on file attributes.  In general, javascript apps will likely work fine located on /media.  No one has reported an app (yet) that does not work.&lt;br /&gt;
&lt;br /&gt;
- Some apps may not behave well if USB drive is mounted to computer, though I've tested several that behaved fine. Linux type background services probably would not work well so probably should not be moved.  Apps that do IO to the home directory of the app while USB mounted may have issues when located on /media.&lt;br /&gt;
&lt;br /&gt;
- Jason Robitaille has indicated that a future version of WebOS Quick Install will include a routine to resize the /var partition. He has also indicated that doing so will wipe the /media/internal area, so any applications stored there would need to be backed up first. It might be good to be able to reverse the process of this solution. This could be done either by adding to this &amp;lt;code&amp;gt;mvapp&amp;lt;/code&amp;gt; script, or creating a new one.&lt;br /&gt;
&lt;br /&gt;
== Future Versions ==&lt;br /&gt;
&lt;br /&gt;
Plans for future versions...&lt;br /&gt;
&lt;br /&gt;
- The script will soon be modified to be friendly for javascript calls... no prompting and no output, just result codes.   Will still maintain user interaction capability as well.&lt;br /&gt;
&lt;br /&gt;
== Confirmed Apps ==&lt;br /&gt;
=== Apps Confirmed ''Not'' to Work ===&lt;br /&gt;
com.palm.app.pdfviewer  (script properly handles this, won't allow it to move)&lt;br /&gt;
&lt;br /&gt;
== Discuss ==&lt;br /&gt;
Discuss in the Discussion tab or PreCentral...&lt;br /&gt;
&lt;br /&gt;
http://forums.precentral.net/web-os-development/205649-resolution-app-catalog-install-limit-proposal.html&lt;br /&gt;
&lt;br /&gt;
'''Your Experiences'''&lt;br /&gt;
&lt;br /&gt;
Please post your experiences, good or bad.  I'd like to get any kinks worked out before attempting to turn this into a webOS app.&lt;br /&gt;
&lt;br /&gt;
- How many apps did you move? &amp;lt;br&amp;gt;&lt;br /&gt;
- Did you find an app that won't work linked? &amp;lt;br&amp;gt;&lt;br /&gt;
- Did you move any back?  (please test)&amp;lt;br&amp;gt;&lt;br /&gt;
- How far down did you have to get /var.../applications down in MB before you could start adding apps from the App Catalog?&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Credits ==&lt;br /&gt;
xorg - initially developed script and proposal.  maintainer of this page.&amp;lt;br&amp;gt;&lt;br /&gt;
daventx - added unlink and clean functions.&lt;/div&gt;</summary>
		<author><name>Odontastic</name></author>
	</entry>
</feed>