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.
- Download and extract this file to your SD-card and then put the SD-card into the box.
- Start Terminal Emulator and become root.
- Remount /system as read-write with "busybox mount -o rw,remount /system"
- Remount /system/app as read-write with "busybox mount -o rw,remount /system/app"
- Copy NetworkLocation.apk into /system/app with "cp /sdcard/NetworkLocation.apk /system/app/"
- Copy framework-res.apk into /system/framework with "cp /sdcard/framework-res.apk /system/framework/"
- Dismiss som force close dialogs that may appear when you replace framwork-res.apk and reboot the box with the command "reboot".
- 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.
- 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.
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>
No comments:
Post a Comment