yashsingh1/xdaforums huggingface dataset:
[Android Software/Hacking General [Developers Only]] echoedge:
Hi,

Can anyone assist in getting pdroid 2.0/pd2.0 working on the EVO 4G?

I've tried autopatcher on both windows and ubuntu and both give the same errors.

I've tried several different EVO 4G Jellybean roms:

Mazwoz-supersonic-jb-b2

MIUI.us_supersonic_v4.1_2.10.26.3_Eng_Deo_ZipA_Signed_0xD34D

swipers_AOKP_3.1.7

All roms when doing the ./autopatcher ROM.zip -h state they are aosp-mod variants (even the one that explicately says AOKP in the filename.

http://codepad.org/Z4AXjl9m (code for -h on ALL.zips (Mazwoz-supersonic-jb-b2 exampled).. all display the same output)

Ubuntu x86--

When trying to do

"./auto_patcher Mazwoz-supersonic-jb-b2swipers_AOKP_3.1.7.zip pd2.0 aosp"

PATCH FAILED

log: http://codepad.org/Yz3rCauh

"./auto_patcher MIUI.us_supersonic_v4.1_2.10.26.3_Eng_Deo_ZipA_Signed_0xD34D pd2.0 aosp"

PATCH FAILED

log: http://codepad.org/tzxkodZP

"./auto_patcher swipers_AOKP_3.1.7.zip pd2.0 aosp"

PATCH FAILED

log: http://codepad.org/vh03yott

aokp:

"./auto_patcher swipers_AOKP_3.1.7.zip pd2.0 aokp"

PATCH FAILED

log: http://codepad.org/0gGJXgd4

I've tried basically every combination on every rom for the EVO 4G using Windows and Linux OS, all failed.

I know there is a way to compile and patch pdroid 2.0 by rebuilding source but I'm completely unfamiliar with doing such things.. I figured autopatcher would be ideal for me, but it obviously is experiencing some major difficulties on the EVO 4g roms IME.

Any help? Anything you can suggest I try?

I have the MazRoz rom on my phone now.. first tried to patch it, it failed - so I tried the other roms. I don't mind which rom I use, would just like to get pdroid 2.0 working to experiment/work with it.

The phone is newly rooted, no pdroid before it... not that that's relevant since nothing was done on the phone itself only on ubuntu and windows machines with the downloaded roms.

Any help would be appreciated
[Android Software/Hacking General [Developers Only]] mateorod:
It is hard to know where the best place for these things is. I would prefer that patching problems come here and that usage problems go to the Pdroid2.0 thread. But I know the line will be difficult to determine.

I would say get a logcat and post it in Pdroid2.0 thread where both CollegeDev and I can look at it. Post your patching log too, if you have it.

Normally I would trim down your quote, but this was a good error report. Made it possible for me to see what was going on. I will try and keep your details straight in this reply. Thanks for the complete error report.

Firstly, the '-h' menu shows what is available for ALL mods and ALL roms. I thought about making it ROM specific, but what if someone wanted to know what their options were? So that menu will show all the patches for each mod and each ROMTYPE.

We do not have any patches for MIUI, so cross that off your list.

Also, Pdroid 2.0 was only released here after Android 4.1.2 was released. The aokp rom you tried to patch with aokp specified, the 'swipers' one...that rom hasn't been updated for 4.1.2 yet. At least it 4.1.1 right now. So it can be probably be patched for PDroid original, but not PDroid2.0.

The other AOKP rom you posted a log for, you specified aosp. The ROMTYPE override is really only there if you try it without it and it fails. As in, if you think it is an AOKP rom, but the Auto-Patcher thinks it is AOSP, then you can use your knowledge to override it and enter AOKP.

So try the Mazwoz (I guess...the 4.1.2 one) with aokp specified.

We really offer patches for Cyanogen, ParanoidAndroid, AOKP, AOSP and AOSP kangs that are close to source.. Roms that stray too far from the original source are not always supported. So If you are trying to patch roms that only exist for your device, then you may not have any luck. We try and support the greatest range of roms possible, though and I happen to know that we support your device, for instance DisarmedToaster uses our patches, even if he doesn't expressly say that they're ours you are getting the same effect.

There ARE options out there, and with a second try you may find one of the above roms is patchable. Good luck and let us know.
[Android Software/Hacking General [Developers Only]] echoedge:
Thanks for the quick and detailed reply.

I tried as you said in both ubuntu linux and w7, both failed but gave me additional prompts to say "YES/no" to replace fluked files.

"./auto_patcher Mazwoz-supersonic-jb-b2.zip pd2.0 aokp"

Log from terminal (has extra info as described above)

http://codepad.org/VseOz3fx

Log file:

http://codepad.org/YOy4IPdr
[Android Software/Hacking General [Developers Only]] mateorod:
There wont be any difference running the patcher between platforms, fyi.

I took from your above post that that rom was based on aokp. Is that true? If so, it doesn't look to be patchable, i guess. Try and find a rom that is for sure based on one of our rom types, and for pdroid2.0, make sure that it is 4.1.2.

Like i said, we dont actively support roms that are device-specific. It just often works out that we can. Perhaps not in Mazwow's case.
[Android Software/Hacking General [Developers Only]] echoedge:
Okay, thanks a bunch mateorod, it seems like that's the current conclusion.

According to this link list of all evo 4g roms

http://alchemistar.blogspot.com/2010/10/htc-evo-4g-supersonic-custom-roms-list.html

Mazwow seems to be the only one up with 4.1.2, and yes seems it has an output of code not supported by the pdroid 2.0 patcher yet.

JellyBean is still stepping its feet into the doors of many android devs so I assume it's just a matter of time before a 4.1.2 compatible is out, time will tell.
[Android Software/Hacking General [Developers Only]] mateorod:
Okay, I went and cruised the Evo 4g forums, I guess I had your phone confused with the Evo 3D. Mazwoz appears to be based off of Evervolv, which had been able to be patched by AOSP patches until the jump to 4.1.2. A user named poncik is actually working on providing me with what I need to patch Evervolv roms as we speak. So that may be an option at some point in the future.

For now, I would say your best bet is to wait for when your AOKP maintainer updates. It has been almost two months, so I would hope that he may have a new build coming out.

You can also try our regular pdroid patches on either the AOKP build or one of the older Evervolv builds, although I definitely won't guarantee the Evervolv-based roms will have any success. But it is highly likely you could use original Pdroid on the AOKP rom.

I guess some devices just don't have CM or PA roms, which I find suprising, but what can you do?

Good luck and keep your eye on the thread, if poncik has some success (which it looks like he will) we should have evervolv roms next update.
[Android Software/Hacking General [Developers Only]] IlPapu:
Issues patching a JB rom

Hello,

I am trying to patch a JB ROM which is a mix of AOKP, CM, and PA. I have tried both the 2.3 and 2.2.1 autopatchers and with pdroid and pd2.0, but both get the same error:

PATCHING FAILED FOR android/app/ContextImpl$20.smali' !!!

!!! patch error for android/app/ContextImpl$20.smali' !!!

I am very new to this and I am unsure what it is that I am missing. I think it may have something to do with how I set up cygwin in W7.

Any help or pointers is greatly appreciated!
[Android Software/Hacking General [Developers Only]] mateorod:
Several posts above you someone reported success with a PACman rom.

Question: If it is a combo of PA/CM/AOKP, how come every log shows you trying to patch for AOSP?

I would try

./auto_patcher PACman.zip pd2.0 [B]cm[/B]

And then if that doesn't work, sub pa for cm. And if that doesn't work, try aokp.

Then do the same with pdroid instead of pd2.0.

Then you'll know. Look back maybe 10-15 posts, someone just patched that ROM.

Make sense? Let me know, and post logs of your experiments. Hard to know what to recommend with these combo roms.
[Android Software/Hacking General [Developers Only]] dirtyreturn:
http://xdaforums.com/showthread.php?t=1839233

http://goo.im/devs/codenamedroid/stable

http://get.cm/get/4fA

Logs from GSM galaxy nexus. -Latest CodeName Android and CM10 'M2'-

CNA - !!! patch error for android/app/ContextImpl$20.smali' !!!

CM10 - failed with framework.jar

Any Nexus owner have a successful patch of CNA? Did you have to patch it manually? Edit - Not asking for the actual update.zip - Was the patching a thumbs up?

For the CM10 M2 the rom is 20121011_autopatcher had chosen a pdroid patch date of 20121012. For the auto_patcher to work it is

always

required to pick a patch date before the rom date, correct?
[Android Software/Hacking General [Developers Only]] mateorod:
That error with the cm rom is actually related to the smali binaries on the rebuild, not the patching. We have only seen that a couple of other times. Try running it through the patcher again, the other times it has been reported it has gone away. And the patching went fine, so all you need is for it to successfully rebuild.

The CNA rom, as an aside you should only use 'aosp', we don't use aosp-jb anymore. The patcher will determine which aosp patches are best. I know that AOSP looks like the best match for CNA, but did you try the cm patches? I would try those as well, they use a bunch of CM code in that rom.

As for the date matching, yes, the best match is directly before your build date. But those patches actually applied fine, so it isn't a matter of the wrong patches in that instance. We determine the best match based on UTC time stamp- I am not sure why it picked an earlier patch for your rom but that did in fact turn out to be the correct choice.

If the builder of the rom built on the 11th and did not clobber, that affects the time stamp. So that could be a part of it, he perhaps built a test build the day before. I will look at it though. The build date querying has been working really well, but that does NOT mean that is perfect or that my logic in it is flawless. So I will look at your case.

Just so everyone knows, the build date matching was instituted so that people would not have to enter build dates anymore. But you still CAN. Entering a patch date will override the automatic matching, so if you think the patches are the wrong date, go ahead and try an earlier/better match manually.
[Android Software/Hacking General [Developers Only]] mateorod:
Okay. Well those patched well and the smali binary is now working.

I could tell you what is happening, but I don't know how interested you are in the specifics. Basically, we used to delete RILs to get around the method cap. We no longer have to do this with the current builds since Cyanogen merged a commit we submitted.

Anyway, we delete those RILs on older builds that don't have that commit, like yours. The line in the Auto-Patcher code is:

if [ -f patches/$P/$A/$R/$B/{JAR}.sh ]; then
printtask "... apply $JAR.sh ..."
. patches/$P/$A/$R/$B/{JAR}.sh 2>&1 > ${JAR}.log
cat ${JAR}.log | tee -a "$LOG"
fi

You can see that the framework.sh script (the one we use) is present here.

The long and the short of it is, you are using it correctly, the patches are applying fine, but our workaround for the method cap (framework.jar.sh) is not executing for some reason.

You are having this exact problem with each rom. Weird how they haven't updated either rom yet, but I am glad as it has illuminated this problem.

I have checked your rom, though and the script is NOT executing like it should. So we have found a bug. I will fix it and release an update. Thank you for your reports, this is a solvable issue and so when it is released you will be able to patch both of those roms.

Thanks dirtyreturn.
[Android Software/Hacking General [Developers Only]] IlPapu:
Thanks!

mateorod,

Thank you very much for your help! It worked on the first try. I was unsure of which ones to try. I had tried pa and aokp, but for some reason I brainfarted and did not try cm. I attach my successful log. It did mention along the way that there were some issues generating the patch, but in reading previous posts it seems that some of those errors are for features that may be ROM specific. Can you verify this for me?

Thanks again!
[Android Software/Hacking General [Developers Only]] mateorod:
First, let me suggest that you go to the download page and get the latest Auto-Patcher next time. It looks to have worked, but that was a whirlwind update for me (TONS of changes) and I can't exactly remember what changed between 2.2.1 and 2.3.0.

But I wouldn't worry about that now, it looks to have worked in your case. You do have two "provisional" files, which I try not to have to use. The GSMServiceStateTracker is known, and I have seen others need CdmaServiceStateTracker.smali as well. But keep an eye on the performance and let us know at the PDroid2.0 thread if you have any problems. You are in rare company needing both prepatched files, so it is something to observe. For some files we know it works completely (for instance, all the original PDroid provisional files have by now been thoroughly tested) but the pd2.0 ones (except GSMService) are still on probation.

Dirty, if you are using ApG, you can get the fix for your issue now. Thanks for bringing it to my attention. You can also download a copy of the new script here.

I will put out a proper update on our download page later today, but for those of you interested, it really only affects builds from early October and earlier. I want to take another look at the build query and see why it chose the patches it did for you, even though they turned out to be the correct patches.
[Android Software/Hacking General [Developers Only]] Sec0nd:
Failed with Quarx 10.18 Defy+

Unfortunately patching pdroid2 to Quarx CM10 Defy+ 10.18 failed with all of the options (ROM).

I have uploaded only one log.

Please help!
[Android Software/Hacking General [Developers Only]] mateorod:
Quarx is a known problem. Really, the only rom (non-skinned AOSP) we reliably cannot don't patch.

No support is forthcoming at the moment, sorry. You can have him contact me if he is willing, I have seen a bunch of you guys here. But there is no plans to add Quarx from this end. Either he or a user with access to source will need to get involved.

Edit: Oh. and Evervolv. But that is a new problem (week or so old), and hopefully one that will be resolved very soon...
[Android Software/Hacking General [Developers Only]] dirtyreturn:
mateorod -

First three logs are from the CNA rom linked earlier. (1)Log was done after first opening windows app. ApG and letting it sync. (2)Log was done after a resync. Logs(1+2) with aosp-mod. (3)Log CNA with cm patches. (4)Log was a success -- CM10 right off the bat.

Also, please keep the explaining things. And if it

is not

too difficult and you have time available - any chance to give a dumbed down version of what's going on too (as you give the technical response)?
[Android Software/Hacking General [Developers Only]] Sec0nd:
Thank You for Your answer, unfortunately I cannot contact him.
[Android Software/Hacking General [Developers Only]] htrakr:
Deleted
[Android Software/Hacking General [Developers Only]] mateorod:
I will keep my eye on this. Please let us know if you have trouble with 11/2 nightlies people. If I am not mistaken, the first pieces of 4.2 are being rolled out starting now...

edit: I came to look at the logs and the message above was deleted. Was there a mistake made?
[Android Software/Hacking General [Developers Only]] mateorod:
Auto-Patcherv2.3.1 has been uploaded to our download page.

Unless you are trying to patch a rom from before mid-October, there is nothing that you need to rush out and get here. But since there was a mistake for older roms, I had to put out an update.

Improvements include:

Fix for Pdroid patches for older roms

Improved Build Query logic

Minor clean-up

Not a whole lot going on here, I wanted 2.3.0 to last as long as the patches did, but what can you do, I had to take care of the older roms.

I am eyeballing some new mods for the patcher (including some of the evilisto stuff that was requested) but am going to wait until the jump to Android 4.2 is complete, as that is liable to cause us some trouble, as every major update seems to do. But we are having some additions to the team, maintaining-wise, which should make the upgrade process A LOT smoother.

It also appears that CollegeDev may be updating his Pdroid2.0 build patches, so we will try and roll all of that into one update, if we can.

Thanks for the reports/logs everyone.
[Android Software/Hacking General [Developers Only]] yannick56:
Auto-Patcher 2.3.0 does not work with Nexus 7's Android 4.1.x factory firmware

@ mateorod

Hello,

When I try to patch with Auto-Patcher 2.3.0 the Nexus 7's Android 4.1.x factory firmware that I download here developers.google.com/android/nexus/images#nakasi (https), it does not work.

It seems that Auto-Patcher does not recongnize tgz file, only zip.

Direct firmware Nexus 7 tablet download link : dl.google.com/dl/android/aosp/nakasi-jzo54k-factory-973f190e.tgz (https)

I use the following command line to patch :

./auto_patcher nakasi-jzo54k-factory-973f190e.tgz 3gdongle,voice aosp

Can you fix this problem ?

Thanks
[Android Software/Hacking General [Developers Only]] mateorod:
Sorry, we don't support factory image patching, mostly because it varies so much from device to device. For the mods you are trying to use, the best thing is to find a deodexed version of the stock rom and run that through the patcher.

The ability to mod and tweak is what gives custom roms their power. Although I will say that if we were to service stock roms, the Nexus line would be the first in line, for a BUNCH of reasons. But we're not there yet.

You can try one of the several deodexed stock roms, though, they'll work.

We are looking at adding deodexing to the auto-patcher for an upcoming version.
[Android Software/Hacking General [Developers Only]] yannick56:
OK

Can you give me some links for tools to deodexed factory stock roms or links where I can find already deodexed stock roms for Nexus 7 ?

OK

Ok, thanks.
[Android Software/Hacking General [Developers Only]] mateorod:
Normally not even I would go this far...but seeing as you're brand new...and trying some mods I would like to see more users attempt...

Here is a new rom based off 4.1.2, with some supposed 4.2 "goodies"

A stock AOSP build (slightly different than grouper stock)

Here is one I have used myself, based off 4.1.1 stock- this will be mostly indistinguishable from what you have now.

In that forum, you'll see probably 4-5 different versions of the stock rom. They have just been deodexed and put back out there, which essentially means that they are ready for development.

Once 4.2 becomes official, I would be very suprised if someone did not immediately deodex and post the new image in this same forum.

Let us know how it goes,,,
[Android Software/Hacking General [Developers Only]] roobyz:
Rebuild framework.jar Exception

I'm getting this exception, while trying to run:

auto_patcher RootBox-JB-i9100-V3.0.zip pd2.0 aokp​

Based on a prior mention, it appears that there are too many file in that jar? Not sure if there is fix for me to do. Please advise.

... pd2.0 patch date has been set to: 20121020...

/framework/framework.jar

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

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

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!​

It seems to fail on:

java -Xmx512M -jar smali.jar -a 15 tmp/${FILE}.out/smali -o tmp/${FILE}.out/classes.dex >> "$LOG" 2>> "$LOG"​

The log show:

system/framework/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 @0x2a5884 (Landroid/util/SparseArray;->clone()Landroid/util/SparseArray; )​
[Android Software/Hacking General [Developers Only]] mateorod:
Well, the short answer is that your ROM is too old. The pd2.0 patches were just released, and they only work on roms from 10/14 and later. Also, to be able to get the best help, I need your entire log.

But it just so happens that error can only happen on ROMs from before 10/14, or on ROMs where the maintainer hadn't merged upstream since before then.

The long answer to why/how is here.

Also, our patches for pd2.0 only work for 4.1.2, as far as I know. Since there was a big update to 4.1.2 at just that time as that merge from 10/14, I hadn't worried too much about the relatively few roms that fall in between those two events. Any rom from before 10/14 was very likely to have the patches fail to comply. But it looks like your rom is one of the ones where the patches CAN apply, but don't have the commit.

It is actually the first example I have seen of it.

But you are in luck, to an extent. I am working on adding Evervolv support as we speak, thanks to user poncik.

As I am I putting it together, I was just in the process of allowing for folks in just your situation. So while you cannot patch it with the current 2.3.1 patcher, I am going to put out an update tonight (assuming the evervolv builds are correct) that will fix your problem.

If you want to fix it on your own, you can look in some of the earlier pdroid patch folders for a 'framework.jar.sh' and place a copy of that file in the patch folder you are specifically using. I only bring that option up since you have obviously enough experience to dig into the script already.

If that seems too daunting or like too much work, wait until later tonight and I will put out an update with a new set of patches with that done for you.
[Android Software/Hacking General [Developers Only]] roobyz:
Rebuild framework.jar Exception

Thanks for your quick response. :good: Sorry I forgot the log file. I've attached it now.

It looks like my ROM was released on 10/22. My guess is that they may not have synced it before releasing the update.

I'll play with the sh script, while I wait for your update. :D
[Android Software/Hacking General [Developers Only]] mateorod:
Well, as I am putting this together, I did a little research on it, and it looks like AOKP still hasn't merged it. They likely don't understand why it is there, this isn't a problem anyone pulling from Cyanogen will ever approach on their own, most likely.

Although with the extra code AOKP adds and without that commit, they are likely RIGHT up against the method cap.

Thanks for bringing this to my attention. Dropping that script (framework.jar.sh) in the most recent patches/pd2.0/jellybean/aokp/201210* folder will solve it for you all by itself, but I will be putting something out tonight.

I will probably submit a patch to AOKP as well, since it makes our lives easier.