<?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=NetWhiz</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=NetWhiz"/>
	<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/wiki/Special:Contributions/NetWhiz"/>
	<updated>2026-04-15T09:35:51Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.35.1</generator>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Talk:Solution_to_App_Catalog_Installation_Limit&amp;diff=6306</id>
		<title>Talk:Solution to App Catalog Installation Limit</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Talk:Solution_to_App_Catalog_Installation_Limit&amp;diff=6306"/>
		<updated>2009-10-06T21:59:34Z</updated>

		<summary type="html">&lt;p&gt;NetWhiz: New section: cp -rp?&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== A call to port this script to a webOS app ==&lt;br /&gt;
&lt;br /&gt;
This is just a proof of concept script, which I didn't intend to mature to this level.  Ideally this would be ported as a standalone webOS app for App Management or included in PreWare and other homebrew app installers.&lt;br /&gt;
&lt;br /&gt;
If you are interested in porting (or applying the basic symbolic link concept), please post your interest here.&lt;br /&gt;
&lt;br /&gt;
--[[User:Xorg|Xorg]] 01:26, 5 October 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Modified the APP variable in the script ==&lt;br /&gt;
&lt;br /&gt;
Modified the script to change&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;APP=$1&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
to&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;APP=/var/usr/palm/applications/$1&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
I'm no script writer, and wouldn't normally change someone else's code, but the script did not work as originally written unless you were already in that directory. I tested it with the changes, and it works properly now.&lt;br /&gt;
&lt;br /&gt;
--[[User:Hparsons|Herb]] 14:31, 30 September 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Not sure why it didn't work for you as your change didn't work for me.  Are you using a different shell?  I added a line to force #!/bin/sh and altered the code back with a note about your change.&lt;br /&gt;
&lt;br /&gt;
--[[User:Xorg|Xorg]] 03:12, 1 October 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
My bad. The way the code was originally formatted, I couldn't cut and paste, and when entering it, I somehow missed the &amp;lt;code&amp;gt;cd $ORG&amp;lt;/code&amp;gt; command. You're right, it should (and does) work in the original format.&lt;br /&gt;
&lt;br /&gt;
--[[User:Hparsons|Herb]] 06:01, 1 October 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Changing app directory to .app  ==&lt;br /&gt;
&lt;br /&gt;
I had noticed that with the 1.2 update, all of the graphics on the USB directory were being scanned as if they were photos. This was pretty much a mess, and hand planned on coming back here to suggest that the &amp;quot;app&amp;quot; directory be changed to &amp;quot;.app&amp;quot; so it would be hidden. I noticed the altered code already had that change, but the original intro did not. Assuming this was the intent, I changed that.&lt;br /&gt;
&lt;br /&gt;
--[[User:Hparsons|Herb]] 14:36, 30 September 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Restructured script to use functions ==&lt;br /&gt;
&lt;br /&gt;
I've restructured the script to use functions.  This allows anyone to post in their own functions and additional features.&lt;br /&gt;
&lt;br /&gt;
--[[User:Xorg|Xorg]] 19:50, 2 October 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Suggestion for the script ==&lt;br /&gt;
&lt;br /&gt;
Perhaps in preparation for the &amp;quot;unlink&amp;quot; command, the &amp;quot;link&amp;quot; command can also create a full backup of the app (.tgz) which will contain the full permissions and any symbolic links that will be lost when copying the app to  the /media/internal/.apps directory. That way if we find that the app does not run correctly from the linked version on /media/internal/.apps, we can restore it fully to /var with no loss of data.&lt;br /&gt;
&lt;br /&gt;
--[[User:Plee3|plee3]] 21:46, 2 October 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
I just added tar backups.  It's an option that currently is on by default.  You need to change the flag in variable setup to turn off.&lt;br /&gt;
&lt;br /&gt;
--[[User:Xorg|Xorg]] 20:53, 5 October 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Versioning ==&lt;br /&gt;
&lt;br /&gt;
Possibly could those modifying the script start using some sort of versioning, with the version at the front of the script, with information about what the new version does added to the main article page?&lt;br /&gt;
&lt;br /&gt;
--[[User:Hparsons|Herb]] 00:22, 5 October 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
Added&lt;br /&gt;
&lt;br /&gt;
--[[User:Xorg|Xorg]] 01:17, 5 October 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
== cp -rp? ==&lt;br /&gt;
&lt;br /&gt;
Why do you not use cp -rp to link the app? This would save the permissions needed.&lt;/div&gt;</summary>
		<author><name>NetWhiz</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Talk:Backing_Up_via_Rsync&amp;diff=4830</id>
		<title>Talk:Backing Up via Rsync</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Talk:Backing_Up_via_Rsync&amp;diff=4830"/>
		<updated>2009-08-27T01:58:34Z</updated>

		<summary type="html">&lt;p&gt;NetWhiz: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Rsync Daemon==&lt;br /&gt;
&lt;br /&gt;
Why turn on the rsync daemon at all?  This could easily be accomplished simply by running &lt;br /&gt;
&lt;br /&gt;
'''rsync -HrlptgoDPvvS --force --delete --del --stats -e ssh root@IPADDRESS:/ /media/pre-backup/'''&lt;br /&gt;
&lt;br /&gt;
Also, since ''-P'' includes ''--progress'', there's no reason to call it a second time.&lt;br /&gt;
&lt;br /&gt;
-JackieRipper&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We don't have a root password set up on the Pre, it's using sudo therefore that's why ssh won't work. Rsyncd.conf gives the rsync daemon root privileges so it can mirror the device. I'm be open to suggestions, but I'm trying to make this fit in with the [[Next_steps | next steps]] guide and limit the number of steps.&lt;br /&gt;
&lt;br /&gt;
Thanks for pointing out the redundancy on --progress.&lt;br /&gt;
&lt;br /&gt;
-hopspitfire&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Ahhh yes.  I keep forgetting that not everyone set up keys for root access.&lt;br /&gt;
&lt;br /&gt;
-JackieRipper&lt;br /&gt;
&lt;br /&gt;
==Pre Rebooting Issue==&lt;br /&gt;
&lt;br /&gt;
If you don't exclude some of the directories then the Pre reboots when the backup process touches them. [[User:hmagoo|-hmagoo]]&lt;br /&gt;
&lt;br /&gt;
:Can you specify which files/directories prompt the reboot? -[[User:Hopspitfire|hopspitfire]] 02:57, 20 August 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
::I could narrow it down to proc and/or sys, that's narrow enough for me to exclude both, any progress on restore testing?  I'm not running an emulator. [[User:hmagoo|-hmagoo]]&lt;br /&gt;
&lt;br /&gt;
:I tested the restore process and it works. Can you run the backup process and send the output to a file (rsync ... &amp;gt; /media/internal/rsync.log) and post it? -[[User:Hopspitfire|hopspitfire]] 00:49, 24 August 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
::[http://sites.google.com/site/hmagoosite/rsync-outputs.tar.gz rsync-outputs.tar.gz] this was the console and log output from running a backup. I had already a backup in place in the destination but excluded /dev, /sys/ and /proc initially, ran it this time without those exclusions to test it out (again, as I saw this reboot the very first time I tried this method). rebooted right after this line in the console, similar in the log.&lt;br /&gt;
 rsync: read errors mapping &amp;quot;/sys/devices/platform/lcd-controller/ctrl_reg_dump&amp;quot; (in root): No data available (61)&lt;br /&gt;
[[User:hmagoo|-hmagoo]]&lt;br /&gt;
::I ran the backup again excluding /sys and everything completed, only errors I got in the console were:&lt;br /&gt;
&lt;br /&gt;
 rsync: send_files failed to open &amp;quot;/proc/sys/kernel/sched_nr_migrate&amp;quot; (in root): Permission denied (13)&lt;br /&gt;
&lt;br /&gt;
 rsync: send_files failed to open &amp;quot;/proc/sys/net/ipv4/route/flush&amp;quot; (in root): Permission denied (13)&lt;br /&gt;
&lt;br /&gt;
 rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1524) [generator=3.0.5]&lt;br /&gt;
&lt;br /&gt;
[[User:hmagoo|-hmagoo]]&lt;br /&gt;
&lt;br /&gt;
Thanks for attaching your log. /sys and /proc don't need to be included in the backup, but /dev does (to initialize devices on boot). After testing the backup and restore, the easiest way is just mkdir the /sys and /proc directories and exlude them in the backup. Does the pre still restart when you excluded those directories?? -[[User:Hopspitfire|hopspitfire]] 21:23, 26 August 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
Shouldn't /dev exist fine after a restore and before rsync backup restore? I guess if you made some strange volume changes, but still. --[[User:NetWhiz|NetWhiz]] 21:59, 26 August 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
I was using /dev as an example of a directory that _shouldn't_ be excluded in the backup process, so /dev will exist after a backup prior to a restore (otherwise the Pre won't boot because it can't initialize the mapper devices for storage). -[[User:Hopspitfire|hopspitfire]] 22:37, 26 August 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
You mean it SHOULD be excluded b/c you will not need to restore it. --[[User:NetWhiz|NetWhiz]] 22:54, 26 August 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
(failed=reboot).. failed with no excludes. successful with /dev/,/proc,/sys excluded. successful with /sys excluded. but with those three error messages.--[[User:Hmagoo|Hmagoo]] 23:52, 26 August 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
:@NetWhiz: /dev needs to be populated on the actual filesystem (before devfs/udev get loaded) for a *nix system to boot.&lt;br /&gt;
&lt;br /&gt;
:@Hmagoo: Thanks, I went ahead and fixed the lines in the article.&lt;br /&gt;
&lt;br /&gt;
:-[[User:Hopspitfire|hopspitfire]] 00:12, 27 August 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
I understand, BUT when you do a restore with WebOS Doctor it will already be there. Are we not talking about the same thing or are we just cross talking? --[[User:NetWhiz|NetWhiz]] 01:11, 27 August 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
:OH, I'm talking about a restore using rsync ;) (in this guide, after the intial webOS Doctor). I still don't know if we should be overwriting the entire system (with the rsync backup, including /dev). Any ideas on this? My reasoning for doing a full system overwrite is version compatibility. -[[User:Hopspitfire|hopspitfire]] 01:16, 27 August 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
:LOL! I would say NOT to overwrite /dev b/c it should already be setup correctly and there is nothing anyone should be doing in there with any mod anyway that I have seen. Trying to overwrite some of the virtual devices can be a BAD thing as some have seen (crashes, freezes, etc.) Just my thoughts. --[[User:NetWhiz|NetWhiz]] 01:58, 27 August 2009 (UTC)&lt;/div&gt;</summary>
		<author><name>NetWhiz</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Talk:Backing_Up_via_Rsync&amp;diff=4828</id>
		<title>Talk:Backing Up via Rsync</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Talk:Backing_Up_via_Rsync&amp;diff=4828"/>
		<updated>2009-08-27T01:11:51Z</updated>

		<summary type="html">&lt;p&gt;NetWhiz: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Rsync Daemon==&lt;br /&gt;
&lt;br /&gt;
Why turn on the rsync daemon at all?  This could easily be accomplished simply by running &lt;br /&gt;
&lt;br /&gt;
'''rsync -HrlptgoDPvvS --force --delete --del --stats -e ssh root@IPADDRESS:/ /media/pre-backup/'''&lt;br /&gt;
&lt;br /&gt;
Also, since ''-P'' includes ''--progress'', there's no reason to call it a second time.&lt;br /&gt;
&lt;br /&gt;
-JackieRipper&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We don't have a root password set up on the Pre, it's using sudo therefore that's why ssh won't work. Rsyncd.conf gives the rsync daemon root privileges so it can mirror the device. I'm be open to suggestions, but I'm trying to make this fit in with the [[Next_steps | next steps]] guide and limit the number of steps.&lt;br /&gt;
&lt;br /&gt;
Thanks for pointing out the redundancy on --progress.&lt;br /&gt;
&lt;br /&gt;
-hopspitfire&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Ahhh yes.  I keep forgetting that not everyone set up keys for root access.&lt;br /&gt;
&lt;br /&gt;
-JackieRipper&lt;br /&gt;
&lt;br /&gt;
==Pre Rebooting Issue==&lt;br /&gt;
&lt;br /&gt;
If you don't exclude some of the directories then the Pre reboots when the backup process touches them. [[User:hmagoo|-hmagoo]]&lt;br /&gt;
&lt;br /&gt;
:Can you specify which files/directories prompt the reboot? -[[User:Hopspitfire|hopspitfire]] 02:57, 20 August 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
::I could narrow it down to proc and/or sys, that's narrow enough for me to exclude both, any progress on restore testing?  I'm not running an emulator. [[User:hmagoo|-hmagoo]]&lt;br /&gt;
&lt;br /&gt;
:I tested the restore process and it works. Can you run the backup process and send the output to a file (rsync ... &amp;gt; /media/internal/rsync.log) and post it? -[[User:Hopspitfire|hopspitfire]] 00:49, 24 August 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
::[http://sites.google.com/site/hmagoosite/rsync-outputs.tar.gz rsync-outputs.tar.gz] this was the console and log output from running a backup. I had already a backup in place in the destination but excluded /dev, /sys/ and /proc initially, ran it this time without those exclusions to test it out (again, as I saw this reboot the very first time I tried this method). rebooted right after this line in the console, similar in the log.&lt;br /&gt;
 rsync: read errors mapping &amp;quot;/sys/devices/platform/lcd-controller/ctrl_reg_dump&amp;quot; (in root): No data available (61)&lt;br /&gt;
[[User:hmagoo|-hmagoo]]&lt;br /&gt;
::I ran the backup again excluding /sys and everything completed, only errors I got in the console were:&lt;br /&gt;
&lt;br /&gt;
 rsync: send_files failed to open &amp;quot;/proc/sys/kernel/sched_nr_migrate&amp;quot; (in root): Permission denied (13)&lt;br /&gt;
&lt;br /&gt;
 rsync: send_files failed to open &amp;quot;/proc/sys/net/ipv4/route/flush&amp;quot; (in root): Permission denied (13)&lt;br /&gt;
&lt;br /&gt;
 rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1524) [generator=3.0.5]&lt;br /&gt;
&lt;br /&gt;
[[User:hmagoo|-hmagoo]]&lt;br /&gt;
&lt;br /&gt;
Thanks for attaching your log. /sys and /proc don't need to be included in the backup, but /dev does (to initialize devices on boot). After testing the backup and restore, the easiest way is just mkdir the /sys and /proc directories and exlude them in the backup. Does the pre still restart when you excluded those directories?? -[[User:Hopspitfire|hopspitfire]] 21:23, 26 August 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
Shouldn't /dev exist fine after a restore and before rsync backup restore? I guess if you made some strange volume changes, but still. --[[User:NetWhiz|NetWhiz]] 21:59, 26 August 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
I was using /dev as an example of a directory that _shouldn't_ be excluded in the backup process, so /dev will exist after a backup prior to a restore (otherwise the Pre won't boot because it can't initialize the mapper devices for storage). -[[User:Hopspitfire|hopspitfire]] 22:37, 26 August 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
You mean it SHOULD be excluded b/c you will not need to restore it. --[[User:NetWhiz|NetWhiz]] 22:54, 26 August 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
(failed=reboot).. failed with no excludes. successful with /dev/,/proc,/sys excluded. successful with /sys excluded. but with those three error messages.--[[User:Hmagoo|Hmagoo]] 23:52, 26 August 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
:@NetWhiz: /dev needs to be populated on the actual filesystem (before devfs/udev get loaded) for a *nix system to boot.&lt;br /&gt;
&lt;br /&gt;
:@Hmagoo: Thanks, I went ahead and fixed the lines in the article.&lt;br /&gt;
&lt;br /&gt;
:-[[User:Hopspitfire|hopspitfire]] 00:12, 27 August 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
I understand, BUT when you do a restore with WebOS Doctor it will already be there. Are we not talking about the same thing or are we just cross talking? --[[User:NetWhiz|NetWhiz]] 01:11, 27 August 2009 (UTC)&lt;/div&gt;</summary>
		<author><name>NetWhiz</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Talk:Backing_Up_via_Rsync&amp;diff=4820</id>
		<title>Talk:Backing Up via Rsync</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Talk:Backing_Up_via_Rsync&amp;diff=4820"/>
		<updated>2009-08-26T22:54:37Z</updated>

		<summary type="html">&lt;p&gt;NetWhiz: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Rsync Daemon==&lt;br /&gt;
&lt;br /&gt;
Why turn on the rsync daemon at all?  This could easily be accomplished simply by running &lt;br /&gt;
&lt;br /&gt;
'''rsync -HrlptgoDPvvS --force --delete --del --stats -e ssh root@IPADDRESS:/ /media/pre-backup/'''&lt;br /&gt;
&lt;br /&gt;
Also, since ''-P'' includes ''--progress'', there's no reason to call it a second time.&lt;br /&gt;
&lt;br /&gt;
-JackieRipper&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We don't have a root password set up on the Pre, it's using sudo therefore that's why ssh won't work. Rsyncd.conf gives the rsync daemon root privileges so it can mirror the device. I'm be open to suggestions, but I'm trying to make this fit in with the [[Next_steps | next steps]] guide and limit the number of steps.&lt;br /&gt;
&lt;br /&gt;
Thanks for pointing out the redundancy on --progress.&lt;br /&gt;
&lt;br /&gt;
-hopspitfire&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Ahhh yes.  I keep forgetting that not everyone set up keys for root access.&lt;br /&gt;
&lt;br /&gt;
-JackieRipper&lt;br /&gt;
&lt;br /&gt;
==Pre Rebooting Issue==&lt;br /&gt;
&lt;br /&gt;
If you don't exclude some of the directories then the Pre reboots when the backup process touches them. [[User:hmagoo|-hmagoo]]&lt;br /&gt;
&lt;br /&gt;
:Can you specify which files/directories prompt the reboot? -[[User:Hopspitfire|hopspitfire]] 02:57, 20 August 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
::I could narrow it down to proc and/or sys, that's narrow enough for me to exclude both, any progress on restore testing?  I'm not running an emulator. [[User:hmagoo|-hmagoo]]&lt;br /&gt;
&lt;br /&gt;
:I tested the restore process and it works. Can you run the backup process and send the output to a file (rsync ... &amp;gt; /media/internal/rsync.log) and post it? -[[User:Hopspitfire|hopspitfire]] 00:49, 24 August 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
::[http://sites.google.com/site/hmagoosite/rsync-outputs.tar.gz rsync-outputs.tar.gz] this was the console and log output from running a backup. I had already a backup in place in the destination but excluded /dev, /sys/ and /proc initially, ran it this time without those exclusions to test it out (again, as I saw this reboot the very first time I tried this method). rebooted right after this line in the console, similar in the log.&lt;br /&gt;
 rsync: read errors mapping &amp;quot;/sys/devices/platform/lcd-controller/ctrl_reg_dump&amp;quot; (in root): No data available (61)&lt;br /&gt;
[[User:hmagoo|-hmagoo]]&lt;br /&gt;
::I ran the backup again excluding /sys and everything completed, only errors I got in the console were:&lt;br /&gt;
&lt;br /&gt;
 rsync: send_files failed to open &amp;quot;/proc/sys/kernel/sched_nr_migrate&amp;quot; (in root): Permission denied (13)&lt;br /&gt;
&lt;br /&gt;
 rsync: send_files failed to open &amp;quot;/proc/sys/net/ipv4/route/flush&amp;quot; (in root): Permission denied (13)&lt;br /&gt;
&lt;br /&gt;
 rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1524) [generator=3.0.5]&lt;br /&gt;
&lt;br /&gt;
[[User:hmagoo|-hmagoo]]&lt;br /&gt;
&lt;br /&gt;
Thanks for attaching your log. /sys and /proc don't need to be included in the backup, but /dev does (to initialize devices on boot). After testing the backup and restore, the easiest way is just mkdir the /sys and /proc directories and exlude them in the backup. Does the pre still restart when you excluded those directories?? -[[User:Hopspitfire|hopspitfire]] 21:23, 26 August 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
Shouldn't /dev exist fine after a restore and before rsync backup restore? I guess if you made some strange volume changes, but still. --[[User:NetWhiz|NetWhiz]] 21:59, 26 August 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
I was using /dev as an example of a directory that _shouldn't_ be excluded in the backup process, so /dev will exist after a backup prior to a restore (otherwise the Pre won't boot because it can't initialize the mapper devices for storage). -[[User:Hopspitfire|hopspitfire]] 22:37, 26 August 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
You mean it SHOULD be excluded b/c you will not need to restore it. --[[User:NetWhiz|NetWhiz]] 22:54, 26 August 2009 (UTC)&lt;/div&gt;</summary>
		<author><name>NetWhiz</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Talk:Backing_Up_via_Rsync&amp;diff=4817</id>
		<title>Talk:Backing Up via Rsync</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Talk:Backing_Up_via_Rsync&amp;diff=4817"/>
		<updated>2009-08-26T21:59:32Z</updated>

		<summary type="html">&lt;p&gt;NetWhiz: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Rsync Daemon==&lt;br /&gt;
&lt;br /&gt;
Why turn on the rsync daemon at all?  This could easily be accomplished simply by running &lt;br /&gt;
&lt;br /&gt;
'''rsync -HrlptgoDPvvS --force --delete --del --stats -e ssh root@IPADDRESS:/ /media/pre-backup/'''&lt;br /&gt;
&lt;br /&gt;
Also, since ''-P'' includes ''--progress'', there's no reason to call it a second time.&lt;br /&gt;
&lt;br /&gt;
-JackieRipper&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We don't have a root password set up on the Pre, it's using sudo therefore that's why ssh won't work. Rsyncd.conf gives the rsync daemon root privileges so it can mirror the device. I'm be open to suggestions, but I'm trying to make this fit in with the [[Next_steps | next steps]] guide and limit the number of steps.&lt;br /&gt;
&lt;br /&gt;
Thanks for pointing out the redundancy on --progress.&lt;br /&gt;
&lt;br /&gt;
-hopspitfire&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Ahhh yes.  I keep forgetting that not everyone set up keys for root access.&lt;br /&gt;
&lt;br /&gt;
-JackieRipper&lt;br /&gt;
&lt;br /&gt;
==Pre Rebooting Issue==&lt;br /&gt;
&lt;br /&gt;
If you don't exclude some of the directories then the Pre reboots when the backup process touches them. [[User:hmagoo|-hmagoo]]&lt;br /&gt;
&lt;br /&gt;
:Can you specify which files/directories prompt the reboot? -[[User:Hopspitfire|hopspitfire]] 02:57, 20 August 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
::I could narrow it down to proc and/or sys, that's narrow enough for me to exclude both, any progress on restore testing?  I'm not running an emulator. [[User:hmagoo|-hmagoo]]&lt;br /&gt;
&lt;br /&gt;
:I tested the restore process and it works. Can you run the backup process and send the output to a file (rsync ... &amp;gt; /media/internal/rsync.log) and post it? -[[User:Hopspitfire|hopspitfire]] 00:49, 24 August 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
::[http://sites.google.com/site/hmagoosite/rsync-outputs.tar.gz rsync-outputs.tar.gz] this was the console and log output from running a backup. I had already a backup in place in the destination but excluded /dev, /sys/ and /proc initially, ran it this time without those exclusions to test it out (again, as I saw this reboot the very first time I tried this method). rebooted right after this line in the console, similar in the log.&lt;br /&gt;
 rsync: read errors mapping &amp;quot;/sys/devices/platform/lcd-controller/ctrl_reg_dump&amp;quot; (in root): No data available (61)&lt;br /&gt;
[[User:hmagoo|-hmagoo]]&lt;br /&gt;
::I ran the backup again excluding /sys and everything completed, only errors I got in the console were:&lt;br /&gt;
&lt;br /&gt;
 rsync: send_files failed to open &amp;quot;/proc/sys/kernel/sched_nr_migrate&amp;quot; (in root): Permission denied (13)&lt;br /&gt;
&lt;br /&gt;
 rsync: send_files failed to open &amp;quot;/proc/sys/net/ipv4/route/flush&amp;quot; (in root): Permission denied (13)&lt;br /&gt;
&lt;br /&gt;
 rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1524) [generator=3.0.5]&lt;br /&gt;
&lt;br /&gt;
[[User:hmagoo|-hmagoo]]&lt;br /&gt;
&lt;br /&gt;
Thanks for attaching your log. /sys and /proc don't need to be included in the backup, but /dev does (to initialize devices on boot). After testing the backup and restore, the easiest way is just mkdir the /sys and /proc directories and exlude them in the backup. Does the pre still restart when you excluded those directories?? -[[User:Hopspitfire|hopspitfire]] 21:23, 26 August 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
Shouldn't /dev exist fine after a restore and before rsync backup restore? I guess if you made some strange volume changes, but still. --[[User:NetWhiz|NetWhiz]] 21:59, 26 August 2009 (UTC)&lt;/div&gt;</summary>
		<author><name>NetWhiz</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Backing_Up_via_Rsync&amp;diff=4200</id>
		<title>Backing Up via Rsync</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Backing_Up_via_Rsync&amp;diff=4200"/>
		<updated>2009-08-11T14:56:14Z</updated>

		<summary type="html">&lt;p&gt;NetWhiz: /* Contributor(s) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Synopsis=&lt;br /&gt;
&lt;br /&gt;
The rsync remote-update protocol allows rsync to transfer just the differences between two sets of files across the network link, using an efficient checksum-search algorithm. &lt;br /&gt;
&lt;br /&gt;
Some of the additional features of rsync are:&lt;br /&gt;
&lt;br /&gt;
* support for copying links, devices, owners, groups and permissions&lt;br /&gt;
* exclude and exclude-from options similar to GNU tar&lt;br /&gt;
* a CVS exclude mode for ignoring the same files that CVS would ignore&lt;br /&gt;
* can use any transparent remote shell, including rsh or ssh&lt;br /&gt;
* does not require root privileges&lt;br /&gt;
* pipelining of file transfers to minimize latency costs&lt;br /&gt;
* support for anonymous or authenticated rsync servers (ideal for mirroring)&lt;br /&gt;
&lt;br /&gt;
=Background &amp;amp; Purpose=&lt;br /&gt;
&lt;br /&gt;
Using rsync as a means to make full backups of the Pre, both for disaster recovery and convenience. I have been using Rsync as a means to backup all my Gentoo and FreeBSD servers, and even a 4TB volume on our NetApp. I was able to restore every system simply by using rsync to push the files to a new disk/array. Using a special string of commands, rsync backups are nearly as depth-oriented as 'dd', while still being much more convenient.&lt;br /&gt;
&lt;br /&gt;
=Requirements=&lt;br /&gt;
&lt;br /&gt;
*1 Unix-based computer (with access to the same WIFI or [[USBnet_networking_setup | usbnet]] subnet as the Pre)&lt;br /&gt;
*On your Palm Pre, you need to have [[Portal:Accessing_Linux | access to linux]] and have completed the [[Next_steps|next steps]] after accessing linux.&lt;br /&gt;
&lt;br /&gt;
The Unix-based computer will be consistently referred to as the &amp;quot;host&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The rsync binary is part of Palm's original package, so it is possible to make a wrap-around gui-based ipk for users who do not want access to linux.&lt;br /&gt;
&lt;br /&gt;
=Backup Procedure=&lt;br /&gt;
&lt;br /&gt;
==Notice==&lt;br /&gt;
The backup method has been tested, but there are '''no guarantees''' explicitly or implicitly given for data replication and retention. These tools have worked exceptionally well for me, but they might not work for you.&lt;br /&gt;
&lt;br /&gt;
Out of respect for Sprint, I will only document how to use rsync over WIFI or [[USBnet_networking_setup | usbnet]]. '''I strongly disadvise against using rsync over EVDO (even through SSH). This process is bandwidth intensive and we don't want Sprint complaining to Palm.'''&lt;br /&gt;
&lt;br /&gt;
==Quick Overview==&lt;br /&gt;
1. We will set up the rsync daemon on the Palm Pre and make it acccessible by the host.&lt;br /&gt;
&lt;br /&gt;
2. The host will be set up to download the Pre's files.&lt;br /&gt;
&lt;br /&gt;
3. The transfer will take place.&lt;br /&gt;
&lt;br /&gt;
4. The daemon on the Pre will be killed to prevent anyone else from gaining access.&lt;br /&gt;
&lt;br /&gt;
==Setting up the Pre==&lt;br /&gt;
1. Access your Pre via WIFI or [[USBnet_networking_setup | usbnet]].&lt;br /&gt;
&lt;br /&gt;
2. Edit '''/etc/rsyncd.conf''' and make sure you fill in the host IP address (your computer)&lt;br /&gt;
&lt;br /&gt;
 pid file = /var/run/rsyncd.pid&lt;br /&gt;
 uid = root&lt;br /&gt;
 gid = root&lt;br /&gt;
 hosts allow = '''FILL_YOUR_HOST_IP_HERE'''&lt;br /&gt;
 hosts deny = *&lt;br /&gt;
 use chroot = no&lt;br /&gt;
 &lt;br /&gt;
 [root]&lt;br /&gt;
  path = /&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Start the rsync daemon and allow the rsync daemon to communicate with the host. Make sure you fill in the host IP address (your computer):&lt;br /&gt;
&amp;lt;source lang=bash&amp;gt;&lt;br /&gt;
 export IPADDRESS='''enter the IP Address of your host'''&lt;br /&gt;
 rsync --daemon &amp;amp;&amp;amp; /usr/sbin/iptables -I INPUT 1 -p TCP --dport 873 -s $IPADDRESS -j ACCEPT&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Setting up the host==&lt;br /&gt;
1. Make sure you are the root user.&lt;br /&gt;
&amp;lt;source lang=bash&amp;gt;&lt;br /&gt;
 sudo -i&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=bash&amp;gt;&lt;br /&gt;
 su -l&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2. On the host, you will need to create a directory where the Palm Pre will back up the files. My example will be '''/media/pre-backup'''&lt;br /&gt;
&amp;lt;source lang=bash&amp;gt;&lt;br /&gt;
 mkdir /media/pre-backup&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Running the transfer==&lt;br /&gt;
===On the host===&lt;br /&gt;
&lt;br /&gt;
1. If you want to exclude any directories you are already backing up (or simply don't want to include), add --exclude=/path/to/your/dir after &amp;quot;-stats&amp;quot; in the command (in Step 4). You will need to do this for every directory you wish to NOT include in the transfer. Until the restore process is verified, I'm including the special filesystems /dev, /proc and /sys in the backup.&lt;br /&gt;
&lt;br /&gt;
2. Fill your IP Address in the command below, along with your excludes (if you have any), and begin the transfer from the host computer. '''Make sure to set the correct backup directory (if you deviated from /media/pre-backup), otherwise you could overwrite data on your host machine.'''&lt;br /&gt;
&amp;lt;source lang=bash&amp;gt;&lt;br /&gt;
 export IPADDRESS='''enter the IP Address of your pre'''&lt;br /&gt;
 rsync -HrlptgoDPvvS --force --delete --del --stats rsync://root@$IPADDRESS/root/ /media/pre-backup/&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2a. Every time you run the transfer, it will retain the exact same file-structure of the Pre, only deleting files that don't exist and only sending files that have changed.&lt;br /&gt;
&lt;br /&gt;
==Disabling the rsync daemon on the Pre==&lt;br /&gt;
&lt;br /&gt;
1. You need to disable the rsync daemon on the Pre to prevent anyone from gaining access to your files. To kill the rsync daemon, you will need to find the Process ID first, then kill the process.&lt;br /&gt;
&amp;lt;source lang=bash&amp;gt;&lt;br /&gt;
 ps auxw | grep rsync &lt;br /&gt;
 root     11567  0.0  0.0  10480   624 ?        Ss   09:18   0:00 rsync --daemon&lt;br /&gt;
 root     11576  0.0  0.0   6124   640 pts/1    S+   09:18   0:00 grep rsync (IGNORE THIS ONE)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then kill the process:&lt;br /&gt;
&amp;lt;source lang=bash&amp;gt;&lt;br /&gt;
 kill 11567&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Restore Procedure=&lt;br /&gt;
==Quick Overview==&lt;br /&gt;
1. Set up the host's rsync daemon&lt;br /&gt;
&lt;br /&gt;
2. Gain access to the Pre's Linux.&lt;br /&gt;
&lt;br /&gt;
3. Transfer the backed-up files to the pre and pray it works.&lt;br /&gt;
&lt;br /&gt;
==Setting up the host==&lt;br /&gt;
1. Edit '''/etc/rsyncd.conf''' (or '''/usr/local/etc/rsyncd.conf''' for FreeBSD). Check your documentation. Be sure to fill in the Pre's IP Address, and set the correct directory for the Pre backup (my example will be '''/media/pre-backup''').&lt;br /&gt;
&lt;br /&gt;
 pid file = /var/run/rsyncd.pid&lt;br /&gt;
 uid = root&lt;br /&gt;
 gid = root&lt;br /&gt;
 hosts allow = '''FILL_YOUR_PALM_PRE_IP_HERE'''&lt;br /&gt;
 hosts deny = *&lt;br /&gt;
 use chroot = no&lt;br /&gt;
 &lt;br /&gt;
 [root]&lt;br /&gt;
  path = /&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2. Start the rsync daemon (you can use an init script, I'm using the command below just for simplicity. Check your documentation)&lt;br /&gt;
&amp;lt;source lang=bash&amp;gt;&lt;br /&gt;
 rsync --daemon&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Setting up the Pre and restoring==&lt;br /&gt;
&lt;br /&gt;
A. For the scope of this guide, the requirements above still apply for the Palm Pre: you need to have [[Portal:Accessing_Linux | access to linux]].&lt;br /&gt;
&lt;br /&gt;
1. Access the Pre via WIFI or usbnet.&lt;br /&gt;
&lt;br /&gt;
2. Turn off the GUI while we restore all the files.&lt;br /&gt;
&amp;lt;source lang=bash&amp;gt;&lt;br /&gt;
 /sbin/initctl stop LunaSysMgr&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3. Fill your IP Address in the command below, and start the transfer. This command will take everything from your Host system and overwrite '''EVERYTHING''' on the Pre.&lt;br /&gt;
&amp;lt;source lang=bash&amp;gt;&lt;br /&gt;
 export IPADDRESS='''enter the IP Address of your host'''&lt;br /&gt;
 cd /&lt;br /&gt;
 mount -o remount,rw /&lt;br /&gt;
 mount -o remount,rw /boot&lt;br /&gt;
 mount -o remount,rw /media/internal&lt;br /&gt;
 rsync -HrlptgoDPvvS --force --delete --del --stats rsync://root@$IPADDRESS/pre-backup/ /&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3a. If you have any &amp;quot;Out of Space&amp;quot; issues, try removing the ''--delete --del'' and replacing it with ''--delete-before''&lt;br /&gt;
&lt;br /&gt;
4. Reboot immediately and pray it works.&lt;br /&gt;
&amp;lt;source lang=bash&amp;gt;&lt;br /&gt;
 reboot&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Development/Improvement Ideas=&lt;br /&gt;
*I need someone to test the restore process and get back to me with suggestions.&lt;br /&gt;
*It would be awesome if the Palm Pre supported NFS, otherwise we're stuck to setting up '''/etc/rsyncd.conf''' on the Pre (for backup) and the Host (for restore).&lt;br /&gt;
*A gui wrapper is possible because the Palm Pre comes shipped with rsync. Also, there needs to be an easy Windows server program to make this mainstream, only thing to use at the moment that's Windows based is cygwin. Otherwise we're stuck with Unix.&lt;br /&gt;
*It's possible to create a cron job to run the backup every evening over WIFI (especially if you dock you're phone overnight). The cron job would be run from the Host computer. It's also recommended to set up iptables for allowing port 873 only for the host on the interface eth0 or usb0.&lt;br /&gt;
* Would be nice to be able to have it run at a low priority and not kill any ssh connections. Have tried renicing the rsync daemons but has had no affect.&lt;br /&gt;
&lt;br /&gt;
=Contributor(s)=&lt;br /&gt;
*hopspitfire&lt;br /&gt;
*NetWhiz&lt;/div&gt;</summary>
		<author><name>NetWhiz</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Backing_Up_via_Rsync&amp;diff=4199</id>
		<title>Backing Up via Rsync</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Backing_Up_via_Rsync&amp;diff=4199"/>
		<updated>2009-08-11T14:55:57Z</updated>

		<summary type="html">&lt;p&gt;NetWhiz: /* Development/Improvement Ideas */ Another idea to improve use&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Synopsis=&lt;br /&gt;
&lt;br /&gt;
The rsync remote-update protocol allows rsync to transfer just the differences between two sets of files across the network link, using an efficient checksum-search algorithm. &lt;br /&gt;
&lt;br /&gt;
Some of the additional features of rsync are:&lt;br /&gt;
&lt;br /&gt;
* support for copying links, devices, owners, groups and permissions&lt;br /&gt;
* exclude and exclude-from options similar to GNU tar&lt;br /&gt;
* a CVS exclude mode for ignoring the same files that CVS would ignore&lt;br /&gt;
* can use any transparent remote shell, including rsh or ssh&lt;br /&gt;
* does not require root privileges&lt;br /&gt;
* pipelining of file transfers to minimize latency costs&lt;br /&gt;
* support for anonymous or authenticated rsync servers (ideal for mirroring)&lt;br /&gt;
&lt;br /&gt;
=Background &amp;amp; Purpose=&lt;br /&gt;
&lt;br /&gt;
Using rsync as a means to make full backups of the Pre, both for disaster recovery and convenience. I have been using Rsync as a means to backup all my Gentoo and FreeBSD servers, and even a 4TB volume on our NetApp. I was able to restore every system simply by using rsync to push the files to a new disk/array. Using a special string of commands, rsync backups are nearly as depth-oriented as 'dd', while still being much more convenient.&lt;br /&gt;
&lt;br /&gt;
=Requirements=&lt;br /&gt;
&lt;br /&gt;
*1 Unix-based computer (with access to the same WIFI or [[USBnet_networking_setup | usbnet]] subnet as the Pre)&lt;br /&gt;
*On your Palm Pre, you need to have [[Portal:Accessing_Linux | access to linux]] and have completed the [[Next_steps|next steps]] after accessing linux.&lt;br /&gt;
&lt;br /&gt;
The Unix-based computer will be consistently referred to as the &amp;quot;host&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The rsync binary is part of Palm's original package, so it is possible to make a wrap-around gui-based ipk for users who do not want access to linux.&lt;br /&gt;
&lt;br /&gt;
=Backup Procedure=&lt;br /&gt;
&lt;br /&gt;
==Notice==&lt;br /&gt;
The backup method has been tested, but there are '''no guarantees''' explicitly or implicitly given for data replication and retention. These tools have worked exceptionally well for me, but they might not work for you.&lt;br /&gt;
&lt;br /&gt;
Out of respect for Sprint, I will only document how to use rsync over WIFI or [[USBnet_networking_setup | usbnet]]. '''I strongly disadvise against using rsync over EVDO (even through SSH). This process is bandwidth intensive and we don't want Sprint complaining to Palm.'''&lt;br /&gt;
&lt;br /&gt;
==Quick Overview==&lt;br /&gt;
1. We will set up the rsync daemon on the Palm Pre and make it acccessible by the host.&lt;br /&gt;
&lt;br /&gt;
2. The host will be set up to download the Pre's files.&lt;br /&gt;
&lt;br /&gt;
3. The transfer will take place.&lt;br /&gt;
&lt;br /&gt;
4. The daemon on the Pre will be killed to prevent anyone else from gaining access.&lt;br /&gt;
&lt;br /&gt;
==Setting up the Pre==&lt;br /&gt;
1. Access your Pre via WIFI or [[USBnet_networking_setup | usbnet]].&lt;br /&gt;
&lt;br /&gt;
2. Edit '''/etc/rsyncd.conf''' and make sure you fill in the host IP address (your computer)&lt;br /&gt;
&lt;br /&gt;
 pid file = /var/run/rsyncd.pid&lt;br /&gt;
 uid = root&lt;br /&gt;
 gid = root&lt;br /&gt;
 hosts allow = '''FILL_YOUR_HOST_IP_HERE'''&lt;br /&gt;
 hosts deny = *&lt;br /&gt;
 use chroot = no&lt;br /&gt;
 &lt;br /&gt;
 [root]&lt;br /&gt;
  path = /&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Start the rsync daemon and allow the rsync daemon to communicate with the host. Make sure you fill in the host IP address (your computer):&lt;br /&gt;
&amp;lt;source lang=bash&amp;gt;&lt;br /&gt;
 export IPADDRESS='''enter the IP Address of your host'''&lt;br /&gt;
 rsync --daemon &amp;amp;&amp;amp; /usr/sbin/iptables -I INPUT 1 -p TCP --dport 873 -s $IPADDRESS -j ACCEPT&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Setting up the host==&lt;br /&gt;
1. Make sure you are the root user.&lt;br /&gt;
&amp;lt;source lang=bash&amp;gt;&lt;br /&gt;
 sudo -i&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=bash&amp;gt;&lt;br /&gt;
 su -l&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2. On the host, you will need to create a directory where the Palm Pre will back up the files. My example will be '''/media/pre-backup'''&lt;br /&gt;
&amp;lt;source lang=bash&amp;gt;&lt;br /&gt;
 mkdir /media/pre-backup&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Running the transfer==&lt;br /&gt;
===On the host===&lt;br /&gt;
&lt;br /&gt;
1. If you want to exclude any directories you are already backing up (or simply don't want to include), add --exclude=/path/to/your/dir after &amp;quot;-stats&amp;quot; in the command (in Step 4). You will need to do this for every directory you wish to NOT include in the transfer. Until the restore process is verified, I'm including the special filesystems /dev, /proc and /sys in the backup.&lt;br /&gt;
&lt;br /&gt;
2. Fill your IP Address in the command below, along with your excludes (if you have any), and begin the transfer from the host computer. '''Make sure to set the correct backup directory (if you deviated from /media/pre-backup), otherwise you could overwrite data on your host machine.'''&lt;br /&gt;
&amp;lt;source lang=bash&amp;gt;&lt;br /&gt;
 export IPADDRESS='''enter the IP Address of your pre'''&lt;br /&gt;
 rsync -HrlptgoDPvvS --force --delete --del --stats rsync://root@$IPADDRESS/root/ /media/pre-backup/&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2a. Every time you run the transfer, it will retain the exact same file-structure of the Pre, only deleting files that don't exist and only sending files that have changed.&lt;br /&gt;
&lt;br /&gt;
==Disabling the rsync daemon on the Pre==&lt;br /&gt;
&lt;br /&gt;
1. You need to disable the rsync daemon on the Pre to prevent anyone from gaining access to your files. To kill the rsync daemon, you will need to find the Process ID first, then kill the process.&lt;br /&gt;
&amp;lt;source lang=bash&amp;gt;&lt;br /&gt;
 ps auxw | grep rsync &lt;br /&gt;
 root     11567  0.0  0.0  10480   624 ?        Ss   09:18   0:00 rsync --daemon&lt;br /&gt;
 root     11576  0.0  0.0   6124   640 pts/1    S+   09:18   0:00 grep rsync (IGNORE THIS ONE)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then kill the process:&lt;br /&gt;
&amp;lt;source lang=bash&amp;gt;&lt;br /&gt;
 kill 11567&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Restore Procedure=&lt;br /&gt;
==Quick Overview==&lt;br /&gt;
1. Set up the host's rsync daemon&lt;br /&gt;
&lt;br /&gt;
2. Gain access to the Pre's Linux.&lt;br /&gt;
&lt;br /&gt;
3. Transfer the backed-up files to the pre and pray it works.&lt;br /&gt;
&lt;br /&gt;
==Setting up the host==&lt;br /&gt;
1. Edit '''/etc/rsyncd.conf''' (or '''/usr/local/etc/rsyncd.conf''' for FreeBSD). Check your documentation. Be sure to fill in the Pre's IP Address, and set the correct directory for the Pre backup (my example will be '''/media/pre-backup''').&lt;br /&gt;
&lt;br /&gt;
 pid file = /var/run/rsyncd.pid&lt;br /&gt;
 uid = root&lt;br /&gt;
 gid = root&lt;br /&gt;
 hosts allow = '''FILL_YOUR_PALM_PRE_IP_HERE'''&lt;br /&gt;
 hosts deny = *&lt;br /&gt;
 use chroot = no&lt;br /&gt;
 &lt;br /&gt;
 [root]&lt;br /&gt;
  path = /&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2. Start the rsync daemon (you can use an init script, I'm using the command below just for simplicity. Check your documentation)&lt;br /&gt;
&amp;lt;source lang=bash&amp;gt;&lt;br /&gt;
 rsync --daemon&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Setting up the Pre and restoring==&lt;br /&gt;
&lt;br /&gt;
A. For the scope of this guide, the requirements above still apply for the Palm Pre: you need to have [[Portal:Accessing_Linux | access to linux]].&lt;br /&gt;
&lt;br /&gt;
1. Access the Pre via WIFI or usbnet.&lt;br /&gt;
&lt;br /&gt;
2. Turn off the GUI while we restore all the files.&lt;br /&gt;
&amp;lt;source lang=bash&amp;gt;&lt;br /&gt;
 /sbin/initctl stop LunaSysMgr&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3. Fill your IP Address in the command below, and start the transfer. This command will take everything from your Host system and overwrite '''EVERYTHING''' on the Pre.&lt;br /&gt;
&amp;lt;source lang=bash&amp;gt;&lt;br /&gt;
 export IPADDRESS='''enter the IP Address of your host'''&lt;br /&gt;
 cd /&lt;br /&gt;
 mount -o remount,rw /&lt;br /&gt;
 mount -o remount,rw /boot&lt;br /&gt;
 mount -o remount,rw /media/internal&lt;br /&gt;
 rsync -HrlptgoDPvvS --force --delete --del --stats rsync://root@$IPADDRESS/pre-backup/ /&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3a. If you have any &amp;quot;Out of Space&amp;quot; issues, try removing the ''--delete --del'' and replacing it with ''--delete-before''&lt;br /&gt;
&lt;br /&gt;
4. Reboot immediately and pray it works.&lt;br /&gt;
&amp;lt;source lang=bash&amp;gt;&lt;br /&gt;
 reboot&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Development/Improvement Ideas=&lt;br /&gt;
*I need someone to test the restore process and get back to me with suggestions.&lt;br /&gt;
*It would be awesome if the Palm Pre supported NFS, otherwise we're stuck to setting up '''/etc/rsyncd.conf''' on the Pre (for backup) and the Host (for restore).&lt;br /&gt;
*A gui wrapper is possible because the Palm Pre comes shipped with rsync. Also, there needs to be an easy Windows server program to make this mainstream, only thing to use at the moment that's Windows based is cygwin. Otherwise we're stuck with Unix.&lt;br /&gt;
*It's possible to create a cron job to run the backup every evening over WIFI (especially if you dock you're phone overnight). The cron job would be run from the Host computer. It's also recommended to set up iptables for allowing port 873 only for the host on the interface eth0 or usb0.&lt;br /&gt;
* Would be nice to be able to have it run at a low priority and not kill any ssh connections. Have tried renicing the rsync daemons but has had no affect.&lt;br /&gt;
&lt;br /&gt;
=Contributor(s)=&lt;br /&gt;
*hopspitfire&lt;/div&gt;</summary>
		<author><name>NetWhiz</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Backing_Up_via_Rsync&amp;diff=4198</id>
		<title>Backing Up via Rsync</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Backing_Up_via_Rsync&amp;diff=4198"/>
		<updated>2009-08-11T14:30:58Z</updated>

		<summary type="html">&lt;p&gt;NetWhiz: /* Setting up the Pre */ Fixed iptables code to actually work.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Synopsis=&lt;br /&gt;
&lt;br /&gt;
The rsync remote-update protocol allows rsync to transfer just the differences between two sets of files across the network link, using an efficient checksum-search algorithm. &lt;br /&gt;
&lt;br /&gt;
Some of the additional features of rsync are:&lt;br /&gt;
&lt;br /&gt;
* support for copying links, devices, owners, groups and permissions&lt;br /&gt;
* exclude and exclude-from options similar to GNU tar&lt;br /&gt;
* a CVS exclude mode for ignoring the same files that CVS would ignore&lt;br /&gt;
* can use any transparent remote shell, including rsh or ssh&lt;br /&gt;
* does not require root privileges&lt;br /&gt;
* pipelining of file transfers to minimize latency costs&lt;br /&gt;
* support for anonymous or authenticated rsync servers (ideal for mirroring)&lt;br /&gt;
&lt;br /&gt;
=Background &amp;amp; Purpose=&lt;br /&gt;
&lt;br /&gt;
Using rsync as a means to make full backups of the Pre, both for disaster recovery and convenience. I have been using Rsync as a means to backup all my Gentoo and FreeBSD servers, and even a 4TB volume on our NetApp. I was able to restore every system simply by using rsync to push the files to a new disk/array. Using a special string of commands, rsync backups are nearly as depth-oriented as 'dd', while still being much more convenient.&lt;br /&gt;
&lt;br /&gt;
=Requirements=&lt;br /&gt;
&lt;br /&gt;
*1 Unix-based computer (with access to the same WIFI or [[USBnet_networking_setup | usbnet]] subnet as the Pre)&lt;br /&gt;
*On your Palm Pre, you need to have [[Portal:Accessing_Linux | access to linux]] and have completed the [[Next_steps|next steps]] after accessing linux.&lt;br /&gt;
&lt;br /&gt;
The Unix-based computer will be consistently referred to as the &amp;quot;host&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The rsync binary is part of Palm's original package, so it is possible to make a wrap-around gui-based ipk for users who do not want access to linux.&lt;br /&gt;
&lt;br /&gt;
=Backup Procedure=&lt;br /&gt;
&lt;br /&gt;
==Notice==&lt;br /&gt;
The backup method has been tested, but there are '''no guarantees''' explicitly or implicitly given for data replication and retention. These tools have worked exceptionally well for me, but they might not work for you.&lt;br /&gt;
&lt;br /&gt;
Out of respect for Sprint, I will only document how to use rsync over WIFI or [[USBnet_networking_setup | usbnet]]. '''I strongly disadvise against using rsync over EVDO (even through SSH). This process is bandwidth intensive and we don't want Sprint complaining to Palm.'''&lt;br /&gt;
&lt;br /&gt;
==Quick Overview==&lt;br /&gt;
1. We will set up the rsync daemon on the Palm Pre and make it acccessible by the host.&lt;br /&gt;
&lt;br /&gt;
2. The host will be set up to download the Pre's files.&lt;br /&gt;
&lt;br /&gt;
3. The transfer will take place.&lt;br /&gt;
&lt;br /&gt;
4. The daemon on the Pre will be killed to prevent anyone else from gaining access.&lt;br /&gt;
&lt;br /&gt;
==Setting up the Pre==&lt;br /&gt;
1. Access your Pre via WIFI or [[USBnet_networking_setup | usbnet]].&lt;br /&gt;
&lt;br /&gt;
2. Edit '''/etc/rsyncd.conf''' and make sure you fill in the host IP address (your computer)&lt;br /&gt;
&lt;br /&gt;
 pid file = /var/run/rsyncd.pid&lt;br /&gt;
 uid = root&lt;br /&gt;
 gid = root&lt;br /&gt;
 hosts allow = '''FILL_YOUR_HOST_IP_HERE'''&lt;br /&gt;
 hosts deny = *&lt;br /&gt;
 use chroot = no&lt;br /&gt;
 &lt;br /&gt;
 [root]&lt;br /&gt;
  path = /&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Start the rsync daemon and allow the rsync daemon to communicate with the host. Make sure you fill in the host IP address (your computer):&lt;br /&gt;
&amp;lt;source lang=bash&amp;gt;&lt;br /&gt;
 export IPADDRESS='''enter the IP Address of your host'''&lt;br /&gt;
 rsync --daemon &amp;amp;&amp;amp; /usr/sbin/iptables -I INPUT 1 -p TCP --dport 873 -s $IPADDRESS -j ACCEPT&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Setting up the host==&lt;br /&gt;
1. Make sure you are the root user.&lt;br /&gt;
&amp;lt;source lang=bash&amp;gt;&lt;br /&gt;
 sudo -i&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=bash&amp;gt;&lt;br /&gt;
 su -l&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2. On the host, you will need to create a directory where the Palm Pre will back up the files. My example will be '''/media/pre-backup'''&lt;br /&gt;
&amp;lt;source lang=bash&amp;gt;&lt;br /&gt;
 mkdir /media/pre-backup&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Running the transfer==&lt;br /&gt;
===On the host===&lt;br /&gt;
&lt;br /&gt;
1. If you want to exclude any directories you are already backing up (or simply don't want to include), add --exclude=/path/to/your/dir after &amp;quot;-stats&amp;quot; in the command (in Step 4). You will need to do this for every directory you wish to NOT include in the transfer. Until the restore process is verified, I'm including the special filesystems /dev, /proc and /sys in the backup.&lt;br /&gt;
&lt;br /&gt;
2. Fill your IP Address in the command below, along with your excludes (if you have any), and begin the transfer from the host computer. '''Make sure to set the correct backup directory (if you deviated from /media/pre-backup), otherwise you could overwrite data on your host machine.'''&lt;br /&gt;
&amp;lt;source lang=bash&amp;gt;&lt;br /&gt;
 export IPADDRESS='''enter the IP Address of your pre'''&lt;br /&gt;
 rsync -HrlptgoDPvvS --force --delete --del --stats rsync://root@$IPADDRESS/root/ /media/pre-backup/&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2a. Every time you run the transfer, it will retain the exact same file-structure of the Pre, only deleting files that don't exist and only sending files that have changed.&lt;br /&gt;
&lt;br /&gt;
==Disabling the rsync daemon on the Pre==&lt;br /&gt;
&lt;br /&gt;
1. You need to disable the rsync daemon on the Pre to prevent anyone from gaining access to your files. To kill the rsync daemon, you will need to find the Process ID first, then kill the process.&lt;br /&gt;
&amp;lt;source lang=bash&amp;gt;&lt;br /&gt;
 ps auxw | grep rsync &lt;br /&gt;
 root     11567  0.0  0.0  10480   624 ?        Ss   09:18   0:00 rsync --daemon&lt;br /&gt;
 root     11576  0.0  0.0   6124   640 pts/1    S+   09:18   0:00 grep rsync (IGNORE THIS ONE)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then kill the process:&lt;br /&gt;
&amp;lt;source lang=bash&amp;gt;&lt;br /&gt;
 kill 11567&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Restore Procedure=&lt;br /&gt;
==Quick Overview==&lt;br /&gt;
1. Set up the host's rsync daemon&lt;br /&gt;
&lt;br /&gt;
2. Gain access to the Pre's Linux.&lt;br /&gt;
&lt;br /&gt;
3. Transfer the backed-up files to the pre and pray it works.&lt;br /&gt;
&lt;br /&gt;
==Setting up the host==&lt;br /&gt;
1. Edit '''/etc/rsyncd.conf''' (or '''/usr/local/etc/rsyncd.conf''' for FreeBSD). Check your documentation. Be sure to fill in the Pre's IP Address, and set the correct directory for the Pre backup (my example will be '''/media/pre-backup''').&lt;br /&gt;
&lt;br /&gt;
 pid file = /var/run/rsyncd.pid&lt;br /&gt;
 uid = root&lt;br /&gt;
 gid = root&lt;br /&gt;
 hosts allow = '''FILL_YOUR_PALM_PRE_IP_HERE'''&lt;br /&gt;
 hosts deny = *&lt;br /&gt;
 use chroot = no&lt;br /&gt;
 &lt;br /&gt;
 [root]&lt;br /&gt;
  path = /&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2. Start the rsync daemon (you can use an init script, I'm using the command below just for simplicity. Check your documentation)&lt;br /&gt;
&amp;lt;source lang=bash&amp;gt;&lt;br /&gt;
 rsync --daemon&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Setting up the Pre and restoring==&lt;br /&gt;
&lt;br /&gt;
A. For the scope of this guide, the requirements above still apply for the Palm Pre: you need to have [[Portal:Accessing_Linux | access to linux]].&lt;br /&gt;
&lt;br /&gt;
1. Access the Pre via WIFI or usbnet.&lt;br /&gt;
&lt;br /&gt;
2. Turn off the GUI while we restore all the files.&lt;br /&gt;
&amp;lt;source lang=bash&amp;gt;&lt;br /&gt;
 /sbin/initctl stop LunaSysMgr&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3. Fill your IP Address in the command below, and start the transfer. This command will take everything from your Host system and overwrite '''EVERYTHING''' on the Pre.&lt;br /&gt;
&amp;lt;source lang=bash&amp;gt;&lt;br /&gt;
 export IPADDRESS='''enter the IP Address of your host'''&lt;br /&gt;
 cd /&lt;br /&gt;
 mount -o remount,rw /&lt;br /&gt;
 mount -o remount,rw /boot&lt;br /&gt;
 mount -o remount,rw /media/internal&lt;br /&gt;
 rsync -HrlptgoDPvvS --force --delete --del --stats rsync://root@$IPADDRESS/pre-backup/ /&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3a. If you have any &amp;quot;Out of Space&amp;quot; issues, try removing the ''--delete --del'' and replacing it with ''--delete-before''&lt;br /&gt;
&lt;br /&gt;
4. Reboot immediately and pray it works.&lt;br /&gt;
&amp;lt;source lang=bash&amp;gt;&lt;br /&gt;
 reboot&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Development/Improvement Ideas=&lt;br /&gt;
*I need someone to test the restore process and get back to me with suggestions.&lt;br /&gt;
*It would be awesome if the Palm Pre supported NFS, otherwise we're stuck to setting up '''/etc/rsyncd.conf''' on the Pre (for backup) and the Host (for restore).&lt;br /&gt;
*A gui wrapper is possible because the Palm Pre comes shipped with rsync. Also, there needs to be an easy Windows server program to make this mainstream, only thing to use at the moment that's Windows based is cygwin. Otherwise we're stuck with Unix.&lt;br /&gt;
*It's possible to create a cron job to run the backup every evening over WIFI (especially if you dock you're phone overnight). The cron job would be run from the Host computer. It's also recommended to set up iptables for allowing port 873 only for the host on the interface eth0 or usb0.&lt;br /&gt;
&lt;br /&gt;
=Contributor(s)=&lt;br /&gt;
*hopspitfire&lt;/div&gt;</summary>
		<author><name>NetWhiz</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Talk:Java_Services&amp;diff=4142</id>
		<title>Talk:Java Services</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Talk:Java_Services&amp;diff=4142"/>
		<updated>2009-08-10T02:43:36Z</updated>

		<summary type="html">&lt;p&gt;NetWhiz: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;How do you kill a loaded service so you can reload it (i.e. not have to reboot when you change the service jar file)? --[[User:NetWhiz|NetWhiz]] 02:43, 10 August 2009 (UTC)&lt;/div&gt;</summary>
		<author><name>NetWhiz</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Talk:Introspecting_Dbus&amp;diff=4114</id>
		<title>Talk:Introspecting Dbus</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Talk:Introspecting_Dbus&amp;diff=4114"/>
		<updated>2009-08-09T13:20:46Z</updated>

		<summary type="html">&lt;p&gt;NetWhiz: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;there is another page at the old wiki that is &amp;quot;Introspecting_Dbus&amp;quot;.  The initial content in this page is from the old wiki at &amp;quot;Introspecting_Dbus_v2&amp;quot; so not sure what to do about that [[User:Sugardave|sugardave]] 05:59, 20 July 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
How do you run this on the Pre? I can not get it to run after installing Python. --[[User:NetWhiz|NetWhiz]] 13:20, 9 August 2009 (UTC)&lt;/div&gt;</summary>
		<author><name>NetWhiz</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Talk:Introspecting_Dbus&amp;diff=4113</id>
		<title>Talk:Introspecting Dbus</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Talk:Introspecting_Dbus&amp;diff=4113"/>
		<updated>2009-08-09T13:19:55Z</updated>

		<summary type="html">&lt;p&gt;NetWhiz: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;there is another page at the old wiki that is &amp;quot;Introspecting_Dbus&amp;quot;.  The initial content in this page is from the old wiki at &amp;quot;Introspecting_Dbus_v2&amp;quot; so not sure what to do about that [[User:Sugardave|sugardave]] 05:59, 20 July 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
How do you run this on the Pre? I can not get it to run after installing Python.&lt;/div&gt;</summary>
		<author><name>NetWhiz</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Talk:Java_Services&amp;diff=4103</id>
		<title>Talk:Java Services</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Talk:Java_Services&amp;diff=4103"/>
		<updated>2009-08-09T03:56:08Z</updated>

		<summary type="html">&lt;p&gt;NetWhiz: New page: How do you kill a loaded service so you can reload it (i.e. not have to reboot when you change the service jar file)?&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;How do you kill a loaded service so you can reload it (i.e. not have to reboot when you change the service jar file)?&lt;/div&gt;</summary>
		<author><name>NetWhiz</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Talk:Patch_Messaging_Character_Counter&amp;diff=3861</id>
		<title>Talk:Patch Messaging Character Counter</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Talk:Patch_Messaging_Character_Counter&amp;diff=3861"/>
		<updated>2009-08-05T20:21:09Z</updated>

		<summary type="html">&lt;p&gt;NetWhiz: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I couldn't get this patch to work.  The Charcounter section failed.  I get the icon on screen though.&lt;br /&gt;
WebOS 1.1&lt;br /&gt;
--[[User:S4rs|S4rs]] 20:08, 5 August 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
You need to manually apply the CharacterCounter.js patch by editing the file. The original patch file does not work on webOS 1.1.&lt;/div&gt;</summary>
		<author><name>NetWhiz</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Patch_Messaging_Forward_Messages&amp;diff=3081</id>
		<title>Patch Messaging Forward Messages</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Patch_Messaging_Forward_Messages&amp;diff=3081"/>
		<updated>2009-07-30T01:44:25Z</updated>

		<summary type="html">&lt;p&gt;NetWhiz: /* Notes */ Works in 1.1.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Description:''' This mod will allow you to forward a message by simply tapping on the text of a message in the chat view.  It does not interfere with the current attachment-tapping behavior.  Tapping an attached image ask if you want to forward.  Selecting &amp;quot;No&amp;quot; will still prompt for a save, etc., while selecting &amp;quot;Yes&amp;quot; will open a the compose dialog, with the message and attachments pre-populated.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' There is a patch available for the mod.  Please see [[Applying Patches]] for instructions.&lt;br /&gt;
&lt;br /&gt;
==Step One: Create the model==&lt;br /&gt;
&lt;br /&gt;
Back up and modify /usr/palm/applications/com.palm.app.messaging/app/models/messaging-luna-service.js.&lt;br /&gt;
&lt;br /&gt;
After line 10, add the following:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
forwardIdentifier: 'palm://com.palm.applicationManager',&lt;br /&gt;
&lt;br /&gt;
  forwardMessage: function(sceneController,messageText,attachment) {&lt;br /&gt;
	var opts = {&lt;br /&gt;
                method: 'launch',&lt;br /&gt;
                parameters: {&lt;br /&gt;
                        id: 'com.palm.app.messaging',&lt;br /&gt;
                        params: {&lt;br /&gt;
                        }&lt;br /&gt;
                }&lt;br /&gt;
        };&lt;br /&gt;
        if (messageText)&lt;br /&gt;
                opts.parameters.params.messageText = 'FWD: '+messageText;&lt;br /&gt;
        if (attachment)&lt;br /&gt;
                opts.parameters.params.attachment = attachment;&lt;br /&gt;
        return sceneController.serviceRequest(MessagingMojoService.forwardIdentifier,opts);&lt;br /&gt;
  },&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Step Two: Make it respond to a tap on the text==&lt;br /&gt;
&lt;br /&gt;
Back up and modify /usr/palm/applications/com.palm.app.messaging/app/controllers/chatview-assistant.js&lt;br /&gt;
&lt;br /&gt;
Find the function '''handleMessageTap''', starting on line 1480:&lt;br /&gt;
&lt;br /&gt;
The first few lines:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
        handleMessageTap: function(event){  &lt;br /&gt;
                var eventTarget = this.controller.get(event.originalEvent.target);&lt;br /&gt;
&lt;br /&gt;
                var mmsImageTarget = MessagingUtils.getClassUpChain(eventTarget,'MMSImageObject');                                                                                 &lt;br /&gt;
                if(mmsImageTarget) {&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And the last few lines:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
                                                                                                                                                                                   &lt;br /&gt;
                        MessagingMojoService.getMessageErrorInfo(this.controller, messageData.messageId, messageData.flags, this.handleMessageErrorPopup.bind(this,messageData));  &lt;br /&gt;
                                                                                                                                                                                   &lt;br /&gt;
                }.bind(this), false);                                                                                                                                              &lt;br /&gt;
        },&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Replace the entire function with the following:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
        handleMessageTap: function(event){&lt;br /&gt;
                var eventTarget = this.controller.get(event.originalEvent.target);&lt;br /&gt;
&lt;br /&gt;
                var mmsImageTarget = MessagingUtils.getClassUpChain(eventTarget,'MMSImageObject');&lt;br /&gt;
                if(mmsImageTarget) {&lt;br /&gt;
                        var imagePath = mmsImageTarget.getAttribute('originalSrc');&lt;br /&gt;
                        this.controller.showAlertDialog({&lt;br /&gt;
                                onChoose: function(value) {if(value == &amp;quot;forward&amp;quot;){MessagingMojoService.forwardMessage(this.controller, event.item.messageText, imagePath);} else {this.controller.stageController.pushScene('imageview', imagePath);}},&lt;br /&gt;
                                title: $L(&amp;quot;Forward Message&amp;quot;),&lt;br /&gt;
                                message: $L(&amp;quot;Do you want to forward this message?&amp;quot;),&lt;br /&gt;
                                choices:[&lt;br /&gt;
                                        {label:$L(&amp;quot;Yes&amp;quot;), value:&amp;quot;forward&amp;quot;, type:&amp;quot;affirmative&amp;quot;},&lt;br /&gt;
                                        {label:$L(&amp;quot;No&amp;quot;), value:&amp;quot;&amp;quot;, type:&amp;quot;negative&amp;quot;}&lt;br /&gt;
                                ]&lt;br /&gt;
                        });&lt;br /&gt;
                        return;&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                var mmsVideoTarget = MessagingUtils.getClassUpChain(eventTarget,'mms-video');&lt;br /&gt;
                if(mmsVideoTarget) {&lt;br /&gt;
                        var videoPath = mmsVideoTarget.getAttribute('filePath');&lt;br /&gt;
                        var videoName = mmsVideoTarget.getAttribute('fileInfo');&lt;br /&gt;
&lt;br /&gt;
                        var args = {&lt;br /&gt;
                                appId: &amp;quot;com.palm.app.videoplayer&amp;quot;,&lt;br /&gt;
                                name: &amp;quot;nowplaying&amp;quot;&lt;br /&gt;
                        };&lt;br /&gt;
                        var params = {&lt;br /&gt;
                                target: videoPath,&lt;br /&gt;
                                title: videoName&lt;br /&gt;
                        };&lt;br /&gt;
                        this.controller.showAlertDialog({&lt;br /&gt;
                                onChoose: function(value) {if(value == &amp;quot;forward&amp;quot;){MessagingMojoService.forwardMessage(this.controller, event.item.messageText, videoPath);} else {this.controller.stageController.pushScene(args, params);}},&lt;br /&gt;
                                title: $L(&amp;quot;Forward Message&amp;quot;),&lt;br /&gt;
                                message: $L(&amp;quot;Do you want to forward this message?&amp;quot;),&lt;br /&gt;
                                choices:[&lt;br /&gt;
                                        {label:$L(&amp;quot;Yes&amp;quot;), value:&amp;quot;forward&amp;quot;, type:&amp;quot;affirmative&amp;quot;},&lt;br /&gt;
                                        {label:$L(&amp;quot;No&amp;quot;), value:&amp;quot;&amp;quot;, type:&amp;quot;negative&amp;quot;}&lt;br /&gt;
                                ]&lt;br /&gt;
                        });&lt;br /&gt;
                        return;&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                var mmsVcardTarget = MessagingUtils.getClassUpChain(eventTarget,'mms-vcard');&lt;br /&gt;
                if(mmsVcardTarget) {&lt;br /&gt;
                        var filePath = mmsVcardTarget.getAttribute('filePath');&lt;br /&gt;
                        this.controller.showAlertDialog({&lt;br /&gt;
                                onChoose: function(value) {if(value == &amp;quot;forward&amp;quot;){MessagingMojoService.forwardMessage(this.controller, event.item.messageText, filePath);} else {this.controller.stageController.pushScene('mmsTextAttachment', filePath);}},&lt;br /&gt;
                                title: $L(&amp;quot;Forward Message&amp;quot;),&lt;br /&gt;
                                message: $L(&amp;quot;Do you want to forward this message?&amp;quot;),&lt;br /&gt;
                                choices:[&lt;br /&gt;
                                        {label:$L(&amp;quot;Yes&amp;quot;), value:&amp;quot;forward&amp;quot;, type:&amp;quot;affirmative&amp;quot;},&lt;br /&gt;
                                        {label:$L(&amp;quot;No&amp;quot;), value:&amp;quot;&amp;quot;, type:&amp;quot;negative&amp;quot;}&lt;br /&gt;
                                ]&lt;br /&gt;
                        });&lt;br /&gt;
                        return;&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                var mmsVcalTarget = MessagingUtils.getClassUpChain(eventTarget,'mms-vcal');&lt;br /&gt;
                if(mmsVcalTarget) {&lt;br /&gt;
                        var filePath = mmsVcalTarget.getAttribute('filePath');&lt;br /&gt;
                        this.controller.showAlertDialog({&lt;br /&gt;
                                onChoose: function(value) {if(value == &amp;quot;forward&amp;quot;){MessagingMojoService.forwardMessage(this.controller, event.item.messageText, filePath);} else {this.controller.stageController.pushScene('mmsTextAttachment', filePath);}},&lt;br /&gt;
                                title: $L(&amp;quot;Forward Message&amp;quot;),&lt;br /&gt;
                                message: $L(&amp;quot;Do you want to forward this message?&amp;quot;),&lt;br /&gt;
                                choices:[&lt;br /&gt;
                                        {label:$L(&amp;quot;Yes&amp;quot;), value:&amp;quot;forward&amp;quot;, type:&amp;quot;affirmative&amp;quot;},&lt;br /&gt;
                                        {label:$L(&amp;quot;No&amp;quot;), value:&amp;quot;&amp;quot;, type:&amp;quot;negative&amp;quot;}&lt;br /&gt;
                                ]&lt;br /&gt;
                        });&lt;br /&gt;
                        return;&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                if (!mmsImageTarget &amp;amp;&amp;amp; !mmsVideoTarget &amp;amp;&amp;amp; !mmsVcardTarget &amp;amp;&amp;amp; !mmsVcalTarget) {&lt;br /&gt;
                        this.controller.showAlertDialog({&lt;br /&gt;
                                onChoose: function(value) {if(value == &amp;quot;forward&amp;quot;){MessagingMojoService.forwardMessage(this.controller, event.item.messageText, '');}},&lt;br /&gt;
                                title: $L(&amp;quot;Forward Message&amp;quot;),&lt;br /&gt;
                                message: $L(&amp;quot;Do you want to forward this message?&amp;quot;),&lt;br /&gt;
                                choices:[&lt;br /&gt;
                                        {label:$L(&amp;quot;Yes&amp;quot;), value:&amp;quot;forward&amp;quot;, type:&amp;quot;affirmative&amp;quot;},&lt;br /&gt;
                                        {label:$L(&amp;quot;No&amp;quot;), value:&amp;quot;&amp;quot;, type:&amp;quot;negative&amp;quot;}&lt;br /&gt;
                                ]&lt;br /&gt;
                        });&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                MessagingUtils.simpleListClick(this.controller.get(event.originalEvent.target), &amp;quot;chatRow&amp;quot;, function(targetRow){&lt;br /&gt;
                        var messageData = {&lt;br /&gt;
                                errorCode: targetRow.getAttribute(&amp;quot;errorCode&amp;quot;),&lt;br /&gt;
                                status: targetRow.getAttribute(&amp;quot;status&amp;quot;),&lt;br /&gt;
                                messageId: targetRow.getAttribute(&amp;quot;messageId&amp;quot;),&lt;br /&gt;
                                flags: targetRow.getAttribute(&amp;quot;flags&amp;quot;),&lt;br /&gt;
                                messageType: targetRow.getAttribute(&amp;quot;messageType&amp;quot;)&lt;br /&gt;
                        };&lt;br /&gt;
&lt;br /&gt;
                        MessagingMojoService.getMessageErrorInfo(this.controller, messageData.messageId, messageData.flags, this.handleMessageErrorPopup.bind(this,messageData));&lt;br /&gt;
&lt;br /&gt;
                }.bind(this), false);&lt;br /&gt;
        },&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Reboot for changes to take effect.&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
To forward a message, open the Messaging application, tap a chat thread, then tap an individual message.  A dialog will pop up asking if you would like to forward.  If the message has an attachment, it will be forwarded, as well.  A new compose card will open with the message text pre-populated.  Simply choose the recipient(s).&lt;br /&gt;
&lt;br /&gt;
= Notes =&lt;br /&gt;
Patching [[Application:Messaging Character Counter]] will not allow for this patch to work, please take a look into this.  -thatdude&lt;br /&gt;
&lt;br /&gt;
If the [[Application:Messaging Character Counter]] patch is applied manually it works fine with this patch. -NetWhiz&lt;br /&gt;
&lt;br /&gt;
= Credits=&lt;br /&gt;
Submitted by JackieRipper and Atlanta&lt;/div&gt;</summary>
		<author><name>NetWhiz</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Patch_Messaging_Character_Counter&amp;diff=3080</id>
		<title>Patch Messaging Character Counter</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Patch_Messaging_Character_Counter&amp;diff=3080"/>
		<updated>2009-07-30T01:42:10Z</updated>

		<summary type="html">&lt;p&gt;NetWhiz: /* Notes */ Works in 1.1.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Character Counter =&lt;br /&gt;
&lt;br /&gt;
[[Image:Messaging_CharacterCounter.jpg|border|right|Character Counter]]&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
One of the features I liked about my old Treo was the character counter built-in to the messaging application. I thought it would be useful on the Pre, so I modified the messaging application to show the current character count. I made this a separate page from the other modifications because it requires many code changes. Maybe the other messaging modifications could be rolled into this page as well.&lt;br /&gt;
&lt;br /&gt;
== Procedure ==&lt;br /&gt;
&lt;br /&gt;
Run the following commands:&lt;br /&gt;
&lt;br /&gt;
''In this example, I have the patch file located in my home directory under '''patches'''''&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd /&lt;br /&gt;
sudo patch -p0 --backup-if-mismatch &amp;lt; ~/patches/charcounter.patch&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is what you should see if it ran properly:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
patching file /usr/palm/applications/com.palm.app.messaging/app/controllers/chatview-assistant.js&lt;br /&gt;
patching file /usr/palm/applications/com.palm.app.messaging/app/controllers/compose-assistant.js&lt;br /&gt;
patching file /usr/palm/applications/com.palm.app.messaging/app/utilities/CharacterCounter.js&lt;br /&gt;
patching file /usr/palm/applications/com.palm.app.messaging/app/views/chatview/chatview-scene.html&lt;br /&gt;
patching file /usr/palm/applications/com.palm.app.messaging/app/views/compose/compose-scene.html&lt;br /&gt;
patching file /usr/palm/applications/com.palm.app.messaging/stylesheets/messaging.css&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These modifications will require LunaSysMgr to be restarted. A rescan will not work. After you've run the commands above, run one more command:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
pkill LunaSysMgr&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== charcounter.patch ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;diff&amp;quot;&amp;gt;&lt;br /&gt;
diff -ur /usr/palm/applications/com.palm.app.messaging/app/controllers/chatview-assistant.js /usr/palm/app-modified/com.palm.app.messaging/app/controllers/chatview-assistant.js&lt;br /&gt;
--- /usr/palm/applications/com.palm.app.messaging/app/controllers/chatview-assistant.js	2009-07-18 00:22:14.000000000 -0500&lt;br /&gt;
+++ /usr/palm/app-modified/com.palm.app.messaging/app/controllers/chatview-assistant.js	2009-07-23 23:13:19.000000000 -0500&lt;br /&gt;
@@ -160,6 +160,11 @@&lt;br /&gt;
 				segmentCountContainer: this.controller.get('segmentCounterContainer'),&lt;br /&gt;
 				segmentCountElement: this.controller.get('segmentCounter'),&lt;br /&gt;
 				setTextFieldValueFn: this.setTextFieldValue.bind(this)&lt;br /&gt;
+			},&lt;br /&gt;
+			charCounter: {&lt;br /&gt;
+				charCountContainer: this.controller.get('charCounterContainer'),&lt;br /&gt;
+				charCountElement: this.controller.get('charCounter'),&lt;br /&gt;
+				setTextFieldValueFn: this.setTextFieldValue.bind(this)&lt;br /&gt;
 			}&lt;br /&gt;
 		};&lt;br /&gt;
 &lt;br /&gt;
diff -ur /usr/palm/applications/com.palm.app.messaging/app/controllers/compose-assistant.js /usr/palm/app-modified/com.palm.app.messaging/app/controllers/compose-assistant.js&lt;br /&gt;
--- /usr/palm/applications/com.palm.app.messaging/app/controllers/compose-assistant.js	2009-07-18 00:22:14.000000000 -0500&lt;br /&gt;
+++ /usr/palm/app-modified/com.palm.app.messaging/app/controllers/compose-assistant.js	2009-07-23 23:14:11.000000000 -0500&lt;br /&gt;
@@ -140,6 +140,11 @@&lt;br /&gt;
 			segmentCountContainer: this.controller.get('segmentCounterContainer'),&lt;br /&gt;
 			segmentCountElement: this.controller.get('segmentCounter'),&lt;br /&gt;
 			setTextFieldValueFn: this.setTextFieldValue.bind(this)&lt;br /&gt;
+		},&lt;br /&gt;
+		charCounter: {&lt;br /&gt;
+			charCountContainer: this.controller.get('charCounterContainer'),&lt;br /&gt;
+			charCountElement: this.controller.get('charCounter'),&lt;br /&gt;
+			setTextFieldValueFn: this.setTextFieldValue.bind(this)&lt;br /&gt;
 		}&lt;br /&gt;
 	};&lt;br /&gt;
 &lt;br /&gt;
diff -ur /usr/palm/applications/com.palm.app.messaging/app/utilities/CharacterCounter.js /usr/palm/app-modified/com.palm.app.messaging/app/utilities/CharacterCounter.js&lt;br /&gt;
--- /usr/palm/applications/com.palm.app.messaging/app/utilities/CharacterCounter.js	2009-07-18 00:22:14.000000000 -0500&lt;br /&gt;
+++ /usr/palm/app-modified/com.palm.app.messaging/app/utilities/CharacterCounter.js	2009-07-23 23:47:32.000000000 -0500&lt;br /&gt;
@@ -39,6 +39,10 @@&lt;br /&gt;
 				containerElement: null,&lt;br /&gt;
 				valueElement: null&lt;br /&gt;
 			};&lt;br /&gt;
+			var charCounterUI = {&lt;br /&gt;
+				containerElement: null,&lt;br /&gt;
+				valueElement: null&lt;br /&gt;
+			};&lt;br /&gt;
 			&lt;br /&gt;
 						&lt;br /&gt;
 			// TODO: eventually we might want to implement some cleverness that counts&lt;br /&gt;
@@ -185,6 +189,20 @@&lt;br /&gt;
 				}&lt;br /&gt;
 			};&lt;br /&gt;
 			&lt;br /&gt;
+			var setCurrentCharCount = function(newCharCount) {&lt;br /&gt;
+				if(charCounterUI.valueElement)&lt;br /&gt;
+					charCounterUI.valueElement.update(newCharCount);&lt;br /&gt;
+				if(charCounterUI.containerElement) {&lt;br /&gt;
+					if (newCharCount == 0) {&lt;br /&gt;
+						if (charCounterUI.containerElement.visible())&lt;br /&gt;
+							charCounterUI.containerElement.hide();&lt;br /&gt;
+					} else {&lt;br /&gt;
+						if (!charCounterUI.containerElement.visible())&lt;br /&gt;
+							charCounterUI.containerElement.show();&lt;br /&gt;
+					}&lt;br /&gt;
+				}&lt;br /&gt;
+			};&lt;br /&gt;
+			&lt;br /&gt;
 			return {&lt;br /&gt;
 				&lt;br /&gt;
 				init: function(controller,platform,textElement,params) {&lt;br /&gt;
@@ -265,7 +283,13 @@&lt;br /&gt;
 								setTextFieldValueFn = params.segmentCounter.setTextFieldValueFn;&lt;br /&gt;
 							}						&lt;br /&gt;
 						}&lt;br /&gt;
-&lt;br /&gt;
+						if(params.charCounter) {&lt;br /&gt;
+							charCounterUI.containerElement = params.charCounter.charCountContainer;&lt;br /&gt;
+							charCounterUI.valueElement = params.charCounter.charCountElement;&lt;br /&gt;
+							if(params.charCounter.setTextFieldValueFn) {&lt;br /&gt;
+								setTextFieldValueFn = params.charCounter.setTextFieldValueFn;&lt;br /&gt;
+							}						&lt;br /&gt;
+						}&lt;br /&gt;
 					}					&lt;br /&gt;
 				},&lt;br /&gt;
 				&lt;br /&gt;
@@ -304,6 +328,7 @@&lt;br /&gt;
 					var rawCharacterData = getRawCharacterData();&lt;br /&gt;
 					var messageData = parseMessage(rawCharacterData.message,rawCharacterData.count,_maxLength,true);&lt;br /&gt;
 					adjustedCharacterCount = messageData.adjustedCharacterCount;&lt;br /&gt;
+					setCurrentCharCount(rawCharacterData.count);&lt;br /&gt;
 					if (_maxLength &amp;gt; 0)&lt;br /&gt;
 						setOverLimit(messageData.isOverLimit);&lt;br /&gt;
 					setCurrentSegmentCount(messageData.segmentCount);				&lt;br /&gt;
diff -ur /usr/palm/applications/com.palm.app.messaging/app/views/chatview/chatview-scene.html /usr/palm/app-modified/com.palm.app.messaging/app/views/chatview/chatview-scene.html&lt;br /&gt;
--- /usr/palm/applications/com.palm.app.messaging/app/views/chatview/chatview-scene.html	2009-07-18 00:22:14.000000000 -0500&lt;br /&gt;
+++ /usr/palm/app-modified/com.palm.app.messaging/app/views/chatview/chatview-scene.html	2009-07-23 23:16:55.000000000 -0500&lt;br /&gt;
@@ -22,6 +22,10 @@&lt;br /&gt;
 			&amp;lt;div id=&amp;quot;messageContainer&amp;quot; class='palm-row'&amp;gt;&lt;br /&gt;
 				&amp;lt;div class=&amp;quot;palm-row-wrapper textfield-group focused&amp;quot;&amp;gt;&lt;br /&gt;
 					&amp;lt;div class=&amp;quot;title&amp;quot;&amp;gt;&lt;br /&gt;
+						&amp;lt;div id=&amp;quot;charCounterContainer&amp;quot;&amp;gt;&lt;br /&gt;
+							&amp;lt;div id=&amp;quot;charCounter&amp;quot;&amp;gt;&lt;br /&gt;
+							&amp;lt;/div&amp;gt;&lt;br /&gt;
+						&amp;lt;/div&amp;gt;&lt;br /&gt;
 						&amp;lt;div id=&amp;quot;attachmentContainer&amp;quot; style=&amp;quot;display: none;&amp;quot;&amp;gt;&lt;br /&gt;
 							&amp;lt;div id=&amp;quot;cancelAttachment&amp;quot;&amp;gt;&lt;br /&gt;
 							&amp;lt;/div&amp;gt;&lt;br /&gt;
diff -ur /usr/palm/applications/com.palm.app.messaging/app/views/compose/compose-scene.html /usr/palm/app-modified/com.palm.app.messaging/app/views/compose/compose-scene.html&lt;br /&gt;
--- /usr/palm/applications/com.palm.app.messaging/app/views/compose/compose-scene.html	2009-07-18 00:22:14.000000000 -0500&lt;br /&gt;
+++ /usr/palm/app-modified/com.palm.app.messaging/app/views/compose/compose-scene.html	2009-07-23 23:17:14.000000000 -0500&lt;br /&gt;
@@ -6,6 +6,10 @@&lt;br /&gt;
 		&amp;lt;div id=&amp;quot;messageContainer&amp;quot; class='palm-row'&amp;gt;&lt;br /&gt;
 			&amp;lt;div class=&amp;quot;palm-row-wrapper textfield-group focused&amp;quot;&amp;gt;&lt;br /&gt;
 				&amp;lt;div class=&amp;quot;title&amp;quot;&amp;gt;&lt;br /&gt;
+					&amp;lt;div id=&amp;quot;charCounterContainer&amp;quot;&amp;gt;&lt;br /&gt;
+						&amp;lt;div id=&amp;quot;charCounter&amp;quot;&amp;gt;&lt;br /&gt;
+						&amp;lt;/div&amp;gt;&lt;br /&gt;
+					&amp;lt;/div&amp;gt;&lt;br /&gt;
 					&amp;lt;div id=&amp;quot;attachmentContainer&amp;quot; style=&amp;quot;display: none;&amp;quot;&amp;gt;&lt;br /&gt;
 						&amp;lt;div id=&amp;quot;cancelAttachment&amp;quot;&amp;gt;&lt;br /&gt;
 						&amp;lt;/div&amp;gt;&lt;br /&gt;
diff -ur /usr/palm/applications/com.palm.app.messaging/stylesheets/messaging.css /usr/palm/app-modified/com.palm.app.messaging/stylesheets/messaging.css&lt;br /&gt;
--- /usr/palm/applications/com.palm.app.messaging/stylesheets/messaging.css	2009-07-18 00:22:22.000000000 -0500&lt;br /&gt;
+++ /usr/palm/app-modified/com.palm.app.messaging/stylesheets/messaging.css	2009-07-23 23:19:25.000000000 -0500&lt;br /&gt;
@@ -837,6 +837,23 @@&lt;br /&gt;
 #messageContainer.palm-row .icon.right {&lt;br /&gt;
 	height: 61px;&lt;br /&gt;
 }&lt;br /&gt;
+#messageContainer #charCounterContainer {&lt;br /&gt;
+	line-height: 20px;&lt;br /&gt;
+	display:block;&lt;br /&gt;
+	height: 20px;&lt;br /&gt;
+	border-width: 0px 10px 0px 9px;&lt;br /&gt;
+	-webkit-border-image: url(../images/message-segment-badge.png) 0 10 0 9 stretch stretch;&lt;br /&gt;
+	position: absolute;&lt;br /&gt;
+	z-index: 3;&lt;br /&gt;
+	top: 2px;&lt;br /&gt;
+	left: 2px;&lt;br /&gt;
+}&lt;br /&gt;
+#messageContainer #charCounterContainer #charCounter {&lt;br /&gt;
+	font-size: 12px;&lt;br /&gt;
+	font-weight: bold;&lt;br /&gt;
+	color: #679BC2;&lt;br /&gt;
+	margin: 0px -4px 3px -3px;&lt;br /&gt;
+}&lt;br /&gt;
 #messageContainer #attachmentContainer {&lt;br /&gt;
 	position: relative;&lt;br /&gt;
 	margin-top:10px;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Post os1.1 update, you will need to swap in the following for the utilities/CharacterCounter.js section: (mod confirmed working by tcurtin, 7/24/09)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;diff&amp;quot;&amp;gt;&lt;br /&gt;
diff -ur /usr/palm/applications/com.palm.app.messaging/app/utilities/CharacterCounter.js /usr/palm/app-modified/com.palm.app.messaging/app/utilities/CharacterCounter.js&lt;br /&gt;
--- /usr/palm/applications/com.palm.app.messaging/app/utilities/CharacterCounter.js	2009-07-18 00:22:14.000000000 -0500&lt;br /&gt;
+++ /usr/palm/app-modified/com.palm.app.messaging/app/utilities/CharacterCounter.js	2009-07-24 12:20:12.000000000 -0500&lt;br /&gt;
@@ -39,6 +39,11 @@&lt;br /&gt;
                                containerElement: null,&lt;br /&gt;
                                valueElement: null&lt;br /&gt;
                        };&lt;br /&gt;
+                       var charCounterUI = {&lt;br /&gt;
+                               containerElement: null,&lt;br /&gt;
+                               valueElement: null&lt;br /&gt;
+                       };&lt;br /&gt;
+&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                        // TODO: eventually we might want to implement some cleverness that counts&lt;br /&gt;
@@ -51,6 +56,10 @@&lt;br /&gt;
                                var message = textAreaElement.value;&lt;br /&gt;
                                return {count:message.length, message:message};&lt;br /&gt;
                        };&lt;br /&gt;
+                       var charCounterUI = {&lt;br /&gt;
+                               containerElement: null,&lt;br /&gt;
+                               valueElement: null&lt;br /&gt;
+                       };&lt;br /&gt;
&lt;br /&gt;
                        var setOverLimit = function(isOver) {&lt;br /&gt;
                                if (isOver) {&lt;br /&gt;
@@ -185,6 +194,21 @@&lt;br /&gt;
                                }&lt;br /&gt;
                        };&lt;br /&gt;
&lt;br /&gt;
+                       var setCurrentCharCount = function(newCharCount) {&lt;br /&gt;
+                               if(charCounterUI.valueElement)&lt;br /&gt;
+                                       charCounterUI.valueElement.update(newCharCount);&lt;br /&gt;
+                               if(charCounterUI.containerElement) {&lt;br /&gt;
+                                       if (newCharCount == 0) {&lt;br /&gt;
+                                               if (charCounterUI.containerElement.visible())&lt;br /&gt;
+                                                       charCounterUI.containerElement.hide();&lt;br /&gt;
+                                       } else {&lt;br /&gt;
+                                               if (!charCounterUI.containerElement.visible())&lt;br /&gt;
+                                                       charCounterUI.containerElement.show();&lt;br /&gt;
+                                       }&lt;br /&gt;
+                               }&lt;br /&gt;
+                       };&lt;br /&gt;
+&lt;br /&gt;
+&lt;br /&gt;
                        return {&lt;br /&gt;
&lt;br /&gt;
                                init: function(controller,platform,textElement,params) {&lt;br /&gt;
@@ -265,7 +289,13 @@&lt;br /&gt;
                                                                setTextFieldValueFn = params.segmentCounter.setTextFieldValueFn;&lt;br /&gt;
                                                        }&lt;br /&gt;
                                                }&lt;br /&gt;
-&lt;br /&gt;
+                                               if(params.charCounter) {&lt;br /&gt;
+                                                       charCounterUI.containerElement = params.charCounter.charCountContainer;&lt;br /&gt;
+                                                       charCounterUI.valueElement = params.charCounter.charCountElement;&lt;br /&gt;
+                                                       if(params.charCounter.setTextFieldValueFn) {&lt;br /&gt;
+                                                               setTextFieldValueFn = params.charCounter.setTextFieldValueFn;&lt;br /&gt;
+                                                       }&lt;br /&gt;
+                                               }&lt;br /&gt;
                                        }&lt;br /&gt;
                                },&lt;br /&gt;
&lt;br /&gt;
@@ -304,6 +334,7 @@&lt;br /&gt;
                                        var rawCharacterData = getRawCharacterData();&lt;br /&gt;
                                        var messageData = parseMessage(rawCharacterData.message,rawCharacterData.count,_maxLength,true);&lt;br /&gt;
                                        adjustedCharacterCount = messageData.adjustedCharacterCount;&lt;br /&gt;
+                                       setCurrentCharCount(rawCharacterData.count);&lt;br /&gt;
                                        if (_maxLength &amp;gt; 0)&lt;br /&gt;
                                                setOverLimit(messageData.isOverLimit);&lt;br /&gt;
                                        setCurrentSegmentCount(messageData.segmentCount);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
[[Forward_Messages]] will not work when applying this patch. Please take a look into this. -thatdude&lt;br /&gt;
&lt;br /&gt;
If this patch is applied manually it works fine with the [[Forward_Messages]] patch. -NetWhiz&lt;br /&gt;
&lt;br /&gt;
== Acknowledgements ==&lt;br /&gt;
&lt;br /&gt;
HattCzech&lt;/div&gt;</summary>
		<author><name>NetWhiz</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Adding_Timestamps_to_All_Received_Messages&amp;diff=3075</id>
		<title>Adding Timestamps to All Received Messages</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Adding_Timestamps_to_All_Received_Messages&amp;diff=3075"/>
		<updated>2009-07-30T00:43:34Z</updated>

		<summary type="html">&lt;p&gt;NetWhiz: /* Procedure */ Fixed line #'s for webOS 1.1.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction==&lt;br /&gt;
&lt;br /&gt;
A number of users have requested adding timestamps to each message that arrives on the device.&lt;br /&gt;
Palm actually goes out of their way to group messages that have arrived during various time intervals,&lt;br /&gt;
but if you'd prefer to see a timestamp on each message, simply follow the instructions below.&lt;br /&gt;
&lt;br /&gt;
== Procedure==&lt;br /&gt;
&lt;br /&gt;
1. Remount the file system as read/write&lt;br /&gt;
&lt;br /&gt;
2. cd to '''/usr/palm/applications/com.palm.app.messaging/app/controllers/'''&lt;br /&gt;
&lt;br /&gt;
3. Backup '''chatview-assistant.js''' (just to be safe)&lt;br /&gt;
&lt;br /&gt;
4. Open '''chatview-assistant.js''' and comment out the following lines:&lt;br /&gt;
&lt;br /&gt;
 * 1169 (webOS 1.1: '''1242''') - line that starts with: '''if(!ChatFlags.'''&lt;br /&gt;
 * 1177 (webOS 1.1: '''1250''') - line that starts with: '''if(today-msg.'''&lt;br /&gt;
 * 1179 (webOS 1.1: '''1252''') - first closing bracket on its own line: '''}'''&lt;br /&gt;
 * 1180 (webOS 1.1: '''1253''') - second closing bracket on its own line: '''}'''&lt;br /&gt;
&lt;br /&gt;
5. Save the file and exit the editor&lt;br /&gt;
&lt;br /&gt;
6. Remount the file system as read-only&lt;br /&gt;
&lt;br /&gt;
7. Logout of your root session&lt;br /&gt;
&lt;br /&gt;
8. Reboot the device&lt;br /&gt;
&lt;br /&gt;
You should now see a full timestamp on all received messages.&lt;br /&gt;
&lt;br /&gt;
= Add Timestamps to All Messages - another approach =&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The method described above is the easiest way to display message timestamps.  I went a little farther since I didn't want the &amp;quot;Message Sent:&amp;quot; label and I also wanted to format the string a bit more.  While I was at it, I also modified the view for the message text to display as pre-formatted text since text messages are text after all, not html.&lt;br /&gt;
&lt;br /&gt;
== Procedure ==&lt;br /&gt;
&lt;br /&gt;
* same as steps 1 &amp;amp; 2 above&lt;br /&gt;
* save a backup of /usr/palm/applications/com.palm.app.messaging/&lt;br /&gt;
** stylesheets/messaging.css&lt;br /&gt;
** app/views/chatview/message/message-text.html&lt;br /&gt;
** app/controllers/chatview-assistant.js&lt;br /&gt;
* edit stylesheets/messaging.css&lt;br /&gt;
** search for the string 'messageText' and append the following after its style definition&lt;br /&gt;
&lt;br /&gt;
 .messageText pre {&lt;br /&gt;
    font-family: inherit;&lt;br /&gt;
    font-size: inherit;&lt;br /&gt;
    color: inherit;&lt;br /&gt;
 }&lt;br /&gt;
 .timeStamp {&lt;br /&gt;
    font-size: 12px;&lt;br /&gt;
    font-style: italic;&lt;br /&gt;
    color: #1111ff;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
**feel free to change the style to your liking.  I tried using 'white-space: pre-wrap' in the .messageText class but it didn't behave as expected, hence the use of the pre tag.&lt;br /&gt;
* edit app/views/chatview/message/message-text.html&lt;br /&gt;
** change the single line to:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&amp;lt;div class=&amp;quot;messageText&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;#{-messageText}&amp;lt;/pre&amp;gt; #{-errorContent}&amp;lt;span class=&amp;quot;timeStamp&amp;quot;&amp;gt;#{-timeStampText}&amp;lt;/span&amp;lt;/div&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* edit app/controllers/chatview-assistant.js&lt;br /&gt;
** search for the string 'preFormatChatList:' and just below that look for 'var msg = stuff.list[i];'&lt;br /&gt;
** somewhere after that line (within the for loop) add the following:&lt;br /&gt;
 var ts = new Date();&lt;br /&gt;
 ts.setTime(msg.deviceTimeStamp);&lt;br /&gt;
 msg.timeStampText = Mojo.Format.formatDate(ts,'short');&lt;br /&gt;
** note that I used msg.deviceTimeStamp which I believe is when your phone sent/received the message.  If you'd prefer the time it was actually sent by the sender, use msg.timeStamp instead.  while you're in here, you may consider applying the [[Change_Enter_To_Create_Newline_Instead_of_Send_Message|send on return behavior]] changes.&lt;br /&gt;
* restart LunaSysMgr or reboot&lt;br /&gt;
&lt;br /&gt;
be sure to save the files you modified as they could get overwritten on the next sprint update.  better yet, install [[Applying_Patches|quilt]] to manage the diffs as a patch.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Acknowledgements==&lt;br /&gt;
&lt;br /&gt;
Thanks to tk102 and scuba_steve on [http://www.precentral.net/ PreCentral] for the mod.&lt;/div&gt;</summary>
		<author><name>NetWhiz</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Tutorials_Linux_opt_on_loopback&amp;diff=2569</id>
		<title>Tutorials Linux opt on loopback</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Tutorials_Linux_opt_on_loopback&amp;diff=2569"/>
		<updated>2009-07-26T23:45:48Z</updated>

		<summary type="html">&lt;p&gt;NetWhiz: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Do '''NOT''' do this if you want to connect your Pre to your computer in USB or MediaSync mode.&lt;br /&gt;
&lt;br /&gt;
The following commands will move all your optware to an ext3 1GB loopback image that resides on /media/internal.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
dd if=/dev/zero of=/media/internal/optware.img bs=1024 count=1000k&lt;br /&gt;
mkfs.ext3 -F /media/internal/optware.img&lt;br /&gt;
mkdir /tmp/opt&lt;br /&gt;
mount -o loop /media/internal/optware.img  /tmp/opt&lt;br /&gt;
rm -rf /tmp/opt/lost\+found&lt;br /&gt;
mv /opt/* /tmp/opt/&lt;br /&gt;
umount /opt&lt;br /&gt;
umount /var/opt&lt;br /&gt;
mount -o loop /media/internal/optware.img /opt/&lt;br /&gt;
echo '/media/internal/optware.img /opt ext3 defaults,loop 0 0' &amp;gt;&amp;gt;/etc/fstab&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>NetWhiz</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Graphical_Shell_with_ajaxPHPterm&amp;diff=2487</id>
		<title>Graphical Shell with ajaxPHPterm</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Graphical_Shell_with_ajaxPHPterm&amp;diff=2487"/>
		<updated>2009-07-26T20:07:38Z</updated>

		<summary type="html">&lt;p&gt;NetWhiz: Updated Graphical_Shell_with_WebShell link&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This article will allow you to use your web browser on your Pre for a terminal using thttp-php and ajaxphpterm. You should have already rooted your Pre and installed an SSH server, and enabled sudo.&lt;br /&gt;
&lt;br /&gt;
1. SSH into your Pre.&lt;br /&gt;
&lt;br /&gt;
2. Install php-thttpd&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
root@castle:/# /opt/bin/ipkg-opt install php-thttpd&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3. Configure php-thttpd&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
root@castle:/# cat &amp;gt; /opt/etc/thttpd.conf &lt;br /&gt;
dir=/&lt;br /&gt;
port=8080&lt;br /&gt;
user=root&lt;br /&gt;
chroot&lt;br /&gt;
nosymlink&lt;br /&gt;
novhost&lt;br /&gt;
logfile=/opt/var/log/thttpd.log&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4. Configure php-thttpd service&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
root@castle:/# cat &amp;gt; /etc/event.d/optware-thttpd &lt;br /&gt;
description &amp;quot;thttpd Daemon for WebOS&amp;quot;&lt;br /&gt;
author &amp;quot;Danny Clark&amp;quot;&lt;br /&gt;
version 1.0&lt;br /&gt;
&lt;br /&gt;
# don't start until the WebOS finishes it's normal boot &lt;br /&gt;
# that way no delay is added to the GUI startup&lt;br /&gt;
start on stopped finish&lt;br /&gt;
stop on runlevel [!2]&lt;br /&gt;
&lt;br /&gt;
# run the daemon&lt;br /&gt;
exec /opt/sbin/thttpd -C /opt/etc/thttpd.conf -D&lt;br /&gt;
respawn&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5. Download and install ajaxPHPterm. Note thttpd requires php files to be mode 644 and executable files to be 755; change permissions where needed after the install.&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
cd /opt/share/www&lt;br /&gt;
wget http://voxel.dl.sourceforge.net/sourceforge/ajaxphpterm/ajaxphpterm.zip&lt;br /&gt;
unzip ajaxphpterm.zip&lt;br /&gt;
rm ajaxphpterm.zip&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
6. Restart thttpd-php&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
/sbin/initctl stop optware-thttpd&lt;br /&gt;
/sbin/initctl start optware-thttpd&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
7. Open up the pre's web browser and go to&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
http://127.0.0.1:8080/opt/share/www/ajaxphpterm/index.php&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This needs verification, and probably more detail in some places (it's working on my device, but text is mostly from IRC conversation).&lt;br /&gt;
&lt;br /&gt;
This is obviously not that secure at all. For one thing, if you change your firewall rules device is wide open. But it's the first way I've found to get access to a local shell that works enough to enter commands and get results ([[Graphical_Shell_with_WebShell]] doesn't work for me for some reason).&lt;br /&gt;
&lt;br /&gt;
This procedure, or just rooting your pre and installing stuff, may cause some [[rooted-pre-issues]]; read that page to see if those would be acceptable trade-offs to you.&lt;br /&gt;
&lt;br /&gt;
The display size can be made more sensible by adding the following in the head section of index.php:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
&amp;lt;meta name=&amp;quot;viewport&amp;quot; content=&amp;quot;width=device-width&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Also note that the &amp;quot;cd&amp;quot; command does not work (I think because the shell commands are executed one at a time, eg in separate processes for each command line followed by a return), but you can access and run files in any path - just treat the command line like shell commands in a GNU Make file :-)&lt;br /&gt;
&lt;br /&gt;
Since the shell is so limited and does not support curses / ncurses or any other kind of full screen mode, it's best used just to execute scripts that have been previously created or modified with a [[text-editor]].&lt;/div&gt;</summary>
		<author><name>NetWhiz</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Graphical_Shell_with_WebShell&amp;diff=2478</id>
		<title>Graphical Shell with WebShell</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Graphical_Shell_with_WebShell&amp;diff=2478"/>
		<updated>2009-07-26T16:13:19Z</updated>

		<summary type="html">&lt;p&gt;NetWhiz: Does not seem to work with webOS 1.1.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Most people are reporting that [[Graphical_Shell_with_ajaxPHPterm]] works better than this method.  You might want to try that one first ...&lt;br /&gt;
&lt;br /&gt;
This article will allow you to use your web browser on your Pre for a terminal. You should have already rooted your Pre and installed an SSH server, enabled sudo and set up the optware repositories.&lt;br /&gt;
&lt;br /&gt;
1. SSH into your Pre.&lt;br /&gt;
2. Download Webshell:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
wget http://web-shell.googlecode.com/files/WebShell-0.9.6.zip&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
3. Install Python:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
sudo /opt/bin/ipkg-opt install python&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
4. Extract the contents of WebShell-0.9.6.zip:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
unzip WebShell-0.9.6.zip&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
5. Generate a server certificate:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
cd WebShell-0.9.6&lt;br /&gt;
sh ./make_certificate.sh&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
6. Move WebShell to /opt/share/webshell:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
cd ..&lt;br /&gt;
sudo mv WebShell-0.9.6/ /opt/share/webshell&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
7. Create an upstart script &amp;quot;/etc/event.d/webos-webshell&amp;quot; with the following contents:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
start on stopped finish&lt;br /&gt;
stop on runlevel [!2]&lt;br /&gt;
&lt;br /&gt;
console none&lt;br /&gt;
&lt;br /&gt;
respawn&lt;br /&gt;
&lt;br /&gt;
exec /opt/bin/python /opt/share/webshell/webshell.py -c &amp;quot;/opt/bin/ssh -p 222 -l $USER localhost&amp;quot; --ssl-disable&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
where $USER is replaced by your user name.&lt;br /&gt;
&lt;br /&gt;
8. Restart the Pre.&lt;br /&gt;
&lt;br /&gt;
9. Open up your web browser and go to&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
http://127.0.0.1:8022&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
10. Type in your password and you now have a shell. You can run any commands you want now directly on your phone.&lt;br /&gt;
&lt;br /&gt;
'''Note''' If it looks like you are seeing a bunch of text flash at the top of the screen, rotate your phone into Landscape mode, hit the enter key a bunch of times.  You will either be able to see the error and can fix it through your version of SSH or you will get a disconnection message.  If you do get a disconnected message, hit Refresh and try to login.  It should start working then. &lt;br /&gt;
&lt;br /&gt;
'''Note''' Eventually there will be a way to disable the auto-text functions (automatic caps especially).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Verified to work as typed by optik678 and hopspitfire.&lt;br /&gt;
&lt;br /&gt;
- webOS 1.1: Can not get this to work with the new webOS. Same error over and over:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
'import site' failed; use -v for traceback&lt;br /&gt;
Traceback (most recent call last):&lt;br /&gt;
  File &amp;quot;/opt/share/webshell/webshell.py&amp;quot;, line 8, in &amp;lt;module&amp;gt;&lt;br /&gt;
    import array, time, glob, optparse, random, re&lt;br /&gt;
  File &amp;quot;/opt/lib/python2.5/glob.py&amp;quot;, line 3, in &amp;lt;module&amp;gt;&lt;br /&gt;
    import os&lt;br /&gt;
  File &amp;quot;/opt/lib/python2.5/os.py&amp;quot;, line 694, in &amp;lt;module&amp;gt;&lt;br /&gt;
    import copy_reg as _copy_reg&lt;br /&gt;
  File &amp;quot;/opt/lib/python2.5/copy_reg.py&amp;quot;, line 7, in &amp;lt;module&amp;gt;&lt;br /&gt;
    from types import ClassType as _ClassType&lt;br /&gt;
ImportError: No module named types&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>NetWhiz</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Patch_Email_Enable_Landscape_Viewing&amp;diff=2289</id>
		<title>Patch Email Enable Landscape Viewing</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Patch_Email_Enable_Landscape_Viewing&amp;diff=2289"/>
		<updated>2009-07-25T16:30:36Z</updated>

		<summary type="html">&lt;p&gt;NetWhiz: /* Notes */ Update compose-assistant.js note for webOS 1.1.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Preamble==&lt;br /&gt;
&lt;br /&gt;
You will need write permissions to the file system on your Pre to apply this patch.&lt;br /&gt;
&lt;br /&gt;
To get write persmissions execute:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;rootfs_open -w&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After you've made the changes below, remount the file system as read-only:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;mount -o remount,ro /&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Procedure==&lt;br /&gt;
&lt;br /&gt;
Enabling rotation in email is trivial. Whenever you rotate the device, the system calls the orientationChanged function of the app. There's already one defined in email, but for some reason it does nothing. You can enable rotation by applying the following patches.&lt;br /&gt;
&lt;br /&gt;
NOTE: The root of the patches is /usr/palm/applications/com.palm.app.email/&lt;br /&gt;
&lt;br /&gt;
=== app/controllers/list-assistant.js===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
--- list-assistant.js_2009-06-27	Sat Jun 27 19:19:19 2009&lt;br /&gt;
+++ list-assistant.js	Sat Jun 27 20:03:19 2009&lt;br /&gt;
@@ -27,6 +27,9 @@&lt;br /&gt;
 				{label:$L('Update'), icon:'sync', command:'sync'}&lt;br /&gt;
 			]};&lt;br /&gt;
 	this.controller.setupWidget(Mojo.Menu.commandMenu, undefined, this.cmdMenuModel);&lt;br /&gt;
+	&lt;br /&gt;
+	// enable free orientation&lt;br /&gt;
+	this.controller.window.PalmSystem.setWindowOrientation(&amp;quot;free&amp;quot;);&lt;br /&gt;
   },&lt;br /&gt;
 &lt;br /&gt;
   // NOTE: this is called by app_scene's _setup function&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== app/controllers/compose-assistant.js===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
--- compose-assistant.js_2009-06-27	Sat Jun 27 19:21:43 2009&lt;br /&gt;
+++ compose-assistant.js	Sat Jun 27 20:03:45 2009&lt;br /&gt;
@@ -178,6 +178,9 @@&lt;br /&gt;
 &lt;br /&gt;
 		// Delayed a little, since we want the header part of render as quickly as possible&lt;br /&gt;
 		ComposeAssistant.onLoad.defer(this.controller, this.email);&lt;br /&gt;
+		&lt;br /&gt;
+		// enable free orientation&lt;br /&gt;
+		this.controller.window.PalmSystem.setWindowOrientation(&amp;quot;free&amp;quot;);&lt;br /&gt;
 	},&lt;br /&gt;
 &lt;br /&gt;
 	cleanup: function() {&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== app/controllers/accounts-assistant.js===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
--- accounts-assistant.js_2009-06-27	Sat Jun 27 19:29:47 2009&lt;br /&gt;
+++ accounts-assistant.js	Sat Jun 27 20:01:28 2009&lt;br /&gt;
@@ -51,6 +51,9 @@&lt;br /&gt;
 		EmailAppDepot.depot.isShowFavorites(AccountsAssistant.kFavoriteFoldersAccountID, this.depotGetFavExpanded.bind(this));&lt;br /&gt;
 &lt;br /&gt;
 		this.controller.listen(this.controller.sceneElement, Mojo.Event.keypress, this.keypressHandler.bind(this));&lt;br /&gt;
+		&lt;br /&gt;
+		// enable free orientation                                                 &lt;br /&gt;
+                this.controller.window.PalmSystem.setWindowOrientation(&amp;quot;free&amp;quot;);&lt;br /&gt;
 	},&lt;br /&gt;
 &lt;br /&gt;
 	cleanup: function() {&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Notes==&lt;br /&gt;
&lt;br /&gt;
Credit goes to jblebrun for the original hack.&lt;br /&gt;
&lt;br /&gt;
Seems that the menu disappears in landscape mode and that the orientation mode carries over from one part of the app to the other as you move to a message or back to the message list or account list. This is especially weird in the compose screen since the menu has some needed functionality in it&lt;br /&gt;
~ FXDemolisher&lt;br /&gt;
&lt;br /&gt;
Curious item found in accounts-assitant.js. There seems to be an orientationString variable in the controller that is linked to some kind of hack if you type a specific string while having the account(folder) list open. Will investigate further. &lt;br /&gt;
&lt;br /&gt;
UPDATE: Seems that typing &amp;quot;RocknRollHax&amp;quot; (see ./app/controllers/accounts-assistant.js)  in the accounts list window will cause the email app to go into 'free' orientation mode. Looks like its an easier way to perform orientation changes instead of explicitly calling setWindowOrientation whenever the orientation changes.&lt;br /&gt;
&lt;br /&gt;
Alternate to RocknRollHax:  In accounts-assistant.js, change key word in line 106 to 'wide' or whatever you want.  Change string length in line 104 to num characters of your new key word. - xorg&lt;br /&gt;
&lt;br /&gt;
- FXDemolisher&lt;br /&gt;
&lt;br /&gt;
7/25/2009 With webOS 1.1 you can type &amp;quot;wide&amp;quot; to activate this feature w/o editing any files. However it is not persistent between application launches. &lt;br /&gt;
&lt;br /&gt;
Only the '''accounts-assistant.js''' file needs to be patched in webOS 1.1. The '''compose-assistant.js''' edit needs work as it currently does not work in webOS 1.1.&lt;br /&gt;
&lt;br /&gt;
-NetWhiz&lt;/div&gt;</summary>
		<author><name>NetWhiz</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Patch_Email_Enable_Landscape_Viewing&amp;diff=2287</id>
		<title>Patch Email Enable Landscape Viewing</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Patch_Email_Enable_Landscape_Viewing&amp;diff=2287"/>
		<updated>2009-07-25T16:21:45Z</updated>

		<summary type="html">&lt;p&gt;NetWhiz: Updated patch requirements for webOS 1.1.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Preamble==&lt;br /&gt;
&lt;br /&gt;
You will need write permissions to the file system on your Pre to apply this patch.&lt;br /&gt;
&lt;br /&gt;
To get write persmissions execute:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;rootfs_open -w&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After you've made the changes below, remount the file system as read-only:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;mount -o remount,ro /&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Procedure==&lt;br /&gt;
&lt;br /&gt;
Enabling rotation in email is trivial. Whenever you rotate the device, the system calls the orientationChanged function of the app. There's already one defined in email, but for some reason it does nothing. You can enable rotation by applying the following patches.&lt;br /&gt;
&lt;br /&gt;
NOTE: The root of the patches is /usr/palm/applications/com.palm.app.email/&lt;br /&gt;
&lt;br /&gt;
=== app/controllers/list-assistant.js===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
--- list-assistant.js_2009-06-27	Sat Jun 27 19:19:19 2009&lt;br /&gt;
+++ list-assistant.js	Sat Jun 27 20:03:19 2009&lt;br /&gt;
@@ -27,6 +27,9 @@&lt;br /&gt;
 				{label:$L('Update'), icon:'sync', command:'sync'}&lt;br /&gt;
 			]};&lt;br /&gt;
 	this.controller.setupWidget(Mojo.Menu.commandMenu, undefined, this.cmdMenuModel);&lt;br /&gt;
+	&lt;br /&gt;
+	// enable free orientation&lt;br /&gt;
+	this.controller.window.PalmSystem.setWindowOrientation(&amp;quot;free&amp;quot;);&lt;br /&gt;
   },&lt;br /&gt;
 &lt;br /&gt;
   // NOTE: this is called by app_scene's _setup function&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== app/controllers/compose-assistant.js===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
--- compose-assistant.js_2009-06-27	Sat Jun 27 19:21:43 2009&lt;br /&gt;
+++ compose-assistant.js	Sat Jun 27 20:03:45 2009&lt;br /&gt;
@@ -178,6 +178,9 @@&lt;br /&gt;
 &lt;br /&gt;
 		// Delayed a little, since we want the header part of render as quickly as possible&lt;br /&gt;
 		ComposeAssistant.onLoad.defer(this.controller, this.email);&lt;br /&gt;
+		&lt;br /&gt;
+		// enable free orientation&lt;br /&gt;
+		this.controller.window.PalmSystem.setWindowOrientation(&amp;quot;free&amp;quot;);&lt;br /&gt;
 	},&lt;br /&gt;
 &lt;br /&gt;
 	cleanup: function() {&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== app/controllers/accounts-assistant.js===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
--- accounts-assistant.js_2009-06-27	Sat Jun 27 19:29:47 2009&lt;br /&gt;
+++ accounts-assistant.js	Sat Jun 27 20:01:28 2009&lt;br /&gt;
@@ -51,6 +51,9 @@&lt;br /&gt;
 		EmailAppDepot.depot.isShowFavorites(AccountsAssistant.kFavoriteFoldersAccountID, this.depotGetFavExpanded.bind(this));&lt;br /&gt;
 &lt;br /&gt;
 		this.controller.listen(this.controller.sceneElement, Mojo.Event.keypress, this.keypressHandler.bind(this));&lt;br /&gt;
+		&lt;br /&gt;
+		// enable free orientation                                                 &lt;br /&gt;
+                this.controller.window.PalmSystem.setWindowOrientation(&amp;quot;free&amp;quot;);&lt;br /&gt;
 	},&lt;br /&gt;
 &lt;br /&gt;
 	cleanup: function() {&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Notes==&lt;br /&gt;
&lt;br /&gt;
Credit goes to jblebrun for the original hack.&lt;br /&gt;
&lt;br /&gt;
Seems that the menu disappears in landscape mode and that the orientation mode carries over from one part of the app to the other as you move to a message or back to the message list or account list. This is especially weird in the compose screen since the menu has some needed functionality in it&lt;br /&gt;
~ FXDemolisher&lt;br /&gt;
&lt;br /&gt;
Curious item found in accounts-assitant.js. There seems to be an orientationString variable in the controller that is linked to some kind of hack if you type a specific string while having the account(folder) list open. Will investigate further. &lt;br /&gt;
&lt;br /&gt;
UPDATE: Seems that typing &amp;quot;RocknRollHax&amp;quot; (see ./app/controllers/accounts-assistant.js)  in the accounts list window will cause the email app to go into 'free' orientation mode. Looks like its an easier way to perform orientation changes instead of explicitly calling setWindowOrientation whenever the orientation changes.&lt;br /&gt;
&lt;br /&gt;
Alternate to RocknRollHax:  In accounts-assistant.js, change key word in line 106 to 'wide' or whatever you want.  Change string length in line 104 to num characters of your new key word. - xorg&lt;br /&gt;
&lt;br /&gt;
- FXDemolisher&lt;br /&gt;
&lt;br /&gt;
7/25/2009 With webOS 1.1 you can type &amp;quot;wide&amp;quot; to activate this feature w/o editing any files. However it is not persistent between application launches. &lt;br /&gt;
&lt;br /&gt;
Only the '''accounts-assistant.js''' file needs to be patched in webOS 1.1. &lt;br /&gt;
&lt;br /&gt;
-NetWhiz&lt;/div&gt;</summary>
		<author><name>NetWhiz</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Patch_Email_Enable_Landscape_Viewing&amp;diff=2286</id>
		<title>Patch Email Enable Landscape Viewing</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Patch_Email_Enable_Landscape_Viewing&amp;diff=2286"/>
		<updated>2009-07-25T16:11:33Z</updated>

		<summary type="html">&lt;p&gt;NetWhiz: Removed superfluous comments.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Preamble==&lt;br /&gt;
&lt;br /&gt;
You will need write permissions to the file system on your Pre to apply this patch.&lt;br /&gt;
&lt;br /&gt;
To get write persmissions execute:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;rootfs_open -w&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After you've made the changes below, remount the file system as read-only:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;mount -o remount,ro /&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Procedure==&lt;br /&gt;
&lt;br /&gt;
Enabling rotation in email is trivial. Whenever you rotate the device, the system calls the orientationChanged function of the app. There's already one defined in email, but for some reason it does nothing. You can enable rotation by applying the following patches.&lt;br /&gt;
&lt;br /&gt;
NOTE: The root of the patches is /usr/palm/applications/com.palm.app.email/&lt;br /&gt;
&lt;br /&gt;
=== app/controllers/list-assistant.js===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
--- list-assistant.js_2009-06-27	Sat Jun 27 19:19:19 2009&lt;br /&gt;
+++ list-assistant.js	Sat Jun 27 20:03:19 2009&lt;br /&gt;
@@ -27,6 +27,9 @@&lt;br /&gt;
 				{label:$L('Update'), icon:'sync', command:'sync'}&lt;br /&gt;
 			]};&lt;br /&gt;
 	this.controller.setupWidget(Mojo.Menu.commandMenu, undefined, this.cmdMenuModel);&lt;br /&gt;
+	&lt;br /&gt;
+	// enable free orientation&lt;br /&gt;
+	this.controller.window.PalmSystem.setWindowOrientation(&amp;quot;free&amp;quot;);&lt;br /&gt;
   },&lt;br /&gt;
 &lt;br /&gt;
   // NOTE: this is called by app_scene's _setup function&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== app/controllers/compose-assistant.js===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
--- compose-assistant.js_2009-06-27	Sat Jun 27 19:21:43 2009&lt;br /&gt;
+++ compose-assistant.js	Sat Jun 27 20:03:45 2009&lt;br /&gt;
@@ -178,6 +178,9 @@&lt;br /&gt;
 &lt;br /&gt;
 		// Delayed a little, since we want the header part of render as quickly as possible&lt;br /&gt;
 		ComposeAssistant.onLoad.defer(this.controller, this.email);&lt;br /&gt;
+		&lt;br /&gt;
+		// enable free orientation&lt;br /&gt;
+		this.controller.window.PalmSystem.setWindowOrientation(&amp;quot;free&amp;quot;);&lt;br /&gt;
 	},&lt;br /&gt;
 &lt;br /&gt;
 	cleanup: function() {&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== app/controllers/accounts-assistant.js===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
--- accounts-assistant.js_2009-06-27	Sat Jun 27 19:29:47 2009&lt;br /&gt;
+++ accounts-assistant.js	Sat Jun 27 20:01:28 2009&lt;br /&gt;
@@ -51,6 +51,9 @@&lt;br /&gt;
 		EmailAppDepot.depot.isShowFavorites(AccountsAssistant.kFavoriteFoldersAccountID, this.depotGetFavExpanded.bind(this));&lt;br /&gt;
 &lt;br /&gt;
 		this.controller.listen(this.controller.sceneElement, Mojo.Event.keypress, this.keypressHandler.bind(this));&lt;br /&gt;
+		&lt;br /&gt;
+		// enable free orientation                                                 &lt;br /&gt;
+                this.controller.window.PalmSystem.setWindowOrientation(&amp;quot;free&amp;quot;);&lt;br /&gt;
 	},&lt;br /&gt;
 &lt;br /&gt;
 	cleanup: function() {&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Notes==&lt;br /&gt;
&lt;br /&gt;
Credit goes to jblebrun for the original hack.&lt;br /&gt;
&lt;br /&gt;
Seems that the menu disappears in landscape mode and that the orientation mode carries over from one part of the app to the other as you move to a message or back to the message list or account list. This is especially weird in the compose screen since the menu has some needed functionality in it&lt;br /&gt;
~ FXDemolisher&lt;br /&gt;
&lt;br /&gt;
Curious item found in accounts-assitant.js. There seems to be an orientationString variable in the controller that is linked to some kind of hack if you type a specific string while having the account(folder) list open. Will investigate further. &lt;br /&gt;
&lt;br /&gt;
UPDATE: Seems that typing &amp;quot;RocknRollHax&amp;quot; (see ./app/controllers/accounts-assistant.js)  in the accounts list window will cause the email app to go into 'free' orientation mode. Looks like its an easier way to perform orientation changes instead of explicitly calling setWindowOrientation whenever the orientation changes.&lt;br /&gt;
&lt;br /&gt;
Alternate to RocknRollHax:  In accounts-assistant.js, change key word in line 106 to 'wide' or whatever you want.  Change string length in line 104 to num characters of your new key word. - xorg&lt;br /&gt;
&lt;br /&gt;
- FXDemolisher&lt;br /&gt;
&lt;br /&gt;
7/25/2009 With webOS 1.1 you can type &amp;quot;wide&amp;quot; to activate this feature w/o editing any files. However it is not persistent between application launches. Applying the above patches does work in webOS 1.1. &lt;br /&gt;
&lt;br /&gt;
-NetWhiz&lt;/div&gt;</summary>
		<author><name>NetWhiz</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Messaging_Mods&amp;diff=2084</id>
		<title>Messaging Mods</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Messaging_Mods&amp;diff=2084"/>
		<updated>2009-07-24T17:09:34Z</updated>

		<summary type="html">&lt;p&gt;NetWhiz: /* Procedure */ - Added new lines #'s for webOS 1.1&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;All files are located in '''/usr/palm/applications/com.palm.app.messaging/'''&lt;br /&gt;
&lt;br /&gt;
= Add Timestamps to All Messages =&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
A number of users have requested adding timestamps to each message that arrives on the device.&lt;br /&gt;
Palm actually goes out of their way to group messages that have arrived during various time intervals,&lt;br /&gt;
but if you'd prefer to see a timestamp on each message, simply follow the instructions below.&lt;br /&gt;
&lt;br /&gt;
== Procedure ==&lt;br /&gt;
&lt;br /&gt;
# [[Portal:Accessing_Linux|Gain root access to your device]]&lt;br /&gt;
# Remount the file system as read/write&lt;br /&gt;
# cd to '''/usr/palm/applications/com.palm.app.messaging/app/controllers/'''&lt;br /&gt;
# Backup '''chatview-assistant.js''' (just to be safe)&lt;br /&gt;
# Open '''chatview-assistant.js''' and comment out the following lines:&lt;br /&gt;
#* 1169 (webOS 1.1: '''1242''') - line that starts with: '''if(!ChatFlags.'''&lt;br /&gt;
#* 1177 (webOS 1.1: '''1250''') - line that starts with: '''if(today-msg.'''&lt;br /&gt;
#* 1179 (webOS 1.1: '''1252''') - first closing bracket on its own line: '''}'''&lt;br /&gt;
#* 1180 (webOS 1.1: '''1253''') - second closing bracket on its own line: '''}'''&lt;br /&gt;
# Save the file and exit the editor&lt;br /&gt;
# Remount the file system as read-only&lt;br /&gt;
# Logout of your root session&lt;br /&gt;
# Reboot the device&lt;br /&gt;
&lt;br /&gt;
You should now see a full timestamp on all received messages.&lt;br /&gt;
&lt;br /&gt;
== Acknowledgements ==&lt;br /&gt;
&lt;br /&gt;
Thanks to [[User:tk102|tk102]] and [[User:scuba_steve|scuba_steve]] on [http://www.precentral.net/  PreCentral] for the mod.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
= New Card For Each Conversation =&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The message app can be a pain when you have multiple conversations going on. You often have to swipe back and then pick someone else. &lt;br /&gt;
It gets annoying fast. This modification modifies the messaging application so that a new card is created whenever you click into a conversation.&lt;br /&gt;
&lt;br /&gt;
== Procedure ==&lt;br /&gt;
&lt;br /&gt;
Edit '''/usr/palm/applications/com.palm.app.messaging/app/controllers/listview-assistant.js''' and replace the launchChatView function with the following function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
launchChatView: function(chatThreadId) {&lt;br /&gt;
    //Need to jump to that stage if it exists&lt;br /&gt;
    var stageController = Mojo.Controller.appController.getStageController(&amp;quot;messaging&amp;quot;+chatThreadId);&lt;br /&gt;
        if (stageController) {&lt;br /&gt;
            stageController.activate();&lt;br /&gt;
            return;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
    var params = {name: 'messaging' + chatThreadId,&lt;br /&gt;
            lightweight: Mojo.Controller.appInfo.lwStages&lt;br /&gt;
    };&lt;br /&gt;
&lt;br /&gt;
    var callback = function(controller) {&lt;br /&gt;
        controller.pushScene('chatview',chatThreadId,{&lt;br /&gt;
                    focusWindow: true&lt;br /&gt;
                });        &lt;br /&gt;
    };&lt;br /&gt;
&lt;br /&gt;
    Mojo.Controller.getAppController().createStageWithCallback(params, callback); //doesnt create ifit exists sooo&lt;br /&gt;
  },&lt;br /&gt;
&lt;br /&gt;
  clearListBadgeForChatThreadId: function(chatThreadId) {&lt;br /&gt;
    var badgeContainers = [&amp;quot;buddyBageContainer&amp;quot;,&amp;quot;historyBageContainer&amp;quot;];&lt;br /&gt;
    var listItem;&lt;br /&gt;
    for (var i = 0; i &amp;lt; badgeContainers.length; i++) {&lt;br /&gt;
        listItem = this.controller.get(badgeContainers[i] + chatThreadId);&lt;br /&gt;
        if (listItem &amp;amp;&amp;amp; !listItem.hasClassName('hide-unread-count')) {&lt;br /&gt;
            listItem.addClassName('hide-unread-count');&lt;br /&gt;
        }&lt;br /&gt;
    }    &lt;br /&gt;
  },&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now in '''/usr/palm/applications/com.palm.app.messaging/app/controllers/chatview-assistant.js''', comment out lines 246 and 247 (webOS 1.1: comment out lines '''289''' and '''290''').&lt;br /&gt;
This change will ensure that if you use the &amp;quot;back gesture&amp;quot; in a chat, the application doesn't bring you back to the conversation list...or do anything else.&lt;br /&gt;
&lt;br /&gt;
To &amp;quot;comment out&amp;quot; a line, add // at the beginning. Example:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
printf(&amp;quot;This is code&amp;quot;);&lt;br /&gt;
//printf(&amp;quot;This is commented out&amp;quot;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Concerns ==&lt;br /&gt;
There is some delay in creating the new cards. I'm not sure why though.&lt;br /&gt;
As stated above, the cards are only opened when you click into the conversation.  Responding to a notification will result in the reuse of the buddy list window, and you have disabled the back gesture.&lt;br /&gt;
&lt;br /&gt;
== Acknolwedgements ==&lt;br /&gt;
&lt;br /&gt;
Thanks to [[User:mikedg|mikedg]] for the mod.&lt;br /&gt;
&lt;br /&gt;
[[User:chris_phelps|chris_phelps]] is continuing to work on this modification to get it working more completely.&lt;br /&gt;
The first step is to clean up the other launchChatNNN functionality in app-assistant.js which accepts Luna System calls from the notification dashboard items which are created when a new message is received on the phone. These code modifications are being tested currently, and will be posted when we figure out how to clear the new message counters in the main listview-assistant.js.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
= Character Counter =&lt;br /&gt;
&lt;br /&gt;
[[Image:Messaging_CharacterCounter.jpg|border|right|Character Counter]]&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
One of the features I liked about my old Treo was the character counter built-in to the messaging application. I thought it would be useful on the Pre, so I modified the messaging application to show the current character count. I made this a separate page from the other modifications because it requires many code changes. Maybe the other messaging modifications could be rolled into this page as well.&lt;br /&gt;
&lt;br /&gt;
== Procedure ==&lt;br /&gt;
&lt;br /&gt;
Run the following commands:&lt;br /&gt;
&lt;br /&gt;
''In this example, I have the patch file located in my home directory under '''patches'''''&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd /&lt;br /&gt;
sudo patch -p0 --backup-if-mismatch &amp;lt; ~/patches/charcounter.patch&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is what you should see if it ran properly:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
patching file /usr/palm/applications/com.palm.app.messaging/app/controllers/chatview-assistant.js&lt;br /&gt;
patching file /usr/palm/applications/com.palm.app.messaging/app/controllers/compose-assistant.js&lt;br /&gt;
patching file /usr/palm/applications/com.palm.app.messaging/app/utilities/CharacterCounter.js&lt;br /&gt;
patching file /usr/palm/applications/com.palm.app.messaging/app/views/chatview/chatview-scene.html&lt;br /&gt;
patching file /usr/palm/applications/com.palm.app.messaging/app/views/compose/compose-scene.html&lt;br /&gt;
patching file /usr/palm/applications/com.palm.app.messaging/stylesheets/messaging.css&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These modifications will require LunaSysMgr to be restarted. A rescan will not work. After you've run the commands above, run one more command:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
pkill LunaSysMgr&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== charcounter.patch ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;diff&amp;quot;&amp;gt;&lt;br /&gt;
diff -ur /usr/palm/applications/com.palm.app.messaging/app/controllers/chatview-assistant.js /usr/palm/app-modified/com.palm.app.messaging/app/controllers/chatview-assistant.js&lt;br /&gt;
--- /usr/palm/applications/com.palm.app.messaging/app/controllers/chatview-assistant.js	2009-07-18 00:22:14.000000000 -0500&lt;br /&gt;
+++ /usr/palm/app-modified/com.palm.app.messaging/app/controllers/chatview-assistant.js	2009-07-23 23:13:19.000000000 -0500&lt;br /&gt;
@@ -160,6 +160,11 @@&lt;br /&gt;
 				segmentCountContainer: this.controller.get('segmentCounterContainer'),&lt;br /&gt;
 				segmentCountElement: this.controller.get('segmentCounter'),&lt;br /&gt;
 				setTextFieldValueFn: this.setTextFieldValue.bind(this)&lt;br /&gt;
+			},&lt;br /&gt;
+			charCounter: {&lt;br /&gt;
+				charCountContainer: this.controller.get('charCounterContainer'),&lt;br /&gt;
+				charCountElement: this.controller.get('charCounter'),&lt;br /&gt;
+				setTextFieldValueFn: this.setTextFieldValue.bind(this)&lt;br /&gt;
 			}&lt;br /&gt;
 		};&lt;br /&gt;
 &lt;br /&gt;
diff -ur /usr/palm/applications/com.palm.app.messaging/app/controllers/compose-assistant.js /usr/palm/app-modified/com.palm.app.messaging/app/controllers/compose-assistant.js&lt;br /&gt;
--- /usr/palm/applications/com.palm.app.messaging/app/controllers/compose-assistant.js	2009-07-18 00:22:14.000000000 -0500&lt;br /&gt;
+++ /usr/palm/app-modified/com.palm.app.messaging/app/controllers/compose-assistant.js	2009-07-23 23:14:11.000000000 -0500&lt;br /&gt;
@@ -140,6 +140,11 @@&lt;br /&gt;
 			segmentCountContainer: this.controller.get('segmentCounterContainer'),&lt;br /&gt;
 			segmentCountElement: this.controller.get('segmentCounter'),&lt;br /&gt;
 			setTextFieldValueFn: this.setTextFieldValue.bind(this)&lt;br /&gt;
+		},&lt;br /&gt;
+		charCounter: {&lt;br /&gt;
+			charCountContainer: this.controller.get('charCounterContainer'),&lt;br /&gt;
+			charCountElement: this.controller.get('charCounter'),&lt;br /&gt;
+			setTextFieldValueFn: this.setTextFieldValue.bind(this)&lt;br /&gt;
 		}&lt;br /&gt;
 	};&lt;br /&gt;
 &lt;br /&gt;
diff -ur /usr/palm/applications/com.palm.app.messaging/app/utilities/CharacterCounter.js /usr/palm/app-modified/com.palm.app.messaging/app/utilities/CharacterCounter.js&lt;br /&gt;
--- /usr/palm/applications/com.palm.app.messaging/app/utilities/CharacterCounter.js	2009-07-18 00:22:14.000000000 -0500&lt;br /&gt;
+++ /usr/palm/app-modified/com.palm.app.messaging/app/utilities/CharacterCounter.js	2009-07-23 23:47:32.000000000 -0500&lt;br /&gt;
@@ -39,6 +39,10 @@&lt;br /&gt;
 				containerElement: null,&lt;br /&gt;
 				valueElement: null&lt;br /&gt;
 			};&lt;br /&gt;
+			var charCounterUI = {&lt;br /&gt;
+				containerElement: null,&lt;br /&gt;
+				valueElement: null&lt;br /&gt;
+			};&lt;br /&gt;
 			&lt;br /&gt;
 						&lt;br /&gt;
 			// TODO: eventually we might want to implement some cleverness that counts&lt;br /&gt;
@@ -185,6 +189,20 @@&lt;br /&gt;
 				}&lt;br /&gt;
 			};&lt;br /&gt;
 			&lt;br /&gt;
+			var setCurrentCharCount = function(newCharCount) {&lt;br /&gt;
+				if(charCounterUI.valueElement)&lt;br /&gt;
+					charCounterUI.valueElement.update(newCharCount);&lt;br /&gt;
+				if(charCounterUI.containerElement) {&lt;br /&gt;
+					if (newCharCount == 0) {&lt;br /&gt;
+						if (charCounterUI.containerElement.visible())&lt;br /&gt;
+							charCounterUI.containerElement.hide();&lt;br /&gt;
+					} else {&lt;br /&gt;
+						if (!charCounterUI.containerElement.visible())&lt;br /&gt;
+							charCounterUI.containerElement.show();&lt;br /&gt;
+					}&lt;br /&gt;
+				}&lt;br /&gt;
+			};&lt;br /&gt;
+			&lt;br /&gt;
 			return {&lt;br /&gt;
 				&lt;br /&gt;
 				init: function(controller,platform,textElement,params) {&lt;br /&gt;
@@ -265,7 +283,13 @@&lt;br /&gt;
 								setTextFieldValueFn = params.segmentCounter.setTextFieldValueFn;&lt;br /&gt;
 							}						&lt;br /&gt;
 						}&lt;br /&gt;
-&lt;br /&gt;
+						if(params.charCounter) {&lt;br /&gt;
+							charCounterUI.containerElement = params.charCounter.charCountContainer;&lt;br /&gt;
+							charCounterUI.valueElement = params.charCounter.charCountElement;&lt;br /&gt;
+							if(params.charCounter.setTextFieldValueFn) {&lt;br /&gt;
+								setTextFieldValueFn = params.charCounter.setTextFieldValueFn;&lt;br /&gt;
+							}						&lt;br /&gt;
+						}&lt;br /&gt;
 					}					&lt;br /&gt;
 				},&lt;br /&gt;
 				&lt;br /&gt;
@@ -304,6 +328,7 @@&lt;br /&gt;
 					var rawCharacterData = getRawCharacterData();&lt;br /&gt;
 					var messageData = parseMessage(rawCharacterData.message,rawCharacterData.count,_maxLength,true);&lt;br /&gt;
 					adjustedCharacterCount = messageData.adjustedCharacterCount;&lt;br /&gt;
+					setCurrentCharCount(rawCharacterData.count);&lt;br /&gt;
 					if (_maxLength &amp;gt; 0)&lt;br /&gt;
 						setOverLimit(messageData.isOverLimit);&lt;br /&gt;
 					setCurrentSegmentCount(messageData.segmentCount);				&lt;br /&gt;
diff -ur /usr/palm/applications/com.palm.app.messaging/app/views/chatview/chatview-scene.html /usr/palm/app-modified/com.palm.app.messaging/app/views/chatview/chatview-scene.html&lt;br /&gt;
--- /usr/palm/applications/com.palm.app.messaging/app/views/chatview/chatview-scene.html	2009-07-18 00:22:14.000000000 -0500&lt;br /&gt;
+++ /usr/palm/app-modified/com.palm.app.messaging/app/views/chatview/chatview-scene.html	2009-07-23 23:16:55.000000000 -0500&lt;br /&gt;
@@ -22,6 +22,10 @@&lt;br /&gt;
 			&amp;lt;div id=&amp;quot;messageContainer&amp;quot; class='palm-row'&amp;gt;&lt;br /&gt;
 				&amp;lt;div class=&amp;quot;palm-row-wrapper textfield-group focused&amp;quot;&amp;gt;&lt;br /&gt;
 					&amp;lt;div class=&amp;quot;title&amp;quot;&amp;gt;&lt;br /&gt;
+						&amp;lt;div id=&amp;quot;charCounterContainer&amp;quot;&amp;gt;&lt;br /&gt;
+							&amp;lt;div id=&amp;quot;charCounter&amp;quot;&amp;gt;&lt;br /&gt;
+							&amp;lt;/div&amp;gt;&lt;br /&gt;
+						&amp;lt;/div&amp;gt;&lt;br /&gt;
 						&amp;lt;div id=&amp;quot;attachmentContainer&amp;quot; style=&amp;quot;display: none;&amp;quot;&amp;gt;&lt;br /&gt;
 							&amp;lt;div id=&amp;quot;cancelAttachment&amp;quot;&amp;gt;&lt;br /&gt;
 							&amp;lt;/div&amp;gt;&lt;br /&gt;
diff -ur /usr/palm/applications/com.palm.app.messaging/app/views/compose/compose-scene.html /usr/palm/app-modified/com.palm.app.messaging/app/views/compose/compose-scene.html&lt;br /&gt;
--- /usr/palm/applications/com.palm.app.messaging/app/views/compose/compose-scene.html	2009-07-18 00:22:14.000000000 -0500&lt;br /&gt;
+++ /usr/palm/app-modified/com.palm.app.messaging/app/views/compose/compose-scene.html	2009-07-23 23:17:14.000000000 -0500&lt;br /&gt;
@@ -6,6 +6,10 @@&lt;br /&gt;
 		&amp;lt;div id=&amp;quot;messageContainer&amp;quot; class='palm-row'&amp;gt;&lt;br /&gt;
 			&amp;lt;div class=&amp;quot;palm-row-wrapper textfield-group focused&amp;quot;&amp;gt;&lt;br /&gt;
 				&amp;lt;div class=&amp;quot;title&amp;quot;&amp;gt;&lt;br /&gt;
+					&amp;lt;div id=&amp;quot;charCounterContainer&amp;quot;&amp;gt;&lt;br /&gt;
+						&amp;lt;div id=&amp;quot;charCounter&amp;quot;&amp;gt;&lt;br /&gt;
+						&amp;lt;/div&amp;gt;&lt;br /&gt;
+					&amp;lt;/div&amp;gt;&lt;br /&gt;
 					&amp;lt;div id=&amp;quot;attachmentContainer&amp;quot; style=&amp;quot;display: none;&amp;quot;&amp;gt;&lt;br /&gt;
 						&amp;lt;div id=&amp;quot;cancelAttachment&amp;quot;&amp;gt;&lt;br /&gt;
 						&amp;lt;/div&amp;gt;&lt;br /&gt;
diff -ur /usr/palm/applications/com.palm.app.messaging/stylesheets/messaging.css /usr/palm/app-modified/com.palm.app.messaging/stylesheets/messaging.css&lt;br /&gt;
--- /usr/palm/applications/com.palm.app.messaging/stylesheets/messaging.css	2009-07-18 00:22:22.000000000 -0500&lt;br /&gt;
+++ /usr/palm/app-modified/com.palm.app.messaging/stylesheets/messaging.css	2009-07-23 23:19:25.000000000 -0500&lt;br /&gt;
@@ -837,6 +837,23 @@&lt;br /&gt;
 #messageContainer.palm-row .icon.right {&lt;br /&gt;
 	height: 61px;&lt;br /&gt;
 }&lt;br /&gt;
+#messageContainer #charCounterContainer {&lt;br /&gt;
+	line-height: 20px;&lt;br /&gt;
+	display:block;&lt;br /&gt;
+	height: 20px;&lt;br /&gt;
+	border-width: 0px 10px 0px 9px;&lt;br /&gt;
+	-webkit-border-image: url(../images/message-segment-badge.png) 0 10 0 9 stretch stretch;&lt;br /&gt;
+	position: absolute;&lt;br /&gt;
+	z-index: 3;&lt;br /&gt;
+	top: 2px;&lt;br /&gt;
+	left: 2px;&lt;br /&gt;
+}&lt;br /&gt;
+#messageContainer #charCounterContainer #charCounter {&lt;br /&gt;
+	font-size: 12px;&lt;br /&gt;
+	font-weight: bold;&lt;br /&gt;
+	color: #679BC2;&lt;br /&gt;
+	margin: 0px -4px 3px -3px;&lt;br /&gt;
+}&lt;br /&gt;
 #messageContainer #attachmentContainer {&lt;br /&gt;
 	position: relative;&lt;br /&gt;
 	margin-top:10px;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Post os1.1 update, you will need to swap in the following for the utilities/CharacterCounter.js section: (mod confirmed working by tcurtin, 7/24/09)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;diff&amp;quot;&amp;gt;&lt;br /&gt;
diff -ur /usr/palm/applications/com.palm.app.messaging/app/utilities/CharacterCounter.js /usr/palm/app-modified/com.palm.app.messaging/app/utilities/CharacterCounter.js&lt;br /&gt;
--- /usr/palm/applications/com.palm.app.messaging/app/utilities/CharacterCounter.js	2009-07-18 00:22:14.000000000 -0500&lt;br /&gt;
+++ /usr/palm/app-modified/com.palm.app.messaging/app/utilities/CharacterCounter.js	2009-07-24 12:20:12.000000000 -0500&lt;br /&gt;
@@ -39,6 +39,11 @@&lt;br /&gt;
                                containerElement: null,&lt;br /&gt;
                                valueElement: null&lt;br /&gt;
                        };&lt;br /&gt;
+                       var charCounterUI = {&lt;br /&gt;
+                               containerElement: null,&lt;br /&gt;
+                               valueElement: null&lt;br /&gt;
+                       };&lt;br /&gt;
+&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                        // TODO: eventually we might want to implement some cleverness that counts&lt;br /&gt;
@@ -51,6 +56,10 @@&lt;br /&gt;
                                var message = textAreaElement.value;&lt;br /&gt;
                                return {count:message.length, message:message};&lt;br /&gt;
                        };&lt;br /&gt;
+                       var charCounterUI = {&lt;br /&gt;
+                               containerElement: null,&lt;br /&gt;
+                               valueElement: null&lt;br /&gt;
+                       };&lt;br /&gt;
&lt;br /&gt;
                        var setOverLimit = function(isOver) {&lt;br /&gt;
                                if (isOver) {&lt;br /&gt;
@@ -185,6 +194,21 @@&lt;br /&gt;
                                }&lt;br /&gt;
                        };&lt;br /&gt;
&lt;br /&gt;
+                       var setCurrentCharCount = function(newCharCount) {&lt;br /&gt;
+                               if(charCounterUI.valueElement)&lt;br /&gt;
+                                       charCounterUI.valueElement.update(newCharCount);&lt;br /&gt;
+                               if(charCounterUI.containerElement) {&lt;br /&gt;
+                                       if (newCharCount == 0) {&lt;br /&gt;
+                                               if (charCounterUI.containerElement.visible())&lt;br /&gt;
+                                                       charCounterUI.containerElement.hide();&lt;br /&gt;
+                                       } else {&lt;br /&gt;
+                                               if (!charCounterUI.containerElement.visible())&lt;br /&gt;
+                                                       charCounterUI.containerElement.show();&lt;br /&gt;
+                                       }&lt;br /&gt;
+                               }&lt;br /&gt;
+                       };&lt;br /&gt;
+&lt;br /&gt;
+&lt;br /&gt;
                        return {&lt;br /&gt;
&lt;br /&gt;
                                init: function(controller,platform,textElement,params) {&lt;br /&gt;
@@ -265,7 +289,13 @@&lt;br /&gt;
                                                                setTextFieldValueFn = params.segmentCounter.setTextFieldValueFn;&lt;br /&gt;
                                                        }&lt;br /&gt;
                                                }&lt;br /&gt;
-&lt;br /&gt;
+                                               if(params.charCounter) {&lt;br /&gt;
+                                                       charCounterUI.containerElement = params.charCounter.charCountContainer;&lt;br /&gt;
+                                                       charCounterUI.valueElement = params.charCounter.charCountElement;&lt;br /&gt;
+                                                       if(params.charCounter.setTextFieldValueFn) {&lt;br /&gt;
+                                                               setTextFieldValueFn = params.charCounter.setTextFieldValueFn;&lt;br /&gt;
+                                                       }&lt;br /&gt;
+                                               }&lt;br /&gt;
                                        }&lt;br /&gt;
                                },&lt;br /&gt;
&lt;br /&gt;
@@ -304,6 +334,7 @@&lt;br /&gt;
                                        var rawCharacterData = getRawCharacterData();&lt;br /&gt;
                                        var messageData = parseMessage(rawCharacterData.message,rawCharacterData.count,_maxLength,true);&lt;br /&gt;
                                        adjustedCharacterCount = messageData.adjustedCharacterCount;&lt;br /&gt;
+                                       setCurrentCharCount(rawCharacterData.count);&lt;br /&gt;
                                        if (_maxLength &amp;gt; 0)&lt;br /&gt;
                                                setOverLimit(messageData.isOverLimit);&lt;br /&gt;
                                        setCurrentSegmentCount(messageData.segmentCount);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Acknowledgements ==&lt;br /&gt;
&lt;br /&gt;
* [[User:HattCzech|HattCzech]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
= Force Offline Send Without Dialog =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo mount -o remount,rw /&lt;br /&gt;
sudo vi /usr/palm/applications/com.palm.app.messaging/app/controllers/chatview-assistant.js&lt;br /&gt;
/forceSendIfOffline =&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Change the line to true (below) , writequit , remount, reload , enjoy &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
forceSendIfOffline = true; &lt;br /&gt;
:wq &lt;br /&gt;
sudo mount -o remount,ro /&lt;br /&gt;
sudo stop LunaSysMgr ; sudo start LunaSysMgr&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>NetWhiz</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Patch_webOS_Brightness&amp;diff=2024</id>
		<title>Patch webOS Brightness</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Patch_webOS_Brightness&amp;diff=2024"/>
		<updated>2009-07-24T14:37:51Z</updated>

		<summary type="html">&lt;p&gt;NetWhiz: /* Modifying Brightness Slider */ - Updated line for webOS 1.1&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Works with: 1.0.x, 1.1&lt;br /&gt;
&lt;br /&gt;
= Modifying Brightness Slider=&lt;br /&gt;
Obviously this isn't too big a hack, and it honestly barely makes a difference, but people have complained about the lowest brightness being too bright.&lt;br /&gt;
&lt;br /&gt;
As it turns out, the slider goes from 10-100 as the default.  You can change this from 0-100 very easily, if you don't mind not having a keyboard backlight at the lowest settings.  It is only slightly less bright than the original maximum, but it's such an easy change that people might want to do it anyway.&lt;br /&gt;
&lt;br /&gt;
'''/usr/palm/applications/com.palm.app.screenlock/app/controllers/securityconfig-assistant.js'''&lt;br /&gt;
&lt;br /&gt;
webOS 1.0.x: In line '''27''', change the 10 to 0.&lt;br /&gt;
&lt;br /&gt;
webOS 1.1: In line '''34''', change the 10 to a 1 (or 0).&lt;br /&gt;
&lt;br /&gt;
= Suggested Future Mods=&lt;br /&gt;
I don't know that it'll be possible, it seems to be only one system call, but it'd be great if someone could figure out how to separate screen brightness and keyboard backlight brightness.&lt;br /&gt;
&lt;br /&gt;
Question: Any idea how to have screen brightness at 0 and still have the keyboard backlight on?&lt;br /&gt;
&lt;br /&gt;
Possible Answer:  It's possible to manually hit the keyboard LEDs at any brightness desired.  The devices are:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
/sys/class/leds/kbd_bl_led_center/brightness &lt;br /&gt;
/sys/class/leds/kbd_bl_led_left/brightness&lt;br /&gt;
/sys/class/leds/kbd_bl_led_right/brightness&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
(-pEEf)&lt;/div&gt;</summary>
		<author><name>NetWhiz</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Messaging_Mods&amp;diff=1982</id>
		<title>Messaging Mods</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Messaging_Mods&amp;diff=1982"/>
		<updated>2009-07-24T12:07:03Z</updated>

		<summary type="html">&lt;p&gt;NetWhiz: /* Procedure */ - Added new lines #'s for webOS 1.1&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;All files are located in '''/usr/palm/applications/com.palm.app.messaging/'''&lt;br /&gt;
&lt;br /&gt;
= Add Timestamps to All Messages =&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
A number of users have requested adding timestamps to each message that arrives on the device.&lt;br /&gt;
Palm actually goes out of their way to group messages that have arrived during various time intervals,&lt;br /&gt;
but if you'd prefer to see a timestamp on each message, simply follow the instructions below.&lt;br /&gt;
&lt;br /&gt;
== Procedure ==&lt;br /&gt;
&lt;br /&gt;
# [[Portal:Accessing_Linux|Gain root access to your device]]&lt;br /&gt;
# Remount the file system as read/write&lt;br /&gt;
# cd to '''/usr/palm/applications/com.palm.app.messaging/app/controllers/'''&lt;br /&gt;
# Backup '''chatview-assistant.js''' (just to be safe)&lt;br /&gt;
# Open '''chatview-assistant.js''' and comment out the following lines:&lt;br /&gt;
#* 1169 (webOS 1.1: '''1242''') - line that starts with: '''if(!ChatFlags.'''&lt;br /&gt;
#* 1177 (webOS 1.1: '''1250''') - line that starts with: '''if(today-msg.'''&lt;br /&gt;
#* 1179 (webOS 1.1: '''1252''') - first closing bracket on its own line: '''}'''&lt;br /&gt;
#* 1180 (webOS 1.1: '''1253''') - second closing bracket on its own line: '''}'''&lt;br /&gt;
# Save the file and exit the editor&lt;br /&gt;
# Remount the file system as read-only&lt;br /&gt;
# Logout of your root session&lt;br /&gt;
# Reboot the device&lt;br /&gt;
&lt;br /&gt;
You should now see a full timestamp on all received messages.&lt;br /&gt;
&lt;br /&gt;
== Acknowledgements ==&lt;br /&gt;
&lt;br /&gt;
Thanks to [[User:tk102|tk102]] and [[User:scuba_steve|scuba_steve]] on [http://www.precentral.net/  PreCentral] for the mod.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
= New Card For Each Conversation =&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The message app can be a pain when you have multiple conversations going on. You often have to swipe back and then pick someone else. &lt;br /&gt;
It gets annoying fast. This modification modifies the messaging application so that a new card is created whenever you click into a conversation.&lt;br /&gt;
&lt;br /&gt;
== Procedure ==&lt;br /&gt;
&lt;br /&gt;
Edit '''/usr/palm/applications/com.palm.app.messaging/app/controllers/listview-assistant.js''' and replace the launchChatView function with the following function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
launchChatView: function(chatThreadId) {&lt;br /&gt;
    //Need to jump to that stage if it exists&lt;br /&gt;
    var stageController = Mojo.Controller.appController.getStageController(&amp;quot;messaging&amp;quot;+chatThreadId);&lt;br /&gt;
        if (stageController) {&lt;br /&gt;
            stageController.activate();&lt;br /&gt;
            return;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
    var params = {name: 'messaging' + chatThreadId,&lt;br /&gt;
            lightweight: Mojo.Controller.appInfo.lwStages&lt;br /&gt;
    };&lt;br /&gt;
&lt;br /&gt;
    var callback = function(controller) {&lt;br /&gt;
        controller.pushScene('chatview',chatThreadId,{&lt;br /&gt;
                    focusWindow: true&lt;br /&gt;
                });        &lt;br /&gt;
    };&lt;br /&gt;
&lt;br /&gt;
    Mojo.Controller.getAppController().createStageWithCallback(params, callback); //doesnt create ifit exists sooo&lt;br /&gt;
  },&lt;br /&gt;
&lt;br /&gt;
  clearListBadgeForChatThreadId: function(chatThreadId) {&lt;br /&gt;
    var badgeContainers = [&amp;quot;buddyBageContainer&amp;quot;,&amp;quot;historyBageContainer&amp;quot;];&lt;br /&gt;
    var listItem;&lt;br /&gt;
    for (var i = 0; i &amp;lt; badgeContainers.length; i++) {&lt;br /&gt;
        listItem = this.controller.get(badgeContainers[i] + chatThreadId);&lt;br /&gt;
        if (listItem &amp;amp;&amp;amp; !listItem.hasClassName('hide-unread-count')) {&lt;br /&gt;
            listItem.addClassName('hide-unread-count');&lt;br /&gt;
        }&lt;br /&gt;
    }    &lt;br /&gt;
  },&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now in '''/usr/palm/applications/com.palm.app.messaging/app/controllers/chatview-assistant.js''', comment out lines 246 and 247.&lt;br /&gt;
This change will ensure that if you use the &amp;quot;back gesture&amp;quot; in a chat, the application doesn't bring you back to the conversation list...or do anything else.&lt;br /&gt;
&lt;br /&gt;
To &amp;quot;comment out&amp;quot; a line, add // at the beginning. Example:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
printf(&amp;quot;This is code&amp;quot;);&lt;br /&gt;
//printf(&amp;quot;This is commented out&amp;quot;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Concerns ==&lt;br /&gt;
There is some delay in creating the new cards. I'm not sure why though.&lt;br /&gt;
As stated above, the cards are only opened when you click into the conversation.  Responding to a notification will result in the reuse of the buddy list window, and you have disabled the back gesture.&lt;br /&gt;
&lt;br /&gt;
== Acknolwedgements ==&lt;br /&gt;
&lt;br /&gt;
Thanks to [[User:mikedg|mikedg]] for the mod.&lt;br /&gt;
&lt;br /&gt;
[[User:chris_phelps|chris_phelps]] is continuing to work on this modification to get it working more completely.&lt;br /&gt;
The first step is to clean up the other launchChatNNN functionality in app-assistant.js which accepts Luna System calls from the notification dashboard items which are created when a new message is received on the phone. These code modifications are being tested currently, and will be posted when we figure out how to clear the new message counters in the main listview-assistant.js.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
= Character Counter =&lt;br /&gt;
&lt;br /&gt;
[[Image:Messaging_CharacterCounter.jpg|border|right|Character Counter]]&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
One of the features I liked about my old Treo was the character counter built-in to the messaging application. I thought it would be useful on the Pre, so I modified the messaging application to show the current character count. I made this a separate page from the other modifications because it requires many code changes. Maybe the other messaging modifications could be rolled into this page as well.&lt;br /&gt;
&lt;br /&gt;
== Procedure ==&lt;br /&gt;
&lt;br /&gt;
Run the following commands:&lt;br /&gt;
&lt;br /&gt;
''In this example, I have the patch file located in my home directory under '''patches'''''&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd /&lt;br /&gt;
sudo patch -p0 --backup-if-mismatch &amp;lt; ~/patches/charcounter.patch&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is what you should see if it ran properly:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
patching file /usr/palm/applications/com.palm.app.messaging/app/controllers/chatview-assistant.js&lt;br /&gt;
patching file /usr/palm/applications/com.palm.app.messaging/app/controllers/compose-assistant.js&lt;br /&gt;
patching file /usr/palm/applications/com.palm.app.messaging/app/utilities/CharacterCounter.js&lt;br /&gt;
patching file /usr/palm/applications/com.palm.app.messaging/app/views/chatview/chatview-scene.html&lt;br /&gt;
patching file /usr/palm/applications/com.palm.app.messaging/app/views/compose/compose-scene.html&lt;br /&gt;
patching file /usr/palm/applications/com.palm.app.messaging/stylesheets/messaging.css&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These modifications will require LunaSysMgr to be restarted. A rescan will not work. After you've run the commands above, run one more command:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
pkill LunaSysMgr&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== charcounter.patch ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;diff&amp;quot;&amp;gt;&lt;br /&gt;
diff -ur /usr/palm/applications/com.palm.app.messaging/app/controllers/chatview-assistant.js /usr/palm/app-modified/com.palm.app.messaging/app/controllers/chatview-assistant.js&lt;br /&gt;
--- /usr/palm/applications/com.palm.app.messaging/app/controllers/chatview-assistant.js	2009-07-18 00:22:14.000000000 -0500&lt;br /&gt;
+++ /usr/palm/app-modified/com.palm.app.messaging/app/controllers/chatview-assistant.js	2009-07-23 23:13:19.000000000 -0500&lt;br /&gt;
@@ -160,6 +160,11 @@&lt;br /&gt;
 				segmentCountContainer: this.controller.get('segmentCounterContainer'),&lt;br /&gt;
 				segmentCountElement: this.controller.get('segmentCounter'),&lt;br /&gt;
 				setTextFieldValueFn: this.setTextFieldValue.bind(this)&lt;br /&gt;
+			},&lt;br /&gt;
+			charCounter: {&lt;br /&gt;
+				charCountContainer: this.controller.get('charCounterContainer'),&lt;br /&gt;
+				charCountElement: this.controller.get('charCounter'),&lt;br /&gt;
+				setTextFieldValueFn: this.setTextFieldValue.bind(this)&lt;br /&gt;
 			}&lt;br /&gt;
 		};&lt;br /&gt;
 &lt;br /&gt;
diff -ur /usr/palm/applications/com.palm.app.messaging/app/controllers/compose-assistant.js /usr/palm/app-modified/com.palm.app.messaging/app/controllers/compose-assistant.js&lt;br /&gt;
--- /usr/palm/applications/com.palm.app.messaging/app/controllers/compose-assistant.js	2009-07-18 00:22:14.000000000 -0500&lt;br /&gt;
+++ /usr/palm/app-modified/com.palm.app.messaging/app/controllers/compose-assistant.js	2009-07-23 23:14:11.000000000 -0500&lt;br /&gt;
@@ -140,6 +140,11 @@&lt;br /&gt;
 			segmentCountContainer: this.controller.get('segmentCounterContainer'),&lt;br /&gt;
 			segmentCountElement: this.controller.get('segmentCounter'),&lt;br /&gt;
 			setTextFieldValueFn: this.setTextFieldValue.bind(this)&lt;br /&gt;
+		},&lt;br /&gt;
+		charCounter: {&lt;br /&gt;
+			charCountContainer: this.controller.get('charCounterContainer'),&lt;br /&gt;
+			charCountElement: this.controller.get('charCounter'),&lt;br /&gt;
+			setTextFieldValueFn: this.setTextFieldValue.bind(this)&lt;br /&gt;
 		}&lt;br /&gt;
 	};&lt;br /&gt;
 &lt;br /&gt;
diff -ur /usr/palm/applications/com.palm.app.messaging/app/utilities/CharacterCounter.js /usr/palm/app-modified/com.palm.app.messaging/app/utilities/CharacterCounter.js&lt;br /&gt;
--- /usr/palm/applications/com.palm.app.messaging/app/utilities/CharacterCounter.js	2009-07-18 00:22:14.000000000 -0500&lt;br /&gt;
+++ /usr/palm/app-modified/com.palm.app.messaging/app/utilities/CharacterCounter.js	2009-07-23 23:47:32.000000000 -0500&lt;br /&gt;
@@ -39,6 +39,10 @@&lt;br /&gt;
 				containerElement: null,&lt;br /&gt;
 				valueElement: null&lt;br /&gt;
 			};&lt;br /&gt;
+			var charCounterUI = {&lt;br /&gt;
+				containerElement: null,&lt;br /&gt;
+				valueElement: null&lt;br /&gt;
+			};&lt;br /&gt;
 			&lt;br /&gt;
 						&lt;br /&gt;
 			// TODO: eventually we might want to implement some cleverness that counts&lt;br /&gt;
@@ -185,6 +189,20 @@&lt;br /&gt;
 				}&lt;br /&gt;
 			};&lt;br /&gt;
 			&lt;br /&gt;
+			var setCurrentCharCount = function(newCharCount) {&lt;br /&gt;
+				if(charCounterUI.valueElement)&lt;br /&gt;
+					charCounterUI.valueElement.update(newCharCount);&lt;br /&gt;
+				if(charCounterUI.containerElement) {&lt;br /&gt;
+					if (newCharCount == 0) {&lt;br /&gt;
+						if (charCounterUI.containerElement.visible())&lt;br /&gt;
+							charCounterUI.containerElement.hide();&lt;br /&gt;
+					} else {&lt;br /&gt;
+						if (!charCounterUI.containerElement.visible())&lt;br /&gt;
+							charCounterUI.containerElement.show();&lt;br /&gt;
+					}&lt;br /&gt;
+				}&lt;br /&gt;
+			};&lt;br /&gt;
+			&lt;br /&gt;
 			return {&lt;br /&gt;
 				&lt;br /&gt;
 				init: function(controller,platform,textElement,params) {&lt;br /&gt;
@@ -265,7 +283,13 @@&lt;br /&gt;
 								setTextFieldValueFn = params.segmentCounter.setTextFieldValueFn;&lt;br /&gt;
 							}						&lt;br /&gt;
 						}&lt;br /&gt;
-&lt;br /&gt;
+						if(params.charCounter) {&lt;br /&gt;
+							charCounterUI.containerElement = params.charCounter.charCountContainer;&lt;br /&gt;
+							charCounterUI.valueElement = params.charCounter.charCountElement;&lt;br /&gt;
+							if(params.charCounter.setTextFieldValueFn) {&lt;br /&gt;
+								setTextFieldValueFn = params.charCounter.setTextFieldValueFn;&lt;br /&gt;
+							}						&lt;br /&gt;
+						}&lt;br /&gt;
 					}					&lt;br /&gt;
 				},&lt;br /&gt;
 				&lt;br /&gt;
@@ -304,6 +328,7 @@&lt;br /&gt;
 					var rawCharacterData = getRawCharacterData();&lt;br /&gt;
 					var messageData = parseMessage(rawCharacterData.message,rawCharacterData.count,_maxLength,true);&lt;br /&gt;
 					adjustedCharacterCount = messageData.adjustedCharacterCount;&lt;br /&gt;
+					setCurrentCharCount(rawCharacterData.count);&lt;br /&gt;
 					if (_maxLength &amp;gt; 0)&lt;br /&gt;
 						setOverLimit(messageData.isOverLimit);&lt;br /&gt;
 					setCurrentSegmentCount(messageData.segmentCount);				&lt;br /&gt;
diff -ur /usr/palm/applications/com.palm.app.messaging/app/views/chatview/chatview-scene.html /usr/palm/app-modified/com.palm.app.messaging/app/views/chatview/chatview-scene.html&lt;br /&gt;
--- /usr/palm/applications/com.palm.app.messaging/app/views/chatview/chatview-scene.html	2009-07-18 00:22:14.000000000 -0500&lt;br /&gt;
+++ /usr/palm/app-modified/com.palm.app.messaging/app/views/chatview/chatview-scene.html	2009-07-23 23:16:55.000000000 -0500&lt;br /&gt;
@@ -22,6 +22,10 @@&lt;br /&gt;
 			&amp;lt;div id=&amp;quot;messageContainer&amp;quot; class='palm-row'&amp;gt;&lt;br /&gt;
 				&amp;lt;div class=&amp;quot;palm-row-wrapper textfield-group focused&amp;quot;&amp;gt;&lt;br /&gt;
 					&amp;lt;div class=&amp;quot;title&amp;quot;&amp;gt;&lt;br /&gt;
+						&amp;lt;div id=&amp;quot;charCounterContainer&amp;quot;&amp;gt;&lt;br /&gt;
+							&amp;lt;div id=&amp;quot;charCounter&amp;quot;&amp;gt;&lt;br /&gt;
+							&amp;lt;/div&amp;gt;&lt;br /&gt;
+						&amp;lt;/div&amp;gt;&lt;br /&gt;
 						&amp;lt;div id=&amp;quot;attachmentContainer&amp;quot; style=&amp;quot;display: none;&amp;quot;&amp;gt;&lt;br /&gt;
 							&amp;lt;div id=&amp;quot;cancelAttachment&amp;quot;&amp;gt;&lt;br /&gt;
 							&amp;lt;/div&amp;gt;&lt;br /&gt;
diff -ur /usr/palm/applications/com.palm.app.messaging/app/views/compose/compose-scene.html /usr/palm/app-modified/com.palm.app.messaging/app/views/compose/compose-scene.html&lt;br /&gt;
--- /usr/palm/applications/com.palm.app.messaging/app/views/compose/compose-scene.html	2009-07-18 00:22:14.000000000 -0500&lt;br /&gt;
+++ /usr/palm/app-modified/com.palm.app.messaging/app/views/compose/compose-scene.html	2009-07-23 23:17:14.000000000 -0500&lt;br /&gt;
@@ -6,6 +6,10 @@&lt;br /&gt;
 		&amp;lt;div id=&amp;quot;messageContainer&amp;quot; class='palm-row'&amp;gt;&lt;br /&gt;
 			&amp;lt;div class=&amp;quot;palm-row-wrapper textfield-group focused&amp;quot;&amp;gt;&lt;br /&gt;
 				&amp;lt;div class=&amp;quot;title&amp;quot;&amp;gt;&lt;br /&gt;
+					&amp;lt;div id=&amp;quot;charCounterContainer&amp;quot;&amp;gt;&lt;br /&gt;
+						&amp;lt;div id=&amp;quot;charCounter&amp;quot;&amp;gt;&lt;br /&gt;
+						&amp;lt;/div&amp;gt;&lt;br /&gt;
+					&amp;lt;/div&amp;gt;&lt;br /&gt;
 					&amp;lt;div id=&amp;quot;attachmentContainer&amp;quot; style=&amp;quot;display: none;&amp;quot;&amp;gt;&lt;br /&gt;
 						&amp;lt;div id=&amp;quot;cancelAttachment&amp;quot;&amp;gt;&lt;br /&gt;
 						&amp;lt;/div&amp;gt;&lt;br /&gt;
diff -ur /usr/palm/applications/com.palm.app.messaging/stylesheets/messaging.css /usr/palm/app-modified/com.palm.app.messaging/stylesheets/messaging.css&lt;br /&gt;
--- /usr/palm/applications/com.palm.app.messaging/stylesheets/messaging.css	2009-07-18 00:22:22.000000000 -0500&lt;br /&gt;
+++ /usr/palm/app-modified/com.palm.app.messaging/stylesheets/messaging.css	2009-07-23 23:19:25.000000000 -0500&lt;br /&gt;
@@ -837,6 +837,23 @@&lt;br /&gt;
 #messageContainer.palm-row .icon.right {&lt;br /&gt;
 	height: 61px;&lt;br /&gt;
 }&lt;br /&gt;
+#messageContainer #charCounterContainer {&lt;br /&gt;
+	line-height: 20px;&lt;br /&gt;
+	display:block;&lt;br /&gt;
+	height: 20px;&lt;br /&gt;
+	border-width: 0px 10px 0px 9px;&lt;br /&gt;
+	-webkit-border-image: url(../images/message-segment-badge.png) 0 10 0 9 stretch stretch;&lt;br /&gt;
+	position: absolute;&lt;br /&gt;
+	z-index: 3;&lt;br /&gt;
+	top: 2px;&lt;br /&gt;
+	left: 2px;&lt;br /&gt;
+}&lt;br /&gt;
+#messageContainer #charCounterContainer #charCounter {&lt;br /&gt;
+	font-size: 12px;&lt;br /&gt;
+	font-weight: bold;&lt;br /&gt;
+	color: #679BC2;&lt;br /&gt;
+	margin: 0px -4px 3px -3px;&lt;br /&gt;
+}&lt;br /&gt;
 #messageContainer #attachmentContainer {&lt;br /&gt;
 	position: relative;&lt;br /&gt;
 	margin-top:10px;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Acknowledgements ==&lt;br /&gt;
&lt;br /&gt;
* [[User:HattCzech|HattCzech]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
= Force Offline Send Without Dialog =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo mount -o remount,rw /&lt;br /&gt;
sudo vi /usr/palm/applications/com.palm.app.messaging/app/controllers/chatview-assistant.js&lt;br /&gt;
/forceSendIfOffline =&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Change the line to true (below) , writequit , remount, reload , enjoy &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
forceSendIfOffline = true; &lt;br /&gt;
:wq &lt;br /&gt;
sudo mount -o remount,ro /&lt;br /&gt;
sudo stop LunaSysMgr ; sudo start LunaSysMgr&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>NetWhiz</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Patch_webOS_Radio_Power_Switch&amp;diff=1978</id>
		<title>Patch webOS Radio Power Switch</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Patch_webOS_Radio_Power_Switch&amp;diff=1978"/>
		<updated>2009-07-24T12:02:39Z</updated>

		<summary type="html">&lt;p&gt;NetWhiz: /* Introduction */ - Changed working OS versions&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Seamless Interface =&lt;br /&gt;
&lt;br /&gt;
[[Image:RadioPowerSwitch.jpg|border|right|Radio Power Switch]]&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
I took what pEEf did and made it look more like it fits. I liked the original idea, but as mentioned in the concerns below, when changing between Airplane mode and back, it doesn't have the correct information. I made mine look like the Bluetooth and Wi-Fi menus.&lt;br /&gt;
&lt;br /&gt;
Works with: 1.0.x, 1.1&lt;br /&gt;
&lt;br /&gt;
== Procedure ==&lt;br /&gt;
&lt;br /&gt;
Run the following commands:&lt;br /&gt;
&lt;br /&gt;
''In this example, I have the patch file located in my home directory under '''patches'''''&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd /&lt;br /&gt;
sudo patch -p0 --backup-if-mismatch &amp;lt; ~/patches/radiopower.patch&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is what you should see if it ran properly:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
patching file /usr/lib/luna/system/luna-systemui/app/controllers/bar-assistant.js&lt;br /&gt;
patching file /usr/lib/luna/system/luna-systemui/app/controllers/devicemenu-assistant.js&lt;br /&gt;
patching file /usr/lib/luna/system/luna-systemui/app/views/devicemenu/devicemenu-scene.html&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These modifications will require LunaSysMgr to be restarted. A rescan will not work. After you've run the commands above, run one more command:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
pkill LunaSysMgr&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== radiopower.patch ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;diff&amp;quot;&amp;gt;&lt;br /&gt;
--- /usr/lib/luna/system/luna-systemui/app/controllers/bar-assistant.js	Sat Jul 18 00:21:30 2009&lt;br /&gt;
+++ /usr/lib/luna/sys-mod/luna-systemui/app/controllers/bar-assistant.js	Fri Jul 24 00:44:08 2009&lt;br /&gt;
@@ -789,6 +789,8 @@&lt;br /&gt;
 				this.callForwardNotificationSession = null;	&lt;br /&gt;
 			}				&lt;br /&gt;
 		}&lt;br /&gt;
+		var stageController = Mojo.Controller.getAppController().getStageProxy(&amp;quot;DeviceMenu&amp;quot;);&lt;br /&gt;
+		stageController.delegateToSceneAssistant(&amp;quot;updatePhone&amp;quot;);&lt;br /&gt;
 	}&lt;br /&gt;
 	else if (payload.eventNetwork &amp;amp;&amp;amp; this.phoneRadioState) {&lt;br /&gt;
 		var networkMsg = payload.eventNetwork;&lt;br /&gt;
@@ -2570,6 +2572,10 @@&lt;br /&gt;
 &lt;br /&gt;
 getCurrentWiFiState: function() {&lt;br /&gt;
 	return this.wifiState;&lt;br /&gt;
+},&lt;br /&gt;
+&lt;br /&gt;
+getCurrentPhoneState: function() {&lt;br /&gt;
+	return this.phoneRadioState;&lt;br /&gt;
 },&lt;br /&gt;
 &lt;br /&gt;
 setDeviceMenuAssistant: function(menuassistant) {&lt;br /&gt;
--- /usr/lib/luna/system/luna-systemui/app/controllers/devicemenu-assistant.js	Sat Jul 18 00:21:30 2009&lt;br /&gt;
+++ /usr/lib/luna/sys-mod/luna-systemui/app/controllers/devicemenu-assistant.js	Fri Jul 24 00:50:25 2009&lt;br /&gt;
@@ -1,6 +1,6 @@&lt;br /&gt;
 /* Copyright 2009 Palm, Inc.  All rights reserved. */&lt;br /&gt;
 &lt;br /&gt;
-var RadioState = new Hash({wifi: undefined, bluetooth: undefined});&lt;br /&gt;
+var RadioState = new Hash({wifi: undefined, bluetooth: undefined, phone: undefined});&lt;br /&gt;
 &lt;br /&gt;
 var DevicemenuAssistant = Class.create({&lt;br /&gt;
 	&lt;br /&gt;
@@ -36,6 +36,8 @@&lt;br /&gt;
 		this.drawerModel = {myOpenProperty:false};&lt;br /&gt;
 		this.controller.setupWidget('wifidetails', {modelProperty:'myOpenProperty'}, this.drawerModel);&lt;br /&gt;
 		this.controller.setupWidget('btdetails', {modelProperty:'myOpenProperty'}, this.drawerModel);&lt;br /&gt;
+		this.controller.setupWidget('phonedetails', {modelProperty:'myOpenProperty'}, this.drawerModel);&lt;br /&gt;
+		this.phonedrawer = this.controller.get('phonedetails');&lt;br /&gt;
 		this.wifidrawer = this.controller.get('wifidetails');&lt;br /&gt;
 		this.btdrawer = this.controller.get('btdetails');&lt;br /&gt;
 		&lt;br /&gt;
@@ -92,6 +94,14 @@&lt;br /&gt;
 			else&lt;br /&gt;
 				this.controller.get('wifimsg').innerHTML = wifistate.escapeHTML();			&lt;br /&gt;
 		}		&lt;br /&gt;
+		&lt;br /&gt;
+		var phonestate = this.barAssistant.getCurrentPhoneState();&lt;br /&gt;
+		if(phoneState === 'Off') {&lt;br /&gt;
+			this.controller.get('phonemsg').innerHTML = $L('Off');&lt;br /&gt;
+			RadioState.set('phone',false);&lt;br /&gt;
+		}&lt;br /&gt;
+		else {&lt;br /&gt;
+			this.controller.get('phonemsg').innerHTML = $L('On');&lt;br /&gt;
+			RadioState.set('phone',true);&lt;br /&gt;
+		}&lt;br /&gt;
+		&lt;br /&gt;
 		this.controller.listen(this.controller.document, Mojo.Event.deactivate, this.close.bindAsEventListener(this));&lt;br /&gt;
 		this.isVisible = true;&lt;br /&gt;
 		&lt;br /&gt;
@@ -115,6 +125,8 @@&lt;br /&gt;
 		this.controller.get('btlist').addEventListener(Mojo.Event.listTap,this.handleBTTap.bindAsEventListener(this));		&lt;br /&gt;
 		this.controller.get('dm_wifi').addEventListener(Mojo.Event.tap, this.togglewifiList.bindAsEventListener(this));&lt;br /&gt;
 		this.controller.get('dm_bluetooth').addEventListener(Mojo.Event.tap, this.togglebluetoothList.bindAsEventListener(this));&lt;br /&gt;
+		this.controller.get('dm_phone').addEventListener(Mojo.Event.tap, this.togglePhoneList.bindAsEventListener(this));&lt;br /&gt;
+		this.controller.get('phone_radio').addEventListener(Mojo.Event.tap, this.togglePhoneRadio.bindAsEventListener(this));&lt;br /&gt;
 		this.controller.get('wifi_radio').addEventListener(Mojo.Event.tap, this.toggleWifiRadio.bindAsEventListener(this));&lt;br /&gt;
 		this.controller.get('bt_radio').addEventListener(Mojo.Event.tap, this.toggleBTRadio.bindAsEventListener(this));&lt;br /&gt;
 		this.controller.get('bt_pref').addEventListener(Mojo.Event.tap,this.handleBluetoothLaunch.bindAsEventListener(this));&lt;br /&gt;
@@ -175,6 +187,48 @@&lt;br /&gt;
 		this.apModeInProgress = false;&lt;br /&gt;
 	},&lt;br /&gt;
 	&lt;br /&gt;
+	updatePhone: function() {&lt;br /&gt;
+		if(this.barAssistant.getCurrentPhoneState()) {&lt;br /&gt;
+			this.controller.get('phonemsg').innerHTML = $L('On');&lt;br /&gt;
+			this.controller.get('phone_radio').innerHTML = $L('Turn off Phone');&lt;br /&gt;
+			RadioState.set('phone', true);&lt;br /&gt;
+		}&lt;br /&gt;
+		else {&lt;br /&gt;
+			this.controller.get('phonemsg').innerHTML = $L('Off');&lt;br /&gt;
+			this.controller.get('phone_radio').innerHTML = $L('Turn on Phone');&lt;br /&gt;
+			RadioState.set('phone', false);&lt;br /&gt;
+		}&lt;br /&gt;
+	},&lt;br /&gt;
+	 &lt;br /&gt;
+	togglePhoneRadio: function(event) {&lt;br /&gt;
+		this.serviceRequest = new Mojo.Service.Request(&amp;quot;palm://com.palm.vibrate&amp;quot;, {&lt;br /&gt;
+			method: 'vibrate', parameters: { 'period': 0,'duration': 250 }&lt;br /&gt;
+		});&lt;br /&gt;
+		if(RadioState.get('phone'))&lt;br /&gt;
+			TelephonyService.tempPowerSet('off',false,null,null);&lt;br /&gt;
+		else&lt;br /&gt;
+			TelephonyService.tempPowerSet('on',false,null,null);&lt;br /&gt;
+		this.toggleDeviceMenu();&lt;br /&gt;
+	},&lt;br /&gt;
+	 &lt;br /&gt;
+	togglePhoneList: function(event) {&lt;br /&gt;
+		if(this.apModeInProgress)&lt;br /&gt;
+			return;&lt;br /&gt;
+	 &lt;br /&gt;
+		if (this.phonedrawer.mojo.getOpenState()) {&lt;br /&gt;
+			this.controller.hideWidgetContainer(this.controller.get('phonedetails'));	&lt;br /&gt;
+		}&lt;br /&gt;
+		else {&lt;br /&gt;
+			if(RadioState.get('phone'))&lt;br /&gt;
+				this.controller.get('phone_radio').innerHTML = $L('Turn off Phone');&lt;br /&gt;
+			else&lt;br /&gt;
+			this.controller.get('phone_radio').innerHTML = $L('Turn on Phone');	&lt;br /&gt;
+	 &lt;br /&gt;
+			this.controller.showWidgetContainer(this.controller.get('phonedetails'));&lt;br /&gt;
+		}&lt;br /&gt;
+		this.phonedrawer.mojo.setOpenState(!this.phonedrawer.mojo.getOpenState());						&lt;br /&gt;
+	},&lt;br /&gt;
+	&lt;br /&gt;
 	toggleBTRadio: function(event) {&lt;br /&gt;
 		if(RadioState.get('bluetooth')) {&lt;br /&gt;
 			BtService.radiooff(null,null);			&lt;br /&gt;
@@ -880,7 +934,10 @@&lt;br /&gt;
 	},&lt;br /&gt;
 	&lt;br /&gt;
 	close: function() {&lt;br /&gt;
-		&lt;br /&gt;
+		if(this.phonedrawer.mojo.getOpenState()) {&lt;br /&gt;
+			this.controller.hideWidgetContainer(this.controller.get('phonedetails'));&lt;br /&gt;
+			this.phonedrawer.mojo.setOpenState(false);&lt;br /&gt;
+		}&lt;br /&gt;
 		if (this.btdrawer.mojo.getOpenState()) {&lt;br /&gt;
 			this.clearBTList();			&lt;br /&gt;
 			this.controller.hideWidgetContainer(this.controller.get('btdetails'));&lt;br /&gt;
--- /usr/lib/luna/system/luna-systemui/app/views/devicemenu/devicemenu-scene.html	Sat Jul 18 00:21:30 2009&lt;br /&gt;
+++ /usr/lib/luna/sys-mod/luna-systemui/app/views/devicemenu/devicemenu-scene.html	Fri Jul 24 00:52:11 2009&lt;br /&gt;
@@ -94,6 +94,22 @@&lt;br /&gt;
 				&lt;br /&gt;
 				&amp;lt;div class=&amp;quot;palm-section-divider&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
 				&lt;br /&gt;
+				&amp;lt;div class=&amp;quot;palm-row&amp;quot; id=&amp;quot;dm_phone&amp;quot; x-mojo-tap-highlight='momentary'&amp;gt;&amp;lt;div class=&amp;quot;palm-row-wrapper&amp;quot;&amp;gt;&lt;br /&gt;
+					&amp;lt;div class=&amp;quot;title truncating-text&amp;quot;&amp;gt;&lt;br /&gt;
+						&amp;lt;div class=&amp;quot;label right&amp;quot; id=&amp;quot;phonemsg&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;lt;/div&amp;gt;&lt;br /&gt;
+						&amp;lt;span x-mojo-loc=''&amp;gt;Phone&amp;lt;/span&amp;gt;&lt;br /&gt;
+					&amp;lt;/div&amp;gt;&lt;br /&gt;
+				&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
+				&lt;br /&gt;
+				&amp;lt;div id='phonedetails' x-mojo-element=&amp;quot;Drawer&amp;quot;&amp;gt;&lt;br /&gt;
+					&amp;lt;div class=&amp;quot;palm-row first&amp;quot; x-mojo-tap-highlight='momentary'&amp;gt;&amp;lt;div class=&amp;quot;palm-row-wrapper&amp;quot;&amp;gt;&lt;br /&gt;
+						&amp;lt;div id=&amp;quot;phone_radio&amp;quot; class=&amp;quot;title truncating-text&amp;quot;&amp;gt;&lt;br /&gt;
+						&amp;lt;/div&amp;gt;&lt;br /&gt;
+					&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
+				&amp;lt;/div&amp;gt;&lt;br /&gt;
+				&lt;br /&gt;
+				&amp;lt;div class=&amp;quot;palm-section-divider&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
+				&lt;br /&gt;
 				&amp;lt;div id=&amp;quot;dm_airplanemode&amp;quot; class=&amp;quot;palm-row last&amp;quot; x-mojo-tap-highlight='momentary'&amp;gt;&amp;lt;div class=&amp;quot;palm-row-wrapper&amp;quot;&amp;gt;&lt;br /&gt;
 					&amp;lt;div id=&amp;quot;dm_airplanemode_status&amp;quot; class=&amp;quot;title truncating-text&amp;quot;&amp;gt;&lt;br /&gt;
 					 &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Acknowledgements ==&lt;br /&gt;
&lt;br /&gt;
* pEEf, for figuring everything out&lt;br /&gt;
* [[User:HattCzech|HattCzech]]&lt;br /&gt;
&lt;br /&gt;
== Concerns ==&lt;br /&gt;
&lt;br /&gt;
* Airplane mode still always turns the radio on regardless of the state before airplane mode was turned on.  Otherwise, very nice.&lt;br /&gt;
** I may try to add in a way for it to remember the phone state, but I figured that was the point of Airplane mode, so I haven't looked into it yet. I will look through the code again and see if it's worth it. -[[User:HattCzech|HattCzech]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
= Original Version =&lt;br /&gt;
&lt;br /&gt;
I created this mod so I can turn off the cellular radio, but keep WiFi and Bluetooth on.  Strangely, The Pre does not seem to have an existing way to do this, only the &amp;quot;Airplane Mode&amp;quot; which shuts off ALL radios!&lt;br /&gt;
&lt;br /&gt;
I currently do not have Sprint service on my Pre, and am just using it with WiFi. (See [/bypassing-activation Bypassing Activation] for info on how to do this.)&lt;br /&gt;
&lt;br /&gt;
This will also be useful for people wishing to save their battery if in a poor or no service area, yet still wanting to use WiFi.&lt;br /&gt;
&lt;br /&gt;
Another great use is shutting off the phone so calls will not disturb you while allowing the phone to do all of its network-related activity.&lt;br /&gt;
&lt;br /&gt;
How it works:  Simply click the upper right of the screen where the status bar is (signal strength).  You will get a drop-down menu, this is where the stock &amp;quot;Airplane Mode&amp;quot; is.  I have added a &amp;quot;Toggle Radio Power&amp;quot; function here.  If the radio is on it will turn it off, and vice-versa.  It will not turn off WiFi or Bluetooth like Airplane mode does.&lt;br /&gt;
&lt;br /&gt;
== Note ==&lt;br /&gt;
&lt;br /&gt;
The Pre actually already lets you turn off the cell radio. You can just turn on Airplane Mode, then turn on WiFi, Bluetooth, or both. ~ lolaiba&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
NOTE: If you have never modified any code on the phone, please see [/stock-application-mods Modifiying Stock Applications] first.&lt;br /&gt;
&lt;br /&gt;
This mod is simply additional code to be added to 3 files on your Pre. WARNING: MAKE BACKUPS FIRST!&lt;br /&gt;
&lt;br /&gt;
I will update the page later with proper diffs, but for now you can just get into the shell, make your backups, fire up vi (or nano) then paste in the relevant lines.  Once you are done, you can test it without rebooting by forcing the Luna manager to reinitialize its cache:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
luna-send -n 1 palm://com.palm.applicationManager/rescan {}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is the code, Enjoy!&lt;br /&gt;
&lt;br /&gt;
/usr/lib/luna/system/luna-systemui/app/views/devicemenu/devicemenu-scene.html Line 94:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
                                &amp;lt;div class=&amp;quot;palm-section-divider&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;!-- Added by pEEf --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
                                &amp;lt;div id=&amp;quot;dm_power&amp;quot; class=&amp;quot;palm-row&amp;quot; x-mojo-tap-highlight='momentary'&amp;gt;&amp;lt;div class=&amp;quot;palm-row-wrapper&amp;quot;&amp;gt;&lt;br /&gt;
                                        &amp;lt;div id=&amp;quot;dm_power_status&amp;quot; class=&amp;quot;title truncating-text&amp;quot;&amp;gt;   &lt;br /&gt;
                                         &amp;lt;/div&amp;gt;&lt;br /&gt;
                                &amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
/usr/lib/luna/system/luna-systemui/app/controllers/bar-assistant.js Line 2039:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
//Returns the Radio Power. Called by DeviceMenu. Added by pEEf        &lt;br /&gt;
getPower: function() {       &lt;br /&gt;
	return this.phoneRadioState;&lt;br /&gt;
},&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
/usr/lib/luna/system/luna-systemui/app/controllers/devicemenu-assistant.js Line 59:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
//		Toggle for Radio Power - Added by pEEf&lt;br /&gt;
		if(this.barAssistant.getPower()) {&lt;br /&gt;
			this.controller.get('dm_power_status').innerHTML = $L('Turn off Phone Radio');&lt;br /&gt;
		}&lt;br /&gt;
		else {&lt;br /&gt;
			this.controller.get('dm_power_status').innerHTML = $L('Turn on Phone Radio');&lt;br /&gt;
		}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
/usr/lib/luna/system/luna-systemui/app/controllers/devicemenu-assistant.js Line 107:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;this.controller.get('dm_power').addEventListener(Mojo.Event.tap, this.togglePower.bindAsEventListener(this));&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
/usr/lib/luna/system/luna-systemui/app/controllers/devicemenu-assistant.js Line 126:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
//	Toggles the Radio Power - Added by pEEf           &lt;br /&gt;
&lt;br /&gt;
	togglePower: function() {&lt;br /&gt;
		this.serviceRequest = new Mojo.Service.Request(&amp;quot;palm://com.palm.vibrate&amp;quot;, {&lt;br /&gt;
			method: 'vibrate', parameters: { 'period': 0,'duration': 250 }&lt;br /&gt;
		});&lt;br /&gt;
		if(this.barAssistant.getPower()) {&lt;br /&gt;
			TelephonyService.tempPowerSet('off',false,null,null);&lt;br /&gt;
			this.controller.get('dm_power_status').innerHTML = $L('Turn on Phone Radio');&lt;br /&gt;
		}&lt;br /&gt;
		else {&lt;br /&gt;
			TelephonyService.tempPowerSet('on',false,null,null);&lt;br /&gt;
			this.controller.get('dm_power_status').innerHTML = $L('Turn off Phone Radio');&lt;br /&gt;
		}&lt;br /&gt;
		this.toggleDeviceMenu();&lt;br /&gt;
	},&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Concerns ==&lt;br /&gt;
* Turn off the radio, then turn on airplane mode, and upon turning off airplane mode, the toggle displays the wrong message.&lt;br /&gt;
* Turn on airplane mode, toggle displays wrong message&lt;br /&gt;
&lt;br /&gt;
== Credits ==&lt;br /&gt;
Brought to you by pEEf.&lt;/div&gt;</summary>
		<author><name>NetWhiz</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Patch_webOS_Radio_Power_Switch&amp;diff=1977</id>
		<title>Patch webOS Radio Power Switch</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Patch_webOS_Radio_Power_Switch&amp;diff=1977"/>
		<updated>2009-07-24T12:01:58Z</updated>

		<summary type="html">&lt;p&gt;NetWhiz: /* radiopower.patch */ - Changed devicemenu-assistant.js phoneState check to match new format of WiFi and BT checks (subtle but now works)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Seamless Interface =&lt;br /&gt;
&lt;br /&gt;
[[Image:RadioPowerSwitch.jpg|border|right|Radio Power Switch]]&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
I took what pEEf did and made it look more like it fits. I liked the original idea, but as mentioned in the concerns below, when changing between Airplane mode and back, it doesn't have the correct information. I made mine look like the Bluetooth and Wi-Fi menus.&lt;br /&gt;
&lt;br /&gt;
Works with: 1.0.x&lt;br /&gt;
&lt;br /&gt;
* Does '''NOT''' currently work with: 1.1.0&lt;br /&gt;
** Always shows phone in the OFF state&lt;br /&gt;
&lt;br /&gt;
== Procedure ==&lt;br /&gt;
&lt;br /&gt;
Run the following commands:&lt;br /&gt;
&lt;br /&gt;
''In this example, I have the patch file located in my home directory under '''patches'''''&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd /&lt;br /&gt;
sudo patch -p0 --backup-if-mismatch &amp;lt; ~/patches/radiopower.patch&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is what you should see if it ran properly:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
patching file /usr/lib/luna/system/luna-systemui/app/controllers/bar-assistant.js&lt;br /&gt;
patching file /usr/lib/luna/system/luna-systemui/app/controllers/devicemenu-assistant.js&lt;br /&gt;
patching file /usr/lib/luna/system/luna-systemui/app/views/devicemenu/devicemenu-scene.html&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These modifications will require LunaSysMgr to be restarted. A rescan will not work. After you've run the commands above, run one more command:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
pkill LunaSysMgr&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== radiopower.patch ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;diff&amp;quot;&amp;gt;&lt;br /&gt;
--- /usr/lib/luna/system/luna-systemui/app/controllers/bar-assistant.js	Sat Jul 18 00:21:30 2009&lt;br /&gt;
+++ /usr/lib/luna/sys-mod/luna-systemui/app/controllers/bar-assistant.js	Fri Jul 24 00:44:08 2009&lt;br /&gt;
@@ -789,6 +789,8 @@&lt;br /&gt;
 				this.callForwardNotificationSession = null;	&lt;br /&gt;
 			}				&lt;br /&gt;
 		}&lt;br /&gt;
+		var stageController = Mojo.Controller.getAppController().getStageProxy(&amp;quot;DeviceMenu&amp;quot;);&lt;br /&gt;
+		stageController.delegateToSceneAssistant(&amp;quot;updatePhone&amp;quot;);&lt;br /&gt;
 	}&lt;br /&gt;
 	else if (payload.eventNetwork &amp;amp;&amp;amp; this.phoneRadioState) {&lt;br /&gt;
 		var networkMsg = payload.eventNetwork;&lt;br /&gt;
@@ -2570,6 +2572,10 @@&lt;br /&gt;
 &lt;br /&gt;
 getCurrentWiFiState: function() {&lt;br /&gt;
 	return this.wifiState;&lt;br /&gt;
+},&lt;br /&gt;
+&lt;br /&gt;
+getCurrentPhoneState: function() {&lt;br /&gt;
+	return this.phoneRadioState;&lt;br /&gt;
 },&lt;br /&gt;
 &lt;br /&gt;
 setDeviceMenuAssistant: function(menuassistant) {&lt;br /&gt;
--- /usr/lib/luna/system/luna-systemui/app/controllers/devicemenu-assistant.js	Sat Jul 18 00:21:30 2009&lt;br /&gt;
+++ /usr/lib/luna/sys-mod/luna-systemui/app/controllers/devicemenu-assistant.js	Fri Jul 24 00:50:25 2009&lt;br /&gt;
@@ -1,6 +1,6 @@&lt;br /&gt;
 /* Copyright 2009 Palm, Inc.  All rights reserved. */&lt;br /&gt;
 &lt;br /&gt;
-var RadioState = new Hash({wifi: undefined, bluetooth: undefined});&lt;br /&gt;
+var RadioState = new Hash({wifi: undefined, bluetooth: undefined, phone: undefined});&lt;br /&gt;
 &lt;br /&gt;
 var DevicemenuAssistant = Class.create({&lt;br /&gt;
 	&lt;br /&gt;
@@ -36,6 +36,8 @@&lt;br /&gt;
 		this.drawerModel = {myOpenProperty:false};&lt;br /&gt;
 		this.controller.setupWidget('wifidetails', {modelProperty:'myOpenProperty'}, this.drawerModel);&lt;br /&gt;
 		this.controller.setupWidget('btdetails', {modelProperty:'myOpenProperty'}, this.drawerModel);&lt;br /&gt;
+		this.controller.setupWidget('phonedetails', {modelProperty:'myOpenProperty'}, this.drawerModel);&lt;br /&gt;
+		this.phonedrawer = this.controller.get('phonedetails');&lt;br /&gt;
 		this.wifidrawer = this.controller.get('wifidetails');&lt;br /&gt;
 		this.btdrawer = this.controller.get('btdetails');&lt;br /&gt;
 		&lt;br /&gt;
@@ -92,6 +94,14 @@&lt;br /&gt;
 			else&lt;br /&gt;
 				this.controller.get('wifimsg').innerHTML = wifistate.escapeHTML();			&lt;br /&gt;
 		}		&lt;br /&gt;
+		&lt;br /&gt;
+		var phonestate = this.barAssistant.getCurrentPhoneState();&lt;br /&gt;
+		if(phoneState === 'Off') {&lt;br /&gt;
+			this.controller.get('phonemsg').innerHTML = $L('Off');&lt;br /&gt;
+			RadioState.set('phone',false);&lt;br /&gt;
+		}&lt;br /&gt;
+		else {&lt;br /&gt;
+			this.controller.get('phonemsg').innerHTML = $L('On');&lt;br /&gt;
+			RadioState.set('phone',true);&lt;br /&gt;
+		}&lt;br /&gt;
+		&lt;br /&gt;
 		this.controller.listen(this.controller.document, Mojo.Event.deactivate, this.close.bindAsEventListener(this));&lt;br /&gt;
 		this.isVisible = true;&lt;br /&gt;
 		&lt;br /&gt;
@@ -115,6 +125,8 @@&lt;br /&gt;
 		this.controller.get('btlist').addEventListener(Mojo.Event.listTap,this.handleBTTap.bindAsEventListener(this));		&lt;br /&gt;
 		this.controller.get('dm_wifi').addEventListener(Mojo.Event.tap, this.togglewifiList.bindAsEventListener(this));&lt;br /&gt;
 		this.controller.get('dm_bluetooth').addEventListener(Mojo.Event.tap, this.togglebluetoothList.bindAsEventListener(this));&lt;br /&gt;
+		this.controller.get('dm_phone').addEventListener(Mojo.Event.tap, this.togglePhoneList.bindAsEventListener(this));&lt;br /&gt;
+		this.controller.get('phone_radio').addEventListener(Mojo.Event.tap, this.togglePhoneRadio.bindAsEventListener(this));&lt;br /&gt;
 		this.controller.get('wifi_radio').addEventListener(Mojo.Event.tap, this.toggleWifiRadio.bindAsEventListener(this));&lt;br /&gt;
 		this.controller.get('bt_radio').addEventListener(Mojo.Event.tap, this.toggleBTRadio.bindAsEventListener(this));&lt;br /&gt;
 		this.controller.get('bt_pref').addEventListener(Mojo.Event.tap,this.handleBluetoothLaunch.bindAsEventListener(this));&lt;br /&gt;
@@ -175,6 +187,48 @@&lt;br /&gt;
 		this.apModeInProgress = false;&lt;br /&gt;
 	},&lt;br /&gt;
 	&lt;br /&gt;
+	updatePhone: function() {&lt;br /&gt;
+		if(this.barAssistant.getCurrentPhoneState()) {&lt;br /&gt;
+			this.controller.get('phonemsg').innerHTML = $L('On');&lt;br /&gt;
+			this.controller.get('phone_radio').innerHTML = $L('Turn off Phone');&lt;br /&gt;
+			RadioState.set('phone', true);&lt;br /&gt;
+		}&lt;br /&gt;
+		else {&lt;br /&gt;
+			this.controller.get('phonemsg').innerHTML = $L('Off');&lt;br /&gt;
+			this.controller.get('phone_radio').innerHTML = $L('Turn on Phone');&lt;br /&gt;
+			RadioState.set('phone', false);&lt;br /&gt;
+		}&lt;br /&gt;
+	},&lt;br /&gt;
+	 &lt;br /&gt;
+	togglePhoneRadio: function(event) {&lt;br /&gt;
+		this.serviceRequest = new Mojo.Service.Request(&amp;quot;palm://com.palm.vibrate&amp;quot;, {&lt;br /&gt;
+			method: 'vibrate', parameters: { 'period': 0,'duration': 250 }&lt;br /&gt;
+		});&lt;br /&gt;
+		if(RadioState.get('phone'))&lt;br /&gt;
+			TelephonyService.tempPowerSet('off',false,null,null);&lt;br /&gt;
+		else&lt;br /&gt;
+			TelephonyService.tempPowerSet('on',false,null,null);&lt;br /&gt;
+		this.toggleDeviceMenu();&lt;br /&gt;
+	},&lt;br /&gt;
+	 &lt;br /&gt;
+	togglePhoneList: function(event) {&lt;br /&gt;
+		if(this.apModeInProgress)&lt;br /&gt;
+			return;&lt;br /&gt;
+	 &lt;br /&gt;
+		if (this.phonedrawer.mojo.getOpenState()) {&lt;br /&gt;
+			this.controller.hideWidgetContainer(this.controller.get('phonedetails'));	&lt;br /&gt;
+		}&lt;br /&gt;
+		else {&lt;br /&gt;
+			if(RadioState.get('phone'))&lt;br /&gt;
+				this.controller.get('phone_radio').innerHTML = $L('Turn off Phone');&lt;br /&gt;
+			else&lt;br /&gt;
+			this.controller.get('phone_radio').innerHTML = $L('Turn on Phone');	&lt;br /&gt;
+	 &lt;br /&gt;
+			this.controller.showWidgetContainer(this.controller.get('phonedetails'));&lt;br /&gt;
+		}&lt;br /&gt;
+		this.phonedrawer.mojo.setOpenState(!this.phonedrawer.mojo.getOpenState());						&lt;br /&gt;
+	},&lt;br /&gt;
+	&lt;br /&gt;
 	toggleBTRadio: function(event) {&lt;br /&gt;
 		if(RadioState.get('bluetooth')) {&lt;br /&gt;
 			BtService.radiooff(null,null);			&lt;br /&gt;
@@ -880,7 +934,10 @@&lt;br /&gt;
 	},&lt;br /&gt;
 	&lt;br /&gt;
 	close: function() {&lt;br /&gt;
-		&lt;br /&gt;
+		if(this.phonedrawer.mojo.getOpenState()) {&lt;br /&gt;
+			this.controller.hideWidgetContainer(this.controller.get('phonedetails'));&lt;br /&gt;
+			this.phonedrawer.mojo.setOpenState(false);&lt;br /&gt;
+		}&lt;br /&gt;
 		if (this.btdrawer.mojo.getOpenState()) {&lt;br /&gt;
 			this.clearBTList();			&lt;br /&gt;
 			this.controller.hideWidgetContainer(this.controller.get('btdetails'));&lt;br /&gt;
--- /usr/lib/luna/system/luna-systemui/app/views/devicemenu/devicemenu-scene.html	Sat Jul 18 00:21:30 2009&lt;br /&gt;
+++ /usr/lib/luna/sys-mod/luna-systemui/app/views/devicemenu/devicemenu-scene.html	Fri Jul 24 00:52:11 2009&lt;br /&gt;
@@ -94,6 +94,22 @@&lt;br /&gt;
 				&lt;br /&gt;
 				&amp;lt;div class=&amp;quot;palm-section-divider&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
 				&lt;br /&gt;
+				&amp;lt;div class=&amp;quot;palm-row&amp;quot; id=&amp;quot;dm_phone&amp;quot; x-mojo-tap-highlight='momentary'&amp;gt;&amp;lt;div class=&amp;quot;palm-row-wrapper&amp;quot;&amp;gt;&lt;br /&gt;
+					&amp;lt;div class=&amp;quot;title truncating-text&amp;quot;&amp;gt;&lt;br /&gt;
+						&amp;lt;div class=&amp;quot;label right&amp;quot; id=&amp;quot;phonemsg&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;lt;/div&amp;gt;&lt;br /&gt;
+						&amp;lt;span x-mojo-loc=''&amp;gt;Phone&amp;lt;/span&amp;gt;&lt;br /&gt;
+					&amp;lt;/div&amp;gt;&lt;br /&gt;
+				&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
+				&lt;br /&gt;
+				&amp;lt;div id='phonedetails' x-mojo-element=&amp;quot;Drawer&amp;quot;&amp;gt;&lt;br /&gt;
+					&amp;lt;div class=&amp;quot;palm-row first&amp;quot; x-mojo-tap-highlight='momentary'&amp;gt;&amp;lt;div class=&amp;quot;palm-row-wrapper&amp;quot;&amp;gt;&lt;br /&gt;
+						&amp;lt;div id=&amp;quot;phone_radio&amp;quot; class=&amp;quot;title truncating-text&amp;quot;&amp;gt;&lt;br /&gt;
+						&amp;lt;/div&amp;gt;&lt;br /&gt;
+					&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
+				&amp;lt;/div&amp;gt;&lt;br /&gt;
+				&lt;br /&gt;
+				&amp;lt;div class=&amp;quot;palm-section-divider&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
+				&lt;br /&gt;
 				&amp;lt;div id=&amp;quot;dm_airplanemode&amp;quot; class=&amp;quot;palm-row last&amp;quot; x-mojo-tap-highlight='momentary'&amp;gt;&amp;lt;div class=&amp;quot;palm-row-wrapper&amp;quot;&amp;gt;&lt;br /&gt;
 					&amp;lt;div id=&amp;quot;dm_airplanemode_status&amp;quot; class=&amp;quot;title truncating-text&amp;quot;&amp;gt;&lt;br /&gt;
 					 &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Acknowledgements ==&lt;br /&gt;
&lt;br /&gt;
* pEEf, for figuring everything out&lt;br /&gt;
* [[User:HattCzech|HattCzech]]&lt;br /&gt;
&lt;br /&gt;
== Concerns ==&lt;br /&gt;
&lt;br /&gt;
* Airplane mode still always turns the radio on regardless of the state before airplane mode was turned on.  Otherwise, very nice.&lt;br /&gt;
** I may try to add in a way for it to remember the phone state, but I figured that was the point of Airplane mode, so I haven't looked into it yet. I will look through the code again and see if it's worth it. -[[User:HattCzech|HattCzech]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
= Original Version =&lt;br /&gt;
&lt;br /&gt;
I created this mod so I can turn off the cellular radio, but keep WiFi and Bluetooth on.  Strangely, The Pre does not seem to have an existing way to do this, only the &amp;quot;Airplane Mode&amp;quot; which shuts off ALL radios!&lt;br /&gt;
&lt;br /&gt;
I currently do not have Sprint service on my Pre, and am just using it with WiFi. (See [/bypassing-activation Bypassing Activation] for info on how to do this.)&lt;br /&gt;
&lt;br /&gt;
This will also be useful for people wishing to save their battery if in a poor or no service area, yet still wanting to use WiFi.&lt;br /&gt;
&lt;br /&gt;
Another great use is shutting off the phone so calls will not disturb you while allowing the phone to do all of its network-related activity.&lt;br /&gt;
&lt;br /&gt;
How it works:  Simply click the upper right of the screen where the status bar is (signal strength).  You will get a drop-down menu, this is where the stock &amp;quot;Airplane Mode&amp;quot; is.  I have added a &amp;quot;Toggle Radio Power&amp;quot; function here.  If the radio is on it will turn it off, and vice-versa.  It will not turn off WiFi or Bluetooth like Airplane mode does.&lt;br /&gt;
&lt;br /&gt;
== Note ==&lt;br /&gt;
&lt;br /&gt;
The Pre actually already lets you turn off the cell radio. You can just turn on Airplane Mode, then turn on WiFi, Bluetooth, or both. ~ lolaiba&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
NOTE: If you have never modified any code on the phone, please see [/stock-application-mods Modifiying Stock Applications] first.&lt;br /&gt;
&lt;br /&gt;
This mod is simply additional code to be added to 3 files on your Pre. WARNING: MAKE BACKUPS FIRST!&lt;br /&gt;
&lt;br /&gt;
I will update the page later with proper diffs, but for now you can just get into the shell, make your backups, fire up vi (or nano) then paste in the relevant lines.  Once you are done, you can test it without rebooting by forcing the Luna manager to reinitialize its cache:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
luna-send -n 1 palm://com.palm.applicationManager/rescan {}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is the code, Enjoy!&lt;br /&gt;
&lt;br /&gt;
/usr/lib/luna/system/luna-systemui/app/views/devicemenu/devicemenu-scene.html Line 94:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
                                &amp;lt;div class=&amp;quot;palm-section-divider&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;!-- Added by pEEf --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
                                &amp;lt;div id=&amp;quot;dm_power&amp;quot; class=&amp;quot;palm-row&amp;quot; x-mojo-tap-highlight='momentary'&amp;gt;&amp;lt;div class=&amp;quot;palm-row-wrapper&amp;quot;&amp;gt;&lt;br /&gt;
                                        &amp;lt;div id=&amp;quot;dm_power_status&amp;quot; class=&amp;quot;title truncating-text&amp;quot;&amp;gt;   &lt;br /&gt;
                                         &amp;lt;/div&amp;gt;&lt;br /&gt;
                                &amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
/usr/lib/luna/system/luna-systemui/app/controllers/bar-assistant.js Line 2039:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
//Returns the Radio Power. Called by DeviceMenu. Added by pEEf        &lt;br /&gt;
getPower: function() {       &lt;br /&gt;
	return this.phoneRadioState;&lt;br /&gt;
},&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
/usr/lib/luna/system/luna-systemui/app/controllers/devicemenu-assistant.js Line 59:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
//		Toggle for Radio Power - Added by pEEf&lt;br /&gt;
		if(this.barAssistant.getPower()) {&lt;br /&gt;
			this.controller.get('dm_power_status').innerHTML = $L('Turn off Phone Radio');&lt;br /&gt;
		}&lt;br /&gt;
		else {&lt;br /&gt;
			this.controller.get('dm_power_status').innerHTML = $L('Turn on Phone Radio');&lt;br /&gt;
		}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
/usr/lib/luna/system/luna-systemui/app/controllers/devicemenu-assistant.js Line 107:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;this.controller.get('dm_power').addEventListener(Mojo.Event.tap, this.togglePower.bindAsEventListener(this));&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
/usr/lib/luna/system/luna-systemui/app/controllers/devicemenu-assistant.js Line 126:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
//	Toggles the Radio Power - Added by pEEf           &lt;br /&gt;
&lt;br /&gt;
	togglePower: function() {&lt;br /&gt;
		this.serviceRequest = new Mojo.Service.Request(&amp;quot;palm://com.palm.vibrate&amp;quot;, {&lt;br /&gt;
			method: 'vibrate', parameters: { 'period': 0,'duration': 250 }&lt;br /&gt;
		});&lt;br /&gt;
		if(this.barAssistant.getPower()) {&lt;br /&gt;
			TelephonyService.tempPowerSet('off',false,null,null);&lt;br /&gt;
			this.controller.get('dm_power_status').innerHTML = $L('Turn on Phone Radio');&lt;br /&gt;
		}&lt;br /&gt;
		else {&lt;br /&gt;
			TelephonyService.tempPowerSet('on',false,null,null);&lt;br /&gt;
			this.controller.get('dm_power_status').innerHTML = $L('Turn off Phone Radio');&lt;br /&gt;
		}&lt;br /&gt;
		this.toggleDeviceMenu();&lt;br /&gt;
	},&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Concerns ==&lt;br /&gt;
* Turn off the radio, then turn on airplane mode, and upon turning off airplane mode, the toggle displays the wrong message.&lt;br /&gt;
* Turn on airplane mode, toggle displays wrong message&lt;br /&gt;
&lt;br /&gt;
== Credits ==&lt;br /&gt;
Brought to you by pEEf.&lt;/div&gt;</summary>
		<author><name>NetWhiz</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Patch_Email_Enable_Landscape_Viewing&amp;diff=1976</id>
		<title>Patch Email Enable Landscape Viewing</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Patch_Email_Enable_Landscape_Viewing&amp;diff=1976"/>
		<updated>2009-07-24T11:04:07Z</updated>

		<summary type="html">&lt;p&gt;NetWhiz: /* Notes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Currently does '''NOT''' work in 1.1. Typing &amp;quot;wide&amp;quot; at the account listing activates this feature in 1.1, but it is not persistent between application launches. Further work needs to be done to make it persistent and not require a keyword entry.&lt;br /&gt;
&lt;br /&gt;
== Preamble==&lt;br /&gt;
&lt;br /&gt;
You will need write permissions to the file system on your Pre to apply this patch.&lt;br /&gt;
&lt;br /&gt;
To get write persmissions execute:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;rootfs_open -w&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After you've made the changes below, remount the file system as read-only:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;mount -o remount,ro /&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Procedure==&lt;br /&gt;
&lt;br /&gt;
Enabling rotation in email is trivial. Whenever you rotate the device, the system calls the orientationChanged function of the app. There's already one defined in email, but for some reason it does nothing. You can enable rotation by applying the following patches.&lt;br /&gt;
&lt;br /&gt;
NOTE: The root of the patches is /usr/palm/applications/com.palm.app.email/&lt;br /&gt;
&lt;br /&gt;
=== app/controllers/list-assistant.js===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
--- list-assistant.js_2009-06-27	Sat Jun 27 19:19:19 2009&lt;br /&gt;
+++ list-assistant.js	Sat Jun 27 20:03:19 2009&lt;br /&gt;
@@ -27,6 +27,9 @@&lt;br /&gt;
 				{label:$L('Update'), icon:'sync', command:'sync'}&lt;br /&gt;
 			]};&lt;br /&gt;
 	this.controller.setupWidget(Mojo.Menu.commandMenu, undefined, this.cmdMenuModel);&lt;br /&gt;
+	&lt;br /&gt;
+	// enable free orientation&lt;br /&gt;
+	this.controller.window.PalmSystem.setWindowOrientation(&amp;quot;free&amp;quot;);&lt;br /&gt;
   },&lt;br /&gt;
 &lt;br /&gt;
   // NOTE: this is called by app_scene's _setup function&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== app/controllers/compose-assistant.js===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
--- compose-assistant.js_2009-06-27	Sat Jun 27 19:21:43 2009&lt;br /&gt;
+++ compose-assistant.js	Sat Jun 27 20:03:45 2009&lt;br /&gt;
@@ -178,6 +178,9 @@&lt;br /&gt;
 &lt;br /&gt;
 		// Delayed a little, since we want the header part of render as quickly as possible&lt;br /&gt;
 		ComposeAssistant.onLoad.defer(this.controller, this.email);&lt;br /&gt;
+		&lt;br /&gt;
+		// enable free orientation&lt;br /&gt;
+		this.controller.window.PalmSystem.setWindowOrientation(&amp;quot;free&amp;quot;);&lt;br /&gt;
 	},&lt;br /&gt;
 &lt;br /&gt;
 	cleanup: function() {&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== app/controllers/accounts-assistant.js===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
--- accounts-assistant.js_2009-06-27	Sat Jun 27 19:29:47 2009&lt;br /&gt;
+++ accounts-assistant.js	Sat Jun 27 20:01:28 2009&lt;br /&gt;
@@ -51,6 +51,9 @@&lt;br /&gt;
 		EmailAppDepot.depot.isShowFavorites(AccountsAssistant.kFavoriteFoldersAccountID, this.depotGetFavExpanded.bind(this));&lt;br /&gt;
 &lt;br /&gt;
 		this.controller.listen(this.controller.sceneElement, Mojo.Event.keypress, this.keypressHandler.bind(this));&lt;br /&gt;
+		&lt;br /&gt;
+		// enable free orientation                                                 &lt;br /&gt;
+                this.controller.window.PalmSystem.setWindowOrientation(&amp;quot;free&amp;quot;);&lt;br /&gt;
 	},&lt;br /&gt;
 &lt;br /&gt;
 	cleanup: function() {&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Notes==&lt;br /&gt;
&lt;br /&gt;
Credit goes to jblebrun for the original hack.&lt;br /&gt;
&lt;br /&gt;
Seems that the menu disappears in landscape mode and that the orientation mode carries over from one part of the app to the other as you move to a message or back to the message list or account list. This is especially weird in the compose screen since the menu has some needed functionality in it&lt;br /&gt;
~ FXDemolisher&lt;br /&gt;
&lt;br /&gt;
Curious item found in accounts-assitant.js. There seems to be an orientationString variable in the controller that is linked to some kind of hack if you type a specific string while having the account(folder) list open. Will investigate further. &lt;br /&gt;
&lt;br /&gt;
UPDATE: Seems that typing &amp;quot;RocknRollHax&amp;quot; (see ./app/controllers/accounts-assistant.js)  in the accounts list window will cause the email app to go into 'free' orientation mode. Looks like its an easier way to perform orientation changes instead of explicitly calling setWindowOrientation whenever the orientation changes.&lt;br /&gt;
&lt;br /&gt;
Alternate to RocknRollHax:  In accounts-assistant.js, change key word in line 106 to 'wide' or whatever you want.  Change string length in line 104 to num characters of your new key word. - xorg&lt;br /&gt;
&lt;br /&gt;
- FXDemolisher&lt;br /&gt;
&lt;br /&gt;
7/24/2009 With the 1.1 update there is no need to edit the compose-assistant.js file referenced in the original mod.&lt;br /&gt;
&lt;br /&gt;
-Mamouton&lt;br /&gt;
&lt;br /&gt;
7/24/2009 With the 1.1 update there is no need to edit '''ANY''' pages.&lt;br /&gt;
&lt;br /&gt;
-NetWhiz&lt;/div&gt;</summary>
		<author><name>NetWhiz</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Patch_Messaging_New_Cards_For_Each_Conversation&amp;diff=1964</id>
		<title>Patch Messaging New Cards For Each Conversation</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Patch_Messaging_New_Cards_For_Each_Conversation&amp;diff=1964"/>
		<updated>2009-07-24T06:06:37Z</updated>

		<summary type="html">&lt;p&gt;NetWhiz: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Works with: 1.0.4, 1.1&lt;br /&gt;
&lt;br /&gt;
The message app can be a pain when you have multiple conversations going on. You have to swipe back and then pick someone else quite often. It gets annoying. This modification makes it so a new card is created whenever you click into a conversation.&lt;br /&gt;
&lt;br /&gt;
Edit /usr/palm/applications/com.palm.app.messaging/app/controllers/listview-assistant.js&lt;br /&gt;
We are going to replace the launchChatView function with the following...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
launchChatView: function(chatThreadId) {&lt;br /&gt;
	//Need to jump to that stage if it exists&lt;br /&gt;
	var stageController = Mojo.Controller.appController.getStageController(&amp;quot;messaging&amp;quot;+chatThreadId);&lt;br /&gt;
		if (stageController) {&lt;br /&gt;
			stageController.activate();&lt;br /&gt;
			return;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
	var params = {name: 'messaging' + chatThreadId,&lt;br /&gt;
			lightweight: Mojo.Controller.appInfo.lwStages&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
	var callback = function(controller) {&lt;br /&gt;
		controller.pushScene('chatview',chatThreadId,{&lt;br /&gt;
					focusWindow: true&lt;br /&gt;
				});		&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
	Mojo.Controller.getAppController().createStageWithCallback(params, callback); //doesnt create ifit exists sooo&lt;br /&gt;
  },&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now in /usr/palm/applications/com.palm.app.messaging/app/controllers/chatview-assistant.js&lt;br /&gt;
Comment out lines 246 and 247 (WebOS 1.1: Lines '''289''' &amp;amp; '''290''').&lt;br /&gt;
This will make it so if you back gesture in a chat, then it doesn't bring you back to the conversation list or do anything else.&lt;br /&gt;
&lt;br /&gt;
Either reboot or refresh/kill LunaSysMgr.&lt;br /&gt;
&lt;br /&gt;
== Concerns==&lt;br /&gt;
There's some delay in creating the new cards. I'm not sure why though.&lt;br /&gt;
&lt;br /&gt;
Unread message counter in listview doesn't always update when you view a conversation.&lt;br /&gt;
&lt;br /&gt;
== Major Bugs==&lt;br /&gt;
None yet&lt;br /&gt;
&lt;br /&gt;
Enjoy!&lt;br /&gt;
-Mike dg&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* verified by tictac (after a few miscues)&lt;/div&gt;</summary>
		<author><name>NetWhiz</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Patch_Messaging_New_Cards_For_Each_Conversation&amp;diff=1963</id>
		<title>Patch Messaging New Cards For Each Conversation</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Patch_Messaging_New_Cards_For_Each_Conversation&amp;diff=1963"/>
		<updated>2009-07-24T06:06:07Z</updated>

		<summary type="html">&lt;p&gt;NetWhiz: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The message app can be a pain when you have multiple conversations going on. You have to swipe back and then pick someone else quite often. It gets annoying. This modification makes it so a new card is created whenever you click into a conversation.&lt;br /&gt;
&lt;br /&gt;
Edit /usr/palm/applications/com.palm.app.messaging/app/controllers/listview-assistant.js&lt;br /&gt;
We are going to replace the launchChatView function with the following...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
launchChatView: function(chatThreadId) {&lt;br /&gt;
	//Need to jump to that stage if it exists&lt;br /&gt;
	var stageController = Mojo.Controller.appController.getStageController(&amp;quot;messaging&amp;quot;+chatThreadId);&lt;br /&gt;
		if (stageController) {&lt;br /&gt;
			stageController.activate();&lt;br /&gt;
			return;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
	var params = {name: 'messaging' + chatThreadId,&lt;br /&gt;
			lightweight: Mojo.Controller.appInfo.lwStages&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
	var callback = function(controller) {&lt;br /&gt;
		controller.pushScene('chatview',chatThreadId,{&lt;br /&gt;
					focusWindow: true&lt;br /&gt;
				});		&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
	Mojo.Controller.getAppController().createStageWithCallback(params, callback); //doesnt create ifit exists sooo&lt;br /&gt;
  },&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now in /usr/palm/applications/com.palm.app.messaging/app/controllers/chatview-assistant.js&lt;br /&gt;
Comment out lines 246 and 247 (WebOS 1.1: Lines '''289''' &amp;amp; '''290''').&lt;br /&gt;
This will make it so if you back gesture in a chat, then it doesn't bring you back to the conversation list or do anything else.&lt;br /&gt;
&lt;br /&gt;
Either reboot or refresh/kill LunaSysMgr.&lt;br /&gt;
&lt;br /&gt;
== Concerns==&lt;br /&gt;
There's some delay in creating the new cards. I'm not sure why though.&lt;br /&gt;
&lt;br /&gt;
Unread message counter in listview doesn't always update when you view a conversation.&lt;br /&gt;
&lt;br /&gt;
== Major Bugs==&lt;br /&gt;
None yet&lt;br /&gt;
&lt;br /&gt;
Enjoy!&lt;br /&gt;
-Mike dg&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* verified by tictac (after a few miscues)&lt;/div&gt;</summary>
		<author><name>NetWhiz</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Patch_Messaging_New_Cards_For_Each_Conversation&amp;diff=1962</id>
		<title>Patch Messaging New Cards For Each Conversation</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Patch_Messaging_New_Cards_For_Each_Conversation&amp;diff=1962"/>
		<updated>2009-07-24T06:02:02Z</updated>

		<summary type="html">&lt;p&gt;NetWhiz: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The message app can be a pain when you have multiple conversations going on. You have to swipe back and then pick someone else quite often. It gets annoying. This modification makes it so a new card is created whenever you click into a conversation.&lt;br /&gt;
&lt;br /&gt;
Edit /usr/palm/applications/com.palm.app.messaging/app/controllers/listview-assistant.js&lt;br /&gt;
We are going to replace the launchChatView function with the following...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
launchChatView: function(chatThreadId) {&lt;br /&gt;
	//Need to jump to that stage if it exists&lt;br /&gt;
	var stageController = Mojo.Controller.appController.getStageController(&amp;quot;messaging&amp;quot;+chatThreadId);&lt;br /&gt;
		if (stageController) {&lt;br /&gt;
			stageController.activate();&lt;br /&gt;
			return;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
	var params = {name: 'messaging' + chatThreadId,&lt;br /&gt;
			lightweight: Mojo.Controller.appInfo.lwStages&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
	var callback = function(controller) {&lt;br /&gt;
		controller.pushScene('chatview',chatThreadId,{&lt;br /&gt;
					focusWindow: true&lt;br /&gt;
				});		&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
	Mojo.Controller.getAppController().createStageWithCallback(params, callback); //doesnt create ifit exists sooo&lt;br /&gt;
  },&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now in /usr/palm/applications/com.palm.app.messaging/app/controllers/chatview-assistant.js&lt;br /&gt;
Comment out lines 246 and 247.&lt;br /&gt;
This will make it so if you back gesture in a chat, then it doesn't bring you back to the conversation list or do anything else.&lt;br /&gt;
&lt;br /&gt;
== Concerns==&lt;br /&gt;
There's some delay in creating the new cards. I'm not sure why though.&lt;br /&gt;
&lt;br /&gt;
Unread message counter in listview doesn't always update when you view a conversation.&lt;br /&gt;
&lt;br /&gt;
== Major Bugs==&lt;br /&gt;
None yet&lt;br /&gt;
&lt;br /&gt;
Enjoy!&lt;br /&gt;
-Mike dg&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* verified by tictac (after a few miscues)&lt;/div&gt;</summary>
		<author><name>NetWhiz</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Patch_Email_Enable_Landscape_Viewing&amp;diff=1960</id>
		<title>Patch Email Enable Landscape Viewing</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Patch_Email_Enable_Landscape_Viewing&amp;diff=1960"/>
		<updated>2009-07-24T05:50:55Z</updated>

		<summary type="html">&lt;p&gt;NetWhiz: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Currently does '''NOT''' work in 1.1. Typing &amp;quot;wide&amp;quot; at the account listing activates this feature in 1.1, but it is not persistent between application launches. Further work needs to be done to make it persistent and not require a keyword entry.&lt;br /&gt;
&lt;br /&gt;
== Preamble==&lt;br /&gt;
&lt;br /&gt;
You will need write permissions to the file system on your Pre to apply this patch.&lt;br /&gt;
&lt;br /&gt;
To get write persmissions execute:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;rootfs_open -w&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After you've made the changes below, remount the file system as read-only:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;mount -o remount,ro /&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Procedure==&lt;br /&gt;
&lt;br /&gt;
Enabling rotation in email is trivial. Whenever you rotate the device, the system calls the orientationChanged function of the app. There's already one defined in email, but for some reason it does nothing. You can enable rotation by applying the following patches.&lt;br /&gt;
&lt;br /&gt;
NOTE: The root of the patches is /usr/palm/applications/com.palm.app.email/&lt;br /&gt;
&lt;br /&gt;
=== app/controllers/list-assistant.js===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
--- list-assistant.js_2009-06-27	Sat Jun 27 19:19:19 2009&lt;br /&gt;
+++ list-assistant.js	Sat Jun 27 20:03:19 2009&lt;br /&gt;
@@ -27,6 +27,9 @@&lt;br /&gt;
 				{label:$L('Update'), icon:'sync', command:'sync'}&lt;br /&gt;
 			]};&lt;br /&gt;
 	this.controller.setupWidget(Mojo.Menu.commandMenu, undefined, this.cmdMenuModel);&lt;br /&gt;
+	&lt;br /&gt;
+	// enable free orientation&lt;br /&gt;
+	this.controller.window.PalmSystem.setWindowOrientation(&amp;quot;free&amp;quot;);&lt;br /&gt;
   },&lt;br /&gt;
 &lt;br /&gt;
   // NOTE: this is called by app_scene's _setup function&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== app/controllers/compose-assistant.js===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
--- compose-assistant.js_2009-06-27	Sat Jun 27 19:21:43 2009&lt;br /&gt;
+++ compose-assistant.js	Sat Jun 27 20:03:45 2009&lt;br /&gt;
@@ -178,6 +178,9 @@&lt;br /&gt;
 &lt;br /&gt;
 		// Delayed a little, since we want the header part of render as quickly as possible&lt;br /&gt;
 		ComposeAssistant.onLoad.defer(this.controller, this.email);&lt;br /&gt;
+		&lt;br /&gt;
+		// enable free orientation&lt;br /&gt;
+		this.controller.window.PalmSystem.setWindowOrientation(&amp;quot;free&amp;quot;);&lt;br /&gt;
 	},&lt;br /&gt;
 &lt;br /&gt;
 	cleanup: function() {&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== app/controllers/accounts-assistant.js===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
--- accounts-assistant.js_2009-06-27	Sat Jun 27 19:29:47 2009&lt;br /&gt;
+++ accounts-assistant.js	Sat Jun 27 20:01:28 2009&lt;br /&gt;
@@ -51,6 +51,9 @@&lt;br /&gt;
 		EmailAppDepot.depot.isShowFavorites(AccountsAssistant.kFavoriteFoldersAccountID, this.depotGetFavExpanded.bind(this));&lt;br /&gt;
 &lt;br /&gt;
 		this.controller.listen(this.controller.sceneElement, Mojo.Event.keypress, this.keypressHandler.bind(this));&lt;br /&gt;
+		&lt;br /&gt;
+		// enable free orientation                                                 &lt;br /&gt;
+                this.controller.window.PalmSystem.setWindowOrientation(&amp;quot;free&amp;quot;);&lt;br /&gt;
 	},&lt;br /&gt;
 &lt;br /&gt;
 	cleanup: function() {&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Notes==&lt;br /&gt;
&lt;br /&gt;
Credit goes to jblebrun for the original hack.&lt;br /&gt;
&lt;br /&gt;
Seems that the menu disappears in landscape mode and that the orientation mode carries over from one part of the app to the other as you move to a message or back to the message list or account list. This is especially weird in the compose screen since the menu has some needed functionality in it&lt;br /&gt;
~ FXDemolisher&lt;br /&gt;
&lt;br /&gt;
Curious item found in accounts-assitant.js. There seems to be an orientationString variable in the controller that is linked to some kind of hack if you type a specific string while having the account(folder) list open. Will investigate further. &lt;br /&gt;
&lt;br /&gt;
UPDATE: Seems that typing &amp;quot;RocknRollHax&amp;quot; (see ./app/controllers/accounts-assistant.js)  in the accounts list window will cause the email app to go into 'free' orientation mode. Looks like its an easier way to perform orientation changes instead of explicitly calling setWindowOrientation whenever the orientation changes.&lt;br /&gt;
&lt;br /&gt;
Alternate to RocknRollHax:  In accounts-assistant.js, change key word in line 106 to 'wide' or whatever you want.  Change string length in line 104 to num characters of your new key word. - xorg&lt;br /&gt;
&lt;br /&gt;
- FXDemolisher&lt;/div&gt;</summary>
		<author><name>NetWhiz</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Patch_webOS_Changing_the_%22Turn_off_after_X%22_time&amp;diff=1956</id>
		<title>Patch webOS Changing the &quot;Turn off after X&quot; time</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Patch_webOS_Changing_the_%22Turn_off_after_X%22_time&amp;diff=1956"/>
		<updated>2009-07-24T05:10:42Z</updated>

		<summary type="html">&lt;p&gt;NetWhiz: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Changing the &amp;quot;Turn off after X&amp;quot; time in the Palm Pre (&amp;quot;Screen and Lock Menu&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
By Townsend Harris (&amp;quot;tharris-&amp;quot; IRC channel)&lt;br /&gt;
&lt;br /&gt;
Ultimately what this does is allow you to change the idle time value that turns the pre off.  So this setting tells the pre &amp;quot;After X seconds of activity go to sleep&amp;quot;.  Now for me I wanted say 5 minutes so I can test stuff, but the average person might be ok&lt;br /&gt;
with the 30 seconds, 1 minute, 2 minutes, or 3minutes, now we have an option. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
SPECIAL NOTE: Changing this value to less than 30 seconds means you better be acting fast, as a side note I was able to &lt;br /&gt;
set the value to 1 second and still operate the pre (I do not recommend this), but I had to be very fast.  Also changing &lt;br /&gt;
this value to a high number *can* drain your battery so be aware.&lt;br /&gt;
&lt;br /&gt;
If all you want to do is keep the screen on while charging, you can set that using luna-send.  Your screen will stay on when on usb power and wall power.  When on the Touchstone, the Pre will still go back to the &amp;quot;lock&amp;quot; screen after the timeout period.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;luna-send -n 1 palm://com.palm.display/control/setProperty '{&amp;quot;onWhenConnected&amp;quot;:true}'&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Steps:&lt;br /&gt;
&lt;br /&gt;
1) Root your pre : go [[Portal:Accessing_Linux]]&lt;br /&gt;
&lt;br /&gt;
2) SSH to your pre and sudo to root.  Execute &amp;quot;rootfs_open -w&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
3) make a copy of the original &amp;quot;/usr/palm/applications/com.palm.app.screenlock/app/controllers/securityconfig-assistant.js&amp;quot; file by executing the following:&lt;br /&gt;
&lt;br /&gt;
&amp;quot;'''cp /usr/palm/applications/com.palm.app.screenlock/app/controllers/securityconfig-assistant.js /usr/palm/applications/com.palm.app.screenlock/app/controllers/securityconfig-assistant.js.org&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
4) edit the /usr/palm/applications/com.palm.app.screenlock/app/controllers/securityconfig-assistant.js file&lt;br /&gt;
&lt;br /&gt;
Goto line '''102''' (WebOS 1.1: Line '''111''') which should like like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
**//Available Timer Values.&lt;br /&gt;
 availableTimers: &amp;quot;[{label: $L('30 seconds'), value:30},{label: $L('1 minute'), value:60},{label: $L('2 minutes'), value:120},{label: $L('3 minutes'), value:180}],&amp;quot;**&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and add this to the end of the string inside the last &amp;quot;]&amp;quot;: &amp;quot;,{label: $L('5 Minutes'), value:300}&amp;quot; and edit it as you see fit.   This will add &amp;quot;5  Minutes&amp;quot; to the drop down menu. You can add further options as you require (i.e. 30 minutes, 3 hours, etc.).&lt;br /&gt;
  &lt;br /&gt;
REMEMBER the value is based on '''SECONDS'''&lt;br /&gt;
&lt;br /&gt;
5) Execute a rescan by running &amp;quot;luna-send -n 1 palm://com.palm.applicationManager/rescan {}&amp;quot; on the command line.&lt;br /&gt;
  &lt;br /&gt;
6) Execute &amp;quot;mount -o remount,ro /&amp;quot;.&lt;br /&gt;
 &lt;br /&gt;
Voila you have changed your idle timeouts.&lt;/div&gt;</summary>
		<author><name>NetWhiz</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Patch_webOS_Changing_the_%22Turn_off_after_X%22_time&amp;diff=1954</id>
		<title>Patch webOS Changing the &quot;Turn off after X&quot; time</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Patch_webOS_Changing_the_%22Turn_off_after_X%22_time&amp;diff=1954"/>
		<updated>2009-07-24T05:07:01Z</updated>

		<summary type="html">&lt;p&gt;NetWhiz: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Changing the &amp;quot;Turn off after X&amp;quot; time in the Palm Pre (&amp;quot;Screen and Lock Menu&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
By Townsend Harris (&amp;quot;tharris-&amp;quot; IRC channel)&lt;br /&gt;
&lt;br /&gt;
Ultimately what this does is allow you to change the idle time value that turns the pre off.  So this setting tells the pre &amp;quot;After X seconds of activity go to sleep&amp;quot;.  Now for me I wanted say 5 minutes so I can test stuff, but the average person might be ok&lt;br /&gt;
with the 30 seconds, 1 minute, 2 minutes, or 3minutes, now we have an option. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
SPECIAL NOTE: Changing this value to less than 30 seconds means you better be acting fast, as a side note I was able to &lt;br /&gt;
set the value to 1 second and still operate the pre (I do not recommend this), but I had to be very fast.  Also changing &lt;br /&gt;
this value to a high number *can* drain your battery so be aware.&lt;br /&gt;
&lt;br /&gt;
If all you want to do is keep the screen on while charging, you can set that using luna-send.  Your screen will stay on when on usb power and wall power.  When on the Touchstone, the Pre will still go back to the &amp;quot;lock&amp;quot; screen after the timeout period.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;luna-send -n 1 palm://com.palm.display/control/setProperty '{&amp;quot;onWhenConnected&amp;quot;:true}'&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Steps:&lt;br /&gt;
&lt;br /&gt;
1) Root your pre : go [[Portal:Accessing_Linux]]&lt;br /&gt;
&lt;br /&gt;
2) SSH to your pre and sudo to root.  Execute &amp;quot;rootfs_open -w&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
3) make a copy of the original &amp;quot;/usr/palm/applications/com.palm.app.screenlock/app/controllers/securityconfig-assistant.js&amp;quot; file by executing the following:&lt;br /&gt;
&lt;br /&gt;
&amp;quot;'''cp /usr/palm/applications/com.palm.app.screenlock/app/controllers/securityconfig-assistant.js /usr/palm/applications/com.palm.app.screenlock/app/controllers/securityconfig-assistant.js.org&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
4) edit the /usr/palm/applications/com.palm.app.screenlock/app/controllers/securityconfig-assistant.js file&lt;br /&gt;
&lt;br /&gt;
Goto line '''102''' (WebOS 1.1: Line '''111''') which should like like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
**//Available Timer Values.&lt;br /&gt;
 availableTimers: &amp;quot;[{label: $L('30 seconds'), value:30},{label: $L('1 minute'), value:60},{label: $L('2 minutes'), value:120},{label: $L('3 minutes'), value:180}],&amp;quot;**&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and add this to the end of the string inside the last &amp;quot;]&amp;quot;: &amp;quot;,{label: $L('5 Minutes'), value:300}&amp;quot; and edit it as you see fit.   This will add &amp;quot;5  Minutes&amp;quot; to the drop down menu.&lt;br /&gt;
  &lt;br /&gt;
REMEMBER the value is based on '''SECONDS'''&lt;br /&gt;
&lt;br /&gt;
5) Execute a rescan by running &amp;quot;luna-send -n 1 palm://com.palm.applicationManager/rescan {}&amp;quot; on the command line.&lt;br /&gt;
  &lt;br /&gt;
6) Execute &amp;quot;mount -o remount,ro /&amp;quot;.&lt;br /&gt;
 &lt;br /&gt;
Voila you have changed your idle timeouts.&lt;/div&gt;</summary>
		<author><name>NetWhiz</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Patch_webOS_Boot_Themes&amp;diff=1953</id>
		<title>Patch webOS Boot Themes</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Patch_webOS_Boot_Themes&amp;diff=1953"/>
		<updated>2009-07-24T05:01:57Z</updated>

		<summary type="html">&lt;p&gt;NetWhiz: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;When the Pre is booting or shutting down, the screen fades between two images - ''/palm-logo.png'' and ''/palm-logo-bright.png'' located in ''/usr/palm/sysmgr/images''.  By replacing either or both of these images, the boot logo can be customized.  This requires a [[Portal:Accessing_Linux | rooted]] Pre.&lt;br /&gt;
&lt;br /&gt;
Works with: 1.0.3, 1.1&lt;br /&gt;
&lt;br /&gt;
== Replacing the Files==&lt;br /&gt;
&lt;br /&gt;
'''Step One'''&lt;br /&gt;
Log into the phone via ssh and copy the files to the USB drive.&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
mkdir /media/internal/bootlogo&lt;br /&gt;
cp /usr/palm/sysmgr/images/palm-logo* /media/internal/bootlogo&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Step Two'''&lt;br /&gt;
Modify the files with your favorite editor (Gimp, Photoshop, ImageMagick, MS Paint, etc.)&lt;br /&gt;
&lt;br /&gt;
'''Step Three'''&lt;br /&gt;
Save the new images to the ''bootlogo'' directory on the Pre's USB drive.&lt;br /&gt;
&lt;br /&gt;
'''Step Four'''&lt;br /&gt;
Log into the phone via ssh, remount the root filesystem read-write, backup the existing files, copy the new images into place, and remount the root filesystem read-only.&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
sudo mount -o rw,remount /&lt;br /&gt;
sudo cp -ip /usr/palm/sysmgr/images/palm-logo.png /usr/palm/sysmgr/images/palm-logo.png.orig&lt;br /&gt;
sudo cp -ip /usr/palm/sysmgr/images/palm-logo-bright.png /usr/palm/sysmgr/images/palm-logo-bright.png.orig&lt;br /&gt;
sudo cp /media/internal/bootlogo/palm-logo.png /usr/palm/sysmgr/images/palm-logo.png&lt;br /&gt;
sudo cp /media/internal/bootlogo/palm-logo-bright.png /usr/palm/sysmgr/images/palm-logo-bright.png&lt;br /&gt;
sudo mount -o ro,remount /&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Step Five'''&lt;br /&gt;
Restart Luna and watch your awesome new logo.&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
pkill LunaSysMgr&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Taking it to the Next Step==&lt;br /&gt;
&lt;br /&gt;
With a small bit of scripting, we can have separate boot and shutdown themes.  The first thing to do is to create regular and &amp;quot;bright&amp;quot; images for booting and shutting down.  Save the new images to the ''bootlogo'' directory on the Pre's USB drive. (Steps 1-3 above).&lt;br /&gt;
&lt;br /&gt;
'''Step One'''&lt;br /&gt;
Log into the phone via ssh, remount the root filesystem read-write, and create a directory in /opt to store the new images.  We're using /opt, as the script we'll modify later will copy files, and /usr is mounted read-only.&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
sudo mount -o rw,remount /&lt;br /&gt;
sudo mkdir -p /opt/share/bootimages&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Step Two'''&lt;br /&gt;
Copy the new images to /opt/share/bootimages, naming them palm-logo-up.png, palm-logo-up-bright.png, palm-logo-down.png and palm-logo-down-bright.png.  Additionally, copy the shutdown files to palm-logo.png and palm-logo-bright.png.&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
cd /opt/share/bootimages/&lt;br /&gt;
sudo cp /media/internal/bootlogo/&amp;lt;boot image&amp;gt; palm-logo-up.png&lt;br /&gt;
sudo cp /media/internal/bootlogo/&amp;lt;bright boot image&amp;gt; palm-logo-up-bright.png&lt;br /&gt;
sudo cp /media/internal/bootlogo/&amp;lt;shutdown image&amp;gt; palm-logo-down.png&lt;br /&gt;
sudo cp /media/internal/bootlogo/&amp;lt;bright shutdown image&amp;gt; palm-logo-down-bright.png&lt;br /&gt;
sudo cp palm-logo-down.png palm-logo.png&lt;br /&gt;
sudo cp palm-logo-down-bright.png palm-logo-bright.png&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Step Three'''&lt;br /&gt;
Backup the current logo images, if you haven't already.&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
sudo cp -ip /usr/palm/sysmgr/images/palm-logo.png /usr/palm/sysmgr/images/palm-logo.png.orig&lt;br /&gt;
sudo cp -ip /usr/palm/sysmgr/images/palm-logo-bright.png /usr/palm/sysmgr/images/palm-logo-bright.png.orig&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Step Four'''&lt;br /&gt;
Delete the current logo images and replace them with symlinks to the files in our new directory in /opt&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
cd /usr/palm/sysmgr/images/&lt;br /&gt;
sudo rm palm-logo-bright.png&lt;br /&gt;
sudo rm palm-logo.png&lt;br /&gt;
sudo ln -s ../../../../../opt/share/bootimages/palm-logo-bright.png palm-logo-bright.png&lt;br /&gt;
sudo ln -s ../../../../../opt/share/bootimages/palm-logo.png palm-logo.png&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Step Five'''&lt;br /&gt;
Back up and edit /etc/init.d/start_animation, adding the switching of the files&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
sudo cp -ip /etc/init.d/start_animation /etc/init.d/start_animation.orig&lt;br /&gt;
sudo -e /etc/init.d/start_animation&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
Before the line starting with ''if [ -x /usr/bin/luna-send'' add the following:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
ok=no&lt;br /&gt;
if [ -f /opt/share/bootimages/palm-logo-up.png ] &amp;amp;&amp;amp; \&lt;br /&gt;
   [ -f /opt/share/bootimages/palm-logo-up-bright.png ] &amp;amp;&amp;amp; \&lt;br /&gt;
   [ -f /opt/share/bootimages/palm-logo-down.png ] &amp;amp;&amp;amp; \&lt;br /&gt;
   [ -f /opt/share/bootimages/palm-logo-down-bright.png ] ; then&lt;br /&gt;
        cp /opt/share/bootimages/palm-logo-down.png /opt/share/bootimages/palm-logo.png&lt;br /&gt;
        cp /opt/share/bootimages/palm-logo-down-bright.png /opt/share/bootimages/palm-logo-bright.png&lt;br /&gt;
        ok=yes&lt;br /&gt;
fi&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
At the very end of the file, add the following:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
if [ &amp;quot;$ok&amp;quot; = &amp;quot;yes&amp;quot; ] ; then&lt;br /&gt;
        sleep 5&lt;br /&gt;
        cp /opt/share/bootimages/palm-logo-up.png /opt/share/bootimages/palm-logo.png&lt;br /&gt;
        cp /opt/share/bootimages/palm-logo-up-bright.png /opt/share/bootimages/palm-logo-bright.png&lt;br /&gt;
fi&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Step Six'''&lt;br /&gt;
Reboot the phone and watch your awesome new logos.&lt;br /&gt;
&lt;br /&gt;
== Boot Themes==&lt;br /&gt;
&lt;br /&gt;
'''Title:''' Default Theme&lt;br /&gt;
&lt;br /&gt;
'''Author:''' Palm&lt;br /&gt;
&lt;br /&gt;
[[Image:Palm-logo.png]] &lt;br /&gt;
[[Image:Palm-logo-bright.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Title:''' Tux - got root?&lt;br /&gt;
&lt;br /&gt;
'''Author:''' JackieRipper&lt;br /&gt;
&lt;br /&gt;
[[Image:Jackieripper-palm-logo.png]] &lt;br /&gt;
[[Image:Jackieripper-palm-logo-bright.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Title:''' Red and Green&lt;br /&gt;
&lt;br /&gt;
'''Author:''' JackieRipper&lt;br /&gt;
&lt;br /&gt;
[[Image:Jackieripper2-palm-logo-up.png]] &lt;br /&gt;
[[Image:Jackieripper2-palm-logo-up-bright.png]] &lt;br /&gt;
[[Image:Jackieripper2-palm-logo-down.png]] &lt;br /&gt;
[[Image:Jackieripper2-palm-logo-down-bright.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Title:''' Blue Tux&lt;br /&gt;
&lt;br /&gt;
'''Author:''' pEEf&lt;br /&gt;
&lt;br /&gt;
[[Image:PEEf-palm-logo.png]] &lt;br /&gt;
[[Image:PEEf-palm-logo-bright.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Title:''' Glassy Tux&lt;br /&gt;
&lt;br /&gt;
'''Author:''' fish199902&lt;br /&gt;
&lt;br /&gt;
[[Image:Fish109902-palm-logo.png]] &lt;br /&gt;
[[Image:Fish109902-palm-logo-bright.png]]&lt;/div&gt;</summary>
		<author><name>NetWhiz</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Patch_webOS_Radio_Power_Switch&amp;diff=1952</id>
		<title>Patch webOS Radio Power Switch</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Patch_webOS_Radio_Power_Switch&amp;diff=1952"/>
		<updated>2009-07-24T05:01:34Z</updated>

		<summary type="html">&lt;p&gt;NetWhiz: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Seamless Interface =&lt;br /&gt;
&lt;br /&gt;
[[Image:RadioPowerSwitch.jpg|border|right|Radio Power Switch]]&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
I took what pEEf did and made it look more like it fits. I liked the original idea, but as mentioned in the concerns below, when changing between Airplane mode and back, it doesn't have the correct information. I made mine look like the Bluetooth and Wi-Fi menus.&lt;br /&gt;
&lt;br /&gt;
Works with: 1.0.3&lt;br /&gt;
&lt;br /&gt;
Does NOT currently work with: 1.1&lt;br /&gt;
&lt;br /&gt;
== Procedure ==&lt;br /&gt;
&lt;br /&gt;
'''/usr/lib/luna/system/luna-systemui/app/views/devicemenu/devicemenu-scene.html''' Line 97:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;HTML4Strict&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;palm-row&amp;quot; id=&amp;quot;dm_phone&amp;quot; x-mojo-tap-highlight='momentary'&amp;gt;&amp;lt;div class=&amp;quot;palm-row-wrapper&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;div class=&amp;quot;title truncating-text&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;div class=&amp;quot;label right&amp;quot; id=&amp;quot;phonemsg&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;lt;/div&amp;gt;&lt;br /&gt;
		&amp;lt;span x-mojo-loc=''&amp;gt;Phone&amp;lt;/span&amp;gt;&lt;br /&gt;
	&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id='phonedetails' x-mojo-element=&amp;quot;Drawer&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;div class=&amp;quot;palm-row first&amp;quot; x-mojo-tap-highlight='momentary'&amp;gt;&amp;lt;div class=&amp;quot;palm-row-wrapper&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;div id=&amp;quot;phone_radio&amp;quot; class=&amp;quot;title truncating-text&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/div&amp;gt;&lt;br /&gt;
	&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;palm-section-divider&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''/usr/lib/luna/system/luna-systemui/app/controllers/bar-assistant.js''' Line 690:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
var stageController = Mojo.Controller.getAppController().getStageProxy(&amp;quot;DeviceMenu&amp;quot;);&lt;br /&gt;
stageController.delegateToSceneAssistant(&amp;quot;updatePhone&amp;quot;);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Line 2302:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
getCurrentPhoneState: function() {&lt;br /&gt;
	return this.phoneRadioState;&lt;br /&gt;
},&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''/usr/lib/luna/system/luna-systemui/app/controllers/devicemenu-assistant.js''' Line 1:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
var RadioState = new Hash({wifi: undefined, bluetooth: undefined, phone: undefined});&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Line 39:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
this.controller.setupWidget('phonedetails', {modelProperty:'myOpenProperty'}, this.drawerModel);&lt;br /&gt;
this.phonedrawer = this.controller.get('phonedetails');&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Line 95:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
if(this.barAssistant.getCurrentPhoneState()) {&lt;br /&gt;
	this.controller.get('phonemsg').innerHTML = $L('On');&lt;br /&gt;
	RadioState.set('phone',true);&lt;br /&gt;
}&lt;br /&gt;
else {&lt;br /&gt;
	this.controller.get('phonemsg').innerHTML = $L('Off');&lt;br /&gt;
	RadioState.set('phone',false);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Line 118:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
this.controller.get('dm_phone').addEventListener(Mojo.Event.tap, this.togglePhoneList.bindAsEventListener(this));&lt;br /&gt;
this.controller.get('phone_radio').addEventListener(Mojo.Event.tap, this.togglePhoneRadio.bindAsEventListener(this));&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Line 173:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
updatePhone: function() {&lt;br /&gt;
	if(this.barAssistant.getCurrentPhoneState()) {&lt;br /&gt;
		this.controller.get('phonemsg').innerHTML = $L('On');&lt;br /&gt;
		this.controller.get('phone_radio').innerHTML = $L('Turn off Phone');&lt;br /&gt;
		RadioState.set('phone', true);&lt;br /&gt;
	}&lt;br /&gt;
	else {&lt;br /&gt;
		this.controller.get('phonemsg').innerHTML = $L('Off');&lt;br /&gt;
		this.controller.get('phone_radio').innerHTML = $L('Turn on Phone');&lt;br /&gt;
		RadioState.set('phone', false);&lt;br /&gt;
	}&lt;br /&gt;
},&lt;br /&gt;
&lt;br /&gt;
togglePhoneRadio: function(event) {&lt;br /&gt;
	this.serviceRequest = new Mojo.Service.Request(&amp;quot;palm://com.palm.vibrate&amp;quot;, {&lt;br /&gt;
		method: 'vibrate', parameters: { 'period': 0,'duration': 250 }&lt;br /&gt;
	});&lt;br /&gt;
	if(RadioState.get('phone'))&lt;br /&gt;
		TelephonyService.tempPowerSet('off',false,null,null);&lt;br /&gt;
	else&lt;br /&gt;
		TelephonyService.tempPowerSet('on',false,null,null);&lt;br /&gt;
	this.toggleDeviceMenu();&lt;br /&gt;
},&lt;br /&gt;
&lt;br /&gt;
togglePhoneList: function(event) {&lt;br /&gt;
	if(this.apModeInProgress)&lt;br /&gt;
		return;&lt;br /&gt;
&lt;br /&gt;
	if (this.phonedrawer.mojo.getOpenState()) {&lt;br /&gt;
		this.controller.hideWidgetContainer(this.controller.get('phonedetails'));	&lt;br /&gt;
	}&lt;br /&gt;
	else {&lt;br /&gt;
		if(RadioState.get('phone'))&lt;br /&gt;
			this.controller.get('phone_radio').innerHTML = $L('Turn off Phone');&lt;br /&gt;
		else&lt;br /&gt;
		this.controller.get('phone_radio').innerHTML = $L('Turn on Phone');	&lt;br /&gt;
&lt;br /&gt;
		this.controller.showWidgetContainer(this.controller.get('phonedetails'));&lt;br /&gt;
	}&lt;br /&gt;
	this.phonedrawer.mojo.setOpenState(!this.phonedrawer.mojo.getOpenState());						&lt;br /&gt;
},&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Line 921:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
if(this.phonedrawer.mojo.getOpenState()) {&lt;br /&gt;
	this.controller.hideWidgetContainer(this.controller.get('phonedetails'));&lt;br /&gt;
	this.phonedrawer.mojo.setOpenState(false);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Acknowledgements ==&lt;br /&gt;
&lt;br /&gt;
* pEEf, for figuring everything out&lt;br /&gt;
* [[User:HattCzech|HattCzech]]&lt;br /&gt;
&lt;br /&gt;
== Concerns ==&lt;br /&gt;
&lt;br /&gt;
* Airplane mode still always turns the radio on regardless of the state before airplane mode was turned on.  Otherwise, very nice.&lt;br /&gt;
** I may try to add in a way for it to remember the phone state, but I figured that was the point of Airplane mode, so I haven't looked into it yet. I will look through the code again and see if it's worth it. -[[User:HattCzech|HattCzech]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
= Original Version =&lt;br /&gt;
&lt;br /&gt;
I created this mod so I can turn off the cellular radio, but keep WiFi and Bluetooth on.  Strangely, The Pre does not seem to have an existing way to do this, only the &amp;quot;Airplane Mode&amp;quot; which shuts off ALL radios!&lt;br /&gt;
&lt;br /&gt;
I currently do not have Sprint service on my Pre, and am just using it with WiFi. (See [/bypassing-activation Bypassing Activation] for info on how to do this.)&lt;br /&gt;
&lt;br /&gt;
This will also be useful for people wishing to save their battery if in a poor or no service area, yet still wanting to use WiFi.&lt;br /&gt;
&lt;br /&gt;
Another great use is shutting off the phone so calls will not disturb you while allowing the phone to do all of its network-related activity.&lt;br /&gt;
&lt;br /&gt;
How it works:  Simply click the upper right of the screen where the status bar is (signal strength).  You will get a drop-down menu, this is where the stock &amp;quot;Airplane Mode&amp;quot; is.  I have added a &amp;quot;Toggle Radio Power&amp;quot; function here.  If the radio is on it will turn it off, and vice-versa.  It will not turn off WiFi or Bluetooth like Airplane mode does.&lt;br /&gt;
&lt;br /&gt;
== Note ==&lt;br /&gt;
&lt;br /&gt;
The Pre actually already lets you turn off the cell radio. You can just turn on Airplane Mode, then turn on WiFi, Bluetooth, or both. ~ lolaiba&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
NOTE: If you have never modified any code on the phone, please see [/stock-application-mods Modifiying Stock Applications] first.&lt;br /&gt;
&lt;br /&gt;
This mod is simply additional code to be added to 3 files on your Pre. WARNING: MAKE BACKUPS FIRST!&lt;br /&gt;
&lt;br /&gt;
I will update the page later with proper diffs, but for now you can just get into the shell, make your backups, fire up vi (or nano) then paste in the relevant lines.  Once you are done, you can test it without rebooting by forcing the Luna manager to reinitialize its cache:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
luna-send -n 1 palm://com.palm.applicationManager/rescan {}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is the code, Enjoy!&lt;br /&gt;
&lt;br /&gt;
/usr/lib/luna/system/luna-systemui/app/views/devicemenu/devicemenu-scene.html Line 94:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
                                &amp;lt;div class=&amp;quot;palm-section-divider&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;!-- Added by pEEf --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
                                &amp;lt;div id=&amp;quot;dm_power&amp;quot; class=&amp;quot;palm-row&amp;quot; x-mojo-tap-highlight='momentary'&amp;gt;&amp;lt;div class=&amp;quot;palm-row-wrapper&amp;quot;&amp;gt;&lt;br /&gt;
                                        &amp;lt;div id=&amp;quot;dm_power_status&amp;quot; class=&amp;quot;title truncating-text&amp;quot;&amp;gt;   &lt;br /&gt;
                                         &amp;lt;/div&amp;gt;&lt;br /&gt;
                                &amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
/usr/lib/luna/system/luna-systemui/app/controllers/bar-assistant.js Line 2039:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
//Returns the Radio Power. Called by DeviceMenu. Added by pEEf        &lt;br /&gt;
getPower: function() {       &lt;br /&gt;
	return this.phoneRadioState;&lt;br /&gt;
},&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
/usr/lib/luna/system/luna-systemui/app/controllers/devicemenu-assistant.js Line 59:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
//		Toggle for Radio Power - Added by pEEf&lt;br /&gt;
		if(this.barAssistant.getPower()) {&lt;br /&gt;
			this.controller.get('dm_power_status').innerHTML = $L('Turn off Phone Radio');&lt;br /&gt;
		}&lt;br /&gt;
		else {&lt;br /&gt;
			this.controller.get('dm_power_status').innerHTML = $L('Turn on Phone Radio');&lt;br /&gt;
		}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
/usr/lib/luna/system/luna-systemui/app/controllers/devicemenu-assistant.js Line 107:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;this.controller.get('dm_power').addEventListener(Mojo.Event.tap, this.togglePower.bindAsEventListener(this));&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
/usr/lib/luna/system/luna-systemui/app/controllers/devicemenu-assistant.js Line 126:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
//	Toggles the Radio Power - Added by pEEf           &lt;br /&gt;
&lt;br /&gt;
	togglePower: function() {&lt;br /&gt;
		this.serviceRequest = new Mojo.Service.Request(&amp;quot;palm://com.palm.vibrate&amp;quot;, {&lt;br /&gt;
			method: 'vibrate', parameters: { 'period': 0,'duration': 250 }&lt;br /&gt;
		});&lt;br /&gt;
		if(this.barAssistant.getPower()) {&lt;br /&gt;
			TelephonyService.tempPowerSet('off',false,null,null);&lt;br /&gt;
			this.controller.get('dm_power_status').innerHTML = $L('Turn on Phone Radio');&lt;br /&gt;
		}&lt;br /&gt;
		else {&lt;br /&gt;
			TelephonyService.tempPowerSet('on',false,null,null);&lt;br /&gt;
			this.controller.get('dm_power_status').innerHTML = $L('Turn off Phone Radio');&lt;br /&gt;
		}&lt;br /&gt;
		this.toggleDeviceMenu();&lt;br /&gt;
	},&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Concerns ==&lt;br /&gt;
* Turn off the radio, then turn on airplane mode, and upon turning off airplane mode, the toggle displays the wrong message.&lt;br /&gt;
* Turn on airplane mode, toggle displays wrong message&lt;br /&gt;
&lt;br /&gt;
== Credits ==&lt;br /&gt;
Brought to you by pEEf.&lt;/div&gt;</summary>
		<author><name>NetWhiz</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Patch_webOS_Radio_Power_Switch&amp;diff=1951</id>
		<title>Patch webOS Radio Power Switch</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Patch_webOS_Radio_Power_Switch&amp;diff=1951"/>
		<updated>2009-07-24T05:00:07Z</updated>

		<summary type="html">&lt;p&gt;NetWhiz: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Seamless Interface =&lt;br /&gt;
&lt;br /&gt;
[[Image:RadioPowerSwitch.jpg|border|right|Radio Power Switch]]&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
I took what pEEf did and made it look more like it fits. I liked the original idea, but as mentioned in the concerns below, when changing between Airplane mode and back, it doesn't have the correct information. I made mine look like the Bluetooth and Wi-Fi menus.&lt;br /&gt;
&lt;br /&gt;
Works with: 1.0.3&lt;br /&gt;
Does NOT currently work with: 1.1&lt;br /&gt;
&lt;br /&gt;
== Procedure ==&lt;br /&gt;
&lt;br /&gt;
'''/usr/lib/luna/system/luna-systemui/app/views/devicemenu/devicemenu-scene.html''' Line 97:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;HTML4Strict&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;palm-row&amp;quot; id=&amp;quot;dm_phone&amp;quot; x-mojo-tap-highlight='momentary'&amp;gt;&amp;lt;div class=&amp;quot;palm-row-wrapper&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;div class=&amp;quot;title truncating-text&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;div class=&amp;quot;label right&amp;quot; id=&amp;quot;phonemsg&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;lt;/div&amp;gt;&lt;br /&gt;
		&amp;lt;span x-mojo-loc=''&amp;gt;Phone&amp;lt;/span&amp;gt;&lt;br /&gt;
	&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id='phonedetails' x-mojo-element=&amp;quot;Drawer&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;div class=&amp;quot;palm-row first&amp;quot; x-mojo-tap-highlight='momentary'&amp;gt;&amp;lt;div class=&amp;quot;palm-row-wrapper&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;div id=&amp;quot;phone_radio&amp;quot; class=&amp;quot;title truncating-text&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/div&amp;gt;&lt;br /&gt;
	&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;palm-section-divider&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''/usr/lib/luna/system/luna-systemui/app/controllers/bar-assistant.js''' Line 690:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
var stageController = Mojo.Controller.getAppController().getStageProxy(&amp;quot;DeviceMenu&amp;quot;);&lt;br /&gt;
stageController.delegateToSceneAssistant(&amp;quot;updatePhone&amp;quot;);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Line 2302:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
getCurrentPhoneState: function() {&lt;br /&gt;
	return this.phoneRadioState;&lt;br /&gt;
},&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''/usr/lib/luna/system/luna-systemui/app/controllers/devicemenu-assistant.js''' Line 1:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
var RadioState = new Hash({wifi: undefined, bluetooth: undefined, phone: undefined});&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Line 39:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
this.controller.setupWidget('phonedetails', {modelProperty:'myOpenProperty'}, this.drawerModel);&lt;br /&gt;
this.phonedrawer = this.controller.get('phonedetails');&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Line 95:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
if(this.barAssistant.getCurrentPhoneState()) {&lt;br /&gt;
	this.controller.get('phonemsg').innerHTML = $L('On');&lt;br /&gt;
	RadioState.set('phone',true);&lt;br /&gt;
}&lt;br /&gt;
else {&lt;br /&gt;
	this.controller.get('phonemsg').innerHTML = $L('Off');&lt;br /&gt;
	RadioState.set('phone',false);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Line 118:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
this.controller.get('dm_phone').addEventListener(Mojo.Event.tap, this.togglePhoneList.bindAsEventListener(this));&lt;br /&gt;
this.controller.get('phone_radio').addEventListener(Mojo.Event.tap, this.togglePhoneRadio.bindAsEventListener(this));&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Line 173:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
updatePhone: function() {&lt;br /&gt;
	if(this.barAssistant.getCurrentPhoneState()) {&lt;br /&gt;
		this.controller.get('phonemsg').innerHTML = $L('On');&lt;br /&gt;
		this.controller.get('phone_radio').innerHTML = $L('Turn off Phone');&lt;br /&gt;
		RadioState.set('phone', true);&lt;br /&gt;
	}&lt;br /&gt;
	else {&lt;br /&gt;
		this.controller.get('phonemsg').innerHTML = $L('Off');&lt;br /&gt;
		this.controller.get('phone_radio').innerHTML = $L('Turn on Phone');&lt;br /&gt;
		RadioState.set('phone', false);&lt;br /&gt;
	}&lt;br /&gt;
},&lt;br /&gt;
&lt;br /&gt;
togglePhoneRadio: function(event) {&lt;br /&gt;
	this.serviceRequest = new Mojo.Service.Request(&amp;quot;palm://com.palm.vibrate&amp;quot;, {&lt;br /&gt;
		method: 'vibrate', parameters: { 'period': 0,'duration': 250 }&lt;br /&gt;
	});&lt;br /&gt;
	if(RadioState.get('phone'))&lt;br /&gt;
		TelephonyService.tempPowerSet('off',false,null,null);&lt;br /&gt;
	else&lt;br /&gt;
		TelephonyService.tempPowerSet('on',false,null,null);&lt;br /&gt;
	this.toggleDeviceMenu();&lt;br /&gt;
},&lt;br /&gt;
&lt;br /&gt;
togglePhoneList: function(event) {&lt;br /&gt;
	if(this.apModeInProgress)&lt;br /&gt;
		return;&lt;br /&gt;
&lt;br /&gt;
	if (this.phonedrawer.mojo.getOpenState()) {&lt;br /&gt;
		this.controller.hideWidgetContainer(this.controller.get('phonedetails'));	&lt;br /&gt;
	}&lt;br /&gt;
	else {&lt;br /&gt;
		if(RadioState.get('phone'))&lt;br /&gt;
			this.controller.get('phone_radio').innerHTML = $L('Turn off Phone');&lt;br /&gt;
		else&lt;br /&gt;
		this.controller.get('phone_radio').innerHTML = $L('Turn on Phone');	&lt;br /&gt;
&lt;br /&gt;
		this.controller.showWidgetContainer(this.controller.get('phonedetails'));&lt;br /&gt;
	}&lt;br /&gt;
	this.phonedrawer.mojo.setOpenState(!this.phonedrawer.mojo.getOpenState());						&lt;br /&gt;
},&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Line 921:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
if(this.phonedrawer.mojo.getOpenState()) {&lt;br /&gt;
	this.controller.hideWidgetContainer(this.controller.get('phonedetails'));&lt;br /&gt;
	this.phonedrawer.mojo.setOpenState(false);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Acknowledgements ==&lt;br /&gt;
&lt;br /&gt;
* pEEf, for figuring everything out&lt;br /&gt;
* [[User:HattCzech|HattCzech]]&lt;br /&gt;
&lt;br /&gt;
== Concerns ==&lt;br /&gt;
&lt;br /&gt;
* Airplane mode still always turns the radio on regardless of the state before airplane mode was turned on.  Otherwise, very nice.&lt;br /&gt;
** I may try to add in a way for it to remember the phone state, but I figured that was the point of Airplane mode, so I haven't looked into it yet. I will look through the code again and see if it's worth it. -[[User:HattCzech|HattCzech]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
= Original Version =&lt;br /&gt;
&lt;br /&gt;
I created this mod so I can turn off the cellular radio, but keep WiFi and Bluetooth on.  Strangely, The Pre does not seem to have an existing way to do this, only the &amp;quot;Airplane Mode&amp;quot; which shuts off ALL radios!&lt;br /&gt;
&lt;br /&gt;
I currently do not have Sprint service on my Pre, and am just using it with WiFi. (See [/bypassing-activation Bypassing Activation] for info on how to do this.)&lt;br /&gt;
&lt;br /&gt;
This will also be useful for people wishing to save their battery if in a poor or no service area, yet still wanting to use WiFi.&lt;br /&gt;
&lt;br /&gt;
Another great use is shutting off the phone so calls will not disturb you while allowing the phone to do all of its network-related activity.&lt;br /&gt;
&lt;br /&gt;
How it works:  Simply click the upper right of the screen where the status bar is (signal strength).  You will get a drop-down menu, this is where the stock &amp;quot;Airplane Mode&amp;quot; is.  I have added a &amp;quot;Toggle Radio Power&amp;quot; function here.  If the radio is on it will turn it off, and vice-versa.  It will not turn off WiFi or Bluetooth like Airplane mode does.&lt;br /&gt;
&lt;br /&gt;
== Note ==&lt;br /&gt;
&lt;br /&gt;
The Pre actually already lets you turn off the cell radio. You can just turn on Airplane Mode, then turn on WiFi, Bluetooth, or both. ~ lolaiba&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
NOTE: If you have never modified any code on the phone, please see [/stock-application-mods Modifiying Stock Applications] first.&lt;br /&gt;
&lt;br /&gt;
This mod is simply additional code to be added to 3 files on your Pre. WARNING: MAKE BACKUPS FIRST!&lt;br /&gt;
&lt;br /&gt;
I will update the page later with proper diffs, but for now you can just get into the shell, make your backups, fire up vi (or nano) then paste in the relevant lines.  Once you are done, you can test it without rebooting by forcing the Luna manager to reinitialize its cache:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
luna-send -n 1 palm://com.palm.applicationManager/rescan {}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is the code, Enjoy!&lt;br /&gt;
&lt;br /&gt;
/usr/lib/luna/system/luna-systemui/app/views/devicemenu/devicemenu-scene.html Line 94:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
                                &amp;lt;div class=&amp;quot;palm-section-divider&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;!-- Added by pEEf --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
                                &amp;lt;div id=&amp;quot;dm_power&amp;quot; class=&amp;quot;palm-row&amp;quot; x-mojo-tap-highlight='momentary'&amp;gt;&amp;lt;div class=&amp;quot;palm-row-wrapper&amp;quot;&amp;gt;&lt;br /&gt;
                                        &amp;lt;div id=&amp;quot;dm_power_status&amp;quot; class=&amp;quot;title truncating-text&amp;quot;&amp;gt;   &lt;br /&gt;
                                         &amp;lt;/div&amp;gt;&lt;br /&gt;
                                &amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
/usr/lib/luna/system/luna-systemui/app/controllers/bar-assistant.js Line 2039:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
//Returns the Radio Power. Called by DeviceMenu. Added by pEEf        &lt;br /&gt;
getPower: function() {       &lt;br /&gt;
	return this.phoneRadioState;&lt;br /&gt;
},&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
/usr/lib/luna/system/luna-systemui/app/controllers/devicemenu-assistant.js Line 59:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
//		Toggle for Radio Power - Added by pEEf&lt;br /&gt;
		if(this.barAssistant.getPower()) {&lt;br /&gt;
			this.controller.get('dm_power_status').innerHTML = $L('Turn off Phone Radio');&lt;br /&gt;
		}&lt;br /&gt;
		else {&lt;br /&gt;
			this.controller.get('dm_power_status').innerHTML = $L('Turn on Phone Radio');&lt;br /&gt;
		}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
/usr/lib/luna/system/luna-systemui/app/controllers/devicemenu-assistant.js Line 107:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;this.controller.get('dm_power').addEventListener(Mojo.Event.tap, this.togglePower.bindAsEventListener(this));&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
/usr/lib/luna/system/luna-systemui/app/controllers/devicemenu-assistant.js Line 126:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
//	Toggles the Radio Power - Added by pEEf           &lt;br /&gt;
&lt;br /&gt;
	togglePower: function() {&lt;br /&gt;
		this.serviceRequest = new Mojo.Service.Request(&amp;quot;palm://com.palm.vibrate&amp;quot;, {&lt;br /&gt;
			method: 'vibrate', parameters: { 'period': 0,'duration': 250 }&lt;br /&gt;
		});&lt;br /&gt;
		if(this.barAssistant.getPower()) {&lt;br /&gt;
			TelephonyService.tempPowerSet('off',false,null,null);&lt;br /&gt;
			this.controller.get('dm_power_status').innerHTML = $L('Turn on Phone Radio');&lt;br /&gt;
		}&lt;br /&gt;
		else {&lt;br /&gt;
			TelephonyService.tempPowerSet('on',false,null,null);&lt;br /&gt;
			this.controller.get('dm_power_status').innerHTML = $L('Turn off Phone Radio');&lt;br /&gt;
		}&lt;br /&gt;
		this.toggleDeviceMenu();&lt;br /&gt;
	},&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Concerns ==&lt;br /&gt;
* Turn off the radio, then turn on airplane mode, and upon turning off airplane mode, the toggle displays the wrong message.&lt;br /&gt;
* Turn on airplane mode, toggle displays wrong message&lt;br /&gt;
&lt;br /&gt;
== Credits ==&lt;br /&gt;
Brought to you by pEEf.&lt;/div&gt;</summary>
		<author><name>NetWhiz</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Patch_webOS_Boot_Themes&amp;diff=1950</id>
		<title>Patch webOS Boot Themes</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Patch_webOS_Boot_Themes&amp;diff=1950"/>
		<updated>2009-07-24T04:59:15Z</updated>

		<summary type="html">&lt;p&gt;NetWhiz: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;When the Pre is booting or shutting down, the screen fades between two images - ''/palm-logo.png'' and ''/palm-logo-bright.png'' located in ''/usr/palm/sysmgr/images''.  By replacing either or both of these images, the boot logo can be customized.  This requires a [[Portal:Accessing_Linux | rooted]] Pre.&lt;br /&gt;
&lt;br /&gt;
Works with - 1.0.3, 1.1&lt;br /&gt;
&lt;br /&gt;
== Replacing the Files==&lt;br /&gt;
&lt;br /&gt;
'''Step One'''&lt;br /&gt;
Log into the phone via ssh and copy the files to the USB drive.&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
mkdir /media/internal/bootlogo&lt;br /&gt;
cp /usr/palm/sysmgr/images/palm-logo* /media/internal/bootlogo&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Step Two'''&lt;br /&gt;
Modify the files with your favorite editor (Gimp, Photoshop, ImageMagick, MS Paint, etc.)&lt;br /&gt;
&lt;br /&gt;
'''Step Three'''&lt;br /&gt;
Save the new images to the ''bootlogo'' directory on the Pre's USB drive.&lt;br /&gt;
&lt;br /&gt;
'''Step Four'''&lt;br /&gt;
Log into the phone via ssh, remount the root filesystem read-write, backup the existing files, copy the new images into place, and remount the root filesystem read-only.&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
sudo mount -o rw,remount /&lt;br /&gt;
sudo cp -ip /usr/palm/sysmgr/images/palm-logo.png /usr/palm/sysmgr/images/palm-logo.png.orig&lt;br /&gt;
sudo cp -ip /usr/palm/sysmgr/images/palm-logo-bright.png /usr/palm/sysmgr/images/palm-logo-bright.png.orig&lt;br /&gt;
sudo cp /media/internal/bootlogo/palm-logo.png /usr/palm/sysmgr/images/palm-logo.png&lt;br /&gt;
sudo cp /media/internal/bootlogo/palm-logo-bright.png /usr/palm/sysmgr/images/palm-logo-bright.png&lt;br /&gt;
sudo mount -o ro,remount /&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Step Five'''&lt;br /&gt;
Restart Luna and watch your awesome new logo.&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
pkill LunaSysMgr&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Taking it to the Next Step==&lt;br /&gt;
&lt;br /&gt;
With a small bit of scripting, we can have separate boot and shutdown themes.  The first thing to do is to create regular and &amp;quot;bright&amp;quot; images for booting and shutting down.  Save the new images to the ''bootlogo'' directory on the Pre's USB drive. (Steps 1-3 above).&lt;br /&gt;
&lt;br /&gt;
'''Step One'''&lt;br /&gt;
Log into the phone via ssh, remount the root filesystem read-write, and create a directory in /opt to store the new images.  We're using /opt, as the script we'll modify later will copy files, and /usr is mounted read-only.&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
sudo mount -o rw,remount /&lt;br /&gt;
sudo mkdir -p /opt/share/bootimages&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Step Two'''&lt;br /&gt;
Copy the new images to /opt/share/bootimages, naming them palm-logo-up.png, palm-logo-up-bright.png, palm-logo-down.png and palm-logo-down-bright.png.  Additionally, copy the shutdown files to palm-logo.png and palm-logo-bright.png.&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
cd /opt/share/bootimages/&lt;br /&gt;
sudo cp /media/internal/bootlogo/&amp;lt;boot image&amp;gt; palm-logo-up.png&lt;br /&gt;
sudo cp /media/internal/bootlogo/&amp;lt;bright boot image&amp;gt; palm-logo-up-bright.png&lt;br /&gt;
sudo cp /media/internal/bootlogo/&amp;lt;shutdown image&amp;gt; palm-logo-down.png&lt;br /&gt;
sudo cp /media/internal/bootlogo/&amp;lt;bright shutdown image&amp;gt; palm-logo-down-bright.png&lt;br /&gt;
sudo cp palm-logo-down.png palm-logo.png&lt;br /&gt;
sudo cp palm-logo-down-bright.png palm-logo-bright.png&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Step Three'''&lt;br /&gt;
Backup the current logo images, if you haven't already.&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
sudo cp -ip /usr/palm/sysmgr/images/palm-logo.png /usr/palm/sysmgr/images/palm-logo.png.orig&lt;br /&gt;
sudo cp -ip /usr/palm/sysmgr/images/palm-logo-bright.png /usr/palm/sysmgr/images/palm-logo-bright.png.orig&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Step Four'''&lt;br /&gt;
Delete the current logo images and replace them with symlinks to the files in our new directory in /opt&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
cd /usr/palm/sysmgr/images/&lt;br /&gt;
sudo rm palm-logo-bright.png&lt;br /&gt;
sudo rm palm-logo.png&lt;br /&gt;
sudo ln -s ../../../../../opt/share/bootimages/palm-logo-bright.png palm-logo-bright.png&lt;br /&gt;
sudo ln -s ../../../../../opt/share/bootimages/palm-logo.png palm-logo.png&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Step Five'''&lt;br /&gt;
Back up and edit /etc/init.d/start_animation, adding the switching of the files&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
sudo cp -ip /etc/init.d/start_animation /etc/init.d/start_animation.orig&lt;br /&gt;
sudo -e /etc/init.d/start_animation&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
Before the line starting with ''if [ -x /usr/bin/luna-send'' add the following:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
ok=no&lt;br /&gt;
if [ -f /opt/share/bootimages/palm-logo-up.png ] &amp;amp;&amp;amp; \&lt;br /&gt;
   [ -f /opt/share/bootimages/palm-logo-up-bright.png ] &amp;amp;&amp;amp; \&lt;br /&gt;
   [ -f /opt/share/bootimages/palm-logo-down.png ] &amp;amp;&amp;amp; \&lt;br /&gt;
   [ -f /opt/share/bootimages/palm-logo-down-bright.png ] ; then&lt;br /&gt;
        cp /opt/share/bootimages/palm-logo-down.png /opt/share/bootimages/palm-logo.png&lt;br /&gt;
        cp /opt/share/bootimages/palm-logo-down-bright.png /opt/share/bootimages/palm-logo-bright.png&lt;br /&gt;
        ok=yes&lt;br /&gt;
fi&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
At the very end of the file, add the following:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
if [ &amp;quot;$ok&amp;quot; = &amp;quot;yes&amp;quot; ] ; then&lt;br /&gt;
        sleep 5&lt;br /&gt;
        cp /opt/share/bootimages/palm-logo-up.png /opt/share/bootimages/palm-logo.png&lt;br /&gt;
        cp /opt/share/bootimages/palm-logo-up-bright.png /opt/share/bootimages/palm-logo-bright.png&lt;br /&gt;
fi&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Step Six'''&lt;br /&gt;
Reboot the phone and watch your awesome new logos.&lt;br /&gt;
&lt;br /&gt;
== Boot Themes==&lt;br /&gt;
&lt;br /&gt;
'''Title:''' Default Theme&lt;br /&gt;
&lt;br /&gt;
'''Author:''' Palm&lt;br /&gt;
&lt;br /&gt;
[[Image:Palm-logo.png]] &lt;br /&gt;
[[Image:Palm-logo-bright.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Title:''' Tux - got root?&lt;br /&gt;
&lt;br /&gt;
'''Author:''' JackieRipper&lt;br /&gt;
&lt;br /&gt;
[[Image:Jackieripper-palm-logo.png]] &lt;br /&gt;
[[Image:Jackieripper-palm-logo-bright.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Title:''' Red and Green&lt;br /&gt;
&lt;br /&gt;
'''Author:''' JackieRipper&lt;br /&gt;
&lt;br /&gt;
[[Image:Jackieripper2-palm-logo-up.png]] &lt;br /&gt;
[[Image:Jackieripper2-palm-logo-up-bright.png]] &lt;br /&gt;
[[Image:Jackieripper2-palm-logo-down.png]] &lt;br /&gt;
[[Image:Jackieripper2-palm-logo-down-bright.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Title:''' Blue Tux&lt;br /&gt;
&lt;br /&gt;
'''Author:''' pEEf&lt;br /&gt;
&lt;br /&gt;
[[Image:PEEf-palm-logo.png]] &lt;br /&gt;
[[Image:PEEf-palm-logo-bright.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Title:''' Glassy Tux&lt;br /&gt;
&lt;br /&gt;
'''Author:''' fish199902&lt;br /&gt;
&lt;br /&gt;
[[Image:Fish109902-palm-logo.png]] &lt;br /&gt;
[[Image:Fish109902-palm-logo-bright.png]]&lt;/div&gt;</summary>
		<author><name>NetWhiz</name></author>
	</entry>
</feed>