[TOOL/SCRIPT] freecyngn - Removing proprietary userspace parts from CM10+
Though CyanogenMod always claimed to be open-source, there were only few versions that had an open userspace (Some drivers and firmware have always been proprietary, but it's not CMs fault).
The first CM version I ever installed on a device was CM7 and it contains koush's proprietary ROM Manager app. CyanogenMod 9 seemed to have no proprietary parts, but since CM10 they included Google Analytics Client library (libGoogleAnalyticsV2.jar) within cmstats in the settings app (so it's not even possible to disable it). In CyanogenMod 10.1 CMAccount was included. It relies heavily on Google's Cloud Messaging service and includes the proprietary Google Play Services Client library (google-play-services.jar).
There are some people here at xda (including myself) that installed CyanogenMod because it does not ship GAPPS and is a fully (except vendor files) open-source and free rom. Since i noticed it's not, i started building CM without these closed-source stuff, but it's a pity to do so. That's when the idea of freecyngn started.
What is freecyngn
freecyngn is a tool you can run from recovery, that removes some known proprietary things (or apps relying on proprietary extensions) from CyanogenMod. At the moment this is Google Analytics (from CMStats), CMAccount and Voice+.
The Script does nothing useful on Stock(-based) ROMs, these do not include Google Analytics in the Settings app or the aforementioned apps
- Copy or download the zip file to the sdcard of your android device
- Boot your device into recovery.
- If not already done, install CyanogenMod as usual from recovery - DO NOT REBOOT
- Install freecyngn as if it was a rom, but DO NOT WIPE /system before
Note: With v0.3 and younger you need to repeat the last step everytime you update CyanogenMod. Do not use the CMUpdater, as it will reboot the recovery after the update without giving you the choice to reflash freecyngn. Since v0.3.1 the patch is automatically applied after each update.
v0.3.1: addon.d based auto repatching
v0.3: fixed logging
v0.2: Now creating logfile: /system/freecyngn/log
Latest release (v0.3.1): https://github.com/mar-v-in/freecyng...-flashable.zip
Older releases: https://github.com/mar-v-in/freecyngn/releases
How it works (technical stuff)
freecyngn disassembles (using [bak]smali) the CyanogenMod settings app and removes the proprietary Google Analytics component. It then replaces it with NoAnalytics
, so that existing bindings from cmstats do not break and reassembles the settings app.
My recovery hangs while flashing?
Why is this script so slow?
freecyngn need plenty of time and is sometimes even slower than flashing the rom itself. This is bcause most recoverys underclock the cpu, which is no problem for just copying files from zip to partition or format a partition, but it is a problem for disassembling and reassembling, which are cpu intensive tasks.
Do I need to apply the patch after every update?
Since v0.3.1 this is no longer needed. Patching is done automatically.
What's about other custom ROMs?
AOKP is patchable with freecyngn as well. Paranoid contains Google Analytics in the proprietary ParanoidSettings app instead of the system settings and thus does not work with this patch. OmniROM does not contain Google Analytics. Note that some slimmed-down CM/AOKP-custom-builds will not work with freecyngn. If you use such, check the log file /system/freecyngn/log after flashing.
freecyngn, a Tool/Utility for the Android General
Current Beta Version:
Beta Release Date: