UPDATE 10-08-2009 - This patch is now available through webOS quick installer under the patch repositories - its also available using preware w/ the patch repository!! USE THE REMOVE COMMAND / SCRIPT BELOW TO REMOVE THIS PATCH BEFORE APPLYING THE ONE FROM THE REPOSITORY!
- UPDATE 09-29-2009 - UPDATED AND CERTIFIED FOR Palm WebOS v1.2.1
THIS HOWTO IS CERTIFIED FOR WEBOS v1.2.0 - DO NOT USE THIS FOR OLDER VERSIONS OF WEBOS!
This HOWTO requires that you already have root access to your phone. If you need more information on how to do that search the forum.
Click Here to search for my HOWTO's and Answers for the Palm PRE!
Notes:
While working on a few other HACKS I came across a file that contained all the area-codes and their corresponding U.S. states in a function. It looks like the PALM Devs had this in there before, or they are working to include it in the future. I'm too impatient to wait so here is a method to get this now. What I did here is add the STATE name where it was possible to fit it in the caller-id, missed call pop-up, missed call notification, call log, and outgoing call display. This works with unknown numbers, because I usually know where someone in my contacts is located and don't need it for those.
I have attached some screen-shots from the Pre to this post (Numbers distorted for their protection).
I'll try to make this as simple as possible.
1. Login to your Palm PRE and obtain root access.. (Again look around the forums to see how to do this)
2. Once you are at the "root@castle" prompt COPY and PASTE all of the following code into your terminal / putty / ssh window.. (These commands will make backup copies of the original files, then modify them)
** This will reboot your PRE so be sure to close all of your applications beforehand. **
[code]
# DISPLAY STATE FOR UNKNOWN CALLERS
#
mount -o remount,rw /
#
# RESTORE FILES
#
echo RESTORING ORIGINAL FILES IF AVAILABLE
cp /usr/palm/applications/com.palm.app.phone/app/controllers/incomingcall-assistant.js_1-1-0 /usr/palm/applications/com.palm.app.phone/app/controllers/incomingcall-assistant.
js
cp /usr/palm/applications/com.palm.app.phone/app/controllers/calllog-assistant.js_1-1-0 /usr/palm/applications/com.palm.app.phone/app/controllers/calllog-assistant.
js
cp /usr/palm/applications/com.palm.app.phone/app/controllers/announcer-assistant.js_1-1-0 /usr/palm/applications/com.palm.app.phone/app/controllers/announcer-assistant.
js
cp /usr/palm/applications/com.palm.app.phone/app/controllers/missedcall-assistant.js_1-1-0 /usr/palm/applications/com.palm.app.phone/app/controllers/missedcall-assistant.
js
cp /usr/palm/applications/com.palm.app.phone/app/models/FormattedCall.js_1-1-0 /usr/palm/applications/com.palm.app.phone/app/models/FormattedCall.
js
#
# BACKUP FILES
#
echo BACKING UP ORIGINAL FILES
cp /usr/palm/applications/com.palm.app.phone/app/controllers/incomingcall-assistant.
js /usr/palm/applications/com.palm.app.phone/app/controllers/incomingcall-assistant.js_1-1-0
cp /usr/palm/applications/com.palm.app.phone/app/controllers/calllog-assistant.
js /usr/palm/applications/com.palm.app.phone/app/controllers/calllog-assistant.js_1-1-0
cp /usr/palm/applications/com.palm.app.phone/app/controllers/announcer-assistant.
js /usr/palm/applications/com.palm.app.phone/app/controllers/announcer-assistant.js_1-1-0
cp /usr/palm/applications/com.palm.app.phone/app/controllers/missedcall-assistant.
js /usr/palm/applications/com.palm.app.phone/app/controllers/missedcall-assistant.js_1-1-0
cp /usr/palm/applications/com.palm.app.phone/app/models/FormattedCall.
js /usr/palm/applications/com.palm.app.phone/app/models/FormattedCall.js_1-1-0
#
# MAKE MODIFICATIONS TO incomingcall-assistant.
js
#
echo MAKING MODIFICATIONS TO incomingcall-assistant.
js
sed -i "s/name = Messages.unknownCaller;/name = RegionLookup.regionFromPhoneNumber(number);/g" /usr/palm/applications/com.palm.app.phone/app/controllers/incomingcall-assistant.
js
#
# MAKE MODIFICATIONS TO calllog-assistant.
js
#
echo MAKING MODIFICATIONS TO calllog-assistant.
js
sed -i "s/item.label = '';/item.label = RegionLookup.regionFromPhoneNumber(item.number);/g" /usr/palm/applications/com.palm.app.phone/app/controllers/calllog-assistant.
js
#
# MAKE MODIFICATIONS TO announcer-assistant.
js
#
echo MAKING MODIFICATIONS TO announcer-assistant.
js
sed -i "s/call.displayName = FormatPhoneNumber(number);/call.displayName = FormatPhoneNumber(number);\n\
var message = Messages.contactWithLabel;\n\
call.displayName = new Template(message).evaluate({\"contact\":call.displayName, \"label\":RegionLookup.regionFromPhoneNumber(number)});/g" /usr/palm/applications/com.palm.app.phone/app/controllers/announcer-assistant.
js
#
# MAKE MODIFICATIONS TO missedcall-assistant.
js
#
echo MAKING MODIFICATIONS TO missedcall-assistant.
js
sed -i "s/this.displayLabel = (this.contact.labelFormatted ? this.contact.labelFormatted : \"\");/this.displayLabel = (this.contact.labelFormatted ? this.contact.labelFormatted : RegionLookup.regionFromPhoneNumber(number));/g" /usr/palm/applications/com.palm.app.phone/app/controllers/missedcall-assistant.
js
#
# MAKE MODIFICATIONS TO FormattedCall.
js
#
echo MAKING MODIFICATIONS TO FormattedCall.
js
sed -i "s/this.displayLabel = (callMsg\[lineNumber\].contact.labelFormatted ? callMsg\[lineNumber\].contact.labelFormatted : \"\");/this.displayLabel = (callMsg\[lineNumber\].contact.labelFormatted ? callMsg\[lineNumber\].contact.labelFormatted : RegionLookup.regionFromPhoneNumber(callMsg\[lineNumber\].number));/g" /usr/palm/applications/com.palm.app.phone/app/models/FormattedCall.
js
#
# COMPLETE UPDATE
#
mount -o remount,ro /
echo INSTALLATION COMPELTE... REBOOTING DEVICE...
/sbin/reboot
#
[/code]
Good luck!
( TO RESTORE ORIGINAL FUNCTION )
- If you ever need to recover your original files and set the PRE back to its defaults you can use the following:
** This will reboot your PRE so be sure to close all of your applications beforehand. **
[code]mount -o remount,rw /
#
# RESTORE FILES
#
echo RESTORING ORIGINAL FILES IF AVAILABLE
cp /usr/palm/applications/com.palm.app.phone/app/controllers/incomingcall-assistant.js_1-1-0 /usr/palm/applications/com.palm.app.phone/app/controllers/incomingcall-assistant.
js
cp /usr/palm/applications/com.palm.app.phone/app/controllers/calllog-assistant.js_1-1-0 /usr/palm/applications/com.palm.app.phone/app/controllers/calllog-assistant.
js
cp /usr/palm/applications/com.palm.app.phone/app/controllers/announcer-assistant.js_1-1-0 /usr/palm/applications/com.palm.app.phone/app/controllers/announcer-assistant.
js
cp /usr/palm/applications/com.palm.app.phone/app/controllers/missedcall-assistant.js_1-1-0 /usr/palm/applications/com.palm.app.phone/app/controllers/missedcall-assistant.
js
cp /usr/palm/applications/com.palm.app.phone/app/models/FormattedCall.js_1-1-0 /usr/palm/applications/com.palm.app.phone/app/models/FormattedCall.
js
#
mount -o remount,ro /
echo INSTALLATION COMPELTE... REBOOTING DEVICE...
/sbin/reboot
#
[/code]
Enjoy!
-D2G
- WEBOS VERSION CHANGELOG -
- v1.2.0 -
No Changes!
- v1.1.0 -
/usr/palm/applications/com.palm.app.phone/app/controllers/calllog-assistant.
js - variable name changed from entry.label to item.label in replacement string.
- v1.0.4 - FIRST HOWTO CREATED
-