webOS Nation Forums >  webOS Discussion >  webOS Discussion Lounge > Fun Things in Code
Fun Things in Code
  Reply
Like Tree13Likes
  • 4 Post By GMMan
  • 3 Post By GMMan
  • 1 Post By GMMan
  • 2 Post By jm2011
  • 1 Post By GMMan
  • 2 Post By GMMan

 
Thread Tools Display Modes
Old 11/03/2012, 03:09 PM   #1 (permalink)
Member
 
GMMan's Avatar
 
Posts: 2,136
Let's make a thread where people can post funny strings and comments found in code used for webOS.

I finally dumped out my tokens, and needed some hints on how to parse some values. Here's what I found in /sbin/trenchcoat (program that reads and writes the flash memory, and is the main driver when flashing a webOS device):
Quote:
trenchcoat - used for flashing (storage, not body parts)
Need to run as root to modify filesystems. Use the sudo Luke.
Interesting to note there isn't sudo on webOS.
__________________
Contact: @GMMan_BZFlag (me on Twitter)
webOS Releases: Change your App Catalog country: TouchPad/PC | TouchPad/webOS Resources | Search suggestion patch for browser | Cycling Email Notifications | Don't Doctor! Make a good support request. | How to post logs | webOS Charge Monitor
GMMan is offline   Reply With Quote
Liked by Rnp, xandros9, mattmers and 1 others like this.
Thanked By: zzt53
Old 11/03/2012, 03:26 PM   #2 (permalink)
Member
 
Remy X's Avatar
 
Posts: 1,282
Oh nice

I've been following that thread about devices stuck in QHUSB-DLOAD, so any update, even a funny one is of great interest
Remy X is offline   Reply With Quote
Old 11/03/2012, 08:08 PM   #3 (permalink)
Member
 
GMMan's Avatar
 
Posts: 2,136
Quote:
Here is palm territory. There be dragons.
Found in trenchcoat config files when referring to the NVRAM. No, there are no dragons there. The NVRAM is actually pretty straight forward and easy to parse.
__________________
Contact: @GMMan_BZFlag (me on Twitter)
webOS Releases: Change your App Catalog country: TouchPad/PC | TouchPad/webOS Resources | Search suggestion patch for browser | Cycling Email Notifications | Don't Doctor! Make a good support request. | How to post logs | webOS Charge Monitor
GMMan is offline   Reply With Quote
Liked by Grabber5.0, xandros9 and webOSnomad like this.
Old 11/04/2012, 06:45 AM   #4 (permalink)
Member
 
Grabber5.0's Avatar
 
Posts: 3,694
I have seen some good comments in the code I have looked at before.. Nothing recent.

semi on-topic: do you know if it is possible to dump the tokens via ssh on a device that has a bad screen or after swapping the board if necessary?
__________________
Matt Williams
*How to install .patch files on your device*
Developer of: SMS Auto Forward/Reply, GPS Viewer,
Keyring converters for CSV, eWallet, & CodeWallet
Touchpad patches:Keyring HD,ClassicNote HD, YouTube HD (for 2.1 app), Show email recipient addresses for contacts
Phone patches: Forums fixes and enhancements patch, Weather Channel fix
All-device patches: Update GlobalSign certs, Google Sync https fix, Yahoo contact sync fix


Last edited by Grabber5.0; 11/04/2012 at 07:09 AM.
Grabber5.0 is offline   Reply With Quote
Old 11/04/2012, 09:18 AM   #5 (permalink)
Member
 
jm2011's Avatar
 
Posts: 42
I think that there are some good ones in the first use app, but I can't really remember them now. One was something along the lines of Spin for 1/4 of a second to pretend that something is happening
__________________
Touchpad 16GB 3.0.5
Pre 2 2.2.4
jm2011 is offline   Reply With Quote
Old 11/04/2012, 10:32 AM   #6 (permalink)
Member
 
GMMan's Avatar
 
Posts: 2,136
Quote:
Originally Posted by Grabber5.0 View Post
I have seen some good comments in the code I have looked at before.. Nothing recent.

semi on-topic: do you know if it is possible to dump the tokens via ssh on a device that has a bad screen or after swapping the board if necessary?
The easiest way to dump the NVRAM (which contains the tokens) is to SFTP in and transfer /dev/mmcblk0p12. It should be 4MB. Open it up with a hex editor and scroll around some, and you'll find the page with tokens. The other way, if you don't want to deal with binary, is to run
Code:
/sbin/tokens --list
and it'll give you the tokens in a key-pair list.
__________________
Contact: @GMMan_BZFlag (me on Twitter)
webOS Releases: Change your App Catalog country: TouchPad/PC | TouchPad/webOS Resources | Search suggestion patch for browser | Cycling Email Notifications | Don't Doctor! Make a good support request. | How to post logs | webOS Charge Monitor
GMMan is offline   Reply With Quote
Liked by Remy X likes this.
Thanked By: Grabber5.0
Old 11/08/2012, 11:28 AM   #7 (permalink)
Member
 
jm2011's Avatar
 
Posts: 42
I looked for the fist use app and I found it at /usr/palm/applications/com.palm.app.firstuse.firstUse.is

line 413: wt!? Come-on, code so this is readable.

line 972:give a 1/4 second for the spinner to show like we are actually doing something. ;-)
__________________
Touchpad 16GB 3.0.5
Pre 2 2.2.4
jm2011 is offline   Reply With Quote
Liked by Rnp and OldSkoolVWLover like this.
Old 11/08/2012, 07:22 PM   #8 (permalink)
Member
 
GMMan's Avatar
 
Posts: 2,136
Quote:
Originally Posted by jm2011 View Post
line 413: wt!? Come-on, code so this is readable.
Lol, I used that in my signature for a while before I ran out of space for links.
__________________
Contact: @GMMan_BZFlag (me on Twitter)
webOS Releases: Change your App Catalog country: TouchPad/PC | TouchPad/webOS Resources | Search suggestion patch for browser | Cycling Email Notifications | Don't Doctor! Make a good support request. | How to post logs | webOS Charge Monitor
GMMan is offline   Reply With Quote
Old 12/30/2012, 02:39 PM   #9 (permalink)
Member
 
Grabber5.0's Avatar
 
Posts: 3,694
Found today in the Facebook app on my Pre2:
Quote:
// We aren't quite ready to make the jump to a prototype free world, so load that while we are at it
// Yep I feel dirty but this is necessary to ensure sync load
__________________
Matt Williams
*How to install .patch files on your device*
Developer of: SMS Auto Forward/Reply, GPS Viewer,
Keyring converters for CSV, eWallet, & CodeWallet
Touchpad patches:Keyring HD,ClassicNote HD, YouTube HD (for 2.1 app), Show email recipient addresses for contacts
Phone patches: Forums fixes and enhancements patch, Weather Channel fix
All-device patches: Update GlobalSign certs, Google Sync https fix, Yahoo contact sync fix

Grabber5.0 is offline   Reply With Quote
Old 12/31/2012, 11:51 AM   #10 (permalink)
Member
 
GMMan's Avatar
 
Posts: 2,136
I chanced a peek at one of Isis' commits, and aside from deleting index.html, looks like HP's doing some comment cleanup to remove comments such as "wt*", "I don't know", "why", "this is a pita", "try this/that", and any references to Palm's internal bug tracking system. I suppose it's to make them seem more formal, but you can never erase the past with source control.

https://github.com/isis-project/isis...9bdf49f9a7b407
__________________
Contact: @GMMan_BZFlag (me on Twitter)
webOS Releases: Change your App Catalog country: TouchPad/PC | TouchPad/webOS Resources | Search suggestion patch for browser | Cycling Email Notifications | Don't Doctor! Make a good support request. | How to post logs | webOS Charge Monitor
GMMan is offline   Reply With Quote
Liked by Remy X likes this.
Old 01/03/2013, 10:42 PM   #11 (permalink)
Member
 
GMMan's Avatar
 
Posts: 2,136
Quote:
// toooo soooooooon!
Some sort of timer in the Email app's DashboardManager. Not sure what it's really about.

Bonus: The Pre email notification sound has the album set to "Top 500 Rock and Roll Songs".
__________________
Contact: @GMMan_BZFlag (me on Twitter)
webOS Releases: Change your App Catalog country: TouchPad/PC | TouchPad/webOS Resources | Search suggestion patch for browser | Cycling Email Notifications | Don't Doctor! Make a good support request. | How to post logs | webOS Charge Monitor
GMMan is offline   Reply With Quote
Liked by Garfonso and Remy X like this.
Reply

 

Thread Tools
Display Modes



 


Content Relevant URLs by vBSEO 3.6.0