5,593,458 Members 36,740 Now Online
XDA Developers Android and Mobile Development Forum

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

Tip us?
 
MaR-V-iN
Old
#1  
MaR-V-iN's Avatar
Senior Member - OP
Thanks Meter 714
Posts: 276
Join Date: Apr 2011

 
DONATE TO ME
Default [TOOL/SCRIPT] freecyngn - Removing proprietary userspace parts from CM10+

Introduction
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

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.

Changelog
v0.3.1: addon.d based auto repatching
v0.3: fixed logging
v0.2: Now creating logfile: /system/freecyngn/log

Downloads
Latest release (v0.3.1): https://github.com/mar-v-in/freecyng...-flashable.zip
Older releases: https://github.com/mar-v-in/freecyngn/releases
Source: https://github.com/mar-v-in/freecyngn

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.

FAQ
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, a Tool/Utility for the Android General

Contributors
MaR-V-iN

Version Information
Status: Beta
Current Beta Version: v0.3.1
Beta Release Date: 2013-12-12

Created 2013-12-01
Last Updated 2014-04-13
The Following 63 Users Say Thank You to MaR-V-iN For This Useful Post: [ Click to Expand ]
 
ela1103
Old
#2  
Senior Member
Thanks Meter 167
Posts: 356
Join Date: Apr 2011
Location: HEART
Its work in android 4.4 kitkat Ah?
 
broodplank1337
Old
#3  
broodplank1337's Avatar
Recognized Contributor / Recognized Developer
Thanks Meter 9363
Posts: 4,715
Join Date: Nov 2011
Location: Nijmegen

 
DONATE TO ME
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:

Roms:
AOSP v4.4.2 (KVT49L) 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.

Apps:
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


Upcoming projects:

broodROM KitKat "Aiming for perfection"
- Custom ROM with really high standards, more info soon, Target devices: All popular new-generation smartphones (mainly Samsung)


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
Old
#4  
joshm.1219's Avatar
Senior Member
Thanks Meter 873
Posts: 2,224
Join Date: May 2013
Location: Philadelphia
This is really cool... definitely going to try this out,
http://farm3.staticflickr.com/2848/11738368925_6e7dbef510_o.png
  • CARRIER: VERIZON
  • DEVICE: HTC ONE MAX
  • RECOVERY: TWRP 2.7
  • ROM: NUSENSE SIX
  • KERNEL: CLEANKERNEL
  • LAUNCHER: TSF SHELL
  • XPOSED MODULES: Greenify/KeepChat/NotifyClean/Sense6Toolbox/Snapshare/YoutubeAdAway
  • CASE: POWER FLIP
  • HACKS: LIFETIME FREE PIZZA DELIVERY
 
Ravicai
Old
#5  
Ravicai's Avatar
Member
Thanks Meter 4
Posts: 76
Join Date: Feb 2008
Subscribed

[Insert long list of devices I've owned and modded here] =P
 
SketchyStunts
Old
#6  
SketchyStunts's Avatar
Senior Member
Thanks Meter 300
Posts: 1,524
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
 
jbonetwo
Old
#7  
Senior Member
Thanks Meter 40
Posts: 143
Join Date: Aug 2012
Quote:
Originally Posted by MaR-V-iN View Post
Introduction

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?
 
jdstrydom
Old
#8  
Senior Member
Thanks Meter 186
Posts: 622
Join Date: Jan 2009
Location: Mossel Bay

 
DONATE TO ME
Quote:
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 : PAC 4.4.Alpha-1 [pac_t0lte-userdebug 4.4.2 KVT49L
Baseband : N7105XXUEMJ9
Kernel : AGNi PSN-pureCM 3.0.101-India-v2.7.3-OC-LTE
The Following User Says Thank You to jdstrydom For This Useful Post: [ Click to Expand ]
 
Revertron
Old
#9  
Revertron's Avatar
Member
Thanks Meter 13
Posts: 61
Join Date: Aug 2010
Thanks, will try this now!
 
ela1103
Old
#10  
Senior Member
Thanks Meter 167
Posts: 356
Join Date: Apr 2011
Location: HEART
jdstrydom

thank for u reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes