fix himedia player to add nas files into media library


My HiMedia 910a player doesn’t support adding nas files (samba/nfs) into its media library. Browsing thru folders is quite tedious for media enjoy time. And 900 series players seem auto overwrite some system files when booting. Therefore customize your own firmware is the choice. Following is the solution after two days of search and configuration:

  1. Make sure you have squashfs-tools installed, if you are on Mac, then build yourself with this code from vasi.
  2. Download your device’s latest firmware, which is named as install.img but actually a tar file. Use tar to extract img’s contents files, in the “packageN” (N=5 or other number) folder, find squashfs1.img
  3. use unsquashfs to extract squashfs files, in the output folder rtk_rootfs/etc/init.d, modify file rcS to uncomment this line:

    /usr/local/etc/rcS>/dev/console&

  4. in rtk_rootfs/user/local/etc.org/, modify file rcS to add a line at the end:

    /usr/local/etc/myinit.sh&

  5. make sure it is executable: chmod +x rcS
  6. use mksquashfs to create back squashfs1.img file, and use tar to create back install.img
  7. upgrade this new created firmware, then myinit.sh will be auto called when booting
  8. Insert a sdcard or usbdisk to player, so that himedia system will allow add to media library button from these “local files”. I use a sdcard, so following location will be /tmp/usbmounts/mmcblkop1
  9. telnet into himedia, go to /tmp/usbmounts/mmcblkop1, mkdir a folder like “nasfiles”
  10. go to /usr/local/etc, vi myinit.sh to mount nfs share after sdcard is ready:

    #!/bin/sh

    sleep 35

    if [ -d /tmp/usbmounts/mmcblk0p1/nasfiles/ ]; then

    mount -t nfs -o ro,nolock 192.168.xx.xx:/folder/ /tmp/usbmounts/mmcblk0p1/nasfiles

    fi

  11. make sure myinit.sh is executable
  12. Now when himedia player is starting, it will auto mount remote nfs files into sdcard folder, then go to storage card’s nasfiles folder, the system will allow you to add nas folders or files to media library!
  13. However, sometime the system media library handling will not work properly. You can also manually fix the media library database when some folder or file is grayed out. Take the sdcard out and insert into your PC.
  14. Go to the sdcard root folder, go into “.Theatter” hidden folder, there’s stx.db file, which is in sqlite format. use sqlite3 to open it. Backup if you don’t want risk library corrupt.
  15. Mostly the ExtHddFolder table is your target, check full_folder_name to be correct; change folder_type to 3 will show the folder in “My Movies”; if you just want folders shown, delete all files item.
  16. Insert back, reboot and wait some time for network up and mount up, browse into My Movies, you have a neat and direct display of Nas folders and movie files!
,

Leave a Reply

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

This site uses Akismet to reduce spam. Learn how your comment data is processed.