[Android Software/Hacking General [Developers Only]] satanwyj:
I'm try to patch CM ROM with pd2.0 , Repeatedly failed

Sorry I can't post a link

ROOT= /cygdrive/c/Users/Roger/Documents/Magic Briefcase/Mobile Folders/Dropbox/AndroidTool/ApG/ApGPackages/ap/

TOOL= /cygdrive/c/Users/Roger/Documents/Magic Briefcase/Mobile Folders/Dropbox/AndroidTool/ApG/ApGPackages/ap//patch_tools.tgz

ROM= /cygdrive/c/Users/Roger/Downloads/FXP201-cm-10-20130103-UNOFFICIAL-hikari.zip

ROMX= C:\Users\Roger\DOWNLO~1\FXP201~1.ZIP

### verify tools ###

/cygdrive/c/Users/Roger/Documents/Magic Briefcase/Mobile Folders/Dropbox/AndroidTool/ApG/ApGPackages/cygwin/bin/patch

/cygdrive/c/Users/Roger/Documents/Magic Briefcase/Mobile Folders/Dropbox/AndroidTool/ApG/ApGPackages/cygwin/bin/tar

/cygdrive/c/Users/Roger/Documents/Magic Briefcase/Mobile Folders/Dropbox/AndroidTool/ApG/ApGPackages/Java/bin/jar

/cygdrive/c/Users/Roger/Documents/Magic Briefcase/Mobile Folders/Dropbox/AndroidTool/ApG/ApGPackages/Java/bin/java

/cygdrive/c/Users/Roger/Documents/Magic Briefcase/Mobile Folders/Dropbox/AndroidTool/ApG/ApGPackages/cygwin/bin/cpio

### verify ROM ###

### running ./auto_patcher /cygdrive/c/Users/Roger/Downloads/FXP201-cm-10-20130103-UNOFFICIAL-hikari.zip pd2.0 cm

PATH= /cygdrive/c/Users/Roger/Documents/Magic Briefcase/Mobile Folders/Dropbox/AndroidTool/ApG/ApGPackages/ap/tmp20130115020545:/cygdrive/c/Users/Roger/Documents/Magic Briefcase/Mobile Folders/Dropbox/AndroidTool/ApG/ApGPackages/Java/bin:/cygdrive/c/Users/Roger/Documents/Magic Briefcase/Mobile Folders/Dropbox/AndroidTool/ApG/ApGPackages/cygwin/bin:/cygdrive/c/Users/Roger/Documents/Magic Briefcase/Mobile Folders/Dropbox/AndroidTool/ApG/ApGPackages/cygwin/usr/sbin

### unzip patch tools ###

### unzip patch patches ###

... result of ROM check: RIL= SonyQualcommRIL

### probe rom type ###

#### Standard Build Query ####

# VER= v2.5.0

# OS= cygwin 32bit

# VID= 4.1.2

# PID= pd2.0

# MID= cm_hikari-userdebug

# RID= cm

# ANDR= 4.1

# BDID= 20130104

# DID= hikari

# BID= 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/mmcblk0p12", "/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_recursive(0, 0, 0755, 0555, "/system/etc/ppp");

set_perm(0, 2000, 0755, "/system/vendor");

set_perm(0, 2000, 0755, "/system/vendor/camera");

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_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/cm/20121017 ###

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

... overwriting system/app/Mms.apk from pd2.0 ...

`patches/pd2.0/4.1/cm/20121017/system/app/Mms.apk' -> `./system/app/Mms.apk'

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

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

... overwriting GsmServiceStateTracker.smali ...

### jar patch pd2.0/4.1/cm/20121017 ###

... apply framework.patch ...

5 out of 5 hunks FAILED -- saving rejects to file smali/android/content/ContentResolver.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 ...

!!! PATCHING FAILED FOR android/content/ContentResolver.smali !!!

!!! patch error for android/content/ContentResolver.smali !!!

File for which patching failed:

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

ContentResolver.smali

askconsent final = yes: for android/content/ContentResolver.smali

... replace android/content/ContentResolver.smali ...

`patches/pd2.0/4.1/provisionals/system/framework/framework.jar.out/smali/android/content/ContentResolver.smali' -> `tmp/system/framework/framework.jar.out/smali/android/content/ContentResolver.smali'

GARBAGE=

GARBAGE= tmp/system/framework/framework.jar.out/smali/com/android/internal/telephony/gsm/GsmServiceStateTracker.smali.rej

... apply core.patch ...

GARBAGE=

GARBAGE=

... apply services.patch ...

GARBAGE=

GARBAGE=

### rebuild jar ###

... rebuild framework.jar ...

adding: classes.dex(in = 8821024) (out= 3567228)(deflated 59%)

adding: preloaded-classes(in = 84887) (out= 14594)(deflated 82%)

... rebuild core.jar ...

adding: classes.dex(in = 2512012) (out= 1045762)(deflated 58%)

... rebuild services.jar ...

adding: classes.dex(in = 1817484) (out= 815671)(deflated 55%)

### create update-cm-hikari-20130104-pd2.0.zip ###

added manifest

adding: system/framework/framework.jar(in = 3582407) (out= 3559091)(deflated 0%)

adding: system/framework/core.jar(in = 1050000) (out= 1044137)(deflated 0%)

adding: system/framework/services.jar(in = 816130) (out= 815179)(deflated 0%)

adding: system/app/Mms.apk(in = 2998855) (out= 2196168)(deflated 26%)

adding: system/media/PDroid.jpeg(in = 26898) (out= 25744)(deflated 4%)

ignoring entry META-INF/

adding: META-INF/com/(in = 0) (out= 0)(stored 0%)

adding: META-INF/com/google/(in = 0) (out= 0)(stored 0%)

adding: META-INF/com/google/android/(in = 0) (out= 0)(stored 0%)

adding: META-INF/com/google/android/update-binary(in = 221856) (out= 143847)(deflated 35%)

adding: META-INF/com/google/android/updater-script(in = 2429) (out= 552)(deflated 77%)

**************************************

**************************************