Enable KSM by default

(cherry picked from commit 73c757487ea4249dab79bd2d8f9a87a2455f316b)

Change-Id: I64f68402c1a86b79a460a0d952ed6297817705bc
Update USB configuration and set default to MTP, ADB

Media Transfer Protocol allows shared access to the SD card by
the PC and Android OS simultaneously. It's supported on Windows
and Linux, so let's use it instead of USB Mass Storage mode.

(cherry picked from commit bb5666578a903db5650681e95a2dfad1ac9af6ec)

Change-Id: I91ec3d712e3a2d302182eb263fbd315e2648b6f3
Update storage configuration & development settings

* Add debugging properties
* Allow mass storage mode
* Update default USB configuration (still using mtp,adb by default)

Conflicts:
	overlay/frameworks/base/core/res/res/xml/storage_list.xml

(cherry picked from commit c007bde4fb856fa86dafd2194e5733045515d88a)

Change-Id: Ibef617fd0a56c7f1d46092114f65fa867298378e
Merge "Enable KSM by default" into cm-10.2
Enable secure root & secure ADB mode

Also include workaround to prevent kernel hang when restarting ADB
daemon via "adb root".

(cherry picked from 30e093a760aff4f9c632647439aabe151ee0b7e6)

Change-Id: I4e46d4850516b419707b719e8486b5501ea64d3b
Add basic SELinux policy for /sd-ext

* Add unionized file_contexts to extend /sd-ext support. This fixes
  /sd-ext formatting in recovery, and adds potential support for
  backup & restore of user data.
* Set SELinux to permissive mode by default. We need to add more rules
  in order for enforcing mode to work correctly.

(cherry picked from commit b25d06c8bd97bb930354f93ff194fca10faabea4)

Change-Id: Ief330c869d0bb08b2c1ab107ad208e9119e9ea79
Remove webkit definitions

Change-Id: Idd18a072abcdcbae774d6f240b74cfb62cc68a32
Force highend graphics

Change-Id: I179d687ee79c02410b8ebf34830d5eff6cb018c7
Remove languages unsupported by SMALLER_FONT_FOOTPRINT (2/2)

Some languages (total 9) fonts aren't in SMALLER_FONT_FOOTPRINT,
and it causes empty list in Setting -> Language,
therefore can't be seen any char.

This commit saves about 6MB for system partition

Languages deleted :
hi_IN iw_IL lt_LT uk_UA ar_EG fa_IR th_TH ml_IN pa_IN

(cherry picked from commit dd951b0ee1f96e787d2a9116cddcfc61b1daf87d)

Change-Id: I6b1e8df9c9b067fbecd5bccd2313f124f7f343ff
Switch init to (working) mount_all

Create symlink to real fstab so that init binary can find it.

Change-Id: Id4e5f27a516418a516463db88975a99f6a037887
Cleanup init scripts & fix fstab mount

* Use makefile to fix the fstab bootloader name, and dynamically
  adjust service details for device-specific quirks.
* Remove dead vold.fstab
* Move Bluetooth services to dedicated init scripts

Conflicts:
	ramdisk/init.msm7x27.rc

(cherry picked from commit fe277cc83b068153895aeaaefd8943bf841c5adf)

Change-Id: I8a0f7ccb4ff889288e7275f5034a0576eaadab63
GalaxyParts: add option for highend graphics

* New property is persist.sys.force_highendgfx
* Set to enabled in build.prop by default & replace persist.sys.ui.hw
  override.

Change-Id: Ia7609717a419d37db60c398b4321ee44c4337d4a
zRAM: enable, enhance & allow coexistence with SD swap

* Using Jellybean method to activate zRAM, as etc script would
  interfere with the KitKat method
* Modify GalaxyParts to allow zRAM and regular swap to coexist
* Tune /proc/sys/vm/page-cluster to 0 (as recommended for KitKat)
* Set zRAM on by default (18% for Froyo device, 26% for Gingerbread)

Change-Id: Ic60164baccdd7839744131feb82bacce399203bb
Backport of extra_free_kbytes to Jellybean

Set to 3MB for all Samsung devices.

Change-Id: I0d1921e93b41ecb964823e1ccf11698dca66474d