[Android Software/Hacking General [Developers Only]] brashmadcap:
Same thing when I try to patch cyanogenmod from the 24th, different box, ubuntu. Here's the log:

ROOT= /home/user/Desktop/ap
TOOL= /home/user/Desktop/ap/patch_tools.tgz
ROM= /home/user/Desktop/ap/cm-10.1-20130226-NIGHTLY-t0lte.zip
ROMX= /home/user/Desktop/ap/cm-10.1-20130226-NIGHTLY-t0lte.zip

### verify tools ###
/usr/bin/patch
/bin/tar
/usr/bin/jar
/usr/bin/java
/bin/cpio

### verify ROM ###
### running ./auto_patcher cm-10.1-20130226-NIGHTLY-t0lte.zip openpdroid cm
PATH= /home/user/Desktop/ap/tmp20130226131722:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games

### unzip patch tools ###

### unzip patch patches ###

... result of ROM check: RIL= SamsungQualcommD2RIL

### probe rom type ###
#### Standard Build Query ####
# VER= v2.8.1
# OS= linux-gnu 64bit
# VID= 4.2.2
# PID= openpdroid
# MID= cm_t0lte-userdebug
# RID= cm
# ANDR= 4.2
# BDID= 20130226
# DID= t0lte
# BID= 20130219
Patches are openpdroid/4.2/cm/20130219
### 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/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 ...
inflated: system/framework/framework-res.apk

... installing framework files ...

... decompile Mms.apk ...
### copy patch openpdroid/4.2/cm/20130219 ###

... copying system/media/PDroid.jpeg ...
‘patches/openpdroid/4.2/cm/20130219/system/media/PDroid.jpeg’ -> ‘./system/media/PDroid.jpeg’

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

... apply framework.patch ...

... apply preloaded.patch ...
GARBAGE=
GARBAGE=

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

... apply services.patch ...
GARBAGE=
GARBAGE=

... apply telephony-common.patch ...
1 out of 78 hunks FAILED -- saving rejects to file smali/com/android/internal/telephony/cdma/CdmaServiceStateTracker.smali.rej
Reversed (or previously applied) patch detected! Skipping patch.
15 out of 15 hunks ignored -- saving rejects to file 'smali/com/android/internal/telephony/RIL$RILSender.smali.rej'

!!! PATCHING FAILED FOR com/android/internal/telephony/cdma/CdmaServiceStateTracker.smali !!!
!!! patch error for com/android/internal/telephony/cdma/CdmaServiceStateTracker.smali !!!

File for which patching failed:

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

CdmaServiceStateTracker.smali

You only need to report this if running the program gives you problems!!!
askconsent final = yes: for com/android/internal/telephony/cdma/CdmaServiceStateTracker.smali

... replace com/android/internal/telephony/cdma/CdmaServiceStateTracker.smali ...
‘patches/openpdroid/4.2/.provisionals/system/framework/telephony-common.jar.out/smali/com/android/internal/telephony/cdma/CdmaServiceStateTracker.smali’ -> ‘tmp/system/framework/telephony-common.jar.out/smali/com/android/internal/telephony/cdma/CdmaServiceStateTracker.smali’
GARBAGE=
GARBAGE= tmp/system/framework/telephony-common.jar.out/smali/com/android/internal/telephony/RIL$RILSender.smali.rej
### apk patch openpdroid/4.2/cm/20130219 ###

... apply Mms.apk.patch ...
GARBAGE=
GARBAGE=
### img patch openpdroid/4.2/cm/20130219 ###
### text patch openpdroid/4.2/cm/20130219 ###

### rebuild jar ###

... rebuild framework.jar ...
adding: classes.dex(in = 8305960) (out= 3405420)(deflated 59%)
adding: preloaded-classes(in = 96019) (out= 16111)(deflated 83%)

... rebuild core.jar ...
adding: classes.dex(in = 2564900) (out= 1085412)(deflated 57%)

... rebuild services.jar ...
adding: classes.dex(in = 2121700) (out= 957405)(deflated 54%)

... rebuild telephony-common.jar ...
adding: classes.dex(in = 1043924) (out= 422067)(deflated 59%)

### rebuild apk ###

... rebuild Mms.apk ...
I: Checking whether sources has changed...
I: Smaling...
I: Checking whether resources has changed...
I: Building resources...
Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, --min-sdk-version, 14, --target-sdk-version, 16, -F, /tmp/APKTOOL6959597704500445137.tmp, -I, /home/user/apktool/framework/1.apk, -S, /home/user/Desktop/ap/tmp20130226131722/tmp/system/app/Mms.apk.out/res, -M, /home/user/Desktop/ap/tmp20130226131722/tmp/system/app/Mms.apk.out/AndroidManifest.xml]
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:357)
at brut.androlib.Androlib.buildResources(Androlib.java:282)
at brut.androlib.Androlib.build(Androlib.java:205)
at brut.androlib.Androlib.build(Androlib.java:176)
at brut.apktool.Main.cmdBuild(Main.java:218)
at brut.apktool.Main.main(Main.java:74)
Caused by: brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, --min-sdk-version, 14, --target-sdk-version, 16, -F, /tmp/APKTOOL6959597704500445137.tmp, -I, /home/user/apktool/framework/1.apk, -S, /home/user/Desktop/ap/tmp20130226131722/tmp/system/app/Mms.apk.out/res, -M, /home/user/Desktop/ap/tmp20130226131722/tmp/system/app/Mms.apk.out/AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:349)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:335)
... 5 more
Caused by: brut.common.BrutException: could not exec command: [aapt, p, --min-sdk-version, 14, --target-sdk-version, 16, -F, /tmp/APKTOOL6959597704500445137.tmp, -I, /home/user/apktool/framework/1.apk, -S, /home/user/Desktop/ap/tmp20130226131722/tmp/system/app/Mms.apk.out/res, -M, /home/user/Desktop/ap/tmp20130226131722/tmp/system/app/Mms.apk.out/AndroidManifest.xml]
at brut.util.OS.exec(OS.java:93)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:347)
... 6 more
Caused by: java.io.IOException: Cannot run program "aapt": error=2, No such file or directory
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
at java.lang.Runtime.exec(Runtime.java:615)
at java.lang.Runtime.exec(Runtime.java:483)
at brut.util.OS.exec(OS.java:84)
... 7 more
Caused by: java.io.IOException: error=2, No such file or directory
at java.lang.UNIXProcess.forkAndExec(Native Method)
at java.lang.UNIXProcess.<init>(UNIXProcess.java:135)
at java.lang.ProcessImpl.start(ProcessImpl.java:130)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1021)
... 10 more

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

!!! error: failed compiling system/app/Mms.apk !!!

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

Additionally, I tried this with ApG and it did make the patch, and mms.apk is in my /system/app but it doesn't show up anywhere in the launcher or anywhere for that matter

UPDATE: I even patched mms.apk from an older build of cyanogenmod and pushed it manually and it is STILL not appearing. Tried like 4 different roms, all sorts of different patches, Linux, Windows, Mac, and I can't get Messaging to appear in my launcher. Pushed a patched mms.apk from cm nightly from the 19th, tried to patch the one from the 24th and the 26th

another update:

Tried to patch the cm from the 19th on ubuntu:

ROOT= /home/user/Desktop/ap
TOOL= /home/user/Desktop/ap/patch_tools.tgz
ROM= /home/user/Desktop/ap/cm-10.1-20130219-NIGHTLY-t0lte.zip
ROMX= /home/user/Desktop/ap/cm-10.1-20130219-NIGHTLY-t0lte.zip

### verify tools ###
/usr/bin/patch
/bin/tar
/usr/bin/jar
/usr/bin/java
/bin/cpio

### verify ROM ###
### running ./auto_patcher cm-10.1-20130219-NIGHTLY-t0lte.zip openpdroid
PATH= /home/user/Desktop/ap/tmp20130226144616:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games

### unzip patch tools ###

### unzip patch patches ###

... result of ROM check: RIL= SamsungQualcommD2RIL

### probe rom type ###
#### Standard Build Query ####
# VER= v2.8.1
# OS= linux-gnu 64bit
# VID= 4.2.2
# PID= openpdroid
# MID= cm_t0lte-userdebug
# RID= cm
# ANDR= 4.2
# BDID= 20130219
# DID= t0lte
# BID= 20130219
Patches are openpdroid/4.2/cm/20130219
### 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/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 ...
inflated: system/framework/framework-res.apk

... installing framework files ...

... decompile Mms.apk ...
### copy patch openpdroid/4.2/cm/20130219 ###

... copying system/media/PDroid.jpeg ...
‘patches/openpdroid/4.2/cm/20130219/system/media/PDroid.jpeg’ -> ‘./system/media/PDroid.jpeg’

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

... apply framework.patch ...

... apply preloaded.patch ...
GARBAGE=
GARBAGE=

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

... apply services.patch ...
GARBAGE=
GARBAGE=

... apply telephony-common.patch ...
1 out of 78 hunks FAILED -- saving rejects to file smali/com/android/internal/telephony/cdma/CdmaServiceStateTracker.smali.rej
Reversed (or previously applied) patch detected! Skipping patch.
15 out of 15 hunks ignored -- saving rejects to file 'smali/com/android/internal/telephony/RIL$RILSender.smali.rej'

!!! PATCHING FAILED FOR com/android/internal/telephony/cdma/CdmaServiceStateTracker.smali !!!
!!! patch error for com/android/internal/telephony/cdma/CdmaServiceStateTracker.smali !!!

File for which patching failed:

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

CdmaServiceStateTracker.smali

You only need to report this if running the program gives you problems!!!
askconsent final = yes: for com/android/internal/telephony/cdma/CdmaServiceStateTracker.smali

... replace com/android/internal/telephony/cdma/CdmaServiceStateTracker.smali ...
‘patches/openpdroid/4.2/.provisionals/system/framework/telephony-common.jar.out/smali/com/android/internal/telephony/cdma/CdmaServiceStateTracker.smali’ -> ‘tmp/system/framework/telephony-common.jar.out/smali/com/android/internal/telephony/cdma/CdmaServiceStateTracker.smali’
GARBAGE=
GARBAGE= tmp/system/framework/telephony-common.jar.out/smali/com/android/internal/telephony/RIL$RILSender.smali.rej
### apk patch openpdroid/4.2/cm/20130219 ###

... apply Mms.apk.patch ...
GARBAGE=
GARBAGE=
### img patch openpdroid/4.2/cm/20130219 ###
### text patch openpdroid/4.2/cm/20130219 ###

### rebuild jar ###

... rebuild framework.jar ...
adding: classes.dex(in = 8305684) (out= 3404981)(deflated 59%)
adding: preloaded-classes(in = 96019) (out= 16111)(deflated 83%)

... rebuild core.jar ...
adding: classes.dex(in = 2564900) (out= 1085412)(deflated 57%)

... rebuild services.jar ...
adding: classes.dex(in = 2121580) (out= 957369)(deflated 54%)

... rebuild telephony-common.jar ...
adding: classes.dex(in = 1042176) (out= 421465)(deflated 59%)

### rebuild apk ###

... rebuild Mms.apk ...
I: Checking whether sources has changed...
I: Smaling...
I: Checking whether resources has changed...
I: Building resources...
Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, --min-sdk-version, 14, --target-sdk-version, 16, -F, /tmp/APKTOOL8189340683411932932.tmp, -I, /home/user/apktool/framework/1.apk, -S, /home/user/Desktop/ap/tmp20130226144616/tmp/system/app/Mms.apk.out/res, -M, /home/user/Desktop/ap/tmp20130226144616/tmp/system/app/Mms.apk.out/AndroidManifest.xml]
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:357)
at brut.androlib.Androlib.buildResources(Androlib.java:282)
at brut.androlib.Androlib.build(Androlib.java:205)
at brut.androlib.Androlib.build(Androlib.java:176)
at brut.apktool.Main.cmdBuild(Main.java:218)
at brut.apktool.Main.main(Main.java:74)
Caused by: brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, --min-sdk-version, 14, --target-sdk-version, 16, -F, /tmp/APKTOOL8189340683411932932.tmp, -I, /home/user/apktool/framework/1.apk, -S, /home/user/Desktop/ap/tmp20130226144616/tmp/system/app/Mms.apk.out/res, -M, /home/user/Desktop/ap/tmp20130226144616/tmp/system/app/Mms.apk.out/AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:349)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:335)
... 5 more
Caused by: brut.common.BrutException: could not exec command: [aapt, p, --min-sdk-version, 14, --target-sdk-version, 16, -F, /tmp/APKTOOL8189340683411932932.tmp, -I, /home/user/apktool/framework/1.apk, -S, /home/user/Desktop/ap/tmp20130226144616/tmp/system/app/Mms.apk.out/res, -M, /home/user/Desktop/ap/tmp20130226144616/tmp/system/app/Mms.apk.out/AndroidManifest.xml]
at brut.util.OS.exec(OS.java:93)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:347)
... 6 more
Caused by: java.io.IOException: Cannot run program "aapt": error=2, No such file or directory
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
at java.lang.Runtime.exec(Runtime.java:615)
at java.lang.Runtime.exec(Runtime.java:483)
at brut.util.OS.exec(OS.java:84)
... 7 more
Caused by: java.io.IOException: error=2, No such file or directory
at java.lang.UNIXProcess.forkAndExec(Native Method)
at java.lang.UNIXProcess.<init>(UNIXProcess.java:135)
at java.lang.ProcessImpl.start(ProcessImpl.java:130)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1021)
... 10 more

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

!!! error: failed compiling system/app/Mms.apk !!!

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