Last week I gave a talk about Replicant with a live (re)installation of it on my phone at Club Linux Atomic. You can download the slides (in french) here (and LaTeX sources here). There are available under the Creative Common BY-SA 3.0 license.
But let's come back to the topic of this post, the GPS chip of the Samsung Galaxy S2. After my talk, someone asked me how I got the GPS module to work on my phone. There is indeed no support of it on Replicant as the chip (a SiRF star IV GSD4t) is not recognized by standard free software tools like gpsd. Someones already worked on it, but without success at this time. All the work is on this Replicant's wiki page. So if you really need it, you have to use the proprietary code.
I realize that there is no documentation explaining how to install this proprietary code, so here is what I did on my phone. Bear in mind that, unlike proprietary firmwares you need for WiFi/Bluetooth chipset, the proprietary code needed for the GPS is a “real” software which run on your main SoC, and could potentially have access to all your data.
- First, let's download the CyanogenMod archive corresponding to the Galaxy S2. Replicant is based on CyanogenMod and we are sure that the code we need is chipped with the CyanogenMod distribution.
Then you need to extract and upload to your phone this 2 files: gps.exynos4.so and libsecril-client.so:
adb push system/lib/hw/gps.exynos4.so /system/lib/hw/ adb shell chmod 644 /system/lib/hw/gps.exynos4.so adb push system/lib/libsecril-client.so /system/lib/ adb shell chmod 644 /system/lib/libsecril-client.so
And that's it! Pretty simple, just 2 files but we should have to know the good ones.