1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Customised HDF file released

Discussion in 'HD/HDR-FOX T2 Customised Firmware' started by af123, Apr 14, 2011.

  1. af123

    af123 Administrator Staff Member

    Code:
    opkg update && opkg install dropbear-ssh
    Dropbear is a small SSH client/server implementation suitable for using on embedded systems. It's largely compatible with OpenSSH and mostly works the same way (e.g. you can create a /mod/.ssh/authorized_keys file to enable key-based logins).

    This package uses passwd/shadow files installed in /mod/etc/dropbear/. The only user that's defined when you first install the package is root with a password of humax but you can change the password or add new users by hand and subsequent package upgrades won't overwrite it. That directory is also where the server keys are placed - they are generated the first time you install the package.

    SCP's supported but SFTP isn't just yet. SFTP will be a separate package coming shortly.
     
  2. af123

    af123 Administrator Staff Member

    Oh, the hidden settings screen is via:

    Menu > Settings > System > System Information > Red > Green > Yellow > Blue > Green > Yellow > Blue

    but there's nothing in there related to auto update.

    The internal settings database has a few update options, but none of them look promising for disabling automatic updates.

    Code:
    humax# sqlite3 /var/lib/humaxtv/setup.db 
    SQLite version 3.7.5
    Enter ".help" for instructions
    Enter SQL statements terminated with a ";"
    sqlite> select * from TBL_MENUCONFIG where itemName like '%UPDATE%';
    66|REGULAR_AUTO_UPDATE_TARGET|2||
    67|REGULAR_AUTO_UPDATE_STANDBY|0||
    68|REGULAR_AUTO_UPDATE_OPERATE|0||
    69|REGULAR_AUTO_UPDATE_TIME|0||
    70|REGULAR_AUTO_UPDATE_FREQUENCY|0||
    71|REGULAR_AUTO_UPDATE_SET|0||
    72|REGULAR_AUTO_UPDATE_SUCCESS|0||
    73|DYNAMIC_UPDATE|1||
    sqlite>
    
     
  3. af123

    af123 Administrator Staff Member

    The greenend-sftp package delivers an SFTP server plugin.
     
  4. fjk3489tb

    fjk3489tb Member

    af123,

    Installed dropbear-ssh, works well but I'm having dificulty getting automatic key exchange working (can't create /.ssh/authorized_keys due to ro file system), any tips?

    Also found telnet fails if I have a ext3 formatted flash in rear usb, reformatted fat32 and so far seems ok.
     
  5. af123

    af123 Administrator Staff Member

    Try /mod/.ssh/authorized_keys - root's home directory is read from the /mod/etc/passwd file and in there it's set to /mod. You can change it to anywhere (writeable) that you like by editing that passwd file.

    Yes, Raydon's shown me how to fix that in the next release. My script always assumes FAT32 which is bad.
     
  6. fjk3489tb

    fjk3489tb Member

    Works perfect.

    Now I can look at writing a script to retrieve files added to the flash drive automatically.
     
  7. af123

    af123 Administrator Staff Member

    An rsync package is available too - might help.
     
  8. James

    James Member

    The 'big' mod I want to get working on as soon as I can open up the HD-FOXT2 is to get the portal system to browse to other web sites (media servers etc) - I'm sure it can't be to dificult to redirect the portal startup page to another one on the hard drive and then have this link to either the portal or to other things like media server pages (I'm hoping to get swiss center to display on it) - The only issue with this is the limited codec support.

    Also has anybody had a chance to compair the firmware pre portal to that post portal so that we can work on copying over what ever is needed from the HDR to the HD?
     
  9. dickie

    dickie New Member

    Thats the Mod most people would like James. Also do you think it would be possible to get 'get_iplayer' to work?
    Then we could download bbc content to the box itself.
     
  10. af123

    af123 Administrator Staff Member

    That probably won't be too hard but we could run into memory problems.. Certainly worth a try!
     
  11. fjk3489tb

    fjk3489tb Member

    I was thinking along the lines of copying the program onto flash (decrypt SD) and get it moved to pc, when it's on pc delete it off flash allowing another program to be uploaded.
     
  12. af123

    af123 Administrator Staff Member

    It's a shame that the copy has to invoked by hand with the remote in order for the encryption to be removed.
    Hopefully someone can come up with a decrypt command...
     
  13. af123

    af123 Administrator Staff Member

    I've updated the dropbear-ssh package. There was a problem with it that stopped the server being started up when the Humax was taken out of standby.

    Code:
    opkg update && opkg upgrade
    should do the trick.
     
    fjk3489tb likes this.
  14. fjk3489tb

    fjk3489tb Member

    How to decrypt WITHOUT using usb flash AND faster.

    Seems the humax code decrypts SD when it copies to a usb flash stick, but I found leaving in a flash stick interferes with the startup of the modded code, and it's VERY SLOW.

    Solution - use a file on the disk to emulate an external media.

    As many tools are missing what I did was create a file system in a file on my pc and transferred it to the humax where I mounted it, here's what I did:

    On my linux system:
    • dd if=/dev/zero bs=1G count=16 of=ext3.dsk
    • mkfs -t ext3 ext3.dsk
    • scp ext3.dsk root@humax:/mnt/hd2/
    On the humax:
    • mkdir -p /media/ext3; mount -t ext3 /mnt/hd2/ext3.dsk -o loop /media/ext3
    Now when I copy a recorded program the filesystem ext3 appears as a destination, simply copy there !

    I can then use FTP or SCP to retrieve the recording (and it's decrypted).

    MUCH faster than using a flash stick.

    Autostart script
    telnet/ssh into box and create startup script: /mnt/hd2/mod/etc/init.d/S89media-ext3
    Code:
    #!/bin/sh
    
    case "$1" in
            start)
                    mkdir -p /media/ext3
                    mount -t ext3  /mnt/hd2/ext3.dsk  -o loop  /media/ext3 ;;
            stop)
                    umount  /media/ext3
                    ;;
            *)
                    exit 1 ;;
    esac
    
    # chmod 755 /mnt/hd2/mod/etc/init.d/S89media-ext3
     
    af123 likes this.
  15. af123

    af123 Administrator Staff Member

    Very neat!
    With that solution, using media servers to stream the content to other devices becomes practical.

    I can package up the ext tools so this can all be done on-box too.
     
  16. James

    James Member

    Is there any chance of getting a modded HD firmware so that I can get working on that - unless the new HDF tool is going to be out soon?
     
  17. af123

    af123 Administrator Staff Member

    I can upload a patched HDF for the HD, but I have no way of testing it first. I'll PM you a link if you want to give it a go.

    The HDF tool will be out on Tuesday morning. I'm away for the weekend and need to spend a few more hours on it before releasing.
     
  18. af123

    af123 Administrator Staff Member

    I've taken the liberty of packaging up this technique into a script that can be run on box. This is a great technique for decrypting content on-box and opens up lots of options. Creating large files is fun on that platform - dd won't do it with a block size of 1G and otherwise it's too slow, so I wrote my own utility to do that.

    Code:
    humax# opkg update && opkg install virtual-disk
    Installing virtual-disk (1.0) to root...
    Downloading http://hummypkg.org.uk/hdrfoxt2/base/virtual-disk_1.0_mipsel.opk.
    Installing e2fsprogs (1.41.14) to root...
    Downloading http://hummypkg.org.uk/hdrfoxt2/base/e2fsprogs_1.41.14_mipsel.opk.
    Configuring e2fsprogs.
    Configuring virtual-disk.
    
    humax# create-virtual-disk barney 16g
    Creating 16g virtual disk 'barney'
    ... Creating empty file to hold fileystem.
    ... Formatting.
    ... Mounting.
    ... Done.
    
    (takes around 15 seconds for 16GB)
    
    humax# df -h | grep barney
    /dev/loop0              15.7G    172.1M    14.8G  1% /media/barney
    
    Thanks to fjk3489tb!
     
    fjk3489tb likes this.
  19. James

    James Member

    Looks good - lets hope humax dont see it and then it stops working in the next (if there is a next) version of the firmware ;)
     
  20. ChrisDaniels

    ChrisDaniels Well-Known Member

    All installed ok for me.
    It did prompt for me to format the hdd when I booted up however, which was concerning, but i cancelled it and it was fine.

    Any chance we can have a more detailed description on hummypkg of what the tools are/can be used for as I noticed there are quite a few changes since the original post.

    Also regarding the auto-update issue, can we not just change the F/w version to a higher value such as v10.01 - Humax will never get this high themselves and the auto-update should fail as their version would be less than v10. This also makes sense as there is no restriction on downgrading.