Lightweight CyanogenMod 13.0 - Samsung Galaxy S2 I have found my old Samsung Galaxy S2, the plan is to use this as a small information screen in the livingroom. I was thinking of stripping down a CyanogenMod 13.0 and build a light-weight version of it, I don't need GPS, Bluetooth, Cellular, FM Radio, Camera support so I was planing to remove support for these. I only need WiFi support. 

I have found this tutorial for building CyanogenMode 13.0 for i9100: http://wiki.cyanogenmod.org/w/Build_for_i9100

How do I strip CM down, and remove all unecessary support and apps (The only app that is going to run on this is a app that I'm myself has written)? I guess I have to do this before i compile it?
Observe .repo/manifests/default.xml for a list of components included by default in the build. For example if you want to remove 2 live wallpapers "Basic" and "PhotoTable", then you'll find these corresponding lines in the file:

  &lt;project path="packages/screensavers/Basic" name="CyanogenMod/android_packages_screensavers_Basic" groups="pdk-fs" /&gt;
  &lt;project path="packages/screensavers/PhotoTable" name="CyanogenMod/android_packages_screensavers_PhotoTable" groups="pdk-fs" /&gt;


Now create another arbitrary xml file in .repo/local_manifests. Edit it and write:

&lt;manifest&gt;
  &lt;remove-project name="CyanogenMod/android_packages_screensavers_Basic" /&gt;
  &lt;remove-project name="CyanogenMod/android_packages_screensavers_PhotoTable" /&gt;
&lt;/manifest&gt;


Do similar edits for all components you want to remove. Save, sync repo and build.

Do note that many items are crucial and can't be removed without introducing errors to building or using. Despite you wanting an extreme barebone experience, I advise against doing so, at least during building.