yashsingh1/xdaforums huggingface dataset:
[LG Optimus 2x] mateorod:
No, I will use those files to make new aosp patches as well as make a package for Botbrew. It will remain to be seen if I need to make multiple packages for vibrantmtd depending on the ROM or if I can make one smart enough to detect the ROM. Either way, i will make packages o support multiple roms for vibrant. I will make a cm9 and team gummy package tonight.

Pastime, I will also try and test the aosp patches on some random roms. I am hoping the problem was that the aosp patches I made from maguro were just broken becausee of the repo change.

C-pimp-

I just saw that those gummy files are the ones you posted earlier. I will use them to make a package here in a minute, but let me know if they work when you update. That big repo change is from some time around there, I just am not sure exactly when.

pastime- Pkay, just to be sure, I remade the AOSP patches from the old team gummy builds of c-pimp. But they are the same aosp patches as were already in the folder, the aosp2 patches. I am going to try them on a couple random aosp builds tonight. It is going to be somewhat a crap shoot, as we know there was a big enough repo update that it broke our old patches right around that time. So if it fails, we may have trouble knowing the cause. I will test it, though.

And since I am adding the team gummy package in a little minute, we will probably know if the packages work on recent builds. But we'll see.
[LG Optimus 2x] mateorod:
Okay, vibrant users.

I put together packages to support CM9, AOKP and Team Gummy AOSP builds for the vibrant. Thanks to c-pimp for the vibrant files!

I put a post up in your forums, in cashmundy's thread. I am hoping he could alter the title to let other users that the port for their device is complete, and just about any user can find a rom that has PDroid on the nightlies, no patchers or computers necessary.

I figure if you need support, that would be the place to go.
[LG Optimus 2x] Striatum_bdr:
Hi

I probably misunderstood something, but as this thread does not concern exclusively p990, shouldn't it be in general Android dev section?

It's a huge work you are doing guys, it would be better to give it a better exposition to all community.
[LG Optimus 2x] wooki:
Just a quick question:

i made a smali patch for my i9100 with cm9 mod installed and after installing the patched .zip the pdroid app keeps telling me, that it's not compatible with android 4.0.4.

What did i do wrong?

I guess the app tells me this, when the pdroid framework is not correctly installed or?

Thanks and sorry for my bad english!
[LG Optimus 2x] mateorod:
Wookie-

The zip you need to flash is the pdroid.zip. Did you flash that one?

If so, and it still didn't work, run the patcher again and pastebin the output. I can look at it for you.

pastime1971- I have some changes to the script I would like to add. I changed it on a copy I have, but if you just want to add them to your working copy, that's fine too.

My changes are

Add the -N flag on the patch commands, to automaticallly skip any detected reversed patches, and

Adding rm to the tmp folders and restore.zip on exit. Because if the patching fails, the program exits, but those files remain in the folder. It could cause confusion to to people who might think the entire rom got patched when they see a restore.zip and their rom sitting in the folder, if they don't understand our patcher's output.

One other thought- I think maybe we should add a log output file, for debugging. So if someone like wooki has issues, they could upload the log.file and we could see the issue. Off the top of my head,

patch ... > patch.output

Would do it, but it would be overwritten each time we patched. I will have to look up how to combine all four patch outputs into one document while also keeping the user's output visible. I'll report back with that soon.
[LG Optimus 2x] wooki:
I got it fixed myself! The smali-patch works perfectly! The problem is the .zip file!

If i take the patched files and drop then into the cm9 zip file (replacing the existing files), pdroid works just fine! :)
[LG Optimus 2x] cashmundy:
@mateorod:

I've updated the OP, and I'll go back and see if I can do the title also, but I think this is big news and deserves a new thread, maybe over in Development.

On my cm7 vibrant, I'm not seeing new packages, just the one android-framework-pdroid package. Updated, reinstalled your report, no change. Maybe I need to flash CM9 before I will see the three packages or the CM9 package?
[LG Optimus 2x] mateorod:
Hey, thanks, cashmundy.

Yeah, you're not going to see any packages because of the weirdness with the build.prop. I looked at a cm9 build.prop and it looks like it has sgh-t959 as well. When you upgrade to whichever rom you choose, check it out again and let me know.

I'll let you guys test it out for a little whle, and then we'll look at branching to a new thread. I've subscribed to your thread, so I'll see anything y'all post there, for now.

thanks.
[LG Optimus 2x] cashmundy:
@mateorod:

Ok, I'll try with the CM9 5/10 nightly, then the next new one out.

I put some build.prop info here:

http://xdaforums.com/showpost.php?p=25978832&postcount=351

Let me know if you want another rom looked into.

If I drop out of touch, it is because I bricked. My phone is my only home net access right now.
[LG Optimus 2x] mateorod:
I made it with a cm9 from 5-12, found by searching cm9 vibrantmtd on Google.

If you have any trouble (boot loops, anything) boot into recovery and just reflash the ROM. No need to wipe anything. It is just system apps, so no real damage to even your install.
[LG Optimus 2x] cashmundy:
I've got CM9 running, but still no new PDroid packages. I tried removing and installing your repo, no luck.

There is still no cm7 permission management in CM9.I think we can begin to speculate that the Powers That Be (doing evil as is the new normal) have convinced the cm honchos to quietly drop it... or else...
[LG Optimus 2x] mateorod:
Okay, scratch the edit I just sent you in that pm. I added another cm9 package with the architecture as vibrantmtd. That should be available for you. But please let me know the contents of that botbrew/etc/opkg/arch.conf file.

And for the sanity of others, can we move this to your thread for the time being?

I kept thinking one more message would finish it, and being wrong. let's go to your device forums. Once we get it hammered out, we can decide where we should make a permanent thread for Botbrew/Pdroid + sgh-t959/vibrantmtd discussions...:p
[LG Optimus 2x] pastime1971:
it definitely sounds like an issue w/ updater-script not being able to mount /system on CWM.

could you post a link to that cm9 zip file you used ? (is it nightly?)
[LG Optimus 2x] cashmundy:
Flashed the 5/12 CM9, the -CM9 package showed up and works. Will switch to the other thread now.
[LG Optimus 2x] pastime1971:
updated the pp20120510v03.zip with those changes. (thread first page)

patch will be run with -N option.

most of output (stdout and stderr) will be routed to a log file, named logYYYYMMDDHHMMSS, which can be used for debugging purpose.

temp folder should be removed upon error as well.

edit: did not remove restore.zip yet. will do it next time.

edit: we could change the name of pdroid.zip to pdroidYYYYMMDD.zip (and same for restore.zip) ?
[LG Optimus 2x] wooki:
Yes it is nightly

The CM9 Version i'm using is this one:

http://download.cyanogenmod.com/get...ate-cm-9-20120511-NIGHTLY-galaxys2-signed.zip
[LG Optimus 2x] pastime1971:
thanks.

somehow, galaxys2 uses somewhat different updater-script

...
unmount("/system");
format("ext4", "EMMC", "/dev/block/mmcblk0p9", "0");
mount("ext4", "EMMC", "/dev/block/mmcblk0p9", "/system");
...

because of unmounting /system before formatting, and i am extracting mount-system part from it, updater-script generated never mounts it.

will need a more elaborate update-script generator... :D

edit: fixed the above issue for SGS2, and updated the first page with pp20120510v031.zip (minor update)

any ROM updater could be using different updater-script / update-binary with different command to mount /system (and definitely their partition could be different for every device.) patcher will try its best (simple) job to figure out how to do that. but there is always a chance it could fail. the alternative could be using busybox and rely on fstab, but that would be the last resort. some ROMs don't carry busybox. (in principle linux mount can mount devices if they are in the fstab.)

if pdroid.zip or restore.zip doesn't mount /system correctly under CWM, please let us know with ROM.zip (i only need META-INF/com/google/android/updater-script) and i will try to fix it.
[LG Optimus 2x] cashmundy:
Thanks

Now that the Vibrant discussion has moved and I may be out of this thread, I want to say a final Thanks to pastime1971, c-pimp, mateorod and the other PDroid and BotBrew folks.

Cheers, carry on and Happy Hacking, y'all.
[LG Optimus 2x] mateorod:
Wow, man. You're quick. I saw you already added those edits. I was coming by to tell you I put an edited script in the box, but now no need for it.

I definitely agree we would be better off naming the output zips something distinct. I have already run into problems testing multiple roms. I am mostly tied up during the day today with family stuff, but I will put some time into aosp again tonight. I feel like we can get there, I may need to find an aosp that only needs 32 bit and build myself. We'll see.

Good work diagnosing the galaxy2 problem.
[LG Optimus 2x] wkwkwk:
Hi,

With great pleasure I can confirm the smali patcher worked like a charm with the latest CM9 nightly for i9100.

Thanks for all your work.
[LG Optimus 2x] c-pimp:
Ok, I downloaded aosp Google source 4.0.4r1.2

I hope to build and patch tonight or tomorrow when I'm off work for my bday :-)
[LG Optimus 2x] mateorod:
Thanks for getting back to me.

Oh yeah, you were real clear about giving the proper credit to syvat, I got that. I'm just glad you wrote something to make it available for ICS. I will try compiling it later today, and I'll update this post with the results.
[LG Optimus 2x] mateorod:
Okay, this is where I am so far:

I have PDroid, the app itself, up and running. However, it doesn't appear to be actually blocking the apps from permissions. For example, I blocked OS Monitor from Network Info and System Logs but it still shows both. It says I have the 1.32 app and the 1.27 patch, but since you link to the market version, I don't think that is the problem.

Big steps though. Any advice? I did repo sync before I compiled with the patches which pulled in all the 4.04 stuff from Cyanogen, if that could make a difference. There are a number of changes to the base, although why that would matter I couldn't say.

Thanks for the work making this get this far!

Edit: Jeez, I didn't give hardly any info, did I? Okay. Cm9 Nook Color, only used your CM9 patch. I did the longer set of commands, the ones that let it compile correctly. My directory was in android/system/build but who cares, I guess. Let me know if you need any more info.
[LG Optimus 2x] pastime1971:
if framework was not correctly patched, the app would complain. so, i think it must be working.

could you try to block something else and see if that works ?

edit: ok, i can confirm what you describe on OS Monitor app. honestly, i do not know what "Network Info" means. (you can ask about it in svyat's thread.)

edit: i don't think that it necessarily means PDroid isn't working. i blocked accounts from g+ and g+ can't log in. could you try other settings for other apps ?
[LG Optimus 2x] mateorod:
Hmmm. I tried several before I boosted. Google Maps still finds my location with everything blocked. It asked me to turn on my GPS first, but there I was.

I had a couple other similar situations. What apps are working for you? Google Plus?

I am gonna look and see if I still have PDroid 1.27 in my Titanium Backup records, and try that.

I reread your request more carefully. I will try some apps that need account info. Maybe some permissions are getting blocked and some aren't? Might take me a minute, I need to restore the patched system apps through Botbrew.
[LG Optimus 2x] pastime1971:
also confirm what you describe on google map.

it is alarming that i blocked everything, and mostly it shows that access blocked, but then once in a while it shows a toast saying access allowed. (i'm not sure if it is correct)

well, it could mean that my "porting" is not perfect. LocationManager part is the only thing that i had to improvise when i did the porting.

i will try to do more testing this weekend.

and thank you very much for testing it and sharing it w/ me. (apparently, this needs more testing and debugging)
[LG Optimus 2x] mateorod:
Well no shame in that! You were right upfront with the fact it needed some more testing. I had been looking at working on some Pdroid patch stuff once the app was upgraded for ICS and the fact that some work towards that end has been accomplished makes me hopeful its coming. I will keep an eye on this and will keep trying the progress.
[LG Optimus 2x] pastime1971:
g map does show the location, but it doesn't find it. swipe the map and press the top right button, and it doesn't center it to the current location. g map complains and says something about "to enable my location setting..." does g map remember its last location ? compass does work (i guess that is normal)

edit: just checked the logcat. with location blocked, gps is not accessed (i don't see any of D/gps_BRCM) after unblocking it, map accesses gps constantly. it is as if map remembers the last known location. i will keep it blocked, and see if the location changes tomorrow when i'm at work...
[LG Optimus 2x] mateorod:
I am having trouble removing the patch from my build following your remove instructions. As I go through the commands it reads "not removing /privacy" after the frameworks step.

My build keeps breaking with a make error 41, with all of the printed errors relating to a privacy file. When I went back through the steps again, it still said not removing privacy, but then said no projects were using branch Pdroid.

Is is completely removed and the problem on cyanogen's aide, do you think?

I could make clobber, but that takes forever on the virtual machine I am using. Just wondering if there was a step that got rid of /privacy as well,
[LG Optimus 2x] pastime1971:
you probably need to do "make clobber" once you remove pdroid from your build.

otherwise, intermediate files will still remain in out folder. (i was told that in many cases, you need to make clobber on ICS)

edit: updates on G-MAP. it looks like GMAP also gets the location from wifi. i don't know the detail but wifi part is separate from the network location (which is cellular ?) i am going to ask svyat about it.

also see http://xdaforums.com/showpost.php?p=24182055&postcount=1109
[LG Optimus 2x] temasek:
Source still v1.27. :(
[LG Optimus 2x] pastime1971:
yeah, i just sent him a pm.
[LG Optimus 2x] pastime1971:
whenever launching google map, events logcat shows

I/am_create_task( 1294): 19
I/am_create_activity( 1294): [1098351576,19,com.google.android.apps.maps/com.google.android.maps.MapsActivity,android.intent.action.MAIN,NULL,NULL,270532608]
I/am_pause_activity( 1294): [1096930672,com.cyanogenmod.trebuchet/.Launcher]
I/binder_sample( 1883): [android.app.IActivityManager,3,119,com.cyanogenmod.trebuchet,23]
I/am_on_paused_called( 1883): com.cyanogenmod.trebuchet.Launcher
I/am_restart_activity( 1294): [1098351576,19,com.google.android.apps.maps/com.google.android.maps.MapsActivity]
I/am_on_resume_called( 9767): com.google.android.maps.MapsActivity
I/binder_sample( 1883): [android.app.IActivityManager,19,166,com.cyanogenmod.trebuchet,33]
I/activity_launch_time( 1294): [1098351576,com.google.android.apps.maps/com.google.android.maps.MapsActivity,230,230]
I/binder_sample( 9767): [android.view.IWindowSession,10,17,com.google.android.apps.maps,3]
I/google_http_request( 9767): [228,200,Mozilla/5.0 (Linux; U; Android 4.0.3; en-us; LG-P990 Build/GRJ22) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30,1]
I/google_http_request( 9767): [238,200,Mozilla/5.0 (Linux; U; Android 4.0.3; en-us; LG-P990 Build/GRJ22) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30,1]
I/wifi_event_handled( 1294): 131144
I/wifi_event_handled( 1294): 131085
I/wifi_event_handled( 1294): 131149
I/wifi_event_handled( 1294): 131144
I/wifi_event_handled( 1294): 131085
I/wifi_event_handled( 1294): 131149
I/google_http_request( 9767): [254,200,Mozilla/5.0 (Linux; U; Android 4.0.3; en-us; LG-P990 Build/GRJ22) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30,1]
I/google_http_request( 9767): [98,200,Mozilla/5.0 (Linux; U; Android 4.0.3; en-us; LG-P990 Build/GRJ22) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30,1]
I/google_http_request( 9767): [204,200,Mozilla/5.0 (Linux; U; Android 4.0.3; en-us; LG-P990 Build/GRJ22) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30,1]

why does GMAP send http request ?
[LG Optimus 2x] pastime1971:
http://androidforums.com/samsung-i7500/9257-using-wireless-networks-location.html

edit: also read http://money.cnn.com/2011/11/15/technology/google_wifi/index.htm
[LG Optimus 2x] mateorod:
man, stuff like this is why I would like to have Pdroid working 100%. I used Pdroid in conjunction with Droid wall, and the amount of packets going through the Google apps is pretty staggering. I am pretty sure that maps couldn't get a fix on my position at all when fully blocked with Pdroid in cm7, though I can't swear to that.

I think maps is logging in your Google account. The integrated search history and all that. That's why I never signed up for +. They tie any and all info going through any of their services to create profile and preference history, the better to sell you stuff. The http is probably an auto-logging done through your ics setup info.
[LG Optimus 2x] pastime1971:
you may be right.

the current implementation seems to cause some exceptions mostly about privacy settings.db. so, there could be a leak. maybe that is why it is not 100% working.

if that is the case, we need more devs to look at the code. (my implementation probably isn't perfect.)

edit:

this is my guess. so maybe not true.

another possibility is that GMAP works around the Network Location Manager by communicating with its server. it may trace ip routes and determine the location.
[LG Optimus 2x] pastime1971:
:) pdroid patch source updated to 1.32. (see svyat's thread of change log)
[LG Optimus 2x] pastime1971:
confirmed that PDroid blocks google map correctly on CM7.2

the following could be why it leaks on CM9.0

E/PrivacyPersistenceAdapter( 1656): getSettings - failed to get settings for package: com.google.android.apps.maps

edit: i see the same behavior on CM7.2. see post 41
[LG Optimus 2x] wkwkwk:
in CM9 on i9100 it seems to block location properly in Google Maps.

At least if I set in droid random (or custom) values, GMaps shows the value I've put in PDroid.

Any way I can test this more thoroughly?
[LG Optimus 2x] mateorod:
Interesting. I have been thinking about this some and may betray my lack of knowledge about how PDroid works, but anyway...

I know that for the Nook, our kernel is still under development and, for instance, in CM9 NAT is not pre- configured. That means that things like Proxy grabber doesn't work, and Droid wall doesn't work.

Does your device have a stock ICS ROM? Every device is at a different stage of development. I am rebuilding my kernel today and am going to try and enable the above apps. If they work, I will give this another try.

Also, I think there is some incomplete info in your patch removal steps. After abandoned the branch, like I said, the /privacy was shown as not removed. And when I clobbered and tried to re-repo sync, the repo complained of error reading objects (the objects had names that looked like MD5 sums). The repo sync competed, but clean builds would still fail, with an error 41 with the bug notes referencing the privacy stuff.

Could just be me, but I had to redo my whole build environment. Next time you remove the patches, let me know if you're successful when you next build.
[LG Optimus 2x] pastime1971:
you are right. frameworks/base/privacy/ directory still remains after "git clean -f"

it will have to be "git clean -df"
[LG Optimus 2x] xd4d3v:
Hi Mateorod.

I have a nexus S with CM9 and try your process.

should it work?

I added the repository but can't find the android framework packages.
[LG Optimus 2x] mateorod:
Sorry, no, every device has to be added by hand. If you have access to a Linux environment, you can use the auto-patcher on the fourth post of this thread.

If not, you can post your services, core and framework.jar (and build.prop) on my packages thread and I can add your ROM to Botbrew support.

Just let us know.

Pastime I am pretty sure I have functioning patches for 1.3.2 for cm7 now. I have put together a couple Botbrew packages and the patches have succeeded in some pretty wildly different builds. You want to think about adding that to the patcher?

I don't see how it could hurt, and I don't look at it taking too much extra effort.

if `getprop ro.cm.version | grep -qvF 7.2.0`; then

And then the cm7.2 patches. we could just nest it after the rommanager prop check, you know?

Let me know what you think. I know the priority is ICS, but I am still kind of waiting on the AOSP builds. I know c-pimp will come up with one at one point. I know you put out commits, do you have any contacts you could see if they would pump us out a patched build as well?
[LG Optimus 2x] c-pimp:
had a few build errors already, changed some stuff around, and cleaned up... making a crespo 4.04r_1.2 build right now and its been building for a couple minutes so thats better, im going out for my bday dinner right now... hopefully this build runs all the way thru.

Im hoping that this will work for samsung builds that are similar because the slim rom base is for :

Galaxy Nexus - I9250

Nexus S - I9020A/T, I9023

Nexus S 4G

Samsung Galaxy S II - I9100

Samsung Galaxy S - I9000

Samsung Captivate - I897

Samsung Vibrant - T959

and I believe compiled from either maguro or crespo... we shall see what happens when I get back tonight.. wish me luck ;)

Stupid errors and not enough time, IM grabbing 4.03 and trying that to see if it works out better until I can figure out what to change.. I tried removing -Werror that i read quickly about but that didn't work out for me
[LG Optimus 2x] cashmundy:
@c-pimp: good luck and happy birthday :)
[LG Optimus 2x] mateorod:
+1

Also

I have tried to farm out the Botbrew stuff to device-specific threads to keep this one under control and focused on the patcher.

But if anyone is using Botbrew to port PDroid to their device, there was a significant change to the CM repo last night and there is a pretty good possibility that the PDroid packages are about to go out of date.

If you have trouble after installing a package with Botbrew, simply reflash your rom and drop me a pm or post in my packages thread with the pertinent info and I will update the repo for you.

Thanks.

edit: requests to add devices can be done at the above link as well.
[LG Optimus 2x] c-pimp:
Maguro Aosp build completed from source, here is the unpatched files.
[LG Optimus 2x] c-pimp:
patched version here.

hopefully this can help us some more with AOSP where its failing with the serverthread.... let me know if you need anything else ;)

thanks for the happy bday wishes too ;)