Merge changes Ifbf58c14,Id4e70992,Ib7653a00,I581aaa1d into android-4.4

* changes:
  init [4]: set permissions on notify_on_migrate node
  init [3/4]: allow system to modify ksm control files
  init [2/4]: set permissions on schedulers sysfs nodes
  init [1/4]: set permissions on governors sysfs nodes
diff --git a/config/common.mk b/config/common.mk
index 0a2a07b..040a132 100644
--- a/config/common.mk
+++ b/config/common.mk
@@ -2,18 +2,18 @@
 
 # bootanimation
 PRODUCT_COPY_FILES += \
-	vendor/omni/prebuilt/bootanimation/bootanimation.zip:system/media/bootanimation.zip
+    vendor/omni/prebuilt/bootanimation/bootanimation.zip:system/media/bootanimation.zip
 
 # general properties
 PRODUCT_PROPERTY_OVERRIDES += \
-	keyguard.no_require_sim=true \
-	ro.url.legal=http://www.google.com/intl/%s/mobile/android/basic/phone-legal.html \
-	ro.com.google.clientidbase=android-google \
-	ro.com.android.wifi-watchlist=GoogleGuest \
-	ro.setupwizard.enterprise_mode=1 \
-	ro.com.android.dateformat=MM-dd-yyyy \
-	ro.com.android.dataroaming=false \
-	persist.sys.root_access=1
+    keyguard.no_require_sim=true \
+    ro.url.legal=http://www.google.com/intl/%s/mobile/android/basic/phone-legal.html \
+    ro.com.google.clientidbase=android-google \
+    ro.com.android.wifi-watchlist=GoogleGuest \
+    ro.setupwizard.enterprise_mode=1 \
+    ro.com.android.dateformat=MM-dd-yyyy \
+    ro.com.android.dataroaming=false \
+    persist.sys.root_access=1
 
 # enable ADB authentication if not on eng build
 ifneq ($(TARGET_BUILD_VARIANT),eng)
@@ -29,8 +29,8 @@
 
 # init.d support
 PRODUCT_COPY_FILES += \
-	vendor/omni/prebuilt/etc/init.d/00banner:system/etc/init.d/00banner \
-	vendor/omni/prebuilt/bin/sysinit:system/bin/sysinit
+    vendor/omni/prebuilt/etc/init.d/00banner:system/etc/init.d/00banner \
+    vendor/omni/prebuilt/bin/sysinit:system/bin/sysinit
 
 # userinit support
 PRODUCT_COPY_FILES += \
@@ -42,7 +42,7 @@
 
 # Enable SIP and VoIP on all targets
 PRODUCT_COPY_FILES += \
-	frameworks/native/data/etc/android.software.sip.voip.xml:system/etc/permissions/android.software.sip.voip.xml
+    frameworks/native/data/etc/android.software.sip.voip.xml:system/etc/permissions/android.software.sip.voip.xml
 
 # Additional packages
 -include vendor/omni/config/packages.mk
diff --git a/config/packages.mk b/config/packages.mk
index 0affec0..cc8c096 100644
--- a/config/packages.mk
+++ b/config/packages.mk
@@ -1,35 +1,37 @@
 # Additional packages
 PRODUCT_PACKAGES += \
-	Development \
-	LatinIME \
-	VideoEditor \
-	VoiceDialer \
-	SoundRecorder \
-	Basic
+    Basic \
+    Development \
+    LatinIME \
+    SoundRecorder \
+    VideoEditor \
+    VoiceDialer
 
 # Additional apps
 PRODUCT_PACKAGES += \
-	Apollo \
-	DashClock \
-	DSPManager \
-	libcyanogen-dsp \
-	audio_effects.conf \
-	MonthCalendarWidget \
-	OpenDelta
+    Apollo \
+    audio_effects.conf \
+    DashClock \
+    DSPManager \
+    libcyanogen-dsp \
+    MonthCalendarWidget \
+    OpenDelta
 
 PRODUCT_PACKAGES += \
-	CellBroadcastReceiver
+    CellBroadcastReceiver
 
 # Additional tools
 PRODUCT_PACKAGES += \
-	openvpn \
-	e2fsck \
-	mke2fs \
-	tune2fs \
-	bash \
-	vim \
-	nano \
-	htop \
-	powertop \
-	lsof
-
+    bash \
+    e2fsck \
+    fsck.exfat \
+    htop \
+    lsof \
+    mke2fs \
+    mkfs.exfat \
+    mount.exfat \
+    nano \
+    openvpn \
+    powertop \
+    tune2fs \
+    vim
diff --git a/config/version.mk b/config/version.mk
index 6e8b0d6..e2d8d41 100644
--- a/config/version.mk
+++ b/config/version.mk
@@ -1,20 +1,20 @@
 # Versioning of the ROM
 
 ifdef BUILDTYPE_NIGHTLY
-	ROM_BUILDTYPE := NIGHTLY
+    ROM_BUILDTYPE := NIGHTLY
 endif
 ifdef BUILDTYPE_AUTOTEST
-	ROM_BUILDTYPE := AUTOTEST
+    ROM_BUILDTYPE := AUTOTEST
 endif
 ifdef BUILDTYPE_EXPERIMENTAL
-	ROM_BUILDTYPE := EXPERIMENTAL
+    ROM_BUILDTYPE := EXPERIMENTAL
 endif
 ifdef BUILDTYPE_RELEASE
-	ROM_BUILDTYPE := RELEASE
+    ROM_BUILDTYPE := RELEASE
 endif
 
 ifndef ROM_BUILDTYPE
-	ROM_BUILDTYPE := HOMEMADE
+    ROM_BUILDTYPE := HOMEMADE
 endif
 
 TARGET_PRODUCT_SHORT := $(TARGET_PRODUCT)
@@ -22,16 +22,16 @@
 
 # Build the final version string
 ifdef BUILDTYPE_RELEASE
-	ROM_VERSION := $(PLATFORM_VERSION)-$(TARGET_PRODUCT_SHORT)
+    ROM_VERSION := $(PLATFORM_VERSION)-$(TARGET_PRODUCT_SHORT)
 else
 ifeq ($(ROM_BUILDTIME_LOCAL),y)
-	ROM_VERSION := $(PLATFORM_VERSION)-$(shell date +%Y%m%d-%H%M%z)-$(TARGET_PRODUCT_SHORT)-$(ROM_BUILDTYPE)
+    ROM_VERSION := $(PLATFORM_VERSION)-$(shell date +%Y%m%d-%H%M%z)-$(TARGET_PRODUCT_SHORT)-$(ROM_BUILDTYPE)
 else
-	ROM_VERSION := $(PLATFORM_VERSION)-$(shell date -u +%Y%m%d)-$(TARGET_PRODUCT_SHORT)-$(ROM_BUILDTYPE)
+    ROM_VERSION := $(PLATFORM_VERSION)-$(shell date -u +%Y%m%d)-$(TARGET_PRODUCT_SHORT)-$(ROM_BUILDTYPE)
 endif
 endif
 
 # Apply it to build.prop
 PRODUCT_PROPERTY_OVERRIDES += \
-	ro.modversion=OmniROM-$(ROM_VERSION) \
-	ro.omni.version=$(ROM_VERSION)
+    ro.modversion=OmniROM-$(ROM_VERSION) \
+    ro.omni.version=$(ROM_VERSION)
diff --git a/utils/forkrepo.sh b/utils/fork_aosp.sh
similarity index 63%
rename from utils/forkrepo.sh
rename to utils/fork_aosp.sh
index 2ee652d..3064b42 100755
--- a/utils/forkrepo.sh
+++ b/utils/fork_aosp.sh
@@ -3,21 +3,20 @@
 # Licensed under GPLv3
 
 # Configuration
-CONFIG_ROOT=~/gitolite-admin/
-CONFIG_FILE=$CONFIG_ROOT/conf/gitolite.conf
-ANDROID_ROOT=~/android
+ANDROID_ROOT=~/omni
 PREFIX=android_
-BRANCH=android-4.3
-SOURCE=android-4.3_r2.2
+BRANCH=android-4.4
+SOURCE=android-4.4.2_r1
 MANIFEST=android/default.xml
-XDA_REMOTE=ssh://git@localhost # NO TRAILING SLASH
-GERRIT_REMOTE=ssh://build1.dev.xda-developers.com:29418
-REMOTE_MANIFEST=private
+GITHUB_ORG=omnirom
+USERNAME=xplodwild
+GERRIT_REMOTE=ssh://gerrit.omnirom.org:29418
+REMOTE_MANIFEST=omnirom
 
 # Script
 if [ $# -lt 1 ]; then
-        echo Usage: ./clone.sh path
-        echo Example: ./clone.sh frameworks/base
+        echo Usage: ./fork_aosp.sh path
+        echo Example: ./fork_aosp.sh frameworks/base
         exit 1
 fi
 
@@ -32,40 +31,23 @@
 fi
 popd
 
-CURRENT_DIR=$(pwd)
-cd $CONFIG_ROOT
-git pull
-cd $CURRENT_DIR
-
-# Create the repo inside gitolite
-echo "Creating $REPO_NAME..."
-
-echo "" >> $CONFIG_FILE
-echo "repo $REPO_NAME" >> $CONFIG_FILE
-echo "    RW+     =  pulser" >> $CONFIG_FILE
-echo "    RW+     =  xplodwild" >> $CONFIG_FILE
-echo "    R       =  @all" >> $CONFIG_FILE
-echo "" >> $CONFIG_FILE
-
-echo "Comitting and pushing..."
-CURRENT_DIR=$(pwd)
-cd $CONFIG_ROOT
-git commit conf/gitolite.conf -m "Add $REPO_NAME"
-git push
+# Create the repo at github
+echo "Creating $REPO_NAME on GitHub..."
+curl --user $USERNAME --data "{\"name\":\"$REPO_NAME\"}" https://api.github.com/orgs/$GITHUB_ORG/repos
 
 # Only works if you are a gerrit admin, will create the named project before pushing (gerrit then replicates to git)
-
 ssh -p 29418 gerrit.omnirom.org gerrit create-project --name $REPO_NAME
 
 echo "Creating branch $BRANCH..."
-cd $CURRENT_DIR/$1
+pushd $1
+git remote rm gerrit
 git remote add gerrit $GERRIT_REMOTE/$REPO_NAME
 git checkout $SOURCE
 git branch $BRANCH
 git push gerrit $BRANCH
 
 echo "Updating manifest..."
-cd $ANDROID_ROOT
+popd
 SRC_LINE=$(cat $MANIFEST | grep ${1%/} | head -n1)
 if [[ "$SRC_LINE" == *group="pdk"* ]]; then
         NEW_LINE="  <project path=\"${1%/}\" name=\"$REPO_NAME\" remote=\"$REMOTE_MANIFEST\" revision=\"$BRANCH\" group=\"pdk\" />"
@@ -78,10 +60,11 @@
 sed -i "s%$SRC_LINE%$NEW_LINE%g" $MANIFEST
 
 echo "Pushing manifest"
-cd $ANDROID_ROOT/android
+pushd android
 git checkout $BRANCH
 git commit -a -m "Replace $1 path to new repository $REPO_NAME"
 git push $GERRIT_REMOTE/android HEAD:refs/for/$BRANCH
+popd
 
 echo "Now remember to approve the change on gerrit before going further!"
 read -p "Press [Enter] key once you've approved the change on gerrit"
diff --git a/utils/fork_github.sh b/utils/fork_github.sh
new file mode 100755
index 0000000..4e60ec0
--- /dev/null
+++ b/utils/fork_github.sh
@@ -0,0 +1,78 @@
+#!/bin/bash
+
+# Tool for forking a GitHub repository to another GitHub org,
+# by creating the repo on GitHub and Gerrit, and pushing
+# the source repo to Gerrit.
+# The name of the repository can be changed before forking,
+# and if the regular branch isn't found, you can choose
+# in the list of available branches.
+# Usage: ./fork.sh
+
+##
+# Configuration
+##
+USERNAME=xplodwild
+BRANCH=android-4.4
+GERRIT=gerrit.omnirom.org
+GITHUB_ORG=omnirom
+
+##
+# Script
+##
+
+# Read the source GitHub URL
+read -p "GitHub URL (no trailing slash): " github_url
+
+# Extract the repo name and prompt for changes
+repo_name=${github_url##*/}
+original_repo_name=$repo_name
+
+read -e -i "$repo_name" -p "Final repo name: " repo_name
+
+# Clone the repo locally
+git clone $github_url
+
+# Create the new repository on the organization
+echo Creating $repo_name on GitHub
+
+curl --user $USERNAME --data "{\"name\":\"$repo_name\"}" https://api.github.com/orgs/$GITHUB_ORG/repos
+
+# Create the repository on Gerrit
+echo Creating $repo_name on Gerrit
+
+ssh -p 29418 $GERRIT gerrit create-project --name $repo_name
+
+# Push the repository
+cd $original_repo_name
+
+git checkout $BRANCH
+git show-ref --verify --quiet refs/heads/$BRANCH
+
+if [ $? != 0 ]; then
+	echo "Branch $BRANCH doesn't exist in the original repository"
+	echo "Here are the branches:"
+	git branch -a
+	echo "--------------------------------------"
+	read -p "Branch to clone from: " origin_branch
+	git checkout $origin_branch
+	git branch $BRANCH
+fi
+
+git push ssh://gerrit.omnirom.org:29418/$repo_name $BRANCH
+
+# If pushing failed, we might want to forcepush the repository
+# to overwite what was previously there.
+if [ $? != 0 ]; then
+	echo "Unable to push!"
+	read -p "Try with -f? [y/n]: " forcepush
+	if [ "$forcepush" = "y" ]; then
+		git psuh -f ssh://gerrit.omnirom.org:29418/$repo_name $BRANCH
+	fi
+fi
+
+# Cleanup our local copy
+cd ..
+rm -rf $original_repo_name
+
+# Done!
+echo "Fork done!"