yashsingh1/xdaforums huggingface dataset:
[LG Optimus 2x] mateorod:
Yeah, I didn't see that. I will do it tonight.

Update: Okay, the patches worked for that. I feel quite confident that any CM9 rom can have PDroid at this point. If you want PDroid for CM9, you can apply the patches yourselves, or I can do it for you. I have been pretty busy, but plan to try and put that patcher together over the next few days.

c-pimp- I patched your Samsung SGH-T959 files, and then made a package for Botbrew based on the build.prop. The directions for Botbrew are here, but it's simple.

Get Botbrew, free from Google Play, and launch it.

Install package repository-mateorod and press the refresh packages button at top right.

Install the android-framework-pdroid package (the info should say architecture= SGH-T959

Reboot.

Anytime you flash a new nightly, just launch Botbrew and it will automatically prompt you to repair the package. Do so and reboot.

At one point the package will break due to changes in the CM repo. We can replace them then by one of us patching the files again (we should have an automatic patcher by then, if I am up to the task!)
[LG Optimus 2x] c-pimp:
Thanks mateorod, those cm 9 files are from a cm9 Kang, currently cm9 was pulled yet again for the vibrant due to e911 issues that hope to be resolved but in the event they stop working with future releases I will be able to get a new one to you or hopefully be able to patch and help maintain on botbrew :-)
[LG Optimus 2x] romracer:
Sorry I haven't read this whole thread, but I have used PDroid for a long time. I came across this thread through the PDroid thread and noticed your smali patches a few pages back.

If you were to remove the .line statements from the source, it would be a lot easier to produce the smali patches. Many of the changes are just ".line" statements which are debug only (its where the :XXX line number bit comes from after each .java file in a stack trace).

baksmali will remove these if you use the "-b" switch (baksmali -b -a 15 -o smali classes.dex). You can also use sed if you prefer, which is how the PDroid Linux and Windows patchers do it.

Anyway, I'm in the process of applying those patches by hand to my Skyrocket 4.0.3 ROM and will let you know how it goes.
[LG Optimus 2x] mateorod:
Yeah, those were just quick proof-of-concept patches. Just making sure they work. The current patches I have are used with the smali binaries again instead of apktool, and have a lot of those useless changes weeded out. Not all, though. I've mostly been trying to get the PDroid patches to work on AOSP and AOKP roms. Hasn't happened yet, though. I still have a bunch to learn about this stuff.

However, I did it within diff itself, banging together the regular expressions. I didn't know the baksmali binaries would do that themselves. I'm going to try that today. Thanks!

Edit: Oh man. That was useful. Way better than slapping in regular expressions and then debugging that to make sure I didn't break the patch. Thanks Romracer,for real. Let me know if you want the updated patches, made with just the binaries.
[LG Optimus 2x] romracer:
Glad it helped :) Sure, if you have them somewhere I can grab 'em. I'm slogging through framework now with the previous set.
[LG Optimus 2x] mateorod:
Oh yeah, no problem. I added the prebuilt preloaded classes file as well. It seems to be stable and transers between roms with no problems I can see.

I just tested these patches on c-pimps AOKP for the vibrant and there were only two files that had any issues, the

/com/android/server/ServerThread.smali (115/116 failed) in the services.jar and

5 out of 6 hunks FAILED -- saving rejects to android/os/Looper.smali in the framework.jar.

It's the ServerThread that has the substantive stuff, though. But anyway, these should be much easier on you!

A little TLC to those files and we may be a lot closer to a wider patch. Let us know how it goes romracer, thanks for your help!

Edit-@pastime- Just tested these on a couple other ROMS users had sent me. Core has been fine, and now framework has succeeded completely on all except the five hunk in Looper on c-pimps (which is probably acceptable for now). The only problem is the ServerThread in the services.jar, which I will give individual attention to tonight. So we should be at wide patching, I would think, sometime in the next 24 hours.
[LG Optimus 2x] c-pimp:
Woot this sounds like fun stuff!

Meteorod for the life of me I can't get botbrew to show Android framework pdroid in the list of packages and I clicked refresh and tried a bunch of stuff.. even uninstall and retried ... I know it shouldnt be this difficult...
[LG Optimus 2x] mateorod:
@c-pimp- You should be good. I sent you a pm awhile ago. The server was down through the host, but everything is back up now.

@fragargon Hey, i have seen you're still monitoring the thread. I put up a package for bravo in the Botbrew repo. Would you test it for me? (That was you, with bravo, right? ...so hard...to...remember)

It's REAL close, if not already working. The directions are the same as the ones here.

The only problem we're having with the patches is the ServerThread in the services.jar. Most of the code for PDroid itself from that file is in, though. The missed changes are internal android stuff.

I went through the hunks and really the code is just different from CM. I have a dirty hacker trick I can try next (:eek:), but I thought I would see how it goes with a basically stock ServerThread file. I have a feeling it will actually work as is. But we'll see.

Let me know. If PDroid doesn't work, then we can try the other trick.

I could force the hunks, but I would be changing a lot. If I was going to do that, I may as well just swap out the file entirely...
[LG Optimus 2x] fragargon:
tested

Hi mateorod,

Yep i m monitoring, i got a busy WE, still on vm... didn t gabe up. And yes it was me on bravo running ics Aosp. Will instal botbrew and give a shot.

Thks

edit 1: hi, I installed patched framework through botbrew. well i can say that botbrew does its job and framework files has been changed.

I check this with ghost commander (some root explorer) and noticed that when rebbotin "app optimatition runing"

however when i launch Pdroid, the app says that is not currently supported with ICS.

well i would say thatat least it s running fine with framewotk files moded.

I will try to grab some logcat about Pdroid launchin... maybe there would be some revelant thing.

edit 2: here a logcat from an app (actually adb on device is broken...)

i looked to this, got a lot of privacy...
[LG Optimus 2x] mateorod:
Hey, thanks fragargon.

So our problem is just that ServerThread file. Looking at the logcat (something I don't do a lot) it seems like the PrivacyManager won't function without that file integrated into the process. I believe a bunch of info goes through it no matter if we're modding or not.

Like I said before, I looked into the changes needed and the code is just different in these than in the Cyanogen. The amount of context I gave the patch didn't help because the context just flat-out doesn't match, no matter how large.

So...I made a new package for you to try, should you be willing.

I have swapped a CM9 PDroid-enabled ServerThread for the stock one. It compiled, which it wouldn't have had the necessary values been inconsistent. I have updated your package, so all you need to do to test is upgrade the package and reboot. If you've already uninstalled the android-framework-pdroid, just install it like before- Botbrew will automatically install the latest package.

Just so You Know: This is kind of dicey, a dirty hack, as pastime has said. Now, at worst case, it is just a non-functioning app, nothing in your read-only memory is being affected. But it may boot-loop you and need a reflash. If you aren't comfortable with that, no worries.

Having said that, I don't consider it any riskier than the testing you've already done.

Thanks fragargon!
[LG Optimus 2x] c-pimp:
materod I'll get you those slim files tonight, I'm waiting on a call so I don't want to test installing cm9 just yet, later tonight as I get you the files from slim I'll be testing and give you input :-)
[LG Optimus 2x] fragargon:
thanks

hi Mateorod,

yep that s right... there was a already a bunch of info, nothing about the moded pacth except those with privacy blablabla...

well don't worry mate, i m a experinced noob :D

i know what i m doing whilst i m not dev... still a techie.

framework are still there, gonna update those file and see. at worst i would flash back the rom or the nand backup that s all... hope not.

(off topic/ busy with linux and build env. hope i would be able to do something; still learning)

thanks a lot

edit 1: i updated the framework - I reboot and wipe dalvik and cache through recovery - rebooted fine - optimation app until the last app and then .... poooffff... bootloop.

I will flash back the rom - 5 min it would be back on work
[LG Optimus 2x] mateorod:
Ha! Yeah, I just had a little less hope than usual about its prospects...seemed gentlemanly to be upfront about that!

Okay, well it was kind of a long shot. I should know better than to rest my hopes on the easy way by now.

c-pimp, this obviously doesn't bode super well for the package you have, either, so no need to rush the test. I'd like to see how it goes, but feel free to do it when your schedule lightens up.

I could keep learning about the ServerThread, but our best idea might just be to have fragargon go about getting his build system up and wait until he can build a Pdroid-ed ROM. I don't know what problems syvat is encountering building his ICS patch, but I bet he is rewriting this portion of PDroid functionality at minimum.

Considering the margin of success we've had (pretty wide, really. PDroid works great on a bunch of ICS-powered devices now) this is really the last hurdle to wide-patching for 1.3.2. I just read the last several pages of his OP for the first time in months, and it looks like he isn't too worried about the number of bugs people have had patching gingerbread with the latest patcher. I bet he has a 1.3.3, 1.4.0 or even 2.0.0 in the pipeline. Why debug 1.3.2 if the whole process is going to change?

I have the framework of a patcher sketched out, but that's about it. I will tinker with both of these problems on and off. But as it seems the official patcher for ICS is truly on the horizon, I don't know how much incentive I have to spend the time truly banging on it.

The patch itself is as perfect for CM9 as I think I can make it. If anyone thinks it is worth it, I can keep going, I suppose. I was asked to provide a smali patch, and that much we have. It could service more ROMs, but that's where we are.

Unless anyone disagrees?

I will continue to maintain the Botbrew packages, either way. I believe in that process regardless of how the system apps are generated. If anyone has a device they would like added to the repo, I would be happy to do that. If you are on a device and the package breaks due to CM update, just let me know and I will fix it ASAP.

@pastime- What do you think? Do you have any investment in putting out the CM9 auto-patcher? The directions and files I use to make it were spelled out to (EDIT): romracer several days ago. I don't do a bunch of script writing, so while it can be done, it would take me some time. Most of what I have done is make and test the patch, so there would be some learning necessary for me to finish it. If you or someone else knows how, we can keep going.

It's not that I am unwilling, more like I fear we'd spend the time and then release a 1.3.2 CM9 patcher a day before svyat released a wide-patcher for 1.5 or something :p
[LG Optimus 2x] pastime1971:
i will say we make an auto-patcher, put it out, let people test it, and see what happens. (who knows how long it will take svyat to publish a working ICS patcher.)

i can/will do the scripting (based on svyat's original linux patcher 1.27). it shouldn't be a big deal for me, except i won't be able to find a time to do that until weekends. (let me try it this weekend...:))

edit: i guess people in svyat's original thread are accustomed to "smali patcher", and that's what they expect.

that was why the "source code patch" wasn't too popular in my opinion. (vast of people download ROM and apply smali patcher, rather than build it themselves.) i'm sure svyat will continue that, once he gets his patch working (and to be tested every ROM out there eventually)

the idea of having Botbrew do it for users is very attractive, while it is a burden to the maintainer (even with some sort of automation), especially when CM9 is still in its early development stage and not many devices have a stable nightly. (nook community is very lucky to have you !)
[LG Optimus 2x] tonyp:
Yes it is! And he is putting a hell of an effort into it, thanks for that!

I love my nook, just wish the hwa would work (we know that from the 2x hehe). I'm jealous of my gf's desire which runs ics really fine with hwa hehe.

And does syvat answer to PMs? If he doesn't I got his mail address and could ping him about the status of his cm9 patcher. :)
[LG Optimus 2x] mateorod:
I am actually glad to hear it. I wasn't sure what the consensus was. I'll keep seeing what I can do about the ServerThread on and off over the week. If there is no traction on getting it patched we can just go ahead with what we have.

@pastime- you want me to set us up with a dropbox folder? I'll just put everything we need in it, plus there are some procedural command stuff I can layout for you to look at whenever your schedule allows. If that sounds like something you'd like to do, just pm me your email address.
[LG Optimus 2x] pastime1971:
yeah, that would be great !

will do.
[LG Optimus 2x] fragargon:
hi,

I agree with above post, whilst a did not do anything but read the thread. it represent lot hours of hard work. glad to read what about.

/off topic - linux build env is running... now learning git and repo and te way it goes... soon framework would be patch :D )
[LG Optimus 2x] c-pimp:
slim

Okay, here are the slim files...

3.2 is more basic and 3.5 has more features that may or may not make a difference but see if you can patch either of them when you have time

Thanks so much again!

I have also included the actual cm9 nightly files and not the kang one I posted before...

like i said in pm for whatever reason botbrew didnt show the package and when I tried to load manually it said diff architectures...

If you need anymore info let me know, I have my build env setup but still learning.... I compiled akop from source but was unable to apply the patches from pasttime for asop but im probably doing something wrong, they didnt patch...
[LG Optimus 2x] pastime1971:
good luck, fragaron, and have fun :D
[LG Optimus 2x] mateorod:
+1 for real.

Plus, if you get a pdroid-enabled build up, it wouldn't be any problem to throw the patches for that in the auto-patcher oss in a getprop filter and we could have several patch sets in there. It could patch all roms-in-one if we can get the right builds to generate the patches.

Did you copy/paste pastime's patch commands? One thing that is different for a lot of folk's build environment is that they house the source in android/system instead of just android like pastime does.

I know that is what the walkthroughs we have recommend. What is your out directory after you build, as in where was your zip? Mine is in android/system/out/product/target/encore. Maybe you were patching the wrong directory.

Most of those patches will apply for sure. Since I can patch your rom 99% from ours, I know most of those hunks should succeed, if not all.

I pm'd you with the details for the cm9 build. I will do the slimrom sometime in the next 24 hours.

And pastime, you should have gotten an invite to a dropbox folder, so just whenever you have time this weekend, take a peek.
[LG Optimus 2x] pastime1971:
will do !
[LG Optimus 2x] pastime1971:
AOKP is based on CM, if i'm not mistaken. try using CM patch, not AOSP.

nevertheless, there is no significant difference between those two patches. (just a little bit in build.diff, and i think after 4.0.4 they are almost identical.)

let us know if you have any question, or problem.
[LG Optimus 2x] mateorod:
c-pimp

You ahould already have direct links for the CM9 patched Botbrew package. Here is a zip of patched system.jars for the 3.2 slim rom files. I haven't done the 3.5 yet, but let's test this first. We're having the same ServerThread issue as before, plus you also have the Looper problem I saw one other time.

Now you have a different situation in that I had patched CM9 versions of those files on hand. I swapped those in as opposed to a foreign file, maybe it will make a difference. Although I am not too too hopeful about that, it is a better chance than others have had.

Now I know the CM9 files patched correctly. Let me know if any problems arose with those.

Good Luck!

Edit: I am going to look at these for a few more minutes before I decide whether to have you try them or not...sorry for the tease

Eedit: Okay i am going to leave them up. I just found something to look into.

and EEEdit: Okay, I know you're having trouble with the packages. The idea behind Botbrew is to make things easier, not harder, but that hasn't been true in your case.

I am attaching patched system files and you can swap them in and flash them if you so choose. If you ever want to grab a logcat when you're messing with Botbrew, we can try and debug the issue, either way. These files patched so I have every expectation that they will work for you.

Thanks for your patience with it.
[LG Optimus 2x] c-pimp:
screenshots

here is the screenshots of my botbrew install and attempts...

the patched files work fine when manually dropping them in cm9... slim fails after reboot with fixing permissions...

hopefully I can try to get akop patched this weekend, I will rebuild the source if I cant figure out what im doing wrong and start from square one...

slim does not work as I stated in pm...
[LG Optimus 2x] c-pimp:
Pasttime should I use the aosp patch with aokp? I was having trouble patching the aokp from source...
[LG Optimus 2x] pastime1971:
try CM one. AOKP is based on CM if i'm not mistaken.

and also, there is almost no difference between AOSP patch and CM patch. (a little in build.diff maybe.)

when you apply patches by "patch -p1 < frameworks.diff" or similar (depending on which method you are using from the post #1), do you get any error message ?

which device are you building it for ?

edit: i just tried patching AOKP w/ CM9 patches, and it seems to go fine. which device are you building ? i will try to build AOKP for that device w/ PDroid.

edit: is it vibrantmtd ?
[LG Optimus 2x] mateorod:
C-pimp-

When you apply a patch, try redirecting the output to a text file, maybe pastime or I could see what is going on.

When you enter in the posted patch commands, I think you just have to direct the output, so just append

> build.output.diff

With spaces before and after the greater than symbol.

If it worked correctly, you won't have any output in your terminal, but a build.output.diff file will be in your working directory (whatever directory is after the cd in the patch command in your case, I believe.)

Another thing I mentioned before, but make sure, if you are typing the commands exactly as pastime has written them, to double check your build root directory.

Pastime has ~/android/, while mine is ~/android/system/

Wherever you are in the file system when you repo sync, that should go before build, framework, libcore in the patch commands.
[LG Optimus 2x] c-pimp:
Thanks, I'll play more with it, yeah I noticed his was diff than mine and I added /Android/system I'll get output this time tho

---------- Post added at 07:38 PM ---------- Previous post was at 06:51 PM ----------

yes it is vibrantmtd ;)

I believe I just patched the proper files and even used the aosp patches before I read this post...but not sure on the last part

brunch <Device Target>

do I have to mount the device filesystem and install like that ? because I cant figure out how to get the device target, Linux File-cd Gadget it shows up as under computer unless I mount, otherwise I cant figure where the device target should be... also this is vm if it makes any difference.

forgive my noobness lol, im just trying to get my head around what Im actually doing and what is actually happening when I issue a command. my linux knowledge is pretty much zero but I have used it before and used the commandline but never done much.
[LG Optimus 2x] mateorod:
Brunch device means just your device name. For instance, the nook is device encore, so I type brunch encore.

Edit: the only time you need your device connected is when you download the proprietary files and get the prebuilt apps, should you need to.

Perhaps this sgh-t959/vibrantmd is the root of our architecture problems as well. Everything else about your screenshots looked correct.

If either of you get a Pdroid build together for aokp, please PLEASE, immediately build a non-pdroid patched build of the same source without a repo sync in-between so I can make the patch wider. If we get this and possibly aosp done, we should be able to wide patch.

I could find a nightly, but with the way commits are scattered throughout the day, superfluous changes would doubtlessly worm their way into the patch.

Incidentally, I believe another way to undo the patches would be to just insert an -R option flag into the original patch commands? Or do you still need to clobber?

I'm second guessing myself. I don't have a bunch of build experience. Maybe stick with what pastime has up for these important builds.
[LG Optimus 2x] c-pimp:
Okay im trying to figure out what your saying, I just did brunch vibrantmtd

before patching anything I built the aokp from source and have my output aokp zip file, would that work for the non pdroid patched build or do I need to make another after I have figured out that it works with pdroid that is missing the patches... just a bit confused.... but it looks like pasttime was building aokp from source to do some testing with this himself so he will probably beat me to it... I have a wedding to attend tonight...
[LG Optimus 2x] mateorod:
If you didn't repo sync a second time, the first zip will be perfect. If you left it in the out folder, you should make a copy and secure it elsewhere, as your current build will overwrite the zip near the end of the process. Which should be pretty soon, really.

There is no change to your brunch command. If it was vibrantmtd before, it will still be now.

If you get a chance, post both (Pdroid and non) system file sets, but either way, congratulations.

The Cyanogen maintainer for the Nook Color and Tablet is known as fattire. Sharp guy, and he says your first successful build makes you a certified android ninja.

Just a little something to get you in good with the ladies tonight. They love ninjas. (Just don't tell 'em what kind, though).
[LG Optimus 2x] pastime1971:
@ mateorod,

it looks like AOKP repo includes all the necessary proprietary libs under vendor/samsung/vibrantmtd

@ c-pimp,

therefore, there is no need to connect phone. just do "brunch aokp_vibrantmtd-userdebug" (it may be possible to do just "brunch vibrantmtd")

@ mateorod,

it is possible to do "patch -R ..." to revert. what i am

not

sure is how git behaves, as i am not too familiar with git yet.

edit: hmmm. brunch aokp_vibrantmtd (or vibrantmtd) doesn't work... does AOKP support vibrantmtd yet ?

edit: it looks like it should. even there is vendor/aokp/products/vibrantmtd.mk (how different is AOKP building from CM ???)