Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
dansteen opened this issue Jun 28, 2013 · 33 comments

Comments

@dansteen
Copy link

I get this when trying to patch cm-10.1.0 for the galaxy note (1) on either at&t or T-mobile. I run the following command line:

./auto_patcher ~/Downloads/att/cm-10.1.0-quincyatt.zip tabletUI,openpdroid cm

Thanks for the great work!!

Here is a full run-log:

./auto_patcher ~/Downloads/att/cm-10.1.0-quincyatt.zip tabletUI,openpdroid cm

The Auto-Patcher v2.9.881

verify tools

verify ROM

unzip patch tools

unzip patch patches

inflated: system/build.prop
... result of ROM check: RIL= SamsungQualcommUiccRIL

probe rom type

... result of ROM check: version= 4.2.2 rom= cm ...
... Using cm patches ...
... tabletUI patch date has been set to: 20130403 ...

unzip rom

inflated: system/app/Mms.apk
inflated: system/app/SystemUI.apk
inflated: system/framework/android.policy.jar
inflated: system/framework/core.jar
inflated: system/framework/framework-res.apk
inflated: system/framework/framework.jar
inflated: system/framework/services.jar
inflated: system/framework/telephony-common.jar

create updater script

inflated: META-INF/com/google/android/update-binary
inflated: META-INF/com/google/android/updater-script
... using Clockworkmod installer ...

create restore.zip

decompile system files

... decompile android.policy.jar ...
... decompile services.jar ...
... decompile framework.jar ...
... extract preloaded-classes ...
... decompile core.jar ...
... decompile telephony-common.jar ...
... installing framework files ...
I: Framework installed to: /home/dsteen/apktool/framework/1.apk
... decompile framework-res.apk ...
... decompile SystemUI.apk ...
... decompile Mms.apk ...

jar patch tabletUI/4.2/cm/20130403

... apply android.policy.patch ...
... apply services.patch ...

apk patch tabletUI/4.2/cm/20130403

... apply framework-res.apk.patch ...
... apply SystemUI.apk.patch ...

copy patch openpdroid/4.2/cm/latest

... copying system/media/PDroid.jpeg ...
... overwriting system/media/PDroid.jpeg from openpdroid ...
... overwriting ContentResolver.smali ...

jar patch openpdroid/4.2/cm/latest

... apply framework.patch ...
... apply preloaded.patch ...

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

usage:     ./auto_patcher <ROM> <MODS> <ROMTYPE>
example:   ./auto_patcher CM10.zip tabletUI cm

Use ./auto_patcher -h for the help menu

@mateor
Copy link
Owner

mateor commented Jun 28, 2013

There is a log file generated by the program (what you poster is the output, I know, a little confusing). Could you post a log to paste in, perhaps?

We just updated the patches yesterday, and sometimes these breakages that you are reporting are a manner of us setting the patch date wrong. If I can track down your build (do you have a link?) I can maybe figure it out.

Thanks for them report.

@dansteen
Copy link
Author

Thanks for the reply! Here is the content of the log:

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' !!!

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

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

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

I couldn't find the rejects file mentioned. Does it put it someplace specific? The build that I am using is:
http://get.cm/get/8LP

Thanks again!

@hkparker
Copy link

hkparker commented Jul 3, 2013

I am getting this same issue attempting to patch cm 10.1 (and pa 3.6) with openpdroid. The end of my log file is as follows:

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

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

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

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

If you would like the full log let me know.

@mateor
Copy link
Owner

mateor commented Jul 3, 2013

Yeah, I need the full log (paste in or equivalent please). All I know from them posted error is that something isn't working correctly in your setup, thenuodater perhaps. The settings.secure error was fixed by updating our patches a week or more ago.

@hkparker
Copy link

hkparker commented Jul 3, 2013

Here it is, appreciate your help:

ROOT= /media/hayden/Hayden/Downloads/auto_patcher
TOOL= /media/hayden/Hayden/Downloads/auto_patcher/patch_tools.tgz
ROM= /media/hayden/Hayden/Downloads/auto_patcher/cm-10.1.0.2-d2vzw.zip
ROMX= /media/hayden/Hayden/Downloads/auto_patcher/cm-10.1.0.2-d2vzw.zip

checking for updates

Updater: Auto-Patcher is already up to date

verify tools

/usr/bin/patch
/bin/tar
/usr/bin/jar
/usr/bin/java
/bin/cpio

verify ROM

running ./auto_patcher cm-10.1.0.2-d2vzw.zip openpdroid

PATH= /media/hayden/Hayden/Downloads/auto_patcher/tmp20130703111110:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games

unzip patch tools

unzip patch patches

probe rom type

Standard Build Query

VER= v2.9.91

OS= linux-gnu 64bit

VID= 4.2.2

PID= openpdroid

MID= cm_d2vzw-userdebug

RID= cm

ANDR= 4.2

BDID= 20130701

DID= d2vzw

BID= 20130626

Patches are openpdroid/4.2/cm/20130626

Current HEAD: 4c1fa52 Switch to SlimRom aapt+apktool for Linux/Cygwin. (h/t Caldair for idea+testing)

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/mmcblk0p14", "/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_recursive(0, 2000, 0755, 0644, "/system/vendor");
set_perm(0, 0, 0644, "/system/vendor/etc/audio_effects.conf");
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 ...
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 ...
I: Baksmaling...
I: Loading resource table...
I: Loaded.
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: /home/hayden/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.2/cm/20130626

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

... overwriting system/media/PDroid.jpeg from openpdroid ...
patches/openpdroid/4.2/cm/20130626/system/media/PDroid.jpeg' ->./system/media/PDroid.jpeg'

... overwriting ContentResolver.smali ...

delete patch openpdroid/4.2/cm/20130626

jar patch openpdroid/4.2/cm/20130626

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

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

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

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

@mateor
Copy link
Owner

mateor commented Jul 5, 2013

Sorry for the delay, it is a holiday where I live. I did not recognize this CM-10.1.0.2 so I looked it up. That looks like it is a RC build. RC builds can be tricky for us, because while they have current build dates in the build.prop, they are actually using older code.

There are two solutions, either download the latest nightly (from get.cm, the ones with a date in the zip name) and use the autopatcher as normal. Or, you can specify the earlier patches (the patches we had made for the code the RC is made from) on the command line.

normally you run the autopatcher like this

  ./auto_patcher CM10.1.zip openpdroid

to specify a date, you use (note the cm)

  ./auto_patcher CM10.1.zip openpdroid cm 20130516

You can see the patches we have available by entering ./auto_patcher -h advanced but I am basically positive that the second command is the correct one for your rom.

Good luck, let us know how it goes.

@hkparker
Copy link

hkparker commented Jul 5, 2013

According to http://get.cm/?device=d2vzw 10.1.0.2 was a stable release, however it is not the most recent stable release like I thought. I'll give those solutions a try and get back to you. Thank you very much for the help, and for your work on this awesome project!

@dansteen
Copy link
Author

dansteen commented Jul 5, 2013

It seems to be working for me now as of the latest updates as of today. Thanks!

@hkparker
Copy link

hkparker commented Jul 6, 2013

Worked perfect, thank you!

@mateor mateor closed this as completed Jul 7, 2013
@allo-
Copy link

allo- commented Jul 13, 2013

Same issue with cm10.1.2

@mateor
Copy link
Owner

mateor commented Jul 13, 2013

No...the 10.1.whatever builds are RC candidates or Final builds or whatever. They use old code in new builds and therefore do not work with the build query we wrote that matches your ROM to a ROMTYPE and patch date.

The easiest thing is to just use then latest cm10.1 nightly release. You can also manually patch this rom if you wish. From experience with this issue you need to run

./auto_patcher ROM.zip openpdroid cm 20130516

@allo-
Copy link

allo- commented Jul 13, 2013

I got a update.zip from cyanogen updater, after i installed 10.1.0. The updater offered 10.1.1 and 10.1.2 i chose the 10.1.2. Before flashing, i tried to patch it with auto-patcher:

./auto_patcher ROM.zip openpdroid cm10

Shouldn't this be the way to build a openpdroid.zip for a cyanogen 10.x.y ROM? As an user i do not know which date the versions in the zip are (but i know the release date of the zip, which is from july), but i would expect the auto-patcher to be able to detect it, if there is already a patch matching the files in the update.zip.

@mateor
Copy link
Owner

mateor commented Jul 13, 2013

we probably cross-posted. Look at the answer right above your post.

The Final builds use old code. I could maybe throw a hack in the acript
to work with these, but it wouldn't be reliable. There is no set policy
as to what code goes into Final releases (as far as I know. We had this
problem with CM7.2 Final as well, waaaaaaay at the beginning of the
thread) so coding in an exact method to match the patch dates is not
necessarily a good idea.

I am thinking about it, lots and lots of problems from users, generally
the sign that something should change.

@allo-
Copy link

allo- commented Jul 13, 2013

I'm still not sure, what this means, and what to do.
So you say, cm10.1.2 may have some code, which is older than in cm10.1.0?
And now from the stupid user's perspective ... any chance how to find out which version is used?
now i can try the patch-date you wrote above, but how do i find out the correct patch for the next cm10.1 update?

So from the perspective of getting a working version ... the patcher should not try to detect the releasedate and such stuff, but detect which class is in the zip, and which patch matches it, or not?
So just ignore metadata like builddates and look at the data, which needs to be patched in some way. I do not really know the details of android there, but at the moment it seems a bit unreliable and involves guessing about which patch may work.

@mateor
Copy link
Owner

mateor commented Jul 13, 2013

Well, thanks for the vote of confidence.

The auto-patcher is deigned to work with releases that use the latest code available. Period. That generally means nightly releases, which are maybe 99% of the released zips. There is no guesswork there. When our patches break due to upstream changes we make new patches.

The auto-patcher was originally written so that you chose a romtype (cm, aokp, whatever) and the also designated apatch date that matched the release. I wrote a query that checks your build date and takes care of much of that work for you.

The problem you are hhaving is that the CM team has released build that do not use their latest changes. Those builds reflect their Stable or Final tags. Those builds have current build dates, which reflect the actual date the server built them, but uses a hodge-podge of commits that changes as to CM's level of assurance as to which commits constitute stable. So yes, the code in CM10.1 night lies is ahead of 10.1.2 because the .2 is incrementing only the designation Final, not the 10.1.

Bottom line, the auto-patcher is designed to work with night lies, which is 99% of the use case. You may patch the Final builds, but it involves bypassing the convienance of the build query and designated the dates. Use the line I gave you the first time.

@allo-
Copy link

allo- commented Jul 13, 2013

okay, it seems to work with that line.
I'm not sure about using nightlys ... i do not want to update often, but i do not want to keep some nightly which might be insecure. So stable releases are better suited for me.

Is there any file, at where the last-commit date in the release tag is the same as needed for the auto-patcher? Or are there even stable releases, which cannot be patched at all, because different files needing a patch are at different versions?

@mateor
Copy link
Owner

mateor commented Jul 13, 2013

On 07/13/2013 12:09 PM, allo- wrote:

okay, it seems to work with that line.
I'm not sure about using nightlys ... i do not want to update often,
but i do not want to keep some nightly which might be insecure. So
stable releases are better suited for me.

Is there any file, at where the last-commit date in the release tag is
the same as needed for the auto-patcher? Or are there even stable
releases, which cannot be patched at all, because different files
needing a patch are at different versions?


Reply to this email directly or view it on GitHub
#134 (comment).

Wanting to patch a stable of Final build is perfectly understandable. It
just means you may have to be more specific when pointing the
auto-patcher to which patches are needed. I have something in the works
that will be easier, but it may not be available until Android 4.3.

I am not sure what you are asking, though. There is a conceivable
scenario where a tagged release could end up as unpatchable, but that is
unlikely. We have found that basically, the stable releases are the same
as the nightlies from several weeks ago, perhaps with a few bugfixes
layered on. So our patches for that time period work fine.

There is the theoretical scenario where they could add a bugfix that
breaks our patches. Given a long enough timeline, I could see that
happening someday. But the odds are good that any bugfix that needs to
go on the stable builds will first be tested on a nightly, so we should
generally have patches for all Official CyanogenMod releases. We did
have a real problem with CM7.2 Final, but we werent nearly as good at
this then.

But if you are worried about bad matches or incorrectly applied patches,
you needn't be. We use the GNU diffutils, which matches with very
specific context. If it isn't supposed to patch, it won't.

@allo-
Copy link

allo- commented Jul 13, 2013

okay, i understood one of your previous posts as if there were many nightlies merged together in a stable release. Then there could be a set of files, which do not work with a single nightly-patch.

I patched the new 10.1.2 with my old openpdroid.zip and it seems to have worked. Is this okay, or will i get any not so obvious problems and should reflash cm10.1.2 and the update.zip generated with your cmdline?

Thanks for your work, anyway :)

@lpinner
Copy link

lpinner commented Jul 14, 2013

Same issue patching last couple of cm10.1 nightlies for Asus tf300t - http://get.cm/?device=tf300t (e.g. cm-10.1-20130713-NIGHTLY-tf300t.zip). Have tried all versions of openpdroid patches in patches/openpdroid/4.2/cm

ROOT= /home/user/build/auto-patcher
TOOL= /home/user/build/auto-patcher/patch_tools.tgz
ROM=  /home/user/build/auto-patcher/cm-10.1-20130713-NIGHTLY-tf300t.zip
ROMX= /home/user/build/auto-patcher/cm-10.1-20130713-NIGHTLY-tf300t.zip

### checking for updates ###

Updater: Auto-Patcher is already up to date

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

### verify ROM ###
### running ./auto_patcher cm-10.1-20130713-NIGHTLY-tf300t.zip openpdroid
PATH= /home/user/build/auto-patcher/tmp20130714111429:/home/user/bin:/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 ###

### probe rom type ###
#### Standard Build Query ####
# VER= v2.9.924
# OS=  linux-gnu 64bit
# VID= 4.2.2
# PID= openpdroid
# MID= cm_tf300t-userdebug
# RID= cm
# ANDR= 4.2
# BDID= 20130714
# DID= tf300t
# BID= 20130516
Patches are openpdroid/4.2/cm/20130516

Current HEAD: 66207c170451c8b49ca4ab3deaf3c148c61b8326 Remove CDMA and GSMServiceStateTracker patches

### 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/mmcblk0p1", "/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/firmware/bcm4324");
set_perm(0, 2000, 0755, "/system/vendor/firmware/bcm4329");
set_perm(0, 2000, 0755, "/system/vendor/firmware/bcm4330");
set_perm(0, 2000, 0755, "/system/vendor/firmware/bcm4334");
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, 0644, "/system/vendor/lib/hw");
set_perm(0, 0, 0644, "/system/vendor/lib/hw/power.cardhu.so");
set_perm_recursive(0, 2000, 0755, 0644, "/system/vendor/pittpatt");
set_perm(0, 0, 0644, "/system/vendor/pittpatt/models/detection/multi_pose_face_landmark_detectors.7/left_eye-y0-yi45-p0-pi45-r0-ri20.lg_32/full_model.bin");
set_perm(0, 0, 0644, "/system/vendor/pittpatt/models/detection/multi_pose_face_landmark_detectors.7/nose_base-y0-yi45-p0-pi45-r0-ri20.lg_32/full_model.bin");
set_perm(0, 0, 0644, "/system/vendor/pittpatt/models/detection/multi_pose_face_landmark_detectors.7/right_eye-y0-yi45-p0-pi45-r0-ri20.lg_32-2/full_model.bin");
set_perm(0, 0, 0644, "/system/vendor/pittpatt/models/detection/yaw_roll_face_detectors.6/head-y0-yi45-p0-pi45-r0-ri30.4a-v24/full_model.bin");
set_perm(0, 0, 0644, "/system/vendor/pittpatt/models/detection/yaw_roll_face_detectors.6/head-y0-yi45-p0-pi45-rn30-ri30.5-v24/full_model.bin");
set_perm(0, 0, 0644, "/system/vendor/pittpatt/models/detection/yaw_roll_face_detectors.6/head-y0-yi45-p0-pi45-rp30-ri30.5-v24/full_model.bin");
set_perm(0, 0, 0644, "/system/vendor/pittpatt/models/recognition/face.face.y0-y0-22-b-N/full_model.bin");
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 ###
system/app/Mms.apk : no such file or directory

### 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 ...
### copy patch openpdroid/4.2/cm/20130516 ###

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

... overwriting system/media/PDroid.jpeg from openpdroid ...
'patches/openpdroid/4.2/cm/20130516/system/media/PDroid.jpeg' -> './system/media/PDroid.jpeg'

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

... apply framework.patch ...
Reversed (or previously applied) patch detected!  Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file smali/android/app/WallpaperInfo.smali.rej
Reversed (or previously applied) patch detected!  Skipping patch.
2 out of 2 hunks ignored -- saving rejects to file smali/android/content/CursorLoader.smali.rej
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' !!!

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

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

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

@mateor
Copy link
Owner

mateor commented Jul 14, 2013

Hmmm...this looks the same but is different. Your log shows that the autopatcher is up to date but is, for some reason, using the old patches. Would you try entering ./batch.sh and then patch again?

It should have happened as you updated, but perhaps something interrupted that. @AJStein is working on a tighter integration, but it is still in the works. Later tonight I will try downloading this and see what is up. You should be able to manually select the newer patches as well

 ./auto_patcher ROMNAME.zip openpdroid cm 20130626

But the build query function should be doing that for you.

@mateor
Copy link
Owner

mateor commented Jul 14, 2013

Yeah, I just downloaded the latest from the get.cm and it patches for me. If batch.sh doesn't work, post another log. The easiest thing to do in that situation might just be to delete it and git clone again. Or download from the download page, it will auto-update for you upon first run.

If trouble persists after that, let us know. But it looks to be something unique to your set-up

@lpinner
Copy link

lpinner commented Jul 14, 2013

Re-running batch.sh fixed it. Thanks.

@mateor
Copy link
Owner

mateor commented Jul 14, 2013

glad to hear it!

@AdamWill
Copy link

Just saw the same error (but maybe not the same cause) trying to patch this build:

http://forum.xda-developers.com/showthread.php?t=2164461

It's a CM-based build for the HTC Doubleshot (MyTouch 4G Slide), I've always had success patching these builds with auto_patcher before. The log ends:

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

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

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

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

and says earlier: "Patches are openpdroid/4.2/cm/20130719"

@mateor
Copy link
Owner

mateor commented Jul 28, 2013

I am gonna need a link to the whole log to really give you sound advice. The rom_probe (the mechanism we match which rom and patch date is best) has been a little difficult because lots of Final and Milestone builds are popping up and use old code on recent build dates....it doesn't matter. Pastebin a log and hopefully I can give you some advice.

@AdamWill
Copy link

Thanks, no problem: http://paste.fedoraproject.org/28494/06352113

@mateor
Copy link
Owner

mateor commented Jul 30, 2013

I just saw you posted this. I will look at it today, ok?

@xee5ch
Copy link
Contributor

xee5ch commented Jul 30, 2013

Sorry back after a long hiatus out. FYI the log posted above is dead for me; Fedora Paste says it is not there anymore.

@AdamWill
Copy link

siiiigh. I thought we had the default expiry on longer. try http://paste.fedoraproject.org/29064/20627513

@mateor
Copy link
Owner

mateor commented Jul 31, 2013

I looked for a download with that name but did not see any CM-10.1 builds for double shot. But regardless, I would only have done these commands here:
./auto_patcher cm-doubleshot.zip openpdroid cm 20130516
or
./auto_patcher cm-doubleshot.zip openpdroid cm 20130626

The odds are pretty good that one of those will work, but if not, then it would just be one of the rare cases where we wouldn't be able to support an unofficial build due to divation from uptream sources. But that is unlikely. Check the other patches or a brand new nightly. Good luck!

@AJStein Glad you're back! We are getting ready for next version...

@AdamWill
Copy link

mateor: the build I'm using is unofficial, I gave a link to the XDA thread a few comments back. Earlier snapshots of the same build have patched fine previously. The command I ran was "auto_patcher cm-10.1-20130727-UNOFFICIAL-doubleshot.zip openpdroid cm" - so you're suggesting explicitly specifying a couple of older patch versions to see if that works?

@mateor
Copy link
Owner

mateor commented Jul 31, 2013

I didn't see the link, but yes. The current official builds are patching,
so the hope is that your build is failing to patch due to a slightly
unsysnced repo (likely the case) rather than a recently introduced and
incompatible commit by the guy putting out the build.

@AdamWill
Copy link

AdamWill commented Aug 2, 2013

20130516 gave a successful patch. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants