Sunday, April 15, 2012

Part 5 - How to get the most out of the Hama Internet TV Box - Enabling Wifi positioning


IMPORTANT! In this part we will install a modified framework-res.apk based on the framework-res.apk from the 120328 firmware. Do NOT try this with any other firmware. Also we are modifying important parts of the system here so this part is potentially more dangerous than previous parts.

Our box has no GPS afaik and no GSM so we cannot position ourselves with GPS-satellites or cell tower positioning but we have Wifi and Google keeps a large database with positions of different Wifi accesspoints. If you have an Android phone then there is a good chance that your Wifi access point is already in their database.

So in order to be able to use weather widgets, Google maps and more that requires some sort of positioning we can hack or little box into using Wifi positioning.

To do this we need to make changes to the framework and also add NetworkLocation.apk. Doing changes to the framework of an already compiled system requires some apktool experience and I won't cover that in this guide. However I've made the necessary changes for the Hama 120328 firmware and made it available for you to download.

  1. Download and extract this file to your SD-card and then put the SD-card into the box.
  2. Start Terminal Emulator and become root.
  3. Remount /system as read-write with "busybox mount -o rw,remount /system"
  4. Remount /system/app as read-write with "busybox mount -o rw,remount /system/app"
  5. Copy NetworkLocation.apk into /system/app with "cp /sdcard/NetworkLocation.apk /system/app/"
  6. Copy framework-res.apk into /system/framework with "cp /sdcard/framework-res.apk /system/framework/"
  7. Dismiss som force close dialogs that may appear when you replace framwork-res.apk and reboot the box with the command "reboot".
  8. Wait for it to start again and start Google Maps. It will recommend you to enter settings and enable wifi positioning which you should do, as this settings menu is not available in the 120328 firmware.
  9. It may take some time to kick in but if your wifi access point (make sure wifi is enabled on the box) has a know location in Googles database then it should be able get your position now.
After this I repeated the second half of part 4 and after two reboots more apps became available in Google Play Store. One example that I could not find before doings this was "Blue Skies Wallpaper" by "Kittehface Software" but after doing this I could both find and install this app. I'm not 100% sure if this was a delayed effect of the changes in part 4 or if enabling positioning enables more apps in Google Play Store.

For the curious:
  • NetworkLocation.apk comes from gapps-hdpi-20101114-signed.zip which is the Google Apps package for CyanogenMod 6.x.
  • The modifcations in framwork-res.apk was done with apktool and what I've done is that I've changed to variables that where set as "@null" in the config.xml to this:
        <!-- Component name of the service providing network location support. -->
        <string name="config_networkLocationProvider">com.google.android.location.NetworkLocationProvider</string>
        <!-- Component name of the service providing geocoder API support. -->
        <string name="config_geocodeProvider">com.google.android.location.GeocodeProvider</string>
Disclaimer: This operation will most likely void your warranty and is done completely at your own risk.

1 comment:

  1. Stopped accepting financial transactions from online gambling websites. Issuers that do accept online gambling transactions typically delay fee of half or all the cash to the online websites for a number of} months in case the user decides to dispute the fees. All of the web casinos on this listing are legit, however you could choose one choice over the others based mostly on the forms of online video games you prefer 메리트카지노 to play. The greatest method to make sure online gambling is reliable is by looking via the web site} for proof of licensing. Apart from licensing, you wants to|must also} take note of|pay consideration to|be conscious of} previous user reviews.

    ReplyDelete