[Android Software/Hacking General [Developers Only]] Ranomez:
Patching failed for me on HTC One x+ android 4.2.2 AOKP wanted to patch with openpdroid

Here is the log:

ROOT= /cygdrive/c/Users/Adrian/Desktop/ApGPackages/ap
TOOL= /cygdrive/c/Users/Adrian/Desktop/ApGPackages/ap/patch_tools.tgz
ROM= /cygdrive/c/cygwin/autopatcher/aokp.zip
ROMX= C:\cygwin\AUTOPA~1\aokp.zip

### verify tools ###
/cygdrive/c/Users/Adrian/Desktop/ApGPackages/cygwin/bin/patch
/cygdrive/c/Users/Adrian/Desktop/ApGPackages/cygwin/bin/tar
/cygdrive/c/Users/Adrian/Desktop/ApGPackages/Java/bin/jar
/cygdrive/c/Users/Adrian/Desktop/ApGPackages/Java/bin/java
/cygdrive/c/Users/Adrian/Desktop/ApGPackages/cygwin/bin/cpio

### verify ROM ###
### running ./auto_patcher /cygdrive/c/cygwin/autopatcher/aokp.zip openpdroid aokp
PATH= /cygdrive/c/Users/Adrian/Desktop/ApGPackages/ap/tmp20130423152229:/cygdrive/c/Users/Adrian/Desktop/ApGPackages/Java/bin:/cygdrive/c/Users/Adrian/Desktop/ApGPackages/cygwin/bin:/cygdrive/c/Users/Adrian/Desktop/ApGPackages/cygwin/usr/sbin

### unzip patch tools ###

### unzip patch patches ###

### probe rom type ###
#### Standard Build Query ####
# VER= v2.9.2
# OS= cygwin 32bit
# VID= 4.2.2
# PID= openpdroid
# MID= aokp_enrc2b-userdebug
# RID= aokp
# ANDR= 4.2
# BDID= 20130423
# DID= enrc2b
# BID= 20130405
Patches are openpdroid/4.2/aokp/20130405
### DELETE FILES=
### COPY FILES= system/media/PDroid.jpeg
### JAR FILES= system/framework/framework.jar system/framework/core.jar system/framework/services.jar system/framework/telephony-common.jar
### APK FILES= system/app/Mms.apk
### IMG FILES=
### TXT FILES=

### unzip rom ###

### create updater script ###

... using Clockworkmod installer ...
# generated updater-script
ui_print("");
ui_print("");
ui_print("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
ui_print("* *");
ui_print("* * The Auto-Patcher * *");
ui_print("* * * * * *");
ui_print("* * by mateor * *");
ui_print("* *");
ui_print("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
ui_print("");
ui_print(" Attention");
ui_print(" ************************************");
ui_print("");
ui_print(" There is nothing that can go wrong here");
ui_print(" that reflashing your ROM won't fix.");
ui_print("");
mount("ext4", "EMMC", "/dev/block/mmcblk0p12", "/system");
package_extract_dir("system", "/system");
set_perm_recursive(0, 0, 0755, 0644, "/system");
set_perm_recursive(0, 2000, 0755, 0755, "/system/bin");
set_perm(0, 3003, 02750, "/system/bin/netcfg");
set_perm(0, 3004, 02755, "/system/bin/ping");
set_perm(0, 2000, 06750, "/system/bin/run-as");
set_perm(1002, 1002, 0440, "/system/etc/dbus.conf");
set_perm(1014, 2000, 0550, "/system/etc/dhcpcd/dhcpcd-run-hooks");
set_perm_recursive(0, 2000, 0755, 0755, "/system/etc/init.d");
set_perm(0, 0, 0755, "/system/etc/init.d");
set_perm(0, 2000, 0550, "/system/etc/init.goldfish.sh");
set_perm_recursive(0, 0, 0755, 0555, "/system/etc/ppp");
set_perm_recursive(0, 2000, 0755, 0644, "/system/vendor");
set_perm(0, 0, 0644, "/system/vendor/firmware/libpn544_fw.so");
set_perm(0, 0, 0644, "/system/vendor/lib/libbt-vendor.so");
set_perm_recursive(0, 2000, 0755, 0755, "/system/xbin");
set_perm(0, 0, 06755, "/system/xbin/librank");
set_perm(0, 0, 06755, "/system/xbin/procmem");
set_perm(0, 0, 06755, "/system/xbin/procrank");
set_perm(0, 0, 06755, "/system/xbin/su");
unmount("/system");
ui_print(" .");
ui_print(" .");
ui_print(" done!");

### create restore.zip ###

### decompile system files ###

... decompile framework.jar ...

... extract preloaded-classes ...
inflated: preloaded-classes

... decompile core.jar ...

... decompile services.jar ...

... decompile telephony-common.jar ...
inflated: system/framework/framework-res.apk

... installing framework files ...

... decompile Mms.apk ...
I: Baksmaling...
I: Loading resource table...
I: Loaded.
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: C:\Users\Adrian\apktool\framework\1.apk
I: Loaded.
I: Regular manifest package...
I: Decoding file-resources...
I: Decoding values */* XMLs...
I: Done.
I: Copying assets and libs...
### copy patch openpdroid/4.2/aokp/20130405 ###

... copying system/media/PDroid.jpeg ...
`patches/openpdroid/4.2/aokp/20130405/system/media/PDroid.jpeg' -> `./system/media/PDroid.jpeg'
### delete patch openpdroid/4.2/aokp/20130405 ###
### jar patch openpdroid/4.2/aokp/20130405 ###

... apply framework.patch ...
Reversed (or previously applied) patch detected! Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file smali/android/app/WallpaperInfo.smali.rej
9 out of 9 hunks FAILED -- saving rejects to file smali/android/content/ContentResolver.smali.rej

... apply preloaded.patch ...

!!! PATCHING FAILED FOR android/content/ContentResolver.smali !!!
!!! patch error for android/content/ContentResolver.smali !!!

File for which patching failed:

---------------------------------------------

ContentResolver.smali

You only need to report this if running the program gives you problems!!!
askconsent final = yes: for android/content/ContentResolver.smali

... replace android/content/ContentResolver.smali ...
`patches/openpdroid/4.2/.provisionals/system/framework/framework.jar.out/smali/android/content/ContentResolver.smali' -> `tmp/system/framework/framework.jar.out/smali/android/content/ContentResolver.smali'
GARBAGE= tmp/system/framework/framework.jar.out/smali/android/app/Activity.smali.orig tmp/system/framework/framework.jar.out/smali/android/provider/Settings$Secure.smali.orig
GARBAGE= tmp/system/framework/framework.jar.out/smali/android/app/WallpaperInfo.smali.rej

... apply core.patch ...
GARBAGE=
GARBAGE=

... apply services.patch ...
147 out of 153 hunks FAILED -- saving rejects to file smali/com/android/server/ServerThread.smali.rej

!!! PATCHING FAILED FOR com/android/server/ServerThread.smali !!!
!!! patch error for com/android/server/ServerThread.smali !!!

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

!!! error: failed com/android/server/ServerThread.smali in services.jar cannot be remedied

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!