[BootHDR] A method of decrypting recordings on the HD-FOX T2

leicray

Member
When the HDR code is running on the HD, what is the software version that I would expect to see displayed on the system menu on the TV. I'm seeing KZTFT 1.02.20 which is the HD version, rather than FHTCP 1.02.20which is the HDR version. Does the version which is displayed correspond to what is permanently INSTALLED or the version that is currently (temporarily) running?
 

DaveyWavey

New Member
First off - Thanks to all the clever guys who give their time to this mod...
I'm having fun ! I got telnet (putty) and ftp (CoffeeCupFree) working, and all was well until I come to type '/mod/sbin/bootHDRmode' in Putty. No matter what I do, I get the response '-/bin/sh: /mod/sbin/bootHDRmode: not found'

It IS in there, I HAVE set permissions with chmod, I have tried everything I can think of. I have tried to evoke it from the root and the directory itself, all with the same result. I'm using an old laptop with Windows XP sp3 and a cat5 cable straight into the HD, but there must be some unix magic that I haven't learned about yet.

I'm mainly after getting de-crypted HD recordings to my PC that I can subsequently play elsewhere (i.e. not on the HD itself).

Any pointers will be gratefully received.

It's like an old Spectrum adventure game. "Go east": You are in a clearing. "Go west": You can't go west. You are carrying: a rowing boat, a sword and a dwarf.
 

af123

Administrator
Staff member
First off - Thanks to all the clever guys who give their time to this mod...
I'm having fun ! I got telnet (putty) and ftp (CoffeeCupFree) working, and all was well until I come to type '/mod/sbin/bootHDRmode' in Putty. No matter what I do, I get the response '-/bin/sh: /mod/sbin/bootHDRmode: not found'

It IS in there, I HAVE set permissions with chmod, I have tried everything I can think of. I have tried to evoke it from the root and the directory itself, all with the same result. I'm using an old laptop with Windows XP sp3 and a cat5 cable straight into the HD, but there must be some unix magic that I haven't learned about yet.

I'm mainly after getting de-crypted HD recordings to my PC that I can subsequently play elsewhere (i.e. not on the HD itself).

Any pointers will be gratefully received.

It's like an old Spectrum adventure game. "Go east": You are in a clearing. "Go west": You can't go west. You are carrying: a rowing boat, a sword and a dwarf.
You have DOS newlines in the file instead of UNIX ones. If you install the vim package then you can remove them as follows:

Code:
humax# cd /mod/sbin
humax# vim bootHDRmode
<the file will open inside the editor - type the following lines, pressing return at the end of each>
:set notextmode
:x
 

DaveyWavey

New Member
Just tried to install vim package, but neither vim_7.3_mipsel.opk or vim-tiny_7.3_mipsel.opk will work for me. Both give me a 'malformed packages' error. (I tried the auto install method also, with same result. Also tried re-downloading from hummy.pkg.org with same result. Will have to try again later. Thanks for trying though...

Originally, I made the scripts with Notepad2, and set the 'Line Endings' to Unix(LF), but maybe that wasn't enough...
 

af123

Administrator
Staff member
Did you FTP the packages too? It sounds like you might not be using Binary mode in your FTP client.
 

DaveyWavey

New Member
I've tried downloading to my USB stick (which worked with other packages) and appending the .auto method, I also transferred them with FTP, and just now I re-downloaded them and put them on the 640g drive using Ext2 volume manager from a different PC. Still says ... ' pkg_init_from_file: Malformed Package file'
I didn't have any trouble with humidify or squasfs !

Is it me (nost likely), or could it be that they ARE 'malformed'.
 

leicray

Member
I'm experiencing exactly the same problem as DaveyWavey with respect to getting bootHDRmode to run. The problem cannot be DOS line endings (CR/LF) as the the file was created on a PC running Ubuntu Linux using gedit as the editor with the file saved with UNIX/Linux line endings. It was transferred to the Hummy using FileZilla in auto mode which should have maintained the line endings. The file has never been near a DOS/Windows PC. However, I will try transferring it again in binary mode and see what happens.

In addition to this issue, I'm very confused by the instructions for setting the permissions and the execute flag. The first chmod command (chmod 755 /mod/sbin/bootHDRmode) is sufficient to set the user permissions to rwx. The second one (chmod -x /mod/sbin/bootHDRmode) then strips the execute permission, so what's that for?

Beyond that, the instructions to run the script do not seem correct either. Running a script requires that it be run from within the /mod/sbin directory (e.g. using ./bootHDRmode) or using sh /usr/sbin/bootHDRmode from anywhere in the directory tree.

Perhaps Drutt would like to comment and get us onto the straight and narrow with his script.
 

leicray

Member
Okay, I've installed vim and edited the script as af123 suggested and that seems to have made the difference. Seems that I was wrong about the line endings. The script now runs correctly, but only if I type sh /usr/sbin/bootHDRmode at the command line. That aspect still needs some comment from Drutt, please.
 
OP
Drutt

Drutt

Active Member
Sorry my mistake :oops: - that should have been a chmod +x, and its not even needed as chmod 755 does the trick. If you end up with dos line endings you can also get rid of them with "dos2unix [filename]" (not sure which package dos2unix came with but it works for me :)). I'll go and fix up the wiki...

Steve
 

DaveyWavey

New Member
Thanks to all of you, I/We have it sorted my 'bootHDRmode' problem now.

I couldn't get vim to install, so used Dos2Unix (on the Windows PC) to make doubly sure there were no DOS newlines, and taking note of leicray's post, I reset the permissions correctly, (without the additional chmod -x) and also invoke it with the correct command. Off it goes !

As a downside, I was so excited that I left it copying lots of films overnight, and forgot it was supposed to be recording another film... - which of course it won't whilst in HDR mode.
 
OP
Drutt

Drutt

Active Member
The "BootHDR" package is now available, and I've done a quick update of the instructions at on the wiki.
To make life even easier, the installer will extract the HDR .hdf if it exists in mod/, or download it direct from the Humax website.

Also includes a start-up script "flag" checking system to allow easy booting into HDR mode from the comfort of your armchair.

Let me know if there are any problems...
 

jtzgt

New Member
Having a few problems getting BootHDR to install. I've tried the package approach and despite having HDR_FOX_T2_upgrade.hdf in /mod it always fails to install:
>>> opkg install BootHDR Installing BootHDR (1.0) to root...
Downloading http://hummypkg.org.uk/hdrfoxt2/base/BootHDR_1.0_mipsel.opk.
Can't find /mod/hdr_fox_t2_upgrade.hdf.
Will try to download but if this fails manually copy hdr_fox_t2_upgrade.hdf to /mod and try again.
Now attempting download...
Connecting to beta.humaxonline.co.uk (209.85.227.121:80)
Connecting to beta.humaxonline.co.uk (209.85.227.121:80)
Connecting to 5799485286242967680-a-humaxonline-co-uk-s-sites.googlegroups.com (209.85.227.137:80)
wget: not an http or ftp url: https://5799485286242967680-a-humaxonline-co-uk-s-sites.googlegroups.com/a/humaxonline.co.uk/beta/freeview-hd-t2/HDR_FOX_T2_1.02.20.zip?attachauth=ANoY7crwy7wAAFg68FXTHHCROwxrWPStT9llqnthnJLUynyVdoXeXTjQ_oTOL_npNL4BgS02etoJr2OLhQg1iQU1AbrDn5wqp0Cs-3Mx9YbVLjfiSk9rOz3x1ap6v-EPGwffzQejvzVEw61j5_4SNiVJ4DHhY6Qg9ai2wNIJLv0oH-vfGeHQV_iYfTVv2lwLjeb2iTyI3Ywi350ytgeCeRzUCePzCNjO4ksEyFslQ5C7mBOlkyBrjeU=&attredirects=0
unzip: can't open HDR_FOX_T2.zip, HDR_FOX_T2.zip.zip, HDR_FOX_T2.zip.ZIP
Can't find /mod/hrd_fox_t2_upgrade.hdf.
Configuring BootHDR.

FYI - Note the typo in the error "/mod/hrd_fox_t2_upgrade.hdf" i.e hrd instead of hdr...

If I try using the wiki (manual) approach, I get to issuing the command "unsquashfs -d HDRfs 1.hdfbin-1-000000.raw" and get the error "Could not open 1.hdfbin-1-000000.raw, because No such file or directory". Again, I'm executing from /mod

Help most appreciated from the clever folks please!
 

af123

Administrator
Staff member
Having a few problems getting BootHDR to install. I've tried the package approach and
despite having HDR_FOX_T2_upgrade.hdf in /mod it always fails to install:
>>> opkg install BootHDR Installing BootHDR (1.0) to root...
Downloading http://hummypkg.org.uk/hdrfoxt2/base/BootHDR_1.0_mipsel.opk.
Can't find /mod/hdr_fox_t2_upgrade.hdf.
I'd check the case (upper/lower) of the filename in /mod first. The filesystem is case-sensitive and the script looks for the file in all lower-case.
 

jtzgt

New Member
I'd check the case (upper/lower) of the filename in /mod first. The filesystem is case-sensitive and the script looks for the file in all lower-case.
Thank you. Being a UNIX O/S I was aware of that but it didn't make any difference; I even did a cut&paste from the error message to be sure... Sorry for that inappropriate information.

Extra info. that may provide a clue(?)... I am using a HD Fox T2 and have two external USB HDD's. Disk 2 is my default recording drive at present (Disk 1 is now full... Hence why I'm trying to back stuff off). /mod seems to put me in /media/drive1/mod (which seems OK though).

Is there a specific hardware configuration that others have used (successfully) that anyone recommends I use instead?

In the meanwhile, I'll step through the scripts contained in the package (BootHDR_1.0_mipsel.opk) via command line to see if I can spot where it's failing and report back any observations to this forum.
 

ChrisDaniels

Well-Known Member
I got it to work a few weeks ago, but like you it wouldnt download the f/w automatically, so I placed it in the /mod/ folder as instructed and it worked fine.
There is only 1 HDD attached to my system though, so maybe it is that which is throwing it out in your case.
 
OP
Drutt

Drutt

Active Member
Hmm - I don't have quick answer for these problems I'm afraid... I just tried re-installing the package on my box and it all went smoothly, including the download. Here is the log in case its any help - there was stuff in about the website redirecting to a temporary site. Maybe it was just down for a bit? Has it worked for anyone else?

Code:
>>> opkg install BootHDR
Installing BootHDR (1.0) to root...
Downloading http://hummypkg.org.uk/hdrfoxt2/base/BootHDR_1.0_mipsel.opk.
Can't find /mod/hdr_fox_t2_upgrade.hdf. Will try to download but if this fails manually copy hdr_fox_t2_upgrade.hdf to /mod and try again. Now attempting download...
--2011-10-14 18:25:24--  http://beta.humaxonline.co.uk/freeview-hd-t2/HDR_FOX_T2_1.02.20.zip
Resolving beta.humaxonline.co.uk... 209.85.147.121
Connecting to beta.humaxonline.co.uk|209.85.147.121|:80... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: http://beta.humaxonline.co.uk/freeview-hd-t2/HDR_FOX_T2_1.02.20.zip?attredirects=0 [following]
--2011-10-14 18:25:24--  http://beta.humaxonline.co.uk/freeview-hd-t2/HDR_FOX_T2_1.02.20.zip?attredirects=0
Connecting to beta.humaxonline.co.uk|209.85.147.121|:80... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: http://5799485286242967680-a-humaxonline-co-uk-s-sites.googlegroups.com/a/humaxonline.co.uk/beta/freeview-hd-t2/HDR_FOX_T2_1.02.20.zip?attachauth=ANoY7cobojNR98beQEobSXPJZ4rkySCU6uTCrgVskk952cQgHBbgjk3Ix2UYnB3y1CizOn6P_GDUxueVFdPyoIpvZ3_GIG6eCdQ0QGGmeZXEb8sx6Nrv6FBrFnP6d5lWazrykZXcehR2Kz6_y-kHOdScB1ylLIzfCvmNLOQFCnkSpv1YbaHLJKYjRDrcsM-442ZjTbv3mK9TCraS8riTA65kMaeEK4LVqjdvylwxiW6n6rptzaOjUCw%3D&attredirects=0 [following]
--2011-10-14 18:25:25--  http://5799485286242967680-a-humaxonline-co-uk-s-sites.googlegroups.com/a/humaxonline.co.uk/beta/freeview-hd-t2/HDR_FOX_T2_1.02.20.zip?attachauth=ANoY7cobojNR98beQEobSXPJZ4rkySCU6uTCrgVskk952cQgHBbgjk3Ix2UYnB3y1CizOn6P_GDUxueVFdPyoIpvZ3_GIG6eCdQ0QGGmeZXEb8sx6Nrv6FBrFnP6d5lWazrykZXcehR2Kz6_y-kHOdScB1ylLIzfCvmNLOQFCnkSpv1YbaHLJKYjRDrcsM-442ZjTbv3mK9TCraS8riTA65kMaeEK4LVqjdvylwxiW6n6rptzaOjUCw%3D&attredirects=0
Resolving 5799485286242967680-a-humaxonline-co-uk-s-sites.googlegroups.com... 209.85.147.137
Connecting to 5799485286242967680-a-humaxonline-co-uk-s-sites.googlegroups.com|209.85.147.137|:80... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: https://5799485286242967680-a-humaxonline-co-uk-s-sites.googlegroups.com/a/humaxonline.co.uk/beta/freeview-hd-t2/HDR_FOX_T2_1.02.20.zip?attachauth=ANoY7cobojNR98beQEobSXPJZ4rkySCU6uTCrgVskk952cQgHBbgjk3Ix2UYnB3y1CizOn6P_GDUxueVFdPyoIpvZ3_GIG6eCdQ0QGGmeZXEb8sx6Nrv6FBrFnP6d5lWazrykZXcehR2Kz6_y-kHOdScB1ylLIzfCvmNLOQFCnkSpv1YbaHLJKYjRDrcsM-442ZjTbv3mK9TCraS8riTA65kMaeEK4LVqjdvylwxiW6n6rptzaOjUCw%3D&attredirects=0 [following]
--2011-10-14 18:25:25--  https://5799485286242967680-a-humaxonline-co-uk-s-sites.googlegroups.com/a/humaxonline.co.uk/beta/freeview-hd-t2/HDR_FOX_T2_1.02.20.zip?attachauth=ANoY7cobojNR98beQEobSXPJZ4rkySCU6uTCrgVskk952cQgHBbgjk3Ix2UYnB3y1CizOn6P_GDUxueVFdPyoIpvZ3_GIG6eCdQ0QGGmeZXEb8sx6Nrv6FBrFnP6d5lWazrykZXcehR2Kz6_y-kHOdScB1ylLIzfCvmNLOQFCnkSpv1YbaHLJKYjRDrcsM-442ZjTbv3mK9TCraS8riTA65kMaeEK4LVqjdvylwxiW6n6rptzaOjUCw%3D&attredirects=0
Connecting to 5799485286242967680-a-humaxonline-co-uk-s-sites.googlegroups.com|209.85.147.137|:443... connected.
WARNING: cannot verify 5799485286242967680-a-humaxonline-co-uk-s-sites.googlegroups.com's certificate, issued by `/C=US/O=Google Inc/CN=Google Internet Authority':
  Unable to locally verify the issuer's authority.
HTTP request sent, awaiting response... 200 OK
Length: 19126109 (18M) [application/x-zip-compressed]
Saving to: `HDR_FOX_T2.zip'

    0K .......... .......... .......... .......... ..........  0%  329K 57s
    50K .......... .......... .......... .......... ..........  0%  623K 43s
  100K .......... .......... .......... .......... ..........  0%  959K 35s
  150K .......... .......... .......... .......... ..........  1%  925K 31s
[snipped]
18650K .......... .......... .......                        100% 1002K=16s

2011-10-14 18:25:42 (1.12 MB/s) - `HDR_FOX_T2.zip' saved [19126109/19126109]

Archive:  HDR_FOX_T2.zip
  inflating: hdr_fox_t2_upgrade.hdf
HDF Tool v1.0.2, by af123, 2011.

Opening hdr_fox_t2_upgrade.hdf, 19129839 bytes.

  Blocks:    621
  Model:      4
  System ID:  80bc.7e00

x  1.hdfbin-1-000000.raw          (16175104 bytes)
Skipping file 2
Skipping file 3

Processed in: 19.53s
 
OP
Drutt

Drutt

Active Member
Here is the installer script to save extracting it from the package. May be worth executing the commands manually to see what goes wrong.

Thanks for spotting that typo - you wouldn't believe the amount of times I've typed "hrd" instead of "hdr" - btw thanks for fixing the ones in the wiki af123! Luckily this one was only in an echo :)

Code:
#!/bin/sh

if [ -f /mod/HDRfs/usr/bin/humaxtv ]; then
        echo "Using previously installed HDRfs"
        exit 1
fi

mkdir -p /mod/tmp
cd /mod/tmp

if [ ! -f /mod/hdr_fox_t2_upgrade.hdf ]; then
        echo "Can't find /mod/hdr_fox_t2_upgrade.hdf. Will try to download but if this fails manually copy hdr_fox_t2_upgrade.hdf to /mod and try again. Now attempting download..."
        wget -O HDR_FOX_T2.zip http://beta.humaxonline.co.uk/freeview-hd-t2/HDR_FOX_T2_1.02.20.zip --no-check-certificate
        unzip HDR_FOX_T2.zip hdr_fox_t2_upgrade.hdf
else
        cp /mod/hdr_fox_t2_upgrade.hdf /mod/tmp
fi

if [ -f /mod/tmp/hdr_fox_t2_upgrade.hdf ]; then
        humidify -x -S1 hdr_fox_t2_upgrade.hdf
        unsquashfs -d /mod/HDRfs 1.hdfbin-1-000000.raw
        if [ -d /mod/HDRfs ]; then
                echo "HDR filesystem extracted..."
        else
                echo "Extraction of HDR filesystem failed."
        fi
        echo "Cleaning up temp files..."
        rm -f 1.hdfbin-1-000000.raw
        rm -f HDR_FOX_T2.zip
        rm -f hdr_fox_t2_upgrade.hdf
else
        echo "Can't find /mod/hrd_fox_t2_upgrade.hdf."
 

jtzgt

New Member
Progress... I managed to unzip the script (but the above extract will help others - thank you :cool:) and installed it via telnet.

I followed the instructions within the Wiki (http://wiki.hummy.tv/wiki/Decrypt_recordings_on_the_HD-FOX_T2) and the magic "bootHDRmode" command proved the install was successful as the box is now reporting software version HDR...

I have copied encrypted .ts files from drive2 to drive1 (hopefully removing the encryption on the way) and ftp'd them to my PC. Unfortunately, neither Windows Media Player nor VLC play the files. Interestingly, Windows Media Player also shows the MediaTomb files as 0 (zero) length...

I'll keep trying but any help greatly appreciated; I'm sure that I'll be there soon and able to help others as you are me!
 
Top