View Single Post
  #32031 (permalink)  
Old 06-25-2011, 09:05 AM
powinmo's Avatar
powinmo
PPCGeeks Regular
Offline
 
Join Date: May 2010
Posts: 184
Reputation: 1815
powinmo is halfway to VIP status based on reppowinmo is halfway to VIP status based on reppowinmo is halfway to VIP status based on reppowinmo is halfway to VIP status based on reppowinmo is halfway to VIP status based on reppowinmo is halfway to VIP status based on reppowinmo is halfway to VIP status based on reppowinmo is halfway to VIP status based on reppowinmo is halfway to VIP status based on reppowinmo is halfway to VIP status based on reppowinmo is halfway to VIP status based on rep
Mentioned: 2 Post(s)
Tagged: 0 Thread(s)
Device Uptime script

Ok folks, I've been sitting on some of my dev scripts for a while now. Thought I'd finally post this here first for some comments before I post a general app/script thread over at XDA...

Script: Device Uptime Viewer
Version 0.3a

Purpose:
1. uptime logging utility
2. manage a log text file with timestamp (of last recorded boot time) in most recent order
3. retain last X timestamps for historical review, default to 20

I've needed a way to track my device's uptime, and also check on prior restarts/reboots.
The latter was useful if my device restarted for some unknown reason.

This is a MortScript that requires version 4.3 or better.

Installer information:
1. the .cab does not require any user interaction beyond the standard Windows Mobile installer (wceload.exe) prompts for, so it can be used in XDA_UC/S4X without an .auto file.

2. creates a local application directory on your local device or storage card depending on how you install it
eg, \Program Files\DeviceUptime or \Storage Card\Program Files\DeviceUptime

3. inserts a shortcut to the \Windows\Startup directory to run a small script on each boot that
a. updates a boot timestamp text file on the root of your device (\uptime.log.txt) - note that it intentionally ends in ".txt" so you can use any text editor to view it manually
b. prunes old boot timestamp entries
c. copies the log file to your Storage Card for archival purposes, if it detects a SD card present
d. if you just flashed a new ROM or did a hard reset, the first time the startup script is run it will check if you have an archived log file on your SD card and copy that as your initial log file. Useful to continue the uptime history tracking.


4. creates a shortcut in "\Windows\Start Menu\UpTime Viewer.lnk" to launch a basic MortScript menu based UI
a. you can view the current uptime statistics
b. you can view the last 20 boot timestamps in most recent order
c. about information
*** be sure to double tap the menu option, or tap once and then select the OK soft button - the UI limitations are due to MortScript **

5. There are no custom icons yet

6. automatically installs MortScript 4.3b15 to its local installation directory so it does not intefere if you have a certain default version of MortScript active.


Future items:
? Use JMLMenuSense for the UI if there is enough requests for it


FAQ:
a. if the script window or dialog box disappears, go to ArkSwitch or what ever task manager you use and bring the script back in to focus.
Depending on what you tap while the script painting a dialog box, etc it may be put in to the background.
b. the date format is DD/MM/YY. I may allow an option for different date formats later.


Credits: original author copenhagen @ XDA
Attached Images
File Type: jpg Screenshot1.jpg (7.3 KB, 22 views) Click for barcode!
File Type: jpg Screenshot2.jpg (12.7 KB, 22 views) Click for barcode!
File Type: jpg Screenshot4.jpg (11.4 KB, 23 views) Click for barcode!
File Type: jpg Screenshot5.jpg (7.4 KB, 19 views) Click for barcode!
Attached Files
File Type: cab device_uptime_v03a.cab (150.8 KB, 11 views) Click for barcode!
__________________
* Using: Energy.RHODCDMA|Leo.[6.5.3].Sense2.5+CHT185 (July.4.2011) | AmeriCanAndroid HD2 | MOAR GS3
+ Helping with: [XDA_UC][UC][SASHIMI][S4X] S4X_Auto (Updated: Jan.17.2011)
+ Energy ROM Script/XDA_UC Contributions: Auto Carrier Provisioning | Start Menu Layout
* Rhodium NRG Energy CDMA ROM Wiki - please read before posting a new question...

Last edited by powinmo; 06-25-2011 at 09:19 AM.
Reply With Quote
This post has been thanked 7 times.