[Android Software/Hacking General [Developers Only]] djkarl:
trying to patch a Feralab Jellybean ROM for my old xperia x10.

Using Windows 8, disabled NOD before starting and Ran as Administroator

ROOT= /cygdrive/d/incoming/ApGPackages/ap
TOOL= /cygdrive/d/incoming/ApGPackages/ap/patch_tools.tgz
ROM= /cygdrive/d/incoming/FeraLab_JellyBean-v3.zip
ROMX= D:\incoming\FERALA~1.ZIP

### verify tools ###
/cygdrive/d/incoming/ApGPackages/cygwin/bin/patch
/cygdrive/d/incoming/ApGPackages/cygwin/bin/tar
/cygdrive/d/incoming/ApGPackages/Java/bin/jar
/cygdrive/d/incoming/ApGPackages/Java/bin/java
/cygdrive/d/incoming/ApGPackages/cygwin/bin/cpio

### verify ROM ###
### running ./auto_patcher /cygdrive/d/incoming/FeraLab_JellyBean-v3.zip openpdroid cm
PATH= /cygdrive/d/incoming/ApGPackages/ap/tmp20130610021854:/cygdrive/d/incoming/ApGPackages/Java/bin:/cygdrive/d/incoming/ApGPackages/cygwin/bin:/cygdrive/d/incoming/ApGPackages/cygwin/usr/sbin

### unzip patch tools ###

### unzip patch patches ###

### probe rom type ###
#### Standard Build Query ####
# VER= v2.9.8
# OS= cygwin 32bit
# VID= 4.1.2
# PID= openpdroid
# MID= FeraLab
# RID= cm
# ANDR= 4.1
# BDID= 19700101
# DID= es209ra
# BID= 20130201
Patches are openpdroid/4.1/cm/20130201
### DELETE FILES=
### COPY FILES= system/media/PDroid.jpeg
### JAR FILES= system/framework/framework.jar system/framework/core.jar system/framework/services.jar
### APK FILES= system/app/Mms.apk
### IMG FILES=
### TXT FILES=

### unzip rom ###

### create updater script ###

... using Aroma 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("yaffs2", "MTD", "system", "/system");
package_extract_dir("system", "/system");
set_perm(0, 0, 0755, "/system/bin/chargemon");
set_perm(0, 0, 0755, "/system/bin/chargemon");
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_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_recursive(0, 0, 0755, 0555, "/system/etc/ppp");
set_perm_recursive(0, 2000, 0755, 0644, "/system/vendor");
set_perm(0, 0, 0644, "/system/vendor/etc/audio_effects.conf");
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");
set_perm(0, 2000, 0755, "/system/xbin/rngd");
set_perm(0, 0, 0644, "/system/etc/resolv.conf");
set_perm(0, 2000, 0777, "/system/xbin/run-parts");
set_perm_recursive(0, 0, 0777, 0777, "/system/engine");
set_perm_recursive(0, 0, 0777, 0777, "/system/vendor/prop");
set_perm_recursive(0, 0, 0777, 0777, "/system/etc/init.d");
set_perm_recursive(0, 0, 0777, 0777, "/system/engine/tweaks");
set_perm(0, 0, 04755, "/system/xbin/sysrw");
set_perm(0, 0, 04755, "/system/xbin/sysro");
set_perm(0, 0, 0644, "/system/etc/permissions/com.sonyericsson.uxpres.xml");
set_perm(0, 0, 0644, "/system/framework/com.sonyericsson.uxpres.jar");
set_perm(0, 0, 0777, "/system/etc/init.d/Seeder");
set_perm(0, 0, 0664, "/system/etc/AudioFilterPlatform.csv");
set_perm(0, 0, 0664, "/system/etc/AudioFilterProduct.csv");
set_perm(0, 0, 0777, "/system/etc/be_movie");
set_perm(0, 0, 0777, "/system/etc/be_movie_setting");
set_perm(0, 0, 0777, "/system/etc/be_photo");
set_perm(0, 0, 0777, "/system/etc/be2_album");
set_perm(0, 0, 0777, "/system/etc/hw_config.sh");
set_perm(0, 0, 0755, "/system/engine/sh");
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 ...
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\users\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.1/cm/20130201 ###

... copying system/media/PDroid.jpeg ...

... overwriting system/media/PDroid.jpeg from openpdroid ...
`patches/openpdroid/4.1/cm/20130201/system/media/PDroid.jpeg' -> `./system/media/PDroid.jpeg'
### delete patch openpdroid/4.1/cm/20130201 ###
### jar patch openpdroid/4.1/cm/20130201 ###

... apply framework.patch ...

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

... 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

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