yashsingh1/xdaforums huggingface dataset:
[Android Software/Hacking General [Developers Only]] antonizoon:
I made a git-based PKGBUILD for the auto_patcher and posted it to Arch Linux's AUR. Took me 20 minutes or so, and a little sed-script too.

The package is called "android-auto-patcher-git", and you can get it here: https://aur.archlinux.org/packages.php?ID=62646

Now you can easily install this awesome script with packer or yaourt or something, and you can call it anywhere with "auto-patcher" at prompt.
[Android Software/Hacking General [Developers Only]] horqai:
PARANOIDANDROID 2.1.1 for Nexus 7 fails patching

I've just tried to patch the todays Paranoid Rom 2.11 for Nexus 7 which fails with this message:

### rebuild jar ###

... rebuild framework.jar ...

UNEXPECTED TOP-LEVEL EXCEPTION:
org.jf.dexlib.Util.ExceptionWithContext: method index is too large.
at org.jf.dexlib.Util.ExceptionWithContext.withContext(ExceptionWithContext.java:54)
at org.jf.dexlib.Item.addExceptionContext(Item.java:177)
at org.jf.dexlib.Item.writeTo(Item.java:120)
at org.jf.dexlib.Section.writeTo(Section.java:119)
at org.jf.dexlib.DexFile.writeTo(DexFile.java:716)
at org.jf.smali.main.main(main.java:231)
Caused by: java.lang.RuntimeException: method index is too large.
at org.jf.dexlib.Code.Format.Instruction35c.writeInstruction(Instruction35c.java:102)
at org.jf.dexlib.Code.Instruction.write(Instruction.java:57)
at org.jf.dexlib.CodeItem.writeItem(CodeItem.java:258)
at org.jf.dexlib.Item.writeTo(Item.java:117)
... 3 more
code_item @0x3d08b8 (Landroid/util/LongSparseArray;->clone()Landroid/util/LongSparseArray;)

Any Ideas to fix this with the used autopatcher version autopatcherv2.0.0?

Cheers and thanks for this gread work!!

Horqai

Edi - -h result...

$ ./auto_patcher pa_grouper-2.11-09SEP2012-192509.zip -h

The Auto-Patcher v2.0.0

### verify tools ###
### verify ROM ###
### unzip patch tools ###
### unzip patch patches ###
### probe rom type ###
\vergr▒▒ert: system/build.prop
!!! pa_grouper-userdebug may not be supported yet, trying aosp-jb latest !!!
### supported patch candidates ###
3gdongle : generic : latest
insecure : generic : latest 20120816
Nexus7 : generic : latest
pdroid : aokp : latest 20120811 20120702 20120613 20120506
20120820 20120707 20120625 20120510
pdroid : aokp-jb : latest 20120907 20120823 20120820 20120809
pdroid : aosp : latest 20120813 20120624 20120515 20120507 20120506
pdroid : aosp-jb : latest 20120817 20120809
pdroid : cm10 : latest 20120901 20120826 20120820 20120806
pdroid : cm7 : latest common 20120811 20120718 20120625 20120611 20120514
pdroid : cm9 : latest 20120724 20120718 20120708 20120702.inc 20120615 2 0120508
20120811 20120723 20120709 20120706 20120626 20120601 20120506
pdroid : generic : latest 20120813 20120624 20120515 20120507 20120506
pdroid_addon : aokp : latest 20120813
pdroid_addon : aosp : latest 20120813
pdroid_addon : cm9 : latest 20120813
pdroid_addon : generic : latest 20120813
secure : generic : latest 20120816
tabletUI : aokp-jb : latest 20120824
tabletUI : aosp-jb : latest 20120826
tabletUI : cm10 : latest 20120826
tabletUI : generic : latest 20120826
v6supercharger : aokp : latest 20120817 20120614
v6supercharger : aokp-jb : latest 20120817
v6supercharger : aosp-jb : latest 20120817
v6supercharger : cm10 : latest 20120817
v6supercharger : cm9 : latest 20120817 20120614
v6supercharger : generic : latest 20120817 20120614
voice : generic : latest 20120826
[Android Software/Hacking General [Developers Only]] mateorod:
hey, cool! I will check this out later tonight, I have my hands full for most of the day. But we are all about community submissions like this!

Interesting. We had a problem with the amount of methods with aosp-jb because Google packed the framework.jar to the limit of java's capabilities. But PA is based on CM, which does the same thing we do in aosp-b to get around the problem- adds a framework2.jar. I will check it out personally as I have that device to test.

Update: Horquai, the patcher must think that PA is aosp-jb based. Usually the Auto-Patcher can tell that they are cm10 based.

It is always best, when using a derivative (i.e. not straight Cyanogen, AOKP or AOSP) to pass a ROMTYPE, in your case cm10.

I was able to create an update zip with

./auto_patcher pa_grouper-2.11-09SEP2012-192509.zip pdroid cm10
[Android Software/Hacking General [Developers Only]] horqai:
Thats weird I used the cm10 command in my first try - I also tried it again but no luck. The GUI version also ends up with the same fault.

Could you please upload your update and restore zip or do you have any other ideas.

Thank you anyway!

Cheers

Horqai
[Android Software/Hacking General [Developers Only]] SecUpwN:
I just LOVE how Auto-Patcher works with CyanogenMod 10.. :)
[Android Software/Hacking General [Developers Only]] mateorod:
I will upload the zip for you since it is made. It will be maybe an hour or so before i can.

Your run of the patcher is failing on recompile, not patching. Which is rare. I had the same ignore hunks, but that is no barrier to recompile. Could you give the details of your system? OS and bit, primarily.
[Android Software/Hacking General [Developers Only]] pastime1971:
what was wrong with openjdk ?

it works fine on my netbook.

$ uname -a
Linux pastimen 3.5.3-1.fc17.i686.PAE #1 SMP Wed Aug 29 19:04:57 UTC 2012 i686 i686 i386 GNU/Linux

$ rpm -qa | grep jdk
java-1.7.0-openjdk-1.7.0.6-2.3.1.fc17.2.i686
java-1.7.0-openjdk-devel-1.7.0.6-2.3.1.fc17.2.i686

$ ./auto_patcher ../AU_maguro_411_V1.zip pdroid

The Auto-Patcher v1.9.8

### verify tools ###
### verify ROM ###
### unzip patch tools ###
### unzip patch patches ###
### probe rom type ###
inflated: system/build.prop
!!! JRO03H may not be supported yet, trying aosp-jb latest !!!
... result of ROM check: version= 4.1.1 rom= aosp-jb ...
### unzip rom ###
inflated: boot.img
inflated: system/framework/services.jar
inflated: system/framework/framework.jar
inflated: system/framework/core.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 framework.jar ...
... extract preloaded-classes ...
... decompile core.jar ...
... decompile services.jar ...
### unpacking boot.img ###
### copy patch pdroid/aosp-jb/latest ###
... copying system/framework/framework2.jar ...
### jar patch pdroid/aosp-jb/latest ###
... apply framework.patch ...
... apply preloaded.patch ...
... apply core.patch ...
... apply services.patch ...
### img patch pdroid/aosp-jb/latest ###
... applying boot.img.patch ...
### rebuild jar ###
... rebuild framework.jar ...
... rebuild core.jar ...
... rebuild services.jar ...
### rebuild img ###
### rebuild boot.img ###
... rebuilding ramdisk ...
... composing boot.img ...
... rebuilding boot.img ...
### create update.zip ###
### finished ###
flash update.zip to install the modified
flash restore.zip to restore the original

the patcher script explains what is missing on your system in order to run it.

edit: by the way, you also need jdk-devel (on fedora). please read the post #2 on this thread, http://xdaforums.com/showpost.php?p=27589704&postcount=2 (posts #1 and #2 are there for a reason.)
[Android Software/Hacking General [Developers Only]] mateorod:
Okay, well I hadn't waited after the successful patching and so I did not notice that my jar failed to build as well.

This is actually a real pain in the ass. If you open your custom roms like CM10, you will notice that they have a framework2.jar that stock roms do not have. That is because Google had packed the framework.jar so full of code that it was right up against Java's method cap, leaving no room for further customization.

CM's hotfix for this was to create framework2.jar and move some of the methods there. To bring PDroid to aosp-jb, we actually had to mimic this process on a smali level, kind of a crazy process, where we have to modify the boot classpath in the ramdisk and create the framework2.jar from whole cloth.

I cannot say at this point if it is CM or PA that has continued to pack more methods into framework.jar but it is a shame considering framework2,jar is just sitting there at under 100kb, all the room in the damn world.

Point is, we need to add ~250 methods to framework.jar in order for PDroid to operate. That is why the patching is so complicated for this mod, it is no little change to completely divert permission data streams.

As of this release, for this device at least, we cannot now add PDroid. I will look into moving actual methods and classes, but we won't be following CM or Google's lead on this one. This is going to be virgin territory, so keep yr fingers crossed.

Unless pastime sees this differently?
[Android Software/Hacking General [Developers Only]] tonyp:
I had the same problem while building from sources. One thing I discovered: you can remove the ril files you don't need to get a little more space in the framework.

This should work at the smali level as well. A user would have to do it manually before patching though.

The problem with the framework2.jar is that you can't move each method in there. The system elements have to stay in the main framework. Although there are a couple more which could get moved, the best way to handle that would probably be to submit these changes to cms gerrit. I'll look into it.
[Android Software/Hacking General [Developers Only]] measel:
SOLVED

Got a working patch with PDroid Patcher v1.27 (not Auto-Patcher)
[Android Software/Hacking General [Developers Only]] curodot:
I was able to patch PA v2.1 for SGS2 using v2.0.0 on Cygwin so thanks a lot guys.
[Android Software/Hacking General [Developers Only]] kobik77:
New ApG version is being uploaded alongside with a new cygwin package to support syncing autopatcher with GitHub.

You'll now get your hot cookies strait from the bakery :)
[Android Software/Hacking General [Developers Only]] horqai:
framework2.jar

I've checked the orginal CM10 release cm-10-20120910-NIGHTLY-grouper.zip for the N7 and its also including the problematic framework2.jar :rolleyes:

Cheers

Horqai
[Android Software/Hacking General [Developers Only]] mateorod:
Yeah, that is what I was afraid of. I speculated to pastime that passing the changs to CM might be the thing to do as well.

Google has acted like the patches that create the framework2/jar in the first place are somethinig of a temporary workaround. But I haven't seen any movement on fixing it from upstream.

I speculated to pastime that CM patches might be the way to go, although it is a bit of a favor and/or extreme preventative methods on their part.

Thanks for the tip on the rils, I am looking into this today.

Update: Gulp. Server classes already have been moved. I am going to experiment with some media classes, i.e filterfw and a couple others...
[Android Software/Hacking General [Developers Only]] LMBBananaJoe:
I failed patching pdroid to slim bean. Guess that's no surprise. Is it even possible with cygwin?
[Android Software/Hacking General [Developers Only]] dakpluto:
dropped the latest CM10 into the windows version and it didn't have any of the tablet options. Only pdroid and supercharger. Any idea how to fix?
[Android Software/Hacking General [Developers Only]] mateorod:
We haven't been able to support slimrom for JB that I know of. We would need someone willing to build and patch it from source. You could try some of the cm10 patches from the last couple weeks though, try the -h flag and see what is there (20120826 and 20120820 I think).

We have a couple user patches that have been submitted that I have been sitting on way too long. I have been trying to get this update out it seems like forever. But I am going to add that function ASAP. That way, as soon as we find someone willing to build and patch slimbean, we could support it.
[Android Software/Hacking General [Developers Only]] kobik77:
Download

http://d-h.st/LuD

Here you go guys, ApG syncing Autopatcher directly from GitHub. just delete current ApGPackages\ap directory before running this ApG version.

Also you can select several patches like pdroid and v6supercharger using CTRL+Left mouse. You will be be presented only with the supported ROM types for each selected combination.
[Android Software/Hacking General [Developers Only]] Stylez Ray.:
Is there more to do than just running the .exe?

I am asking as I just receive error messages when running as admin under Windows 8.

Please have a look at the screenshots attached.

I am running it from folder D:\APG\
[Android Software/Hacking General [Developers Only]] kobik77:
I don't have Windows 8 to test it but anyway running it as admin isn't necessary nor recommended.

Try running it as normal application.

Sent from my Galaxy Nexus
[Android Software/Hacking General [Developers Only]] dakpluto:
That update fixed my issue, thanks!
[Android Software/Hacking General [Developers Only]] thepolish:
Confirmation for aokp-jb

Pdroid patch working flawlessly on Rishi Kumar's build of aokp-jb compiled from merges up to 9/8/12. Patched and flashed everything last night. Has worked all day today without a single issue. Thank you for your work, all of it and to everyone involved.

edit* Patched using osx terminal, if that makes a difference to anyone.
[Android Software/Hacking General [Developers Only]] scutworker:
Is this link still working? I get to the Dev-Host page but the download button brings up an error.
[Android Software/Hacking General [Developers Only]] Px80:
i tried to patch Codename Android Saga v3.5.0 Beta | Kernel 3 it says it is not possible..

Now i don't know what to quote, what is the interesting part and useful for you...
[Android Software/Hacking General [Developers Only]] nsmart:
I tried the new version on Windows 7 and it worked instantly. After first start it downloaded java, cygwin and autopatcher. I synced with github and could patch pdroid into cm10-2012-09-11 for galaxys2 (i9100). Thanks button pressed, very good work.
[Android Software/Hacking General [Developers Only]] grayfoxmg1:
I had the same problem, the way I got around it was to COMPLETELY disable my anit-virus (as in stopping every process) and following the link in IE.
[Android Software/Hacking General [Developers Only]] scutworker:
Cheers. That did the trick. Strange, but it works.
[Android Software/Hacking General [Developers Only]] bitstra:
Hi kobik77,

thanx for your great GUI - it makes handling the autopatcher flowless!

Is it possible, you can builtin a small change/extension in one of next releases? - Delete the TEMPdirs in ap-folder automatically after building the patch-files - to hold that ap folder clean? While trying to delete them manually there come up much of system messages about user rights for other users. Extending your scripts should do that better, was my hope...

regards

bitstra

---------- Post added at 10:35 PM ---------- Previous post was at 10:28 PM ----------

The new mod for 3gdongle dosn't work for CM10-UNOFFICIAL-encore-ROMs (nook color)...

But the pdroid patch does!

THANX for AP 2.0!

bitstra
[Android Software/Hacking General [Developers Only]] TheRecRuiT89:
I am not able to patch GN7000 utacka's paranoid v2.11 (10 SEP). I installed kobik77's latest auptopatcher GUI and I tried with CM10 to patch this rom but it failed. So i tried aosp-jb and aokp-jb they failed too. Finally i tried "common" which was finished succesfully but when i flash that update file, i dont get anything about pdroid. so it is also broken.

how can i create a patch for this?
[Android Software/Hacking General [Developers Only]] mateorod:
grayfoxmg1- my man. Good to see you here.

I was just coming to post about this same issue, having just discovered this. My wife's (the only windows in the house with which to test) anti-virus complains, but as you can see it has been scanned by devhost. It is okay,

We just discovered a few issues with cygwin and repacking the APKs. Please try it again when we release the update tonight. I am very much interested in if that mod works for Nook Color, my old favorite.

You had some java errors when you attempted to apply the patch, right?

Lastly

Please attach logs for help- I saw that the PA was giving trouble, we are trying to work on that still, but it might be awhile. They have filled their framework.jar up, there is no longer any room for PDroid! I am investigating.
[Android Software/Hacking General [Developers Only]] grayfoxmg1:
I cannot, find a reason for our anti-viruses to ping this as a threat and block access, the only 2 things I can think of are:

1. The file hosting website does in fact hold viruses in some else's file list and our anti-virus software tags the whole site as a result. To fix this move your file to mediafire or techerrata as those are the preferences for xda-members and I've yet to have an issue with them on my end.

2. Perhaps our software don't like that we are downloading a .exe from an 'empty certificate' website. I say this as it is your own .exe that you created, it doesn't have a microsoft certified running certificate* and it is coming from a file-hosting website. So our AV programs see an unlicensed file designed to run a process (or series of processes) coming from a file-hosting website. Thus they prevent what, to them, is an attempt to attack our system. To fix this, enclose the .exe within a .zip or .rar and re-upload.

* I do not know what it is called, other than it being a tag attached to a program which informs your OS who compiled the program and it's level of trustworthiness.
[Android Software/Hacking General [Developers Only]] mateorod:
That could be. I don't know much about devhost or antivirus software for windows. I flex my iptables like a beast, though :victory:

Yeah, I used an emoticon. What of it?

But the GUI doesn't have anything to do with me, directly anyway. That is all kobik. I pm'd him about it this morning, he'll do what he sees best.

There is an update being put together right now, hopefully will go out late tonight. It should finally fix all the nagging issues for you cygwin folk. I finally was able to run the auto_patcher through cygwin myself.

This will allow boot patching and fix apk patching, which doesn't look like it was actually working...for something we thought could get tacked on, we probably spend more time working out cygwin stuff than anything else.

That pretty much leaves the pdroid for the newest PA as the only thing not working. I can't swear that that will get fixed. This has been a hardcoded hurdle in Android since the beginning. PA has walked right into the problem, and may find out they have their own troubles with it very soon, but it is really an issue that has originated with AOSP. They WILL have to fix it before the next cycle of OEM 4.1 releases, of that I am pretty sure. So we may have to wait on Google...

I will post when the update is ready.
[Android Software/Hacking General [Developers Only]] bitstra:
Hi mateorod,

will try that with the next update. If something goes wrong again, I will post logs here...

BTW,

The Downlod link in post #1 has a typo: actual link directs to (nirwana):

http//techerrata.com/browse/mateorod/pastime1971

':' is missed in 'http//'

shoul be:

http://techerrata.com/browse/mateorod/pastime1971

regards

bitstra
[Android Software/Hacking General [Developers Only]] mateorod:
Okay, I am pretty sure I don't want to know what nirwana is. The link is fixed, although I am wondering how it could be posssibly wrong in both of my threads and yet no one complains AND we get 1000 downloads in two days. Must be very resourceful users, or something weird happened.

Anyway, update is up, Might be 15-20 before it is available. Autopatcherv2.0.1 with a bunch of fixes for Cygwin. I got my hands on a Cygwin terminal and debugged and tested it myself, and I am pretty sure all mods are now working correctly.

bitstra, please let me know if the 3gdongle works, I have a interest, you know?
[Android Software/Hacking General [Developers Only]] scutworker:
Thanks, but it's still no go for my Desire JB ROM. It seems to go further than the last update, but just not far enough :crying:

It's this ROM (which is an HTC Desire Evervolv based JellyBean ROM):

http://xdaforums.com/showthread.php?t=1766550

And I'm using Cygwin on Windows XP 32bit.

My log is attached and any help would be appreciated (if it will work on Linux, I can set that up)

Cheers.
[Android Software/Hacking General [Developers Only]] kobik77:
Lets let autopatcher to throw its own trash :)

I'm using Microsoft Essentials and it doesn't false alerting on ApG and I doesn't have any problems downloading it from Dev-Host.

And I doubt that your antivirus knows what this program does before downloading and monitoring its activity.

Anyway, paranoid AV users :p

Try downloading this version which isn't UPX compressed and let me know if your AVs still recognizing it as a national threat.

It also includes a fix for a cases of a parenthesis in ROM and ApG paths

http://d-h.st/1jO

Virustotal Analysis of this version

https://www.virustotal.com/file/a86...fc5430588cfaa3e0bbd89d3b/analysis/1347452956/
[Android Software/Hacking General [Developers Only]] bitstra:
@mateorod

@mateorod,

so, I've tried patching my latest nook-color CM10 with 3gdongle-mod - it failed.

in cygwin on windows 7 32 bit:

./auto_patcher cm-10-20120912-UNOFFICIAL-encore.zip pdroid,3gdongle cm10

result:

... copying system/etc/usb_modeswitch/8888_6500 ...
### jar patch 3gdongle/generic/latest ###
### apk patch 3gdongle/generic/latest ###
... apply framework-res.patch ...
1 out of 2 hunks FAILED -- saving rejects to file res/values/arrays.xml.rej
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!! error: failed framework-res.patch
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

! please refer to /cygdrive/c/ap/log20120912155458 for any debugging

! patching failed.
! it may be possible to patch /cygdrive/c/ap/cm-10-20120912-UNOFFICIAL-encore.zip using other patch version

smali auto patcher v2.0.1
pdroid 1.32 patches 2012.09.0.7
v6supercharger patches 2012.08.17.

usage: ./auto_patcher ROM.ZIP MODS [ROMTYPE] [PATCHDATE]

MODS e.g: pdroid,v6supercharger or pdroid or v6supercharger
optional [ROMTYPE] can be cm9, aokp-jb, cm10, etc.
optional [PATCHDATE] can be specified to use older patch versions.
try "./auto_patcher ROM.ZIP -h" to see what is available

... the log-file is attached.

thank you and

regards

bitstra

EDIT: the pdroid - only patch in ap2.0.1 works like a charme with the ROM above