Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,813,583 Members 37,779 Now Online
XDA Developers Android and Mobile Development Forum

[TOOL/SCRIPT] freecyngn - Removing proprietary userspace parts from CM10+

Tip us?
MaR-V-iN's Avatar
Senior Member - OP
Thanks Meter 899
Posts: 309
Join Date: Apr 2011

Default [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, Voice+ and VoiceDialer.
The Script does nothing useful on Stock(-based) ROMs, these do not include Google Analytics in the Settings app or the aforementioned apps

Installation Instructions
  1. Copy or download the zip file to the sdcard of your android device
  2. Boot your device into recovery.
  3. If not already done, install CyanogenMod as usual from recovery - DO NOT REBOOT
  4. 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.4.1: Remove LockClock (uses Google Play Services)
v0.4: Adapt to latest changes, remove VoiceDialer as well
v0.3.1: addon.d based auto repatching
v0.3: fixed logging
v0.2: Now creating logfile: /system/freecyngn/log

Latest release (v0.4):
Older 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.

Q: My recovery hangs while flashing?
Q: Why is this script so slow?
A: 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.
Q: Do I need to apply the patch after every update?
A: Since v0.3.1 this is no longer needed. Patching is done automatically.
Q: What's about other custom ROMs?
A: 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.

XDA:DevDB Information
freecyngn, Tool/Utility for the Android General


Version Information
Status: Stable
Stable Release Date: 2014-07-15

Created 2013-12-01
Last Updated 2014-07-15
The Following 78 Users Say Thank You to MaR-V-iN For This Useful Post: [ Click to Expand ]
Senior Member
Thanks Meter 181
Posts: 391
Join Date: Apr 2011
Location: HEART
Its work in android 4.4 kitkat Ah?
broodplank1337's Avatar
Recognized Contributor / Recognized Developer
Thanks Meter 10,021
Posts: 4,940
Join Date: Nov 2011
Location: Nijmegen

Pretty interesting stuff, I didn't knew you could assemble/disassemble dex files on the device. Anyways, I wanted to tell you, you can just boot the cpu freq to make it faster.

just grep cpuinfo_max_freq and use that number for scaling_max_freq
Device: Samsung Galaxy S4 (i9505)

Latest Development:

AOSP v4.4.4 (KTU84P) from source for I9505 (Github)
- Cleanest ROM available for i9505. along with up-to-date stock kernel, also forms a perfect base for ROM developers.

Galaxy S4 Glove Mode App (Playstore link)
- Do you want the Glove Mode of the S4 but your ROM doesn't support it? Use this app to enable/disable it easily.

Latest Scraps:
Proprietary Lib Cleaner / Silent proprietary libs / Live Thermal Monitor / GIT Conflict Fixer

Projects in development:

broodROM KitKat "Aiming for perfection"
- Custom ROM with really high standards, more info soon

For sources you can visit my Github. Or take a look at all my projects

The Following 2 Users Say Thank You to broodplank1337 For This Useful Post: [ Click to Expand ]
joshm.1219's Avatar
Senior Member
Thanks Meter 1,347
Posts: 3,172
Join Date: May 2013
Location: Philadelphia
This is really cool... definitely going to try this out,
  • CARRIER: Verizon
  • PHONE: Samsung S4 HTC One Max
  • CASE: Otterbox Defender modded to fit Anker 7800mah battery HTC PowerFlip
  • BOOTLOADER: MDK, loki bypass S-OFF & Relocked
  • RECOVERY: TWRP 2.7.x
  • KERNEL: Ktoonsez with Project Icarus profile and Hydra script FlyKernel
  • ROM: Eclipse TW 4.4 Adrenaline Sense 6
  • LAUNCHER & MODS: Google Now launcher with XGEL settings, GravityBox, Heads Up notifications, & Android L navbar
Ravicai's Avatar
Thanks Meter 4
Posts: 76
Join Date: Feb 2008

[Insert long list of devices I've owned and modded here] =P
SketchyStunts's Avatar
Senior Member
Thanks Meter 349
Posts: 1,568
Join Date: Sep 2011
Location: GA.
Flashed on cm10.2 on evo3d. Only took about 3seconds for me. Thanks

Sent from my Evo 3D CDMA using XDA Premium 4 mobile app
Senior Member
Thanks Meter 43
Posts: 153
Join Date: Aug 2012
Originally Posted by MaR-V-iN View Post

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+.
I always remove CMAccount and Voice+ as they are system apps but isn't removing CMStats the same as disabling About Phone>CyanogenMod Statistics>Enable Reporting?
Senior Member
Thanks Meter 301
Posts: 768
Join Date: Jan 2009
Location: Mossel Bay

Originally Posted by ela1103 View Post
Its work in android 4.4 kitkat Ah?
I'm on beanstalk 4.4 and worked fine.

Sent from my GT-N7105 using Tapatalk 4

Model : Samsung Galaxy Note II LTE (International) - GT-N7105
Build : Either CM11, AICP, AOSB or Omni Nightlies
Baseband : N7105XXUFND3
Kernel : Agni 2.7.7
The Following User Says Thank You to jdstrydom For This Useful Post: [ Click to Expand ]
Revertron's Avatar
Thanks Meter 19
Posts: 82
Join Date: Aug 2010
Thanks, will try this now!
Senior Member
Thanks Meter 181
Posts: 391
Join Date: Apr 2011
Location: HEART

thank for u reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes