Hack 95. Browsing Through TiVo s Resources

   

Hack 95 Browsing Through TiVo's Resources

figs/expert.gif figs/hack95.gif

Groups of resources are loaded by TiVo's main programs at runtime. Hacking these resources allows customization of the TiVo software without recompiling or any such complex shenanigans .

Resource groups are external definitions of strings that the main program can load at runtime, allowing programmers to customize applications in various ways without touching the executable applications themselves . Normally these resources are meant for TiVo, Inc. programmers, but now they in the hands of hackers.

You can browse the current crop of resource groups on your TiVo in /SwSystem/ACTIVE . Use mls [Hack #88] to inspect the file. Then use dumpobj [Hack #89] to view their contents:

 %  mls /SwSystem/ACTIVE  Directory of /SwSystem starting at 'ACTIVE'     Name Type FsId Date Time Size         ---- ---- ---- ---- ---- ----         ACTIVE tyDb 1054901 06/14/02 07:04 652     %  dumpobj /SwSystem/ACTIVE  SwSystem 1054901/11 {   Active         = 1   IndexPath      = /SwSystem/3.0-01-1-010 /SwSystem/ACTIVE /Server/6406408   Module         = 1054552/-1 1054554/-1 1054556/-1 1054558/-1 1054560/-1  1054562/-1 1054564/-1 1054566/-1 1054902/-1   Name           = 3.0-01-1-010   ResourceChecksum = 2561393d51da083831d2f0714914888a   ResourceGroup  = 1054757/-1 1054758/-1 1054889/-1 1054761/-1 1054766/-1  1054767/-1 1054890/-1 1054772/-1 1054775/-1 1054776/-1 1054779/-1 1054891/-1  1054784/-1 1054787/-1 1054892/-1 1054792/-1 1054795/-1 1054796/-1 1054800/-1  1054893/-1 1054803/-1 1054806/-1 1054807/-1 1054808/-1 1054809/-1 1054894/-1  1054810/-1 1054895/-1 1054896/-1 1054897/-1 1054811/-1 1054812/-1 1054813/-1  1054814/-1 1054815/-1 1054816/-1 1054817/-1 1054818/-1 1054821/-1 1054898/-1  1054826/-1 1054899/-1 1054831/-1 1054900/-1 1054840/-1 1054841/-1 1054850/-1  1054851/-1 1054854/-1   ServerId       = 6406408   ServerVersion  = 51   Version        = 2 } 

FSIDs of all the available resource groups are listed under ResourceGroup . Here, you'll find all the text in the TiVo user interface, constants that control your MPEG encoder bitrate , the backdoor password [Hack #8], a veritable cornucopia of default values, and a host of things nobody has yet figured out.

The Code

The following script is based on a conversation at http://alt.org/forum/index.php?t=msg&th=34. It walks through all the resources in the TiVo and prints them out with their identification numbers

 #!/tvbin/tivosh                   set outformat "%3s %3s %s" puts [format $outformat "GID" "IID" "Resource"] puts [format $outformat "---" "---" "--------"]                    set db [dbopen]    RetryTransaction {     set active [db $db open "/SwSystem/ACTIVE"]      set rgroup [dbobj $active get ResourceGroup]     set groupn 0       foreach group $rgroup {          set items [dbobj $group get Item]         set itemn 0         foreach item $items {         regsub -all "\[\{\}\]" [dbobj $item get String] "" resource  [RETURN]  puts [format $outformat $groupn $itemn "\"$resource\""]  [RETURN]  incr itemn                                                                    }                  incr groupn     }              } 

Save the code as dump.tcl in your TiVo's /var/hack/bin directory and make it executable, like so:

 bash-2.02#  chmod 755 /var/hack/bin/dump.tcl  

Running the Hack

Run the script from TiVo's command line Section 3.3. You're sure to see lots of familiar strings flow by.

 bash-2.02#  /var/hack/bin/dump.tcl  ...   1   5 "Now Playing List"   1   6 "TiVo Central"   1   7 "TiVo's Suggestions"   1   8 "TiVolution Magazine"   1   9 "Showcases"   1  10 "Pick Programs to Record"   1  11 "To Do List"   1  12 "Messages & Setup"   1  13 "DIRECTV Menu"   1  14 "No programs"   1  15 "TiVolution Magazine is currently unavailable. It will be updated  the next time your Recorder makes a daily call to the TiVo Service. "   1  16 "Custom"   1  17 " Channel %s"   1  18 " Search By Title"   1  19 " Browse By Channel"   1  20 " Browse By Time"   1  21 " Search Using WishLists"   1  22 " Manually Record Time/Channel" ... 

Just makes you want to reach out and fiddle[Hack #96], doesn't it?


   
Top


Tivo Hacks. 100 Industrial-strength Tips Tools 2003
Tivo Hacks. 100 Industrial-strength Tips Tools 2003
ISBN: 1597490318
EAN: N/A
Year: 2004
Pages: 164

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net