yashsingh1/xdaforums huggingface dataset:
[Android Software/Hacking General [Developers Only]] ratelutz:
thanks for your reply

./auto_patcher PA.zip pdroid cm10

results in:

The Auto-Patcher v1.9.6

### verify tools ###
### verify ROM ###
### unzip patch tools ###
### unzip patch patches ###
### unzip rom ###
inflated: system/framework/core.jar
inflated: system/framework/framework.jar
inflated: system/framework/services.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 framework.jar ###
... extract preloaded-classes ...
### decompile core.jar ###
### decompile services.jar ###
### copy patch pdroid/cm10/latest ###
... copying tmp/system/framework/framework.jar.out/smali/android/content/ContentResolver.smali ...
... overwriting tmp/system/framework/framework.jar.out/smali/android/content/ContentResolver.smali from pdroid ...
### jar patch pdroid/cm10/latest ###
### apply framework.patch ###
... apply preloaded.patch ...
### apply core.patch ###
### apply services.patch ###
1 out of 7 hunks FAILED -- saving rejects to file smali/com/android/server/am/ActivityManagerService.smali.rej
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!! error: failed services.patch
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

and

./auto_patcher PA.zip pdroid cm10 20120806

[/QUOTE]

results in:

The Auto-Patcher v1.9.6

### verify tools ###
### verify ROM ###
### unzip patch tools ###
### unzip patch patches ###
### unzip rom ###
inflated: system/framework/core.jar
inflated: system/framework/framework.jar
inflated: system/framework/services.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 framework.jar ###
... extract preloaded-classes ...
### decompile core.jar ###
### decompile services.jar ###
### copy patch pdroid/cm10/20120806 ###
... copying tmp/system/framework/framework.jar.out/smali/android/content/ContentResolver.smali ...
... overwriting tmp/system/framework/framework.jar.out/smali/android/content/ContentResolver.smali from pdroid ...
### jar patch pdroid/cm10/20120806 ###
### apply framework.patch ###
Reversed (or previously applied) patch detected! Skipping patch.
5 out of 5 hunks ignored -- saving rejects to file smali/android/content/ContentResolver.smali.rej
... apply preloaded.patch ...
### apply core.patch ###
### apply services.patch ###
1 out of 7 hunks FAILED -- saving rejects to file smali/com/android/server/am/ActivityManagerService.smali.rej
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!! error: failed services.patch
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

so í will wait for the next update

thx
[Android Software/Hacking General [Developers Only]] mateorod:
It looks like Xylograph used Evervolv sources instead of CM10 straight.

Would you test this on that ROM please?
[Android Software/Hacking General [Developers Only]] nsmart:
First official cm10 nightly build for GalaxyS2 (i9100) is out and I could successfully patch pdroid into it with autopatcher20120823v1.9.7. And it is working !!!

cm-10-20120823-EXPERIMENTAL-i9100-COFFEEMAKER.zip

@mateorod & pastime1971

Let me just go through the thread and click on thanks for every post both of you made!

Edit: done... daily thanks-counter limit reached.
[Android Software/Hacking General [Developers Only]] ratelutz:
it works

thanks
[Android Software/Hacking General [Developers Only]] wbedard:
Here's a small update to v1.9.7 for mateorod and pastime1971 to review. I bundled some Cygwin-compatible tools (found here in a couple of XDA forms...) alongside the Linux ones and modified the main script to use the appropriate binary based on the OS. Using the Pure Vanilla AOSP Jelly Bean (http://xdaforums.com/showthread.php?t=1813185) as my test ROM, this version makes a clean run using the "pdroid aosp-jb latest" option under both Cygwin and my Ubuntu 10.04 virtual machine that I use for building AOSP. I am attaching the 1.9.7mod archive, the update.zip for both runs and their logfiles. There are a couple of small differences that I would like the devs to look at, just to make sure nothing is amiss.

Keep up the great work everyone!
[Android Software/Hacking General [Developers Only]] mateorod:
Thanks for the work, man!

Pastime is busy creating a static-linked library for the application, which will accomplish the same task, but will enable us to not have to pack the auto-patcher with two sets of binaries. While we look forward to that being done, that has left our Cygwin users somewhat out to dry, so I thank you for the changes.

I do have a coupe of questions, which once resolved, I can checkin your changes for the time being...

I see you revived and improved the function to convert to hex, and then call it if the scrpt detects Cygwin. I originally included that in my drafts due to seeing places where it was said to be necessary, but I found that regular pagesize was fine. Is that not the case in Cygwin? Does it need to be PGSIZE=$((0x$PGHEX))? For I found that PGSIZE worked fine as it appeared after unpacking the boot.img, not messing with the output at all. But maybe Cygwin handles if differently.

Lastly, it looks like your logs are reading the output of that function, there seems to be a large stretch of hex in there. I didn't actually scroll all that far down the log to make sure where it is coming from, I am actually looking at this from a phone, so it hasnt gotten a full vett, yet. But somewhere arounf rebuilding the ramdisk, there is about 330 kb of hex. Maybe we can kill both of those birds with one stone.

I liked how you added the $EXE, it is a better way than the quick and dirty change I added to the script to accomplish the same task...much cleaner...and useful for more than just the mkboot utilities...
[Android Software/Hacking General [Developers Only]] ratelutz:
how can i combine your update.zip with v6supercharger patch?
[Android Software/Hacking General [Developers Only]] wbedard:
mateorod,

The hex conversion for Cygwin is probably needed just because of differences in the unpack binary for Linux. I get the impression that it's a pretty simple program that devs might "tweak" for their particular needs (i.e. hex vs dec output).

As for the binary content in the logs, if it's not supposed to be there, my only guess would be an error in the script causing it to capture output from a program where you don't need to or an incorrect/missing flag to a program. I'll look at it more closely later today.
[Android Software/Hacking General [Developers Only]] mateorod:
Well, you could have taken the services.jar out of the update.zip and inserted it into your ROM and THEN plug it back through the patcher...which might take a bit of specialized knowledge.

I ran it through the modified patcher I built to test your ROM...we'll try and bring this feature to the public soon, it may drastically increase the amount of ROMs we can support.
[Android Software/Hacking General [Developers Only]] ratelutz:
thx i will try and report back
[Android Software/Hacking General [Developers Only]] ratelutz:
it works

thank you again
[Android Software/Hacking General [Developers Only]] wbedard:
I had a look at where the binary info was getting injected into the log file. It appears that your std practice of redirecting both stdout and stderr to the logfile is the problem, at least in the case of the "mkbootfs" command. The way it's constructed now, the output (stdout) of mkbootfs is piped into gzip and it's stdout is then redirected into the output file. So, while there might be some output on stderr to redirect, there's simply nothing on stdout that you'd want to send to the logfile (it's all going to the output file, by design...). I could make some guesses as to why your stdout/stderr redirection is still able to access the output of mkbootfs/gzip but I'll leave it up the bash "wizards" in the audience. This is small potatoes so I just removed all the logfile redirection for this one command.

I also tweaked the logfile redirection for some of the jar extraction commands where stdout would contain a list of all the APKs in the ROM for some options. In my view, most people probably want to use the terminal to monitor the overall progress of the patcher. If they want all the details (including what APKs were extracted, etc...) they can review the logfile. Feel free not to incorporate this change but take it as one user's feedback. I have attached a zipped version of the modified patcher (script only...) to this post...enjoy!
[Android Software/Hacking General [Developers Only]] adrienned:
Hi does anyone have a flashable autopatcher for the at&t galaxy note? I saw one for the international note with jb but that doesn't work for me. I'm running AOSPxXx JB alpha 4 which is jelly bean as well. I'm looking through these instructions and I don't think I'll even attempt lol so if anyone has a flashable patch that would be awesome!
[Android Software/Hacking General [Developers Only]] pastime1971:
i thought i had fixed this.

( ./mkbootfs ./ramdisk | gzip > boot.img-ramdisk.gz ) >> $LOG 2>> $LOG

the above will fix it and still get the error into stderr.

parenthesis will help confine command outputs and separate logs.

edit: now that we have many contributors, it may be a good idea to set up a github for script source ?
[Android Software/Hacking General [Developers Only]] kobik77:
GitHub would be great.

Updates would also be easier with it.

Sent from my Galaxy Nexus
[Android Software/Hacking General [Developers Only]] SecUpwN:
Is there a way to run Auto-Patcher on the phone?
[Android Software/Hacking General [Developers Only]] karamelos:
No
[Android Software/Hacking General [Developers Only]] mateorod:
Yeah, it is past time. (Get it?)

(Anybody?)

Annnnnyway, yeah, we need to go ahead and get some version control anyway. My fear of github is the only thing holding us back, and it is more than time. I will put it up sometime tomorrow. Having contributions from the community is what it is all about.

The longer-term plans includes a function for making patches, where hopefully devs and themers see the tool as a method of distribution. Combine that with a web-hosted patch database (so new patches doesn't necessitate a whole new download of the patcher, devs can count downloads, the whole bit) and I would like to see the community run with it...as I am sure you have noticed, the maintenance on this thing is pretty demanding.

I know smali hacks have a bad name in the dev community. But the bottom line is that the vast majority of users have no need to build from source. And editing the code just isn't for everyone. So I think this tool has a place.

And of course, you're right. Zep has said it is impossible, and so far no one has run operations of this sort on-device.

(Except me...:cool:)

#hopetoshareitsoon...
[Android Software/Hacking General [Developers Only]] wkwkwk:
I can confirm that autopatcher-1.9.7 worked flawlessly with CM10-Preview4 on N7000.

You guys are doing some amazing work, thank you. How can I buy you a beer? I can't see anything in the first post. Cheers.
[Android Software/Hacking General [Developers Only]] mateorod:
Fails in the ContentResolver usually mean that you are using a patch for an Unofficial build on an Official build, or, like in your case, vice versa. It is real irritating and I can't find anyone who can tell me why those two types if builds differ. Regardless...

Try

./auto_patcher <ROM>.zip pdroid cm10 20120806

I have a major rewrite of the OP coming down the pipe, and depending on whether we get a possible future way around this issue, I will be more explicit with this there.

Hopefully this works for you.
[Android Software/Hacking General [Developers Only]] karamelos:
for this rom [JB:CM10:HYBRD] PARANOIDANDROID [1.992, True HybridMode, Size & UI on Per App Basis]

follows this post work for me

http://xdaforums.com/showpost.php?p=30579598&postcount=1134
[Android Software/Hacking General [Developers Only]] thibz:
thanks but i am on I9100, not N7000 phone!
[Android Software/Hacking General [Developers Only]] SaschaHa:
Same problem here. The patch seems not to work with latest ParanoidAndroid (1.992) because of "missing cpio"
[Android Software/Hacking General [Developers Only]] Iormangund:
Has anybody gotten this working with a Galaxy S3 Omega rom? Every patch or rom version I try fails.

Patching CM9 worked flawlessly so it's definitely not my setup.

Any reply would be appreciated, even if it's just that "it's not possible because xyz". Been trying to get it working on omega for a long time and never get answers.
[Android Software/Hacking General [Developers Only]] thibz:
Run cygwin setup,

search cpio in the search bar,

install.
[Android Software/Hacking General [Developers Only]] kobik77:
This is a new addition i guess, so I would add this too to the cygwin manual.

Edit: done :)

Sent from my Galaxy Nexus
[Android Software/Hacking General [Developers Only]] gnunix-:
Similar error for CM10 unofficial port. I've tried multiple dates as well. Let me know if you need any additional info, or if you get a donate page.
[Android Software/Hacking General [Developers Only]] Paulikid:
Patching of [JB:CM10:HYBRD] PARANOIDANDROID [1.992, True HybridMode, Size & UI on Per App Basis] worked like a charm here. Thanks for your hard work, the Autopatcher is an absolutely great tool.
[Android Software/Hacking General [Developers Only]] mateorod:
Try these update.zips and get back to us. They should work. The function that allowed me to patch them is not in the official Auto-Patcher (yet) but if these zips work for you, I will try and figure out a decent way to add it for 1.9.8.

This has already worked for two other ROMs.

I have tested out current patches on several CMnightlies and they still work (grouper, maguro) as well as some unofficials I found. So I don't know what the difference is. This is pretty frustrating, that there would be this divergence from supposedly identical code. But I think this method will keep us from having to hold a bazillion cm10 patches just to keep everyone covered.
[Android Software/Hacking General [Developers Only]] kobik77:
I'm currently working on a solution for making a one-click GUI for Windows which will download all necessary updated packages like Cygwin, Java and autopatcher and run the patch on the selected ROM.

Hopefully it would come in the following days.

GitHub based autopatcher would be great for that allowing auto update feature.
[Android Software/Hacking General [Developers Only]] ratelutz:
Hi mateorod,

will the patch work on newer builds, or do i need a new one?

New JBParanoid build based on 1.992 is out and i would like to install it
[Android Software/Hacking General [Developers Only]] Paulikid:
3 posts above yours I confirmed 1.992 can be patched without any problems. Use cm10 option for patching.

Sent from my paranoid PauliDroid
[Android Software/Hacking General [Developers Only]] ratelutz:
cool thx for pointing

edit: which auto_patcher version did you use? linux or cygwin?

i tried 1.9.7 in cygwin and the patch failes
[Android Software/Hacking General [Developers Only]] Paulikid:
I used 1.9.6 in cygwin, command line: auto_patcher pa.zip pdroid cm10

(pa.zip = name of the Rom zip-file)

Sent from my paranoid PauliDroid
[Android Software/Hacking General [Developers Only]] ratelutz:
strange i get

...
### jar patch pdroid/cm10/latest ###
### apply framework.patch ###
Reversed (or previously applied) patch detected! Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file smali/android/location/Location.smali.rej
Reversed (or previously applied) patch detected! Skipping patch.
3 out of 3 hunks ignored -- saving rejects to file smali/android/widget/AppSecurityPermissions.smali.rej
... apply preloaded.patch ...
### apply core.patch ###
### apply services.patch ###
1 out of 7 hunks FAILED -- saving rejects to file smali/com/android/server/am/ActivityManagerService.smali.rej
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!! error: failed services.patch
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
[Android Software/Hacking General [Developers Only]] karamelos:
Try option -h or just with pdroid option
[Android Software/Hacking General [Developers Only]] ratelutz:
applying with just pdroid option gives

..
### jar patch pdroid/aosp-jb/latest ###
### apply framework.patch ###
Reversed (or previously applied) patch detected! Skipping patch.
13 out of 13 hunks ignored -- saving rejects to file smali/android/app/BackStackRecord.smali.rej
The next patch would create the file 'smali/android/app/ContextImpl$38.smali',
which already exists! Skipping patch.
1 out of 1 hunk ignored
..

-h option gives many posibilities. but how to decide wich one is the best?
[Android Software/Hacking General [Developers Only]] thibz:
thanks for the patches

Device : I9100 GT

ROM : cm-10-20120821-EXPERIMENTAL-i9100-CODEWORKX

i9100codeworxxupdate.zip : Bootloop

phantonphreakepic4gupdate.zip : Work !
[Android Software/Hacking General [Developers Only]] mateorod:
Reversed or ignored hunks are at least worth flashing. They usually work. The reversed hunks only mean that those files are already in the state they need to be for PDroid to work.

If you are trying to determine the best patch date for the -h flag, generally it is best to check the ROM's build.prop and get the build date. The most likely patch is the one with a date right before your build date.

If you can't get any of those to work, I will try and get the new function I used to patch your ROM into the patcher over the next day or so. It isn't in there yet because it isn't a matter of new patches, it is a rejiggering of the command you use to run the auto-patcher and some other things.

But I will try and get it out soon, I think it will help a bunch of people that we were currently unable to support.
[Android Software/Hacking General [Developers Only]] ratelutz:
ok i will give it a try
[Android Software/Hacking General [Developers Only]] ratelutz:
i tried diferent combinations whitout luck

everytime it results in

$ ./auto_patcher JBParanoid_hd2_beta_v1.992.zip pdroid cm10 20120820

The Auto-Patcher v1.9.6

### verify tools ###
### verify ROM ###
### unzip patch tools ###
### unzip patch patches ###
### unzip rom ###
\vergr÷▀ert: system/framework/core.jar
\vergr÷▀ert: system/framework/framework.jar
\vergr÷▀ert: system/framework/services.jar
### create updater script ###
\vergr÷▀ert: META-INF/com/google/android/update-binary
\vergr÷▀ert: META-INF/com/google/android/updater-script
... using Clockworkmod installer ...
### create restore.zip ###
### decompile framework.jar ###
... extract preloaded-classes ...
### decompile core.jar ###
### decompile services.jar ###
### copy patch pdroid/cm10/20120820 ###
... copying tmp/system/framework/framework.jar.out/smali/android/content/ContentResolver.smali ...
... overwriting tmp/system/framework/framework.jar.out/smali/android/content/ContentResolver.smali from pdroid ...
### jar patch pdroid/cm10/20120820 ###
### apply framework.patch ###
Reversed (or previously applied) patch detected! Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file smali/android/location/Location.smali.rej
Reversed (or previously applied) patch detected! Skipping patch.
3 out of 3 hunks ignored -- saving rejects to file smali/android/widget/AppSecurityPermissions.smali.rej
... apply preloaded.patch ...
### apply core.patch ###
### apply services.patch ###
1 out of 7 hunks FAILED -- saving rejects to file smali/com/android/server/am/ActivityManagerService.smali.rej
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!! error: failed services.patch
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

! please refer to /home/ratelutz/ap/log20120826173832 for any debugging

! patching failed.

and it does not create update.zip
[Android Software/Hacking General [Developers Only]] Paulikid:
:confused: Are you sure you use the latest release of PA for patching? The file name looks strange to me

Sent from my paranoid PauliDroid
[Android Software/Hacking General [Developers Only]] ratelutz:
no it is a repacked version. i deleted some unneede apps and added some. but nothing was changed regarding framework
[Android Software/Hacking General [Developers Only]] mateorod:
Are you two running PA for the same device? Some PA are built from source and some are ports, they may have different patching needs. I can fix that patching issue for you rafe, I am going to be working on this stuff right now. I hope to have it added over the next day or so. There have been a bunch of changes to the patcher, and I just have a lot on my plate with getting it in shape. But hopefully I can add the optional copying function soon.
[Android Software/Hacking General [Developers Only]] ratelutz:
ok i will whait for the next release
[Android Software/Hacking General [Developers Only]] abulbulia:
I'm also using pa 1.992 for galaxy note i717 and having problems patching. The pa rom is build from source but when it was ported it patched fine.
[Android Software/Hacking General [Developers Only]] gongoscho:
Can anybody make a patch for Virtuous Infinity v1.33.0 Alpha3?
[Android Software/Hacking General [Developers Only]] karamelos:
Are you try it?

If I had little time (when I come back at home), I try it (my connection s.....)
[Android Software/Hacking General [Developers Only]] karamelos:
what's is your rom ?

give a valide link or direct link !!!!!!!!!!!! link of dowload page, 10 devices :rolleyes:
[Android Software/Hacking General [Developers Only]] Paulikid:
I'm running PA on a GNex.

Sent from my paranoid PauliDroid
[Android Software/Hacking General [Developers Only]] karamelos:
I tested (with last patcher & over) but

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

!!! error: unknown ROM version

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
[Android Software/Hacking General [Developers Only]] ratelutz:
I'm running PA on HD2

thats why the filenames are different
[Android Software/Hacking General [Developers Only]] gongoscho:
Too bad :( Thanks for your test! :good:
[Android Software/Hacking General [Developers Only]] poncik:
evervolv-jb based roms

i'm using evervolv-jb based custom rom on my htc desire. i tried autopatcher with aosp-jb and other parameters but all failed. do you have any plan to add support for evervolv-jb roms in near future?
[Android Software/Hacking General [Developers Only]] kobik77:
Guys, is there any chance for adding support to fitsnugly's CM10 and AOKP builds?

http://fitsnugly.euroskank.com/?rom=cm10&device=maguro

http://fitsnugly.euroskank.com/?rom=aokp&device=maguro
[Android Software/Hacking General [Developers Only]] mateorod:
I think evervolv is cm10 based, right? I believe I just patched one by hand as it was the base for ratelutz PA ROM. If I have then right ROM, them patching it with the latest cm10 patches fail on the ActivtyManager Service.smali.

If I am right then you should be able to patch those sometime this week. I worked on it most of the day. I have a tested function that should work for many of these derivative ROMs.

I wouldn't be surprised if it covered fitsnugly too. Where do they fail in their closest match, kobil?

I have been on the patcher most of the day, and am changing a bunch of stuff. Hopefully I can get it all together sometime tommorow or at latest the next day. I plan for the next update to be available on github as well. I am going to need you guys then, because it will need some error checking, especially for cygwin. I am looking closely at the user submit stuff I have on hand already, hopefully gong through pull requests will make that stuff easier.

Of course I have to evacuate for the hurricane, then we may get pushed back. My wife doesn't play with these storms since she found out I swam out of Katrina.