[Android Software/Hacking General [Developers Only]] DeadK:
For CM 10.1 Nightly

ROOT= /cygdrive/c/Users/KraMeR/Downloads/ApGPackages/ap
TOOL= /cygdrive/c/Users/KraMeR/Downloads/ApGPackages/ap/patch_tools.tgz
ROM= /cygdrive/d/Note 2/CM/cm-10.1-20130222-NIGHTLY-n7100.zip
ROMX= D:\NOTE2~1\CM\CM-101~1.ZIP

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

### verify ROM ###
### running ./auto_patcher /cygdrive/d/Note 2/CM/cm-10.1-20130222-NIGHTLY-n7100.zip openpdroid cm
PATH= /cygdrive/c/Users/KraMeR/Downloads/ApGPackages/ap/tmp20130228210230:/cygdrive/c/Users/KraMeR/Downloads/ApGPackages/Java/bin:/cygdrive/c/Users/KraMeR/Downloads/ApGPackages/cygwin/bin:/cygdrive/c/Users/KraMeR/Downloads/ApGPackages/cygwin/usr/sbin

### unzip patch tools ###

### unzip patch patches ###

... result of ROM check: RIL= SamsungExynos4RIL

### probe rom type ###
#### Standard Build Query ####
# VER= v2.8.0
# OS= cygwin 32bit
# VID= 4.2.2
# PID= openpdroid
# MID= cm_n7100-userdebug
# RID= cm
# ANDR= 4.2
# BDID= 20130222
# DID= t03g
# BID= 20130213
Patches are openpdroid/4.2/cm/20130213
### DELETE FILES=
### COPY FILES= system/app/Mms.apk 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=
### 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/mmcblk0p13", "/system");
package_extract_dir("system", "/system");
set_perm_recursive(0, 0, 0755, 0644, "/system");
set_perm_recursive(0, 0, 0755, 0755, "/system/addon.d");
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(0, 2000, 0755, "/system/vendor");
set_perm_recursive(0, 2000, 0755, 0644, "/system/vendor/etc");
set_perm(0, 0, 0644, "/system/vendor/etc/audio_effects.conf");
set_perm(0, 2000, 0755, "/system/vendor/firmware");
set_perm(0, 2000, 0755, "/system/vendor/lib");
set_perm_recursive(0, 2000, 0755, 0644, "/system/vendor/lib/drm");
set_perm(0, 0, 0644, "/system/vendor/lib/drm/libdrmwvmplugin.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 ...
### copy patch openpdroid/4.2/cm/20130213 ###

... copying system/app/Mms.apk ...

... overwriting system/app/Mms.apk from openpdroid ...
`patches/openpdroid/4.2/cm/20130213/system/app/Mms.apk' -> `./system/app/Mms.apk'

... copying system/media/PDroid.jpeg ...
`patches/openpdroid/4.2/cm/20130213/system/media/PDroid.jpeg' -> `./system/media/PDroid.jpeg'

... overwriting ContentResolver.smali ...
### delete patch openpdroid/4.2/cm/20130213 ###
### jar patch openpdroid/4.2/cm/20130213 ###

... apply framework.patch ...
1 out of 9 hunks FAILED -- saving rejects to file 'smali/android/provider/Settings$Secure.smali.rej'

... apply preloaded.patch ...

!!! PATCHING FAILED FOR android/provider/Settings$Secure.smali' !!!
!!! patch error for android/provider/Settings$Secure.smali' !!!

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

!!! error: failed android/provider/Settings$Secure.smali' in framework.jar cannot be remedied

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

For PA 2.57.2

---------- Post added at 09:26 PM ---------- Previous post was at 09:17 PM ----------

PA 2.57.2

ROOT= /cygdrive/c/Users/KraMeR/Downloads/ApGPackages/ap
TOOL= /cygdrive/c/Users/KraMeR/Downloads/ApGPackages/ap/patch_tools.tgz
ROM= /cygdrive/d/Note 2/Paranoid Android/pa_n7100-2.57.2-20130210-132406-Utacka.zip
ROMX= D:\NOTE2~1\PARANO~1\PA_N71~1.ZIP

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

### verify ROM ###
### running ./auto_patcher /cygdrive/d/Note 2/Paranoid Android/pa_n7100-2.57.2-20130210-132406-Utacka.zip pd2.0 pa
PATH= /cygdrive/c/Users/KraMeR/Downloads/ApGPackages/ap/tmp20130228210919:/cygdrive/c/Users/KraMeR/Downloads/ApGPackages/Java/bin:/cygdrive/c/Users/KraMeR/Downloads/ApGPackages/cygwin/bin:/cygdrive/c/Users/KraMeR/Downloads/ApGPackages/cygwin/usr/sbin

### unzip patch tools ###

### unzip patch patches ###

... result of ROM check: RIL= Smdk4210RIL

### probe rom type ###
#### Standard Build Query ####
# VER= v2.8.0
# OS= cygwin 32bit
# VID= 4.1.2
# PID= pd2.0
# MID= pa_n7100-userdebug
# RID= pa
# ANDR= 4.1
# BDID= 20130210
# DID= t03g
# BID= 20121017
Patches are pd2.0/4.1/pa/20121017
### DELETE FILES=
### COPY FILES= system/app/Mms.apk system/media/PDroid.jpeg
### JAR FILES= system/framework/framework.jar system/framework/core.jar system/framework/services.jar
### APK FILES=
### 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/mmcblk0p13", "/system");
package_extract_dir("system", "/system");
set_perm_recursive(0, 0, 0755, 0644, "/system");
set_perm_recursive(0, 0, 0755, 0755, "/system/addon.d");
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_recursive(1002, 1002, 0755, 0440, "/system/etc/bluetooth");
set_perm(0, 0, 0755, "/system/etc/bluetooth");
set_perm(1000, 1000, 0640, "/system/etc/bluetooth/auto_pairing.conf");
set_perm(3002, 3002, 0444, "/system/etc/bluetooth/blacklist.conf");
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(1000, 1000, 0644, "/system/etc/paranoid/properties.conf");
set_perm_recursive(0, 0, 0755, 0555, "/system/etc/ppp");
set_perm(0, 2000, 0755, "/system/vendor");
set_perm_recursive(0, 2000, 0755, 0644, "/system/vendor/etc");
set_perm(0, 0, 0644, "/system/vendor/etc/audio_effects.conf");
set_perm(0, 2000, 0755, "/system/vendor/firmware");
set_perm(0, 2000, 0755, "/system/vendor/lib");
set_perm_recursive(0, 2000, 0755, 0644, "/system/vendor/lib/drm");
set_perm(0, 0, 0644, "/system/vendor/lib/drm/libdrmwvmplugin.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 ...
### copy patch pd2.0/4.1/pa/20121017 ###

... copying system/app/Mms.apk ...

... overwriting system/app/Mms.apk from pd2.0 ...
`patches/pd2.0/4.1/pa/20121017/system/app/Mms.apk' -> `./system/app/Mms.apk'

... copying system/media/PDroid.jpeg ...
`patches/pd2.0/4.1/pa/20121017/system/media/PDroid.jpeg' -> `./system/media/PDroid.jpeg'

... overwriting GsmServiceStateTracker.smali ...
### delete patch pd2.0/4.1/pa/20121017 ###
### jar patch pd2.0/4.1/pa/20121017 ###

... apply framework.patch ...
The next patch would create the file 'smali/android/app/ContextImpl$40.smali',
which already exists! Skipping patch.
1 out of 1 hunk ignored
Reversed (or previously applied) patch detected! Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file smali/android/location/Location.smali.rej
Reversed (or previously applied) patch detected! Skipping patch.
3 out of 3 hunks ignored -- saving rejects to file smali/android/widget/AppSecurityPermissions.smali.rej
Reversed (or previously applied) patch detected! Skipping patch.
5 out of 5 hunks ignored -- saving rejects to file smali/com/android/internal/telephony/gsm/GsmServiceStateTracker.smali.rej

... apply preloaded.patch ...
GARBAGE= tmp/system/framework/framework.jar.out/smali/android/app/ContextImpl.smali.orig
GARBAGE= tmp/system/framework/framework.jar.out/smali/android/location/Location.smali.rej tmp/system/framework/framework.jar.out/smali/android/widget/AppSecurityPermissions.smali.rej tmp/system/framework/framework.jar.out/smali/com/android/internal/telephony/gsm/GsmServiceStateTracker.smali.rej

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

... apply services.patch ...
138 out of 143 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

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