yashsingh1/xdaforums huggingface dataset:
[Android Software/Hacking General [Developers Only]] mateorod:
Try the attachment. I used aosp-jb, but I had to remove the boot.img patching, as you already have framework2.jar in your bootclasspath.

This may not work!

But it looked like all the ignored patches were only because it was trying to delete classes that you already have in framework2.jar like you need.

Umm...we remove the temp folders. Unless you manually stop the patching in the middle, all that should be left is a logfile.

Well, the attached failure is eventually not going to be a problem, as we are probably going to move to sed for this patch. It is looking for an ethernet line to glob onto, and Nook doesn't have one.

But looking at this further, I realized that Nook doesn't have a boot.img. How quickly we forget!

I actually just went in with a hex editor and pulled your ramdisk out by hand (well, the ramdisk from my PA roms for the Nook; what is eyeballer done posting builds?) and applied the changes by hand.

This requires a radio, I am not sure if this is going to work. But I created this by hand. I wouldn't do this except that the Nook was pretty important to my Android learning curve. I like the community.

Don't flash it!

This is very experimental, have another rom at the ready. Although I am not going to replace your kernel or anything wild. You are going to have to pack an rom with these files, okay?

In the attached zip there is a ramdisk.img, meta-inf and framework-res.apk. Replace the ones in your cm9 build with these. There is also a system folder. You are going to have to merge that with the existing system folder. open up system/etc and drag the contents into your rom's /system/etc folder and so forth.

We'll just have to see. Try taking a logcat of the boot. or better yet, follow the troubleshooting guide from trevd, he has some specific things, like dmesg, that he uses to see what's going on. If it doesn't work, provide him with the info.

I can't swear that the Nook has the hardware. But looking in the framework-res made me hopeful. The list in the uevent.grouper.rc less so. I am not an expert on this, so take the result to trevd. You're on the bleeding edge with this one...
[Android Software/Hacking General [Developers Only]] camp.:
pdroid AOKP patch fails

Hi all,

A am using kobik77's ApG to create a pdroid patch for an older AOKP ROM (on the i777). The auto-patcher fails and returns the following output:

The log file is also attached. Any suggestions to get this patch created successfully? I've never used Linux/Cygwin, but I'll give it a shot if that's what it takes. Thanks for the patcher, GUI, and support!

.
[Android Software/Hacking General [Developers Only]] mateorod:
If you look on the OP, older roms need you to point them in the direction of the correct build date. For future reference, to anyone trying this, that is really th purpose of the -h flag at this point.

I am supposing that your rom was built on 4-28, which is right before pastime and I started this project. But you can try the earliest patches and see if they work. Those patches worked for a looonnng time, so maybe you will get lucky.

./auto_patcher <ROMSNAME>.zip pdroid aokp 20120506
[Android Software/Hacking General [Developers Only]] bitstra:
Dear mateorod,

I've merged the tree out of you r nookdongle.zip - as described - nook boots fines - all files ar in place so far.

But my huawei-dongle can't be activated. tried also toggle hostmode via 'nook color tweaks' but no luck.

Have more to test - but i think your test-patch seems to o.k. :)

(now I have to have some time for my whife :))

best regards

bitstra
[Android Software/Hacking General [Developers Only]] mateorod:
Thanks bitstra, I know that took a little time investment. I would love for trevd to get a look at your logs so we can know if we are just barking up the wrong tree or not...but I also understand if you were just taking a flyer onit and are happy with just having Pdroid.

The was a small problem with some permisssion management on the 3g dongle mods preventing a clean flash.

version 2.0.2 is uploaded to techerrata with a fix; should be available in maybe 20 mins. If you are a Windows user using kobik77's GUI, you can probably get an update right now.

A user submitted a wrapper script for linux as well, I need to finish looking at it. We are going to implement an auto-update feature for the other OS's at some point, but the wrapper looked pretty neat. If anyone goes back and tries it let me know, otherwise I will try and have it vetted and linked to for next update.
[Android Software/Hacking General [Developers Only]] scutworker:
Thanks very much for that patch: I flashed it and finally Pdroid worked!

But there is one problem; all my apps work except for file system viewers like ES File Explorer and Astro. Strangely File Expert does work.

I've attached a logcat of what happens when I open ES File Explorer. Also one of XE Currency app that does the same. And MX Player too. All just FC.

One final thing: you used the asop-jp option, that I understand, but what else do I need to do to make my own patches (i.e how do I remove boot.img patching). I ask as this ROM is updated a lot and I can stop bothering you if you tell me what to do.

Thanks once again for all your help.

Cheers.
[Android Software/Hacking General [Developers Only]] mateorod:
Well, as of right now there isn't an option to try the aosp-jb patches on roms that already have framework2.jars. What I sent you was kind of a flyer, just seeing what woud happen since the patching applied.

I was hoping it would work, but from your description it doesn't sound like it really did, no? I will have to look at your logs later tonight, I am about to get up and out.

If you are willing to lose those functions, what you can do while we look at the efficacy of this method, is this:

tar xvf patch_patches.tgz
rm patches/pdroid/aosp-jb/boot_patch.txt
tar cvxz patch_patches.tgz patches
./auto_patcher <EVERVOLV>.zip pdroid aosp-jb

You only have to remove the patches the first time, after that you can run the script like normal. If we release an update just repeat the process.

Now if this turns out to be a viable way to patch the evervolv roms, we will add a way to make this easier...just have to hear more results and look at your logs.
[Android Software/Hacking General [Developers Only]] camp.:
After messing around with Cygwin for a bit, I run the command above and I get "error: Missing patch diff tools". See below.

I have followed kobik77's guide (thanks for that) and installed the 'patch' and 'cpio' Cygwin packages to try to fix the error. The only thing I am doing differently than the guide instructs is running bash from cygwin/bin folder because the Cygwin Terminal shortcut does nothing for me.

I am getting the same thing still; I'm stuck. Any suggestions?

Thanks again!

camp.
[Android Software/Hacking General [Developers Only]] kobik77:
Yeah, one suggestion: use ApG.

It would do all the dirty work for you and you'll only need to drop the rom file you want to patch and hit start.

http://d-h.st/1jO
[Android Software/Hacking General [Developers Only]] htrakr:
(Silly) Question

I am still using GB with pdroid as of now. I downloaded CM9.1 and patched using ApG (pdroid and CM9 options). (Still havent decided to install)

I see that the update.zip is smaller than restore.zip and the framework.jar, core.jar, etc are also smaller size. In syvat's patcher the update.zip and framework.jar, etc are bigger size than restore zip.

Is there some reason the files are smaller? Does it affect something else? Sorry about wasting time if there is no simple answer.

TIA
[Android Software/Hacking General [Developers Only]] camp.:
That was the first thing I tried, it didn't work however (see post #649 here). Meteorod suggested I try an older patch version. There isn't a way to do that with auto_patcher is there?

Great program by the way, I was able to patch an aokp-jb ROM no problem, I just like my old timey ROM. =|
[Android Software/Hacking General [Developers Only]] IvanNCase:
First off thanks to everyone who made autopatcher. Sorry if this has already been answered a thousand times but I did search and couldn't find an answer. I've finally got a PDroid patch made for the rom I'm using and it installed without bootlooping my phone but when I run PDroid it says it doesn't support ICS. I've tried the apk from Syvat's thread and the ad-on thread and the version from the market and they all give me this error but obviously some of you are running PDroid with ICS/JB so is there a newer version of the apk somewhere or is it something else.
[Android Software/Hacking General [Developers Only]] switchgott:
Hi,

not working on officiell nighty cm10 :(

### 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 ...

### apk patch pdroid/cm10/latest ###

### rebuild jar ###

... rebuild framework.jar ...

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

!!! error: failed compiling framework.jar !!!

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

! please refer to /cygdrive/c/tmp/log20120913154527 for any debugging

! patching failed.

! it may be possible to patch /cygdrive/c/tmp/cm-10-20120913-NIGHTLY-i9100.zip using other patch version

smali auto patcher v2.0.2

pdroid 1.32 patches 2012.09.0.7

v6supercharger patches 2012.08.17.
[Android Software/Hacking General [Developers Only]] pastime1971:
need to see the log file to see what happened.

but it is very likely that because CM filled up the method number cap (65536), and adding pdroid exceeds that limit.

look for "method cap" and see if that is true.
[Android Software/Hacking General [Developers Only]] doobie2010:
cm-10-20120913 doesn't work for me, too. Have you tried cm-10-20120911?
[Android Software/Hacking General [Developers Only]] nsmart:
I think you are right. I could not patch the latest nightly, too. Is there something we can do ?

... 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 @0x3cef90 (Landroid/util/LongSparseArray;->clone()Landroid/util/LongSparseArray
[Android Software/Hacking General [Developers Only]] pastime1971:
i am testing a workaround to remove vendor-specific RIL files (thanks to tonyp)

but still we need to build an up-to-date patch first w/ it.

will report back soon.
[Android Software/Hacking General [Developers Only]] switchgott:
Thanks for your answer,

but i understand ... nothing :)))

You will get it!

But what i dont understand too, a week bevor, i could patch the source code and compile it, Today build i cant do this anymore!

Everytime i get a error while compiling.

WHAT the Hell CM10 Team has chanced??
[Android Software/Hacking General [Developers Only]] Cirkator:
Thanks a lot for these explanations! Very interesting to get some "inside" information! :)
[Android Software/Hacking General [Developers Only]] pastime1971:
it means there are more than 65536 methods (java class functions) in framework.jar, which is NOT allowed.

---------- Post added at 01:49 PM ---------- Previous post was at 01:48 PM ----------

it happens both when compiling and when baksmali-ing. one jar file can't have more than 2^16 methods.
[Android Software/Hacking General [Developers Only]] switchgott:
Mh strange, very strange.

Because it has worked last week with cm10 :(

Any idea how to fix this problem?

As i understand, this is a code problem.Java cant have more as 65xxx method in one file.

THANKS for you great work

---------- Post added at 05:04 AM ---------- Previous post was at 05:01 AM ----------

Question:

Is it possible to create a own jar file for pdroid??
[Android Software/Hacking General [Developers Only]] nsmart:
The devs are aware of the problem and already working on an fix. For now we just have to wait until they release and new autopatcher version.
[Android Software/Hacking General [Developers Only]] switchgott:
Thanks!

I found a workaround :))

Have a look!

This works for me.

Originally Posted by tonyp

I had the same problem. You can't use the AOSP patches, they will _generate_ the framework2 file - but this does already exist in CM.

What I'm doing is that I just delete a couple RIL files I don't need at "android_frameworks_base\telephony\java\com\androi d\internal\telephony".

Just delete the Samsung, HTC and Sony ones and you should be able to enable PDroid.

The CM team should really try to move a couple more methods into the framework2 - I will ask arcee about that the next time I'll talk to him.

(Although they could just say that they optimize it for CM and not for kangers).

Thanks... same problem here compiling for CM10 Samsung Galaxy Tab 7" (p1, p1n, p1l, p1c). It's getting to 65565 with the patches.

I just deleted 2 files: SonyQualcommRIL.java HTCQualcommRIL.java

In hopes that I'm on a Samsung and won't be needing them.

Compiled latest nightly fine with that.
[Android Software/Hacking General [Developers Only]] nsmart:
Thanks, tonyp's tip worked and I could successfully patch the newest galaxy s2 nightlies now. As said above, I hope I will not need those ril files on my phone.
[Android Software/Hacking General [Developers Only]] redbull320:
hmm Where can i find the patches zip? Greetz
[Android Software/Hacking General [Developers Only]] scutworker:
There are none. The whole point of the GUI is that it is automatic. You fire it up, and it'll download the latest Java, Cygwin and patches. You then select what patches you want to apply on the left hand pane and the type of rom you have on the right. Then drag and drop the ROM zip file onto the window and away you go.

Good luck.
[Android Software/Hacking General [Developers Only]] pastime1971:
about the method cap issue (more than 65536 methods in framework.jar), we have implemented vendor-specific-RIL-removal in the patcher script, so that you can take a nightly ROM, and the script will remove unnecessary RILs except one specified by ro.telephony.ril_class in build.prop

mateo will release it after more testing.

it should work on CM10 and AOKP.
[Android Software/Hacking General [Developers Only]] pro.aggro:
Nice work kobik. Can you please put the versionnumber into the filename?

Thx
[Android Software/Hacking General [Developers Only]] kobik77:
Yeah, no problem.

On the next version I'll also add auto patcher version to the main GUI and an option to upload log files to pastebin in case of a patch failure.

Sent from my Galaxy Nexus
[Android Software/Hacking General [Developers Only]] mssngr:
@kobik, I'm having trouble with the download link of the ApG, every time I press it it directs me to a blank page.
[Android Software/Hacking General [Developers Only]] kobik77:
No problem here.

Anyway, get it from my dropbox

https://www.dropbox.com/s/3n5wp75xxl1bwj6/ApG.exe
[Android Software/Hacking General [Developers Only]] noonecanhide:
Any news about the release of the version with the "method index" fix ?
[Android Software/Hacking General [Developers Only]] mateorod:
less than 24 hours, if'n the crik don't rise.

When it goes out, find a post by pastime1971 and press the thanks button. Look out for friend of the program tonyp while you're at it...
[Android Software/Hacking General [Developers Only]] noonecanhide:
Sorry for ETA spam, but i don't want to miss pdroid and i am on the last patchable nightly of cm10 for nexus, which is from 7. September. And it is really buggy compared to the latest nightlies. :)

But thanks for your reply!
[Android Software/Hacking General [Developers Only]] zaos:
I would like to point out that at least for desktops, Java can execute some code faster than the equivalent C code, particularly if the compiler is something like gcc. This is testament to the amount of effort Sun's engineers put into the jvm.
[Android Software/Hacking General [Developers Only]] mateorod:
Auto-Patcherv2.1.0 is now available on our downloads page. Users of the Windows GUI ApG by kobik77 should also be able to auto update to the newest version.

There are a ton of structural changes to the program, making it more sound, stable and versatile. Pastime1971 has been refining these changes for awhile now and the program is much better for it.

This update includes a fix for the method-cap issue for Pdroid patching. The script needed to make some space in the framework.jar in order to fit PDroid's functionality. We achieved this by querying your device's configuration and then deleting some unneeded files. These files are called RILs, radio interface layers. They are used to let your rom make phone calls. They are device specific, though, so a full complement are distributed in Cyanogen roms, even though you only need the RIL that matches your carrier. So, if it works like it is supposed to, you will never miss the files.

This fix comes from friend of the program tonyp and has been proven to work in limited testing. But you guys are our release testers so please let us know how it goes. Remember, if something isn't working correctly, running the auto-patcher also creates a restore.zip. You can flash the restore.zip directly over any update.zip our program makes- no wiping necessary, ever.

This has been tested as much as we can with no problems, an tonyp has been distributing his PA rom with this fix for a week or so. So there isn't any risk and we feel confident it will work.

Keep your eyes open for any other functions you would like the auo-patcher to incorporate, i want to stretch this new scripts wings!
[Android Software/Hacking General [Developers Only]] Iormangund:
Small typo in the link btw, it's http://www.techerrata.com/browse/mateorod/pastime1971

Does this version have any capability to work on samsung based roms yet? (deodexed, root, etc)
[Android Software/Hacking General [Developers Only]] mateorod:
Thanks, fixed. I am currently not working on adding those. Wbedard and I have talked about him starting to try and expand AOSP support, but anyone who wants to start building stock roms can kick in and help.
[Android Software/Hacking General [Developers Only]] tonyp:
friend of the program, I like that :)

Anyways, I'm 99% sure that the RIL removal won't harm anything.

After discussing the initial idea with pastime I code-studied the RIL dependencies and these RIL files are never referenced - except the one needed for your device, which is referenced via build.prop at ro.telephony.ril_class.

Auto-Patcher reads the needed RIL with the proberil function ( see source - line 270) and deletes the others.

Well implemented you two!

Apart from theory, as you said, I'm using it at my ROM and there hasn't been a single problem :)
[Android Software/Hacking General [Developers Only]] noonecanhide:
Patching of latest CM10 nightly with pdroid on Galaxy Nexus fails when using apg.exe GUI.

Doing it manually fails, too, when using any newer pdroid patch as 20120901.

With 20120901 it works, including removing the unnecessary RIL-files. log here

Nexus is up with running networking (gsm, umts, hspa, wlan)

log of failed patch: here - but that looks more like an issue for the pdroid ics thread, am i right ?

thanks, great work !
[Android Software/Hacking General [Developers Only]] mateorod:
The reason that it fails for you is the ContentResolver, and the reason that the 9/01 patch works is because at that time I had removed the ContentResolver file patch because I was copying that file over manually.

But the patcher should ask you if you want to copy that file over manually, asking for two YES responses. Did that not happen for you?

Kobik, I don't have my Windows box with me, but how do you handle the copy files? Or is that function available yet? The automatic ContentResolver copying has been taken out in favor of an interactive approach, which means that basically every CM10 pdroid patch will need two yes inputs for the foreseeable future.
[Android Software/Hacking General [Developers Only]] pro.aggro:
There are two questions answed automatical with yes, but in the previous versions of APG it still failed. I have not tried the new one!

Sent from SGS II powered by PARANOIDANDROID
[Android Software/Hacking General [Developers Only]] kobik77:
Currently, I'm piping yes to the auto_patcher script using the format

echo yes | ./auto_patcher ROM.zip MODTYPE ROMTYPE

I'll leave that as is unless you have another suggestion for me.

BTW, there is no print for that in the log file and I think you should add one. Moreover, IMO you should consider making the log file more like the console output but with more informational prints so there would be only one log to upload.

For your convenience, I also added at the end of the uploaded log files, auto_patcher version which IMO should be also printed to the log file by auto_patcher script on its start.

Of course, it's just my opinion ;)

Edit: There was a problem in previous auto-response method, so I'll have a new fix for ApG in just a few minutes

This is how it should be:

yes yes | ./auto_patcher ROM.zip MODTYPE ROMTYPE

Edit2: for some reason just this fails

yes | ./auto_patcher ROM.zip MODTYPE ROMTYPE

Edit3: Uploaded new version

http://xdaforums.com/showpost.php?p=31648393&postcount=690
[Android Software/Hacking General [Developers Only]] mateorod:
I will look more carefully at your specific suggestions later today, kobik, but if you check the github, you will see that I am in the beginning of reworking our logs- they started with a humble origin, and kind of fell into being what they are. They almost always give us just eough to go on to figure out any basic problems, but I think they can be reworked into a state where they actively make the program better.

so that is what I am going to try and make them do. Thanks for the fix. Are all your uploads to a different address? I found out my link in the OP was out of date last night. I could go through and check your old posts, but if you could just tell me that would be easier.
[Android Software/Hacking General [Developers Only]] kobik77:
You can always look for updated versions here

http://d-h.st/users/kobik/?fld_id=5247#files
[Android Software/Hacking General [Developers Only]] Iormangund:
Ok, thankyou. Fingers crossed Omega S3 rom will work someday :)
[Android Software/Hacking General [Developers Only]] Hotfingers:
CM10 hickup

Hi kobik77,

Thanks for the auto-patcher. It makes my life so much easier.

The auto-patcher worked perfectly for doing the pdroid patch on FXP CM10 ( right up to build 137).

Now that build 138 has just been released, I tried to do the pdroid patch again, this time it failed.

It seems that there are now too many procedures in framework.jar..?

I have no idea how to deal with this.

I've pasted a log on codepad - http://codepad.org/ce2I8zYB#comment-Tn2D6rpP

I also tried the "Manual Patch" button, and chose dates 20120901, 20120826.

After that I gave up.

I guess from reading a bit that the procedure count limit is built in to the android operating system.

So I'm guessing this is not going to be a quick solution..

I'm not sure if I should post this here, or over on the original thread by pepcisko.

Sorry if I put it in the wrong place. I put it here because the auto-patcher is the tool that automagically pasted the log onto codepad.

Thanks for your time.