Mac Tools

Discussion in 'TiVo Underground' started by jgraessley, Apr 12, 2004.

  1. jgraessley

    jgraessley New Member

    7
    0
    Feb 28, 2004
    I've been working on some tools for exploring the TiVo using a Mac.

    I've placed the tools here:
    http://josh.graessley.net/tivo/

    The two tools I've written are:

    TiVoPartitionScheme
    This is a system kext that will let Mac OS X read the TiVo parition of a Series 1 TiVo. You can use the ext2fs support for Mac OS X from source forge to mount the ext2 file systems (/var and the two root partitions) on a Mac OS X box. This is really handy when combined with a IDE to firewire case.

    MFS Browser
    This is a tool that lets you browse the stuff on the MFS partitions. This will not let you extract video. It just lets you poke around and find out what's on those MFS partitions. This should work without modification with any single disk series 2 tivo. For the series 1, the TiVoPartitionScheme kext mentioned above is required.

    Enjoy,
    -josh
     
  2. ADent

    ADent Active Member

    2,142
    3
    Jan 7, 2000
    Denver, CO
  3. v8q

    v8q New Member

    20
    0
    Jan 14, 2002
    This is very cool!!
    I did not know there was a way to deal with ext2 on a BSD system. I will have to check this out next time I need to mess with my tivo - which btw has not been touched for well over a year.
     
  4. v8q

    v8q New Member

    20
    0
    Jan 14, 2002
    I would not count on this happening. Tiger seems to have a big problem with releasing the code under GPL or even getting this software to run on a PPC platform. I am not even sure why he put a project on SOURCEFORGE when he has no intention of ever releasing source.
    It seems a little two faced of him since he used open source tools and help from this list to get mfstools going in the first place but that is the way it is.
     
  5. Tiger

    Tiger TMNBT Special Forces

    151
    0
    Aug 15, 2000
    Okay, major clue here.. Have you actually LOOKED? The source code was up within 24 hours of the sourceforge project being opened. It was already up by the time I announced anything. I even just logged out to make sure I could access it. I followed the instructions on the project page (Well, I copy and pasted the two commands) and checked out the source code without logging into my account.

    I do not have a problem getting the software to run on PPC. In fact, it's probably most the way there. I had even used TiVo as a test platform for most the tools. The exception was backup and restore because I didn't feel it was worth the effort to try and work around some linking issues with libz for TiVo. That was really the only limitation.

    And yes, I used open source tools. I used gcc. I used libz as well, but libz makes no demands on the final product besides being mentioned, which it is. Oh, and Linux. Well, I'm sure many of you are using those as well, and don't go handing out everything you make.

    And what sort of community support has there been? I've gotten several offers from people to do a Mac port. I couldn't very well do it myself, as I did not have the platform for development. I even took some of those people up on the offers. I never heard back from any of them. Not one. It's not like I wasn't receptive to it, it's that people were not coming through with their offers.

    So I create a sourceforge project, opening it up to a wider audience. I have yet to get any response from people, either requests to join the project, or offers to contribute back changes people have made.

    And help? I got help from all of 1 person. I looked at some other stuff that was passed around, but most of it was unrelated to what I was doing, so didn't interest me, or was stuff I already knew. I had a bit of an information exchange with pjcreath. I can attribute to him my knowledge of the TiVo CRC checking, and putting names to concepts I already knew. For example, I had been calling the zone maps "allocation maps" since I was doing everything from a point of view of examining the data as opposed to examining the executables, where the names come from.

    I had never (And still have never) seen any other source or even discussion of being able to mimic the TiVo mfsadd process without modifying the mfsadd executable on the TiVo. I had never (And still have never, though I'd be surprised if this isn't out there) seen source or dicsussion on dealing with the MFS transaction log. I also had never (And still have never) seen any source or discussion of successfully divorcing drives.

    I didn't even get an invitation to this "elite little club" until after I already had a fully working "mls" program.

    Now take your false accusations and shove it.
     
  6. v8q

    v8q New Member

    20
    0
    Jan 14, 2002
    Well - I guess I got your attention.

    I did look - not at the CVS tree (where I do now see source files) but on the download button which does nothing. My bad. All I found the first time was the zip files containing the exe files.

    As for my statements about your un-willingness to release code, that was based on a conversation I had with you well over a year ago when I offered to help with a PPC port. You said you could not send me the code because some of it was top secret but that I could send you my computer. I declined.

    Sorry to ruffle feathers but I was just passing on info as relayed to me.
    My goal is not to piss any one off - just to get this working on PPC and maybe even OSX.
    Thanks for the release and if I am able to get anything working I will let you all know.

    Nuff said??

    btw, I have not been tuned in here for about a year - and this is what I found when I came back. Glad to see some movement towards Mac tools.
     
  7. wmcbrine

    wmcbrine Well-Known Mumbler

    11,532
    715
    Aug 2, 2003
    I downloaded the CVS source of MFS Tools and attempted to compile it on the SourceForge Mac (I don't have an OS X system of my own). I've gotten pretty far along (had to make a number of changes), but I haven't finished it yet. Someone else will have to test it, in any event.

    Some folks on DDB seem to have compiled it native for the Tivo, IIRC. So, there's certainly activity there. The source has only been available a short while... and I have to say, I saw no reason to contact Tiger about what I was doing, as (for one thing) I rather had the impression that he was abandoning the project.
     
  8. v8q

    v8q New Member

    20
    0
    Jan 14, 2002
    So you can perform a compile on a computer at sourceforge? I have never done any of this stuff so I guess I am pretty clueless about whats available out there.
    I had a linux PPC (2.4.17 I think) system setup on my old mac 8500 but I have abandonded it in favor of OS 10.2. I could probably get it set up again if you need a tester.
    Tiger mentioned something about a boot CD too. I do have a kernel that unlocks the tivo disks, and the yellowdog install CD is probably a good template for the boot CD. You are welcome to to the kernal if you want it.
    I am pretty sure I still have the source code.
     
  9. Tiger

    Tiger TMNBT Special Forces

    151
    0
    Aug 15, 2000
    Ooh, I didn't even think to look for a MacosX in the sourceforge compile farm. I don't tend to use the compile farm normally. I'm kind of curious how difficult people found the porting. I tried to write it cross platform compatible as much as possible. Nearly everything has been tested natively on TiVo so I know the core code works. The only thing that hasn't been tested is backup and restore. That's also probably the ugliest code in there, the backup and restore stuff. It used to be worse before I rewrote some of it for 2.0. I have ported MFS Tools to QNX just for grins. Just took tweaking a few header files. However I've only ever tested the backup and restore on an intel platform, and intel is different from nearly everyone else in byte ordering. In THEORY, the backups can be passed between machines of different byte ordering. It notices the signature is backwards and swaps the order of everything. In practice... Well.. Anyone want to share if it actually worked? :)

    I'm sorry you weren't happy with the response v8q. Most likely it was because either I already had someone "working" on it, or I had already been burned out by the lack of response I'd gotten from the other who said they would help.

    wmcbrine, I haven't abandoned it as such. I just do not have time to work on it myself at the moment. If I were just abandoning it, I would have just tarred up the source and dropped it somewhere instead of going and opening up a sourceforge project for it. I see no reason not to have a central location for the project. If that ends up being somewhere else, maintained by someone else... Well that's the nature of open source. However it would be a shame to see the project space on source forge not put to use. After all, that is where people who get a URL out of a book are being sent now.
     
  10. wmcbrine

    wmcbrine Well-Known Mumbler

    11,532
    715
    Aug 2, 2003
    OK, I guess I misunderstood your announcement. Good to hear that you'll remain involved.

    Unfortunately, it didn't seem that portable to me; but I think it can be made so without too much trouble. The issues I found were basically just BSD vs. Linux conventions. I also have QNX, so I'll try that, too. And maybe BeOS for good measure. :)
     
  11. Tiger

    Tiger TMNBT Special Forces

    151
    0
    Aug 15, 2000
    I'll have to admit I haven't done much BSD work. However I do know there are more than a few linux-isms in the code. I imagine that's just shuffling around header files and #ifdefs though. At least that's most of what it was for QNX. (Incedentally, the QNX sales rep I work with is named Dave Bott. No relation, though he does use a TiVo.) What I'm more worried about would be the kind of things that compile but don't work right due to byte ordering.
     
  12. v8q

    v8q New Member

    20
    0
    Jan 14, 2002
    No problem at all Tiger. I have been waiting patiently ever since the release of OSX for someone smarter than me to pick up this ball and run with it. I figured it was only a matter of time. There are quite a few people out there now who have discovered that the Mac is a good platform for a hacker (the real kind - not the script kiddy version) as evidenced by the large and growing number of linux tools being ported. In fact, I think the whole x-window system can run side by side (not dual boot, running concurrently) with mac osx. Very cool stuff.
    And thanks again for releasing mfstools to the rest of us!

    Dave
     
  13. Tiger

    Tiger TMNBT Special Forces

    151
    0
    Aug 15, 2000
    Posting in this thread since nobody else here seems to be working on such a thing..

    If anyone is interested in supporting MFS Tools backups without actually porting MFS Tools/including MFS Tools code, the format is fairly simple. I've added a file called "Format-bak" to MFS Tools CVS with a brief description of how it works. I make no claims to accuracy though, as it's been awhile and I was writing it from memory, with glances at code when I needed it.
     
  14. v8q

    v8q New Member

    20
    0
    Jan 14, 2002
    Well...
    I guess I can confirm my moron status. I can not find format-bak anywhere, but I did download the rest of the CVS files so I will try to get them compiled up on my system. I will post here if I get anything working.
     
  15. Tiger

    Tiger TMNBT Special Forces

    151
    0
    Aug 15, 2000
    Well it would be more accurate to call that an "I forgot to do a cvs commit after the cvs add". :) Should be there now.
     
  16. Loki

    Loki New Member

    24
    0
    Jul 11, 2000
    NV, USA
    Well my Tivo's HD finally lost a few sectors and I didn't have a PC around so I finally got around to trying to compile mfstools for OSX. The good news is that it now compiles by hand, my expertise with makefiles and config aren't good enough to figure out what was dying in that process. How about I just make an Xcode project for it?

    As for running it I've been having fun :D, mostly due to Darwin's /dev partitioning scheme vs linux. lib/volume.c is looking ugly with #if #else etc's now. Here's an example output from a quickly dying Series2 80 hr info command, I'll have to track down the labeling problem but its getting the info correct:

    MFS volume set for /dev/disk0s10
    The MFS volume set contains 4 partitions
    /dev/disk0s1010
    MFS Partition Size: 256MiB
    /dev/disk0s1011
    MFS Partition Size: 33375MiB
    /dev/disk0s1012
    MFS Partition Size: 256MiB
    /dev/disk0s1013
    MFS Partition Size: 41975MiB
    Total MFS volume size: 75862MiB
    Estimated hours in a standalone TiVo: 79
    This MFS volume may be expanded 4 more times

    I hope to have binaries available by the end of the week for all the functions but info is all I know for sure right now.

    Quick question, when running the info command on linux do you need to just specify the disk device or the first mfs partition. Right now I'm specifying the first mfs partition and it works fine.
     
  17. Loki

    Loki New Member

    24
    0
    Jul 11, 2000
    NV, USA
    Okay I think I have mls working now. If someone can confirm this looks like an appropriate output:
    Name Type FsId Date Time Size
    ---- ---- ---- ---- ---- ----
    Anchor tyDir 39965 04/15/04 04:21 5380
    AreaCode tyDir 3353 02/17/03 14:24 16
    AuxInfo tyDir 346838 07/28/03 18:10 32
    Avalanche tyDir 48223 02/24/03 04:29 20
    AvalanchePP tyDir 35170 04/21/03 04:42 4
    CaptureRequest tyDir 35159 02/19/03 02:12 68
    Clips tyDir 39979 02/20/03 04:52 44
    Component tyDir 202 08/20/02 11:55 40
    Config tyDir 26 08/20/02 11:54 32
    CorrelationIndexPart tyDir 35156 02/26/03 21:56 16
    DataSet tyDir 24 04/15/04 01:36 1048
    DataSetVersion tyDir 164365 04/17/04 13:21 1200
    Database tyDir 2366 04/17/04 12:20 244
    DiskUsed tyDir 164349 04/17/04 16:03 3444
    Genre tyDir 42 03/05/04 14:37 2476
    GuideIndexV2 tyDir 3287 04/17/04 13:16 372
    GuideIndexV2.temp tyDir 3651 04/17/04 13:16 4
    Headend tyDir 3632 09/05/03 00:57 16
    HeadendPostalCode tyDir 3633 12/02/03 16:48 24
    HeadendTms tyDir 3634 09/05/03 00:57 20
    LeadGeneration tyDir 39797 04/15/04 01:36 1864
    LinkTag tyDir 346842 04/09/04 19:26 3796
    LogoGroup tyDir 1754 08/20/02 11:57 52
    MenuItem tyDir 35200 02/21/04 14:30 20
    MessageItem tyDir 34503 02/18/03 19:11 48
    Package tyDir 39303 04/12/04 18:36 3816
    Person tyDir 3062 02/19/03 20:42 32
    PostalCode tyDir 3638 02/17/03 14:25 16
    Preference tyDir 34539 02/17/03 15:47 12
    Recording tyDir 2166 04/23/03 02:05 332
    Resource tyDir 1396 04/23/03 02:10 80
    Rubbish tyDir 3339 04/17/04 12:20 436
    Schedule tyDir 3290 03/26/04 23:50 332
    SeasonPass tyDir 3349 04/23/03 02:09 96
    Server tyDir 4 04/17/04 13:17 1272
    Setup tyDb 3291 03/16/04 04:59 3700
    Showcase tyDir 39309 04/15/04 01:36 1132
    ShowcaseIndex tyDir 3333 04/17/04 13:27 216
    ShowcaseIndex.temp tyDir 3644 04/17/04 13:27 4
    Star tyDir 3064 08/20/02 12:08 36
    State tyDir 3289 04/27/03 21:39 260
    StationTms tyDir 3364 03/16/04 04:50 4880
    SwModule tyDir 5 01/22/04 02:12 164
    SwSystem tyDir 3060 01/21/04 08:51 44
    Table tyDir 21 08/20/02 11:54 52
    Theme tyDir 272311 06/18/03 21:19 24
    TuikRes tyDir 141249 04/14/03 04:50 44
    User tyDir 3309 04/23/03 02:09 4
    tmp tyDir 34765 04/17/04 17:03 4
     
  18. Loki

    Loki New Member

    24
    0
    Jul 11, 2000
    NV, USA
    I'm calling it a night.
    Good news, I appear to have gotten the backup function to work
    Bad news, My Tivo's harddrive is refusing to give up data 480 MB into the backup. Guess I get to reprogram all my season passes.
     
  19. Loki

    Loki New Member

    24
    0
    Jul 11, 2000
    NV, USA
    It lives! Going cold turkey without a Tivo for two weeks is NOT a pleasant experience. Anyways mfstools appears to be succesfully ported to OSX as a command line tool. I'm going on travel on Wed-Fri but once I get back I'll start submitting DIFFS to Tiger. The only issues I found was the difference in partition naming, some ioctls, and a few bugs in the endian conversion code.
     
  20. ADent

    ADent Active Member

    2,142
    3
    Jan 7, 2000
    Denver, CO
    Thanx for the work.

    Looking forward to a download for us dummies.

    Now I just need to go install OSX on one of my old Towers (OSX in on my eMac, not the optimal machine for pulling/swapping hard drives). Any chance of this working in an external firewire case?
     

Share This Page