mateor / auto-patcher

smali patcher for Android code injection
MIT License
74 stars 42 forks source link

[Android 4.3.1]ParanoidAndroid 3.99-RC2 | Test 10 - patch fails #252

Closed Christoph21x closed 10 years ago

Christoph21x commented 10 years ago

Dear Mateor, dear All

Patch on "[Android 4.3.1]ParanoidAndroid 3.99-RC2 | Test 10" fails.

Take your time pls. mateor, it's just for myself only... and I'm patient and will also accept any "no-go" ;)

Greetz - Chris

Download link: http://d-h.st/nlI Source Codes: https://github.com/woh (<-- his own reporsitory; user is called WoH) https://github.com/evervolv https://github.com/cyanogenmod https://github.com/Evervolv/android_kernel_htc_qsd8k

Patch log: ROOT= /cygdrive/c/Installationen/PDA/Android/PDroid/ApGPackages/ap TOOL= /cygdrive/c/Installationen/PDA/Android/PDroid/ApGPackages/ap/patch_tools.tgz ROM= /cygdrive/c/Users/Christoph Graessner/Desktop/pa_bravo-3.99-RC2-20131011.zip ROMX= C:\Users\CHRIST~1\Desktop\PA_BRA~1.ZIP

checking for updates

Updater: Auto-Patcher is already up to date

verify tools

/cygdrive/c/Installationen/PDA/Android/PDroid/ApGPackages/cygwin/bin/tar /cygdrive/c/Installationen/PDA/Android/PDroid/ApGPackages/Java/bin/jar /cygdrive/c/Installationen/PDA/Android/PDroid/ApGPackages/Java/bin/java /cygdrive/c/Installationen/PDA/Android/PDroid/ApGPackages/cygwin/bin/cpio

verify ROM

running ./auto_patcher /cygdrive/c/Users/Christoph Graessner/Desktop/pa_bravo-3.99-RC2-20131011.zip openpdroid

PATH= /cygdrive/c/Installationen/PDA/Android/PDroid/ApGPackages/ap/tmp20131223215910:/cygdrive/c/Installationen/PDA/Android/PDroid/ApGPackages/Java/bin:/cygdrive/c/Installationen/PDA/Android/PDroid/ApGPackages/cygwin/bin:/cygdrive/c/Installationen/PDA/Android/PDroid/ApGPackages/cygwin/usr/sbin

unzip patch tools

unzip patch patches

probe rom type

GNU Build Query

VER= v3.7.0

OS= cygwin 32bit

VID= 4.3.1

PID= openpdroid

MID= pa_bravo-userdebug

RID= pa

ANDR= 4.3

BDID= 20131011

DID= bravo

BID= 20130915

Current HEAD: b0b50a3427254f00e82e5ff3c970772acb62ce66 Fix autopatcher to work with Android 2.3 again

unzip rom

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 system/app/Mms.apk

APK FILES=

IMG FILES=

TXT FILES=

create updater script

... using Clockworkmod installer ...

generated updater-script

ui_print(""); ui_print(""); ui_print("~~~~~~~~~~~~"); uiprint("* "); uiprint(" * The * _"); uiprint(" * * Auto-Patcher * * _"); uiprint(" * * _"); uiprint(" *"); ui_print("~~~~~~~~~~~~"); ui_print(""); ui_print(" Attention"); uiprint(" ***"); ui_print(""); ui_print(" No ART support!"); ui_print(" Only use the davlik runtime with OpenPDroid!"); uiprint(" *"); 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_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, 0, 0755, "/system/bin/ping"); set_perm(0, 2000, 0750, "/system/bin/run-as"); set_perm(1014, 2000, 0550, "/system/etc/dhcpcd/dhcpcd-run-hooks"); set_perm_recursive(0, 2000, 0755, 0750, "/system/etc/init.d"); set_perm(1000, 1000, 0644, "/system/etc/paranoid/properties.conf"); set_perm_recursive(0, 0, 0755, 0555, "/system/etc/ppp"); set_perm_recursive(0, 2000, 0755, 0644, "/system/vendor"); set_perm_recursive(0, 0, 0755, 0644, "/system/vendor/firmware"); set_perm(0, 2000, 0755, "/system/vendor/firmware"); 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 ... \vergrößert: preloaded-classes

... decompile core.jar ...

... decompile services.jar ...

... decompile telephony-common.jar ...

... decompile Mms.apk ...

copy patch openpdroid/4.3

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

... overwriting system/media/PDroid.jpeg from openpdroid ... patches/openpdroid/4.3/pa/20130915/system/media/PDroid.jpeg' ->./system/media/PDroid.jpeg'

jar patch openpdroid/4.3

... apply framework.patch ... Matching the created file: ContextImpl$42 There are 1 Context match; Using: patches/openpdroid/4.3/pa/20130915

Succesful match found! Swapping patches/openpdroid/4.3/.aosp-ever/20130810/framework_30_SystemProperties.patch for patches/openpdroid/4.3/pa/20130915/framework_34_SystemProperties.patch!! Succesful match found! Swapping patches/openpdroid/4.3/.aosp-ever/20130810/framework_51_Settings$Secure.patch for patches/openpdroid/4.3/pa/20130915/framework_55_Settings$Secure.patch!! ...applying patches/openpdroid/4.3/pa/20130915/framework_00_preloaded.patch ... ...applying patches/openpdroid/4.3/pa/20130915/framework_13_Instrumentation$1.patch ... ...applying patches/openpdroid/4.3/pa/20130915/framework_14_Instrumentation$2.patch ... ...applying patches/openpdroid/4.3/pa/20130915/framework_15_Instrumentation$3.patch ... ...applying patches/openpdroid/4.3/pa/20130915/framework_16_Instrumentation$4.patch ... ...applying patches/openpdroid/4.3/pa/20130915/framework_17_Instrumentation.patch ... ...applying patches/openpdroid/4.3/pa/20130915/framework_19_ContentResolver.patch ... ...applying patches/openpdroid/4.3/pa/20130915/framework_24_Camera$EventHandler.patch ... ...applying patches/openpdroid/4.3/pa/20130915/framework_25_Camera.patch ... ...applying patches/openpdroid/4.3/pa/20130915/framework_27_AudioRecord.patch ... ...applying patches/openpdroid/4.3/pa/20130915/framework_28_MediaRecorder$PrivacyRunner.patch ... ...applying patches/openpdroid/4.3/pa/20130915/framework_29_MediaRecorder.patch ... ...applying patches/openpdroid/4.3/pa/20130915/framework_30_NetworkInfo.patch ... ...applying patches/openpdroid/4.3/pa/20130915/framework_31_WifiInfo.patch ... ...applying patches/openpdroid/4.3/pa/20130915/framework_35_IPrivacySettingsManager.patch ... ...applying patches/openpdroid/4.3/pa/20130915/framework_36_IPrivacySettingsManager$Stub$Proxy.patch ... ...applying patches/openpdroid/4.3/pa/20130915/framework_37_IPrivacySettingsManager$Stub.patch ... ...applying patches/openpdroid/4.3/pa/20130915/framework_38_PrivacyFileObserver.patch ... ...applying patches/openpdroid/4.3/pa/20130915/framework_39_PrivacyPersistenceAdapter.patch ... ...applying patches/openpdroid/4.3/pa/20130915/framework_40_PrivacySettings$1.patch ... ...applying patches/openpdroid/4.3/pa/20130915/framework_41_PrivacySettingsManagerService.patch ... ...applying patches/openpdroid/4.3/pa/20130915/framework_42_PrivacySettingsManager.patch ... ...applying patches/openpdroid/4.3/pa/20130915/framework_43_PrivacySettings.patch ... ...applying patches/openpdroid/4.3/pa/20130915/framework_44_PrivacySettingsStub.patch ... ...applying patches/openpdroid/4.3/pa/20130915/framework_45_PrivacyAccountManager$PrivacyAccountManagerFuture.patch ... ...applying patches/openpdroid/4.3/pa/20130915/framework_46_PrivacyAccountManager.patch ... ...applying patches/openpdroid/4.3/pa/20130915/framework_47_PrivacyActivityManagerService.patch ... ...applying patches/openpdroid/4.3/pa/20130915/framework_48_PrivacyConnectivityManager.patch ... ...applying patches/openpdroid/4.3/pa/20130915/framework_49_PrivacyContentResolver.patch ... ...applying patches/openpdroid/4.3/pa/20130915/framework_50_PrivacyCursor.patch ... ...applying patches/openpdroid/4.3/pa/20130915/framework_51_PrivacyLocationManager$PrivacyLocationUpdater.patch ... ...applying patches/openpdroid/4.3/pa/20130915/framework_52_PrivacyLocationManager.patch ... ...applying patches/openpdroid/4.3/pa/20130915/framework_53_PrivacyTelephonyManager.patch ... ...applying patches/openpdroid/4.3/pa/20130915/framework_54_PrivacyWifiManager.patch ... ...applying patches/openpdroid/4.3/pa/20130915/framework_56_MicrophoneInputStream.patch ... ...applying patches/openpdroid/4.3/pa/20130915/framework_58_PhoneStateListener$1.patch ... ...applying patches/openpdroid/4.3/pa/20130915/framework_59_PhoneStateListener.patch ... ...applying patches/openpdroid/4.3/pa/20130915/framework_60_ServiceState.patch ... ...applying patches/openpdroid/4.3/pa/20130915/framework_10_ContextImpl$42.patch ... ...applying patches/openpdroid/4.3/pa/20130915/framework_11_ContextImpl.patch ... ...applying patches/openpdroid/4.3/pa/20130915/framework_1_ContextImpl$10.patch ... ...applying patches/openpdroid/4.3/pa/20130915/framework_2_ContextImpl$22.patch ... ...applying patches/openpdroid/4.3/pa/20130915/framework_3_ContextImpl$31.patch ... ...applying patches/openpdroid/4.3/pa/20130915/framework_4_ContextImpl$36.patch ... ...applying patches/openpdroid/4.3/pa/20130915/framework_5_ContextImpl$38.patch ... ...applying patches/openpdroid/4.3/pa/20130915/framework_6_ContextImpl$39.patch ... ...applying patches/openpdroid/4.3/pa/20130915/framework_7_ContextImpl$3.patch ... ...applying patches/openpdroid/4.3/pa/20130915/framework_8_ContextImpl$40.patch ... ...applying patches/openpdroid/4.3/pa/20130915/framework_9_ContextImpl$41.patch ... ...applying patches/openpdroid/4.3/.aosp-ever/20130810/framework_30_SystemProperties.patch ... ...applying patches/openpdroid/4.3/.aosp-ever/20130810/framework_51_Settings$Secure.patch ... GARBAGE= tmp/system/framework/framework.jar.out/smali/android/media/AudioRecord.smali.orig tmp/system/framework/framework.jar.out/smali/android/provider/Settings$Secure.smali.orig GARBAGE=

... apply core.patch ... ...applying patches/openpdroid/4.3/pa/20130915/core_0_PrivacyInputStream.patch ... ...applying patches/openpdroid/4.3/pa/20130915/core_1_PrivacyProcessManager$PrivacyFileReader.patch ... ...applying patches/openpdroid/4.3/pa/20130915/core_2_PrivacyProcessManager.patch ... ...applying patches/openpdroid/4.3/pa/20130915/core_3_ProcessManager$ProcessImpl.patch ... ...applying patches/openpdroid/4.3/pa/20130915/core_4_ProcessManager.patch ... GARBAGE= GARBAGE=

... apply services.patch ... 152 out of 154 hunks FAILED -- saving rejects to file smali/com/android/server/ServerThread.smali.rej We did not find a working patch for patches/openpdroid/4.3/pa/20130915/services_3_ServerThread.patch...looking for other solutions!

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

!!! error: ServerThread.patch in services.jar cannot be remedied

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

If your deodexed rom is not on the supported list and you want it added:

- Upload your log and a link to the rom's source code (mandatory)

 and be patient, please! 
mateor commented 10 years ago

Jeez. 4.3.1...I don't know where I would start to find those sources. I understand that you have posted some sources, but those are incredibly broad. I take that to mean that this developer has used some CyanogenMod sources and some evervolv sources along with some repos in his own github page. But there is no manifest.

By a manifest, I mean a build document. What groups like CyanogenMod (and most independant or small devs) do is use a document called a default.xml. You will find it usually in the github page as USER/android or USER/platform_manifest. See an example at mateor/android (where I publish the manifest for any rom I distribute)

All it really is is a list of all the various repos someone has used to make the rom. Without that document, there is no telling what sources are in the rom. It sounds like your developer WoH did not publish his sources. That means

I can (and will) go ahead and rebuild patches for ParanoidAndroid, but I don;t know if this WoH used the ParanoidAndroid or AOSPA repos (I don't personally know the difference). Generally speaking, the sort of "kang" builds very very rarely deviate from established source codes like CM or PA or PAC. So hopefully that will help. Best I can do...

mateor commented 10 years ago

Sorry, the AOSPA did not fix your issue. Without knowing (at minimum) which frameworks he used (as in which frameworks/base and which frameworks/opt/telephony) not to mention any dependencies caused by those frameworks, I cannot help.

I need published source code to provide patches, sorry.

Christoph21x commented 10 years ago

Dear Friend, Thanks a lot for your effort! I didn't expect that; you might have quitted without trying, I know HOW MUCH work you have and do! No problem for me, I stick to the patched ROM that I have. Kindest Seasonal Greetings to you - Chris