Browsing "TiVo"
May 27, 2008 - Old, TiVo    Comments Off on Hackman module for TivoWeb v7.0 manual

Hackman module for TivoWeb v7.0 manual

[b:27sfx5dj][size=170:27sfx5dj][color=#cc0033:27sfx5dj]T[/color:27sfx5dj][color=#00cc99:27sfx5dj]i[/color:27sfx5dj][color=#ff9933:27sfx5dj]V[/color:27sfx5dj][color=#336699:27sfx5dj]o H[/color:27sfx5dj][/size:27sfx5dj][/b:27sfx5dj][b:27sfx5dj][color=#a0a0a0:27sfx5dj][size=170:27sfx5dj]ack Manager[/size:27sfx5dj][/color:27sfx5dj][/b:27sfx5dj]
[b:27sfx5dj][/b:27sfx5dj]
The hackman module for TivoWeb
Version 7.0.x
[BLOCKQUOTE]
[b:27sfx5dj]Hack Manager[/b:27sfx5dj] is a plug-in module for TivoWeb and TivoWebPlus that allows the user to start and stop TiVo hacks, such as telnet, tivoftp, TiVo Control Station, TyStudio, tytools, cron, YAC, autospace, EndPadPlus, elseed, elseedyac, ccxstream, unscramble, etc. Hackman also creates rc.sysinit.author files to automatically start hacks at boot time, and can manage this and other startup files.

Optionally, the user may elect to include remote reboot capabilities, a way to remount the root drive as read/write or read-only, and the ability to execute bash command lines. [b:27sfx5dj]NOTE:[/b:27sfx5dj] This last ability may be very dangerous if you leave your TiVo exposed to the world via the Internet. Those who know what they’re doing and who have malicious intent regarding your TiVo could do real harm. Also, leaving the root directory read/write can be dangerous and could lead to disastrous file corruption on your TiVo. So please use these options at your own risk (just like the rest of this module and every other TiVo hack ever written) and know what you’re doing before you enable it.

Hackman includes support for xPlusz commands and backdoor codes as well as the option of incorporating the bufferhack, KeepAtMost and TCTimeout utilities. Hackman also provides protection against reboot cycling caused by corrupted guide data. Additionally, one can adjust the start-up parameters for EndPad or EndPadPlus from TivoWeb. It’s even possible to switch from TivoWeb 1.9.4 to TivoWebPlus and back again, all on the fly!

[b:27sfx5dj]System Requirements[/b:27sfx5dj]
Hackman Version 5.0.0 and higher will run on any TiVo running TivoWebPlus (TWP) Version 1.4 or higher. Users of earlier versions of TivoWeb or TivoWebPlus are encouraged to use hackman Version 4.2.8, though you’d be better advised to update to the latest version of TWP, available from [url:27sfx5dj]http://thomson.tivo.googlepages.com/tivowebplus[/url:27sfx5dj]. This readme applies to all versions of hackman, with the exception of the installation process which was improved with 6.0.0.

[b:27sfx5dj]Installation — Version 6.0.0 and newer[/b:27sfx5dj]
Hackman is now distributed in easy-to-install .tgz packages, as is TivoWebPlus. Version 6.0.0 can be installed following these steps:
1. Click on the hackman program link on the [url=http://www.tivohackman.com/:27sfx5dj]hackman website[/url:27sfx5dj]
2. Download the hackman .tgz file to a known location on your computer
3. Use tivoftp to copy the file to your /var/hack directory (or the directory containing TivoWebPlus) and then telnet to your TiVo
4. [i:27sfx5dj]cd /var/hack[/i:27sfx5dj] (or appropriate directory)
5. [i:27sfx5dj]tar xvzf hackman-V6.0.15.tgz[/i:27sfx5dj] (for example — use current version number)
6. If that doesn’t work or if you don’t have tar on your TiVo, use
[i:27sfx5dj]gzip -dc hackman-V6.0.15.tgz | cpio -iduH tar[/i:27sfx5dj]
7. Set permissions for executables[i:27sfx5dj]
chmod 755 TivoWebPlus/bin_ppc/*
chmod 755 TivoWebPlus/bin_mips/*
[/i:27sfx5dj]8. Do a Full Restart of TivoWebPlus

Once the new hackman module [b:27sfx5dj]Installation — Older Versions[/b:27sfx5dj]
Basically, it’s the standard installation: After activating hackman as described later in this readme (very important!), hackman_util.tcl, hackman_create_cfg.tcl, hackman.itcl, hackman.cfg and xPlusz.itcl go into the /modules directory, and the .png button icons go in the /images directory. IT IS NOT NECESSARY to load xPlusz.itcl unless you have xPlusz installed. Leaving it out will save disk and memory space. The “find” and “sendkey” binaries go into the appropriate directories, either bin_mips or bin_ppc. These directories are automatically created by TivoWebPlus.

[b:27sfx5dj]NOTE:[/b:27sfx5dj] Depending upon your method of transferring files to the TiVo, the binaries may not have their permissions set properly. If you get a “permission denied” error when loading hackman, use chmod +x to make these files executable.

Unzip hackman.zip to a temporary directory, say C:\temp. Then FTP into TiVo and set your PC side to C:\temp\hackman and your TiVo side to your TivoWeb directory, usually /var/hack/TivoWebPlus or (prior to TWP) either /var/hack/tivoweb-tcl/ or /var/hack/tivowebplus/. Then copy the directories (/images/, /modules/, /bin_mips, and /bin_ppc) from your PC to the TiVo. If you have both TivoWeb 1.9.4 and TivoWebPlus installed on your TiVo, install hackman to both directories.

[b:27sfx5dj]Installation — All Versions[/b:27sfx5dj]
If this is all greek to you, please look at [url=http://tivo.stevejenkins.com/network_cd.html#_Toc67665687:27sfx5dj]Steve Jenkins’ Network Hack How-To Guide (tivo.stevejenkins.com)[/url:27sfx5dj] with the definitive directions for installing TivoWeb.
Once the files are in place, simply reload TivoWeb with a Restart and Quit and Restart command. Please note that controls will be visible only for installed hacks. If your hack doesn’t appear, check the path to your application as defined on the “Observed Paths and Pathnames” page, reached from the Preferences page. Hackman uses the UNIX “find” command to locate the [i:27sfx5dj]first occurrence[/i:27sfx5dj] of applications and files. If the appropriate path or pathname is not found, it is necessary to either (a) adjust or delete files on the TiVo or (b) use the hackman.cfg method described below.

The fact that you’re reading this ReadMe is good…thank you! If you’ve tried to run hackman you know that you need to activate it by making an adjustment in the hackman.cfg file. Please keep reading and the secret will be revealed. More importantly, you’ll learn how hackman works and how to safely take advantage of hackman’s power without trashing your TiVo.

[b:27sfx5dj]Updates — Version 6.0.0 and newer[/b:27sfx5dj]
Hackman has its own update function. It will be found on the Commands Page, ”
Update the hackman software to the latest version.” The available versions appear in the lower part of the screen. The update process is very similar to that already described:

1. Download the hackman .tgz file to a known location on your computer
2. Use the browse function to find the hackman .tgz file on your computer
3. Click “update”

[b:27sfx5dj]Updates — Older Versions[/b:27sfx5dj]
To install updates, it is usually sufficient to replace all the files in the ./modules with the new files. Rarely it may be necessary to replace files in the images directory.

[b:27sfx5dj]Basic Principles[/b:27sfx5dj]
To fully realize hackman’s capabilities, it’s helpful to understand how hackman detects files and manages applications. Basically, hackman relies on a data file which stores various settings along with application paths and pathnames. The configuration file is created on the fly by hackman and modified by the user, if necessary. The process is as follows:

1. The hackman.cfg file located in the /modules/ directory contains defaults and is not modified at any time, either by the user or by hackman. The real config values are stored in /config/hackman.cfg.
2. If /config/hackman.cfg does not exist, the TiVo is scanned for specific hacks and files and the [i:27sfx5dj]first instance[/i:27sfx5dj] is recorded. Checks for known variations (tserver and tivoweb, for example) will attempt to definitively identify the hacks. HINT: If you’re archiving past versions of applications, rename the primary file so it won’t be selected by hackman. Example: mv /var/hack/application /var/hack/OLDapplication.
3. Once hackman.cfg is created, this file will be used in the startup process, thereby reducing the load time. Settings can be adjusted from the Preferences page and hackman.cfg will be updated accordingly.
4. If hackman.cfg doesn’t accurately report your file configuration, one of two things can be done. The .cfg file can be edited directly from hackman or the .cfg file can be regenerated and subsequently edited for accuracy. HINT: If you install new software, re-generate the .cfg file. Ideally, the re-generation should accurately reflect your new configuration, particularly if you’ve taken steps to avoid detection conflicts.
5. As a part of the config file creation process, files which may be starting hacks are scanned, If a hack is started by a file, it is classified as either managed by hackman (default file: rc.sysinit.author) or loaded by some other file. Every attempt is made to ignore commented-out load commands and load commands that aren’t being executed. These settings generate the multi-colored boot buttons indicating the hacks’ startup status. [b:27sfx5dj]NOTE:[/b:27sfx5dj] Part of this process of identifying load commands includes looking for filenames preceded by a “/”. If your startup command doesn’t include a full pathnames with a “/”, it won’t be picked up by hackman.
6. hackman.cfg should not need editing, as it maintains itself. If the system becomes corrupted, the defaults can be restored from the Preferences page.
7. If you change the managed startup file, a new hackman.cfg will be generated reflecting the changes in managed hacks.

Recommended procedure:
1. Start hackman and allow hackman to find all of your hacks
2. Review the derived /config/hackman.cfg and edit it to match your configuration
3. Save /config/hackman.cfg and proceed to use hackman.

The files that are scanned for startup commands are:
1. rc.sysinit
2. rc.sysinit.author (if present)
3. hacks_callfromrc.sysinit (if present)
4. rc.sysinit.author.edit (if present)
5. rc.sysinit.tpm (if present)
6. any files in /etc/rcS.d/ (if present)
7. any files in /etc/init.d/ (if present)
8. xPlusz.ini (if present)

The key words that are looked for are the hack names, e.g. vserver or endpad.tcl, found in the startup command. If the name is found on a comment line, it is ignored. xPlusz works a little differently, but the concept is the same.

The green and red boot buttons reflect only the current managed startup file, as defined on the Preferences page, rc.sysinit.author, by default.

Blue buttons reflect conflicts. From the Preferences page, “View paths and pathnames” will indicate in which startup scripts the startup commands for a given hack are found. Use this feature to examine the scripts in question to figure out why the hack has been found.

If hackman will not load for some reason, delete any prior /config/hackman.cfg file. This causes hackman to reset the default settings and should allow hackman to load properly.

Procedure:
1. From ftp or telnet, delete the old /config/hackman.cfg file
2. Do a Quit and Restart from TivoWebPlus

[b:27sfx5dj]TiVoVBI (Closed-caption)[/b:27sfx5dj]
People seem to have taken more liberties with the TiVoVBI hack, in that there are several configurations for the various TiVo models. Hackman is configured to work with the following combinations:

[TABLE][TR][TD][/TD][TD][b:27sfx5dj]Series 1
Standalone[/b:27sfx5dj][/TD][TD][b:27sfx5dj]Series 1
Dtivo[/b:27sfx5dj][/TD][TD][b:27sfx5dj]Series 2[/b:27sfx5dj][/TD][/TR][TR][TD][b:27sfx5dj]Kernel Module[/b:27sfx5dj][/TD][TD]tvbi.o[/TD][TD]tvbi-dtv.o[/TD][TD]pxmpegdecode.o[/TD][/TR][TR][TD][b:27sfx5dj]TivoVBI file[/b:27sfx5dj][/TD][TD]tivovbi*[/TD][TD]tivovbi*[/TD][TD]tivovbi*[/TD][/TR][/TABLE]

It is recommended that you make sure you have TiVoVBI working properly on your TiVo from the bash prompt. Leave only the files you need on your TiVo. Then be certain that the kernel module (*.o file) is named to be consistent with the pattern described above. More information about TiVoVBI may be found at [url:27sfx5dj]http://alt.org/wiki/index.php/TivoVBI[/url:27sfx5dj] with original files available from [url:27sfx5dj]http://tivo.samba.org/download/mbm/bin/[/url:27sfx5dj] and [url:27sfx5dj]http://tivo.samba.org/download/mbm/[/url:27sfx5dj] with the latest information available at [url:27sfx5dj]http://www.dealdatabase.com/forum/showthread.php?t=41313[/url:27sfx5dj].

[b:27sfx5dj]Options[/b:27sfx5dj]
Preferences and other options are set on the “Edit files and preferences” page. You can view this screen by clicking on the cleverly disguised “March, 2008″ line at the bottom of the hackman screen.

There are several options that may be set:
[i:27sfx5dj]Show Reboot Command[/i:27sfx5dj] — When this is checked the option to reboot TiVo is displayed. Default is checked.
[i:27sfx5dj]Show Bash Command Line[/i:27sfx5dj] — When this is checked bash shell commands are enabled. Default is unchecked.
[i:27sfx5dj]Show ReMount Control[/i:27sfx5dj] — When this is checked the option to remount the root directory to read-only (not read/write) is enabled. Default is checked
[i:27sfx5dj]Show Bufferhacks[/i:27sfx5dj] — When this is checked the menu of JJBliss’s utilities, including Bufferhack, is enabled. Default is checked.
[i:27sfx5dj]Show Backdoor Commands[/i:27sfx5dj] — When this is checked, the backdoor commands menu is enabled. Default is checked. NOTE: Backdoor commands will not be available on later TiVo models without a functional SendKey binary.
[i:27sfx5dj]Show xPlusz Commands[/i:27sfx5dj] — When this is checked the xPlusz commands menu is enabled, if xPlusz is installed. Default is checked.
[i:27sfx5dj]Show Resource Command[/i:27sfx5dj] — When this is checked, the option to display the catalog of TiVo resources is enabled (see below). Default is checked. NOTE: This command used to cause reboots with earlier versions of TivoWeb but this problem appears to have been solved with the introduction of TWP 1.4.
[i:27sfx5dj]Show Boot Load Buttons[/i:27sfx5dj] — When this is checked, the buttons to load or not load hacks when TiVo boots are enabled. Default is unchecked. NOTE: Danger! Please understand how this feature works before trying to use it!
[i:27sfx5dj]Set Root Directory read-only on boot[/i:27sfx5dj] — When this is checked the root directory is mounted as read-only when hackman is loaded and mounted as read/write when it is unchecked. Default is checked. For users who keep their hacks in directories other than /var/* it may be better to set this as unchecked in order to avoid access errors.
[i:27sfx5dj]Increase freepages limits[/i:27sfx5dj] — When this is checked, the minimum/low/high freepages are increased from 32/48/64 to 128/192/256, respectively. This may alleviate memory management problems and decrease the chances of an unintended reboot. Default is checked.
[i:27sfx5dj]5 reboots in an hour clears guide data[/i:27sfx5dj] — Twice one month, my TiVo rebooted every four minutes. After replacing the drives and power supply, I discovered that it needed to run a Clear and Delete which would clear all the corrupted guide information, but not the recorded programs. A daily call was then required to reload everything — a total of about four hours. This feature checks the boot frequency and if the box has rebooted more than five times in the past hour, it will initiate a Clear and Delete followed by a Daily Call. Default is unchecked (off).

[b:27sfx5dj]NOTE to developers:[/b:27sfx5dj] If you are frequently re-booting TiVo in a development project, please be sure to set this to unchecked, or you may be delayed for quite some time! Re-starts of TivoWeb should not affect your work.
[i:27sfx5dj]Use native ‘SendKey” (Series 1)[/i:27sfx5dj] — When this is checked, hackman uses the native SendKey command, which I prefer, at least on the standalone TiVo. Otherwise, hackman uses the SendKey by DarkWing. Default is checked.
[i:27sfx5dj]Select startup file to be managed[/i:27sfx5dj] — hackman can manage a file which, when called at boottime, loads specified hacks. Default is “rc.sysinit.author.”
[i:27sfx5dj]Options string for elseed[/i:27sfx5dj] — enter any options to be loaded with elseed. Please see elseed documentation for possible switches. Default is – blank -.
[i:27sfx5dj]Options string for YAC[/i:27sfx5dj] — enter any options to be loaded with YAC. Please see YAC documentation for possible switches. Default is – blank -.”
[i:27sfx5dj]Use password protection[/i:27sfx5dj] — Enables password requirement to reach Preferences screen. May not be necessary if TiVo is not exposed to the Internet; desirable if it is. Default is checked (on).
[i:27sfx5dj]Password[/i:27sfx5dj] — Enter the password to allow entry into the “dangerous features” section to enable/disable rebooting and bash shell commands and to edit startup and configuration files. The default password is “password.”
[i:27sfx5dj]Call TPM startup scripts from rc.sysinit.author[/i:27sfx5dj] — When hackman creates or modifies the rc.sysinit.author, this setting causes the Tivo Package Manager Startup Scripts to be run from rc.sysinit.author. Default is unchecked (off).
[i:27sfx5dj]Call hacks_callfromrc.sysinit from rc.sysinit.author[/i:27sfx5dj] — When hackman creates or modifies the rc.sysinit.author, this setting causes the hacks_callfromrc.sysinit script (Jeff Keegan’s method) to be run from rc.sysinit.author. NOTE: If the instructions in [i:27sfx5dj]Hacking TiVo[/i:27sfx5dj] are followed exactly, this file is called from rc.sysinit. If you call it from rc.sysinit.author, you should delete the call from rc.sysinit. Default is unchecked (off).
[i:27sfx5dj]Label for ‘Edit Files and Set Preferences’ button[/i:27sfx5dj] — This allows the user to change the label for this feature. In order to make access to these features less obvious, the default is “March, 2008.”
[i:27sfx5dj]Label for banner title[/i:27sfx5dj] — This allows the user to change the label in the upper left hand corner of the menu banner. The default is “TivoWebPlus” but for multiple TiVo households, it can be changed to indicate the location of the TiVo, such as the Living Room or Bedroom.
[i:27sfx5dj]Set version over-ride[/i:27sfx5dj] — If the TiVo is running software version 3.1/3.2/4.0, the backdoor code is not obvious. Methods exist to change it to something that can be entered and many people choose the 3.0 code, “3 0 BC.” When set to “3.0” this setting causes the version to be “spoofed” to 3.0. When set to T1V0 this setting causes the password to be set to the other common substitution, “T1V0”. Default is unchecked (off).
[i:27sfx5dj]Set boot delay[/i:27sfx5dj] — This setting determines the number of milliseconds (seconds times 1000) that must pass before the backdoor codes begin to be executed. On a standalone TiVo, the process should begin shortly after the “TiVo Man” animation has completed. If execution begins too early or an inordinately long time, adjust this value. Default (developed on a standalone version 1 box) is “55000”.
[i:27sfx5dj]Use yac2ncid time zone adjustment[/i:27sfx5dj] — This setting will adjust the time reported by yac2ncid by the TiVo time zone adjustment. Probably not needed on Series 3 TiVos. Default is checked (on).
[i:27sfx5dj]Load file utilities[/i:27sfx5dj] — This setting will load a shortcut menu item starting the hackman file utilities. Default is checked (on).

The following commands will execute when the TiVo boots (assuming TivoWebPlus is started at that time). Some are available only on standalone TiVo models (not DirecTiVo). Later TiVo models without a functional SendKey command will not support any of these codes.
[i:27sfx5dj]Send backdoor code on boot[/i:27sfx5dj] — Causes the backdoor code to be entered when hackman starts. Hackman will detect the TiVo software version and respond accordingly. Default is unchecked (off).
[i:27sfx5dj]Set 30-second skip on boot[/i:27sfx5dj] — Causes the 30-second skip to be enabled when hackman starts. This changes the function of the skip-to-end button on the remote to jump forward about 30 seconds. Default is unchecked (off).
[i:27sfx5dj]Set sort Now Playing on boot[/i:27sfx5dj] — (TiVo software v 3.0 or higher only) Causes the sort-Now-Playing option to be enabled when hackman starts. This provides for the Now Playing list to be sorted by recording order, alphabetically, or by expiration date. Default is unchecked (off).
[i:27sfx5dj]Double over-shoot value on boot[/i:27sfx5dj] — (standalone TiVo models only) Causes overshoot time for the medium fast-forward function to be doubled. This increases the amount of time the picture “jumps back”. Default is unchecked (off).
[i:27sfx5dj]Set on-screen clock on boot[/i:27sfx5dj] — Causes the on-screen clock to be enabled when hackman starts. Default is unchecked (off). If there’s not enough time for the Now Playing list to appear when this is running, increase the value of Boot Delay.
[i:27sfx5dj]Toggle Play bar fast disappear [/i:27sfx5dj]– Causes the Play Bar to disappear more quickly. Initiated when hackman starts. Default is unchecked (off).
The Preferences screen also allows you to edit various files directly from hackman. For example, startup scripts that are called by rc.sysinit (such as /var/hack/etc/hacks_callfromrc.sysinit and /var/hack/rc.sysinit.author.edit) may be edited, as well as crontab and the preference/config files for TivoWeb and TiVo Control Station (TCS). The paths to these files are automatically detected by hackman but may be revised, if necessary, as described above.
This section also includes the ability to edit the native TiVo startup files, /etc/rc.d/rc.sysinit and rc.sysinit.author.

[b:27sfx5dj][i:27sfx5dj][color=#ff0000:27sfx5dj]CAUTION:[/color:27sfx5dj] Editing rc.sysinit is particularly dangerous as this file has to execute properly for TiVo to even operate. Improper editing of this file can definitely lead to problems which may necessitate pulling the drive(s) from your TiVo and repairing the problem on a PC or, in the worst case, having to restore the TiVo software from an image file. You have been duly warned. If you mess this up, don’t blame the tool, blame the carpenter. You have the power to ruin your TiVo from anywhere in the world…I will take no responsibility for your actions.[/i:27sfx5dj][/b:27sfx5dj]

If you try to edit a non-existent secondary startup file (rc.sysinit.author, rc.sysinit.author.edit or hacks_callfromrc.sysinit), you will be presented with the option to create the file. Thus, you can use hackman to set up your startup sequence by editing rc.sysinit to call a secondary file with all your hack startup commands. For details concerning the startup methods referenced here, look at either Jeff Keegan’s “Hacking TiVo” book or at [url=http://www.tivocommunity.com/tivo-vb/showthread.php?s=&postid=1559003&highlight=startuped.itcl#post1559003:27sfx5dj]this thread[/url:27sfx5dj], the inspiration for this section…thanks, sanderton! [b:27sfx5dj]NOTE:[/b:27sfx5dj] Full URLs for this and other similar links will be found in the html version of this ReadMe.

Finally, this section offers the ability to create or edit [i:27sfx5dj]any[/i:27sfx5dj] file on the TiVo, even if the boot directory is mounted as read-only. File utilities were expanded to include the ability to view, edit, rename, chmod, or delete any file or directory on the TiVo. Again, this is a very powerful feature and certainly has the power to render your TiVo inoperative. Use only with extreme care and knowledge of what you’re doing.

Also included in the package is a separate shortcut module that calls the file utilities directly without going through the hackman interface. If this function is considered too powerful to leave easily accessible in TivoWebPlus, the hackman Preferences page provides the option to suppress loading the shortcut. Or, use the MenuEditor module to hide the shortcut or place it in a less obvious location.

[b:27sfx5dj]Operation[/b:27sfx5dj]
Two general rules for hackman and for all other TivoWeb modules: (1) Wait for each page to fully load before navigating to another page and (2) Use the controls supplied on the page rather than the back button. Failure to observe these conventions may result in data not being properly read or written with unpredictable consequences.

Running hackman should be fairly intuitive. Clicking on a red “STOP” button will shut down a hack, while clicking a green “START” button will launch it. There are pop-up windows associated with the items that provide more information and the “About Hackman” button at the bottom will give a program overview. The only caution is that the TiVo Resources command may take a minute or more to execute and does have (or used to have) the drawback of occasionally re-booting the TiVo. Please be patient. Also, at times the TiVo might be busy and not respond as quickly as desired or as fast as it has in the past. Again, patience is a virtue, particularly for TiVo-nators.

[b:27sfx5dj]Caution![/b:27sfx5dj]
Experience with starting and stopping programs with hackman indicates that it is a safe utility to use. However, the danger does exist of TiVo rebooting if a hack is shut down while it is accessing the MFS database. For example, if you are running TyStudio and are in the process of transferring a file when you shut down tyserver with hackman, your TiVo will almost certainly reboot. The most “delicate” hacks have shutdown procedures designed to minimize this problem. But the best advice is to not shut down any hack application that may be presently interacting with your TiVo.

If hackman fails to start an application, first check the path as described above. Rare problems have been observed in starting TiVo Control System (TCS) and mfs_ftp. If this occurs, it is unlikely that the app will be able to be started by any method and a TiVo reboot will be necessary.
One feature of hackman is disabled by default because too many people have forged forward without understanding that it could render their machine temporarily useless. This is the power to create and manage the rc.sysinit.author or other app starting files. To enable this feature, go to the “Edit files and preferences” page and check the [i:27sfx5dj]Show Boot Load Buttons[/i:27sfx5dj] box.
Small “gumdrop” buttons will now appear next to the names of the hacks to indicate the status of boot startup commands located in the /etc/rc.d/rc.sysinit.author file, or whichever startup file you have chosen to manage with hackman. The colors are coded thusly:
[b:27sfx5dj]Green:[/b:27sfx5dj] Set to start from the currently managed startup script, as set on the Preferences page. Clicking this button will cause the hack to be removed from the current startup script and not start on boot.
[b:27sfx5dj]Red:[/b:27sfx5dj] Set to not start from any of the monitored startup scripts, including xPlusz. Clicking this button will cause the hack to load on boot from the current startup script, as specified on the Preferences page.
[b:27sfx5dj]Yellow:[/b:27sfx5dj] Set to start from a script [i:27sfx5dj]other[/i:27sfx5dj] than the currently managed startup script, as set on the Preferences page. Clicking this button will cause the hack to load on boot from the current startup script [i:27sfx5dj]in addition to[/i:27sfx5dj] its existing load ([b:27sfx5dj]not recommended[/b:27sfx5dj]).
[b:27sfx5dj]Blue:[/b:27sfx5dj] Set to start from the currently managed startup script, as set on the Preferences page AND from [i:27sfx5dj]one or more[/i:27sfx5dj] of the other monitored startup scripts, including xPlusz. Clicking this button will cause the hack to be removed from the current startup script, but it will still start on boot from one (or more) of the other scripts. Action should be taken to remedy this multiple startup situation.

Click a button to add or remove a hack from the startup file. [b:27sfx5dj]NOTE:[/b:27sfx5dj] When this feature is used, the startup file will consist of ONLY those hacks entered by hackman, plus any other commands manually entered by the user AFTER the first file is created. Each time the file is changed, the file is completely re-written. The file can be edited as described elsewhere. If startup commands are desired beyond the scope of hackman, it is recommended that these commands be included in the “user section” of the startup file.

[b:27sfx5dj][i:27sfx5dj]NOTE:[/i:27sfx5dj] At the risk of being repetitious, use of this feature [B]will[/b:27sfx5dj] overwrite any previous startup file. A back-up file will be created (<STARTUP filename=””></STARTUP>.PRIOR), but it’s best to plan ahead as suggested here (using rc.sysinit.author as an example):
1. Create a copy of your old rc.sysinit.author file (if it exists) or you can use the file that is created in the next step, rc.sysinit.author.PRIOR
2. Run hackman and add or delete a hack. This will create a fresh rc.sysinit.author file
3. Use hackman’s file edit feature to edit the new rc.sysinit.author file
4. Cut-n-paste the pieces of the old file that weren’t included in the new file. Put these commands in the space created between[/B]

[b:27sfx5dj][code:27sfx5dj]## ~~ Start of user section ~~ ##
and
### ~~ End of user section ~~ ###[/code:27sfx5dj][/b:27sfx5dj]
Do not edit any of the “#” or “~” characters — these are what hackman uses as markers to define the users section.

5. Continue to add your hacks to the file by clicking the “gumdrops” and saving the resulting file.

The preference page gives you the option to select which startup file you will manage and to bring this file up in the text editor to check your work. Saving at this point will write the changes to disk. Cancel will revert to the prior setup. If you care to make any changes, you may do so at this time, but bear in mind that changes outside the user section will be overwritten the next time hackman modifies your chosen startup file.

The shell command feature sends multiple command lines, but without executing .profile, setting paths or setting any other environment variables which, at this time, appears to be impossible without actually being in bash. For example, the following sets the directory, and then does an ls on that directory:
cd /var/hack/bin
ls

In order to execute commands such as “ls” or “ps” without specifying the full path name, it is necessary that (1) the command be installed in your TiVo and (2) the path where the command is installed is listed in your [i:27sfx5dj]path[/i:27sfx5dj] statement in one of the boot scripts, such as rc.sysinit, rc.sysinit.author, or (for Jeff Keegan-style systems), hacks_callfromrc.sysinit.

The backdoor features (described above) are accessed on the “Commands Page” and should be fairly self-explanatory. The exception is the “Advanced Wishlists” feature. Once this option is entered, it need not be entered again, except to confirm that it’s still in effect. Advanced Wishlists enable the user to create combinations of title, theme, director, etc. in creating wishlist items. NOTE: As unofficial internal “undocumented features” and/or “maybe we should do this sometime” developments from TiVo, they aren’t designed to be accessed in a formal manner under all conditions. The default state of the TiVo is watching live tv with nothing recording. Backdoor access codes may or may not work under other conditions.

In the middle of the “Commands Page” is “Set TiVo clock date and time.” Typically, the time and date are set automatically in the data download from TiVo via telephone, Internet, or satellite. However, some Series 1 TiVos can function as overpriced, underutilized VCRs without a subscription. This feature enables a user to correctly set the local time and date.

Next on the “Commands Page” is “Backup/Restore /var partition.” This function backs up all the files in the /var directory, which is volatile and may be wiped clean during normal TiVo operations. The files are saved to a compressed file on the root partition, which is normally immune to damage. The restore option does as its name implies. When used with the “Copy active to inactive partitions” function, a complete backup can be maintained on the TiVo.

The next feature is “Start critical functions from rc.sysinit.” When important functions such as telnet and ftp are kept in the /var partition, they run the risk of disappearing when the partition is cleared. Or if rc.sysinit.author is damaged or deleted, hacks won’t start and the user may be locked out of the machine and forced to resort to remedial surgery. Some advocate keeping all hacks in the root directory, but this presents other problems, discussed elsewhere. But if the critical files are stored in the root partition, they will survive a /var wipe. This function copies telnet and ftp to /lib and adds startup commands to rc.sysinit to more reliably maintain access to the TiVo.

One more thing to add a bit of insurance. Carefuly use the hackman file editing capability to move these lines (or something similar to the bottom of rc.sysinit:

[code:27sfx5dj] [ ! -f /etc/rc.d/rc.sysinit.author ] || /etc/rc.d/rc.sysinit.author
echo “rc.sysinit is completed”[/code:27sfx5dj]

This will ensure that telnet and ftp are started before rc.sysinit.author is called, thereby possibly avoiding problems in rc.sysinit.author.

The next function on the “Commands Page” is “Copy active to inactive partitions.” This feature is intended only for experienced and adventurous TiVo hackers! Proceed at your own risk! This process will copy your active partitions to the inactive partitions so that if something goes wrong with the current configuration, the TiVo repair process will bring in the backup team. Or, you can manually flip the boot pages to achieve the same effect. This routine is adapted from several sources including Bubbaj, Riley, Alphawolf, mikey, and ScanMan…much appreciation.

This process is not guaranteed AT ALL! Please have a backup available and proceed at your own risk. To repeat, this is intended only for experienced and adventurous TiVo hackers!

Basically, what it does is:
— dd copy —
1. Determine your active partitions
2. dd them to their corresponding inactive partitions
— flip partitiions —
3. Revises the bootpage parameters, preserving any startup strings
4. Flips the bootpage
5. Revises the file system table (/etc/fstab) on the updated partition to reflect the change
6. Reboots to run from the newly copied partitions

The last function on the “Commands Page” is “Adjust TiVo Clock for Daylight Savings Time (DST).” This, very simply, does what it says. If, due to the changes in the implementation of DST, your TiVo is displaying the wrong time and your channel guide has programs shifted by an hour one way or the other, use this feature to remedy the problem. Only the displays are affected. Scheduled programs, season passes, manual recordings, etc. are not affected. Series 1 Standalones will have to be rebooted to effect the change. I’ve discovered that the best way to handle the DST problem on a non-TiVo-patched software version is to set the TiVo time zone to your appropriate time zone (Eastern, for example) and then select the option to not adjust for DST. Then you only have to adjust the TiVo twice a year, once in the spring and again in the fall. NOTE: This feature may not work on all models of TiVos.

[b:27sfx5dj]xPlusz commands are available on DirecTiVo models so equipped. For further information about xPlusz, look [/b:27sfx5dj][url=http://dealdatabase.com/forum/showthread.php?s=&threadid=18394:27sfx5dj][b:27sfx5dj]here[/b:27sfx5dj][/url:27sfx5dj][b:27sfx5dj]. Information about the commands may be found [/b:27sfx5dj][url=http://www.dealdatabase.com/forum/showthread.php?t=22130:27sfx5dj][b:27sfx5dj]here[/b:27sfx5dj][/url:27sfx5dj][b:27sfx5dj] and [/b:27sfx5dj][url=http://www.dealdatabase.com/forum/showthread.php?s=&postid=79110#post79110S:27sfx5dj][b:27sfx5dj]here[/b:27sfx5dj][/url:27sfx5dj][b:27sfx5dj].[/b:27sfx5dj]
JJBliss has contributed a hackman extension module which includes three very useful functions: bufferhack, KeepAtMost and TCTimeout. Bufferhack adjusts the number of minutes the TiVo holds in the record buffer and makes available for instant replay. KeepAtMost allows the user to increase the number of Season Pass episodes that will be saved on the TiVo. And TCTimeout adjusts the length of time that the TiVo Central screen is visible before reverting to live programming. [b:27sfx5dj]NOTE:[/b:27sfx5dj] You may occasionally receive an error message indicating “can’t open db” or “CONFLICT” or something similar. You should first try shutting down and restarting TivoWeb using hackman’s “Reload (stop/start) TivoWeb” command. If that doesn’t work, you should reboot your TiVo.
Also included in this package is another useful hack, Save Until I Delete by Hamster and newbr, which marks all programs in the To Do list so that they will not be deleted before they’ve had a chance to be viewed.

[b:27sfx5dj]Crontab tricks and data recovery[/b:27sfx5dj]
Hackman automatically copies the file “varbackup” to the /lib directory so it won’t disappear if /var gets wiped. The command line commands are:
varbackup backup — copy all files in /var partition to /lib/varfiles.cpio
varbackup restore — restore all files from backup file to /var partition
varbackup ddcopy — copy active partitions to inactive partitions
varbackup flip — switch active partitions with inactive partitions

This utility gives the user the ability to do the /var backup/restore and active/inactive dd partition and flipping from the bash prompt, thereby enabling programmed cronjobs to keep the updates current and command line control to assist with restore activities. Presented below are two cron entries that accomplish nightly updates. A discussion of the use and installation of cron is beyond the scope of this ReadMe. Please check the TiVo forums for more information.

# Twenty after three a.m.(EST) or four a.m. (DST), Maine time, every night, update /var ddcopy
20 8 * * * /lib/varbackup ddcopy >> /var/log/varbackup-ddcopy 2>&1

# Twenty after four a.m.(EST) or five a.m. (DST), Maine time, every night, update /var backup
20 9 * * * /lib/varbackup backup >> /var/log/varbackup-backup 2>&1

If the worst happens, /var disappears and your hacks with it, the first thing to try is varbackup restore. From a bash prompt, enter “/lib/varbackup restore” (no quotes). If you’ve kept your updates current, everything should return to normal. If the whole operating system is trashed and you still have access to /lib, try “varbackup flip” to use the alternate partitions and then do varbackup restore. I sincerely hope this system avoids some TiVo anguish…it’s worked for me.

[b:27sfx5dj]About Permissions[/b:27sfx5dj]
Permissions determine whether a file or directory can be written to or just read and whether a file can be executed (run). TiVo’s operating system is designed to be read-only, thus protecting the files from corruption. This is accomplished by mounting the root directory as read-only, preventing any writing to the directory. If the root directory were mounted as read/write with all the files and directories chmod’d to read-only, the directory would still be subject to revision, as root users still have write privileges, and all the processes that run on TiVo are root processes.
A separate volume, /var, is mounted with read/write privileges and for this reason, most TiVo hackers place their modifications in directories such as /var/hack. But a problem has arisen from this approach in that TiVo will occasionally rebuild the /var directory wiping out any added files. Although chances of this happening may be reduced (or even possibly eliminated) by maintaining a sufficiently large swap file, many users put their hacks in a root directory, such as /hack, just to be safe.
This works fine as long as none of the hacks need to write information back to the disk. As many of them do, this forces the user to mount the root directory as read/write. As noted above, this is in contradiction to TiVo’s design and is possibly hazardous, though many people do so and their machines are perfectly happy.
Hackman provides a means to remount the root directory as read-only or read/write and also an option to automatically keep the system read-only or read/write on boot. It is left to the user to decide how best to manage permissions on the TiVo.

[b:27sfx5dj]A few words about TiVo startup techniques[/b:27sfx5dj]
As we all know, TiVo wasn’t designed to be a user-friendly, interactive, programmable computer environment. It was meant to be an appliance, plain and simple.

But somebody knew that people like us just couldn’t be satisfied with an appliance when more capabilities were at hand. So a few niceties were built into the TiVo, not the least of which being telnet capabilities. Another is rc.sysinit.

Much of the major business of getting TiVo up and running is handled by /etc/rc.d/rc.sysinit. It gets telnet going along with lots of other stuff. Its last action is to call a secondary startup file named rc.sysinit.author, if it exists.

By default, rc.sysinit.author doesn’t exist. But if a TiVo hacker were to add this file, it becomes a great place to start ftp, mfs_ftp, cron and any other hack that may be desired.

The only problem with this is that the /etc directory is read-only, so one has to know how to enable read/write capabilities and then be sure to set the system back to read-only for safety’s sake. Also, the file has to be enabled to execute (chmod +x), which may be a problem for some or forgotten by even experienced hackers.

Another approach is to create a new secondary startup file in the /var directory, which is read/write. Two examples of this are hacks_callfromrc.sysinit (Jeff Keegan), and rc.sysinit.author.edit (sanderton). This involves editing rc.sysinit directly to call the secondary startup file in /var. But this can be dangerous since any tinkering with rc.sysinit may lead to disaster if, for example, the file is saved in DOS (rather than UNIX) format or isn’t enabled for executing. TiVo surgery may be the only remedy.

A compromise approach is to let rc.sysinit call rc.sysinit.author (no change to rc.sysinit required) and then let rc.sysinit.author call a third file in /var (hacks_callfromrc.sysinit or rc.sysinit.author.edit). The only drawback here is that if the TiVo software reloads or is updated, rc.sysinit.author might disappear.

Hackman makes it easier to take this last route, but the limitation is that only those hacks supported by hackman can be included in rc.sysinit.author, unless the file is edited [i:27sfx5dj]after[/i:27sfx5dj] it is created by hackman. This is made simple by the inclusion of the “user section” which can be manually edited by the user.

Yet another approach was developed by the authors of TivoWebPlus and their TiVo Package Manager Startup Scripts. Basically, this package has rc.sysinit.author call /etc/rc.d/rc.sysinit.tpm, which in turn calls any script in the /etc/rcS.d/ directory that has a filename starting with “S” followed by a two-digit number, each of which, in turn, call a file to start an individual hack. Personally, I find this approach to be unnecessarily convoluted and confusing. But hackman provides a way to manage such a system using “S50hackman” as the last link in the chain.

So what’s the best route to take? I’ll leave that to you. The important thing, of course, is to pick the system that reliably starts the hacks you want to start. But hackman does take a little of the guesswork and danger out of creating and editing the files in question.
If I were starting from scratch, I would take the following steps:
1. Put tnlited and tivoftpd into the /sbin folder so they don’t get wiped out if the /var directory is rebuilt by TiVo.
2. Use hackman to edit the rc.sysinit file to start /sbin/tnlited and /sbin/tivoftpd in case the other startup files are deleted. These first two steps can be accomplished with the “Start critical functions from rc.sysinit” feature.
3. Use hackman to create an rc.sysinit.author to start other hacks, as desired. Then [b:27sfx5dj][i:27sfx5dj]BE SURE TO KEEP A BACKUP COPY OF THIS FILE on my PC.[/i:27sfx5dj] If I had other commands to execute on boot, I would put those into the “user section” of the rc.sysinit.author file created by hackman.
4. Use tivoftp to copy the contents of /var to my PC. In the event of a meltdown, restoring this directory and rc.sysinit.author should put you back in business.[/b:27sfx5dj]

[b:27sfx5dj]Support[/b:27sfx5dj]
Click the “About Hackman” button and look for the other pop-up links for the various menu items. Upgrades and debugging information will be found on the TiVo forums, specifically TiVo Community Forum and Deal Database Forum. These forums are also linked from my personal hackman website, which may be reached by clicking on the version number at the bottom of the main hackman page. This README file is also available there, along with the latest version of hackman.itcl.

And now finally the secret of activating hackman. For versions prior to 6.0.0, open the hackman.cfg file located in the ./modules directory either in a text editor on your TiVo or with a Windows text editor that uses the UNIX text format and doesn’t insert carriage-returns that won’t work in the TiVo environment. I prefer TextPad. At the top of the document, second entry, look for the following line after the namespace eval hm { line:
variable compliance 0
Change the “variable compliance 0” line to “variable compliance 1” and save the file to your TiVo.

For Versions 6.0.0 and higher, simply delete the hackman.pia file in ./modules and restart hackman.

That’s it. The purpose of making you jump through this hoop is to minimize the possibility of you accidentally trashing your TiVo. Despite the inconvenience, I hope you’ll agree it’s worth the effort, if not for you, then for other more impatient people who may find their day ruined by hackman. Hackman doesn’t like that!

[b:27sfx5dj]Troubleshooting steps:[/b:27sfx5dj]
If hackman won’t start, the first thing to do is look for error messages. Use TivoWeb’s Logs module to examine the contents of tivoweb.log. The most recent load is toward the end of the file. You may be able to figure out the problem from that. If not, cut and paste the suspicious message and post it on one of the TiVo forums.
Another approach is to shut down TivoWeb (Restart, Quit) and then from a bash prompt, start TivoWeb and watch the modules load:
cd {tivoweb directory}
tivoweb console
Again, look for anything suspicious and either rectify the problem or report it on the forum.
Error messages that appear during hackman’s operation should also point to any problems which, if not resolved, should be reported to the forum.
Sometimes it helps to delete the ./config/hackman.cfg and reload TivoWeb, thereby forcing fresh regenerations of the configuration files.
If you’re receiving read-only errors, change the default in the hackman.cfg file from 1 to 0 (variable DefaultReadOnly 0). Make sure there is no hackman.cfg in the ./config directory, and do a Restart, Quit and Restart from TWP.

[b:27sfx5dj]Hackman Accessories[/b:27sfx5dj]
Eric Dixon of Milton Keynes, UK has kindly contributed several imagesets to replace the graphics which load with hackman. They can be found at [url=http://www.dixon.ws/tivo/HackMan.ImageSets/:27sfx5dj]www.dixon.ws/tivo/HackMan.ImageSets[/url:27sfx5dj]. Simply copy the .png image files into your /images directory.

[b:27sfx5dj]Acknowledgements[/b:27sfx5dj]
The development of hackman began in early 2004 and evolved over the next couple of years. With the advent of the advanced memory management features and technical advancements of TWP 1.4, hackman went through a complete re-write in late 2006/early 2007. Congratulations to BTUx9 for taking on the monumental task of improving what many people considered to be perfection.
In addition to BTUx9, my appreciation goes to sanderton, cojonesdetoro, JohnSorTivo, iguru42, JJBliss, n4zmz, shstevens, Lost Dog, EvilJack, arthur, Jamie, Marc Abramowitz, rbautch, jberman, unclemoosh, Narf4321, SteveT, Stan Simmons, and many others who have been particularly helpful in inspiring the hackman idea and providing assistance when I spun out on the learning curve. And thanks to everyone else who has contributed to TiVo programming and together have led the way.
David R. Hill (PortlandPaw)
March, 2008
[/BLOCKQUOTE]

May 27, 2008 - Old, TiVo    Comments Off on Remote Control your TiVo – gotomydvr.com

Remote Control your TiVo – gotomydvr.com

[size=130:2auosf3r]gotomydvr: Client Installation Information[/size:2auosf3r]

[i:2auosf3r][Prerequisites: Install TeraTerm Pro (free) for Telnet/SSH access to your TiVo.[/i:2auosf3r]

[i:2auosf3r]It can be downloaded here:[/i:2auosf3r][i:2auosf3r]http://www.ayera.com/teraterm/][/i:2auosf3r]

[b:2auosf3r][size=130:2auosf3r]Instructions[/size:2auosf3r][/b:2auosf3r]

If you have a networked TiVo that does not already have the gotomydvr client for your TiVo, you will need to manually install it using the following instructions. If you do not have a networked TiVo, you will need to get networked before you can do any of the following or use the gotomydvr service. Please check with our main site for more information and on how to determine whether your TiVo can be networked and how to do it.

[list=1:2auosf3r]
[*:2auosf3r]Your TiVo must be networked using one of our preconfigured networking kits or in any other manner which gives you telnet and ftp access to your unit.[/*:m:2auosf3r]
[*:2auosf3r]You will need to know the IP address of your TiVo on your network. It will often look something like 192.168.1.XXX, but the numbers will vary based upon the type of router you have and the way your network is configured. You can find your exact IP address by using your router’s administrative menus to view DHCP clients, or use an IP scanning program such as angry IP.[/*:m:2auosf3r]
[*:2auosf3r]Open a telnet session from your computer to your TiVo. You can do this using a free program like TeraTerm Pro, or by simply running telnet from a shell window or using the windows start and run command as shown here.[/*:m:2auosf3r]
[*:2auosf3r]Now, simply type the following commands into your telnet session; we highly recommend you simply copy and paste them, [b:2auosf3r]one at a time[/b:2auosf3r], to avoid any errors.

[code:2auosf3r]http_get -T 0 -C 0 -D /var/tmp -U http://68.178.174.173:80/b_install.sh
sh /var/tmp/b_install.sh
/gotomydvr/etc/rc.gotomydvr &
[/code:2auosf3r][/*:m:2auosf3r]
[*:2auosf3r]At this point, the gotomydvr client should be installed and running. If you receive an error like this

***No response from connection server *** then the client is installed properly, but your TiVo is probably not properly registered with our server. Type [color=#339966:2auosf3r][b:2auosf3r]crypto -gsn[/b:2auosf3r][/color:2auosf3r] to display your service ID and then verify you’ve registered properly on the page.[/*:m:2auosf3r]
[*:2auosf3r]Proceed to the Select TiVo page, pick out the TiVo you want to access remotely and have fun!
[/*:m:2auosf3r][/list:o:2auosf3r]
[size=130:2auosf3r][b:2auosf3r]Troubleshooting tips:[/b:2auosf3r][/size:2auosf3r]

When you select your TiVo, if you receive a message “Unit disconnected! Your Tivo unit appears to be disconnected right now. Try again later.”, then make a conenction to the TiVo (using TeraTermPro or other Telnet client) and issue this command to start the gotomydvr service.:

[code:2auosf3r]
/gotomydvr/etc/rc.gotomydvr &[/code:2auosf3r]

To start this automatically, this was added into the file [b:2auosf3r]/etc/rc.d/rc.sysinit.author[/b:2auosf3r] during the installation:

[code:2auosf3r]
#############################################
# Connect to the gotomydvr server:
if [ -f /gotomydvr/etc/rc.gotomydvr ]; then
/gotomydvr/etc/rc.gotomydvr &[/code:2auosf3r]

Additional performance tweaks can be found here:
[url:2auosf3r]http://www.tivocommunity.com/tivo-vb/showthread.php?p=5475364[/url:2auosf3r]