yashsingh1/xdaforums huggingface dataset:
[LG Optimus 2x] mateorod:
Since I know some people still end up at this thread, and because this thread was such a big part of keeping PDroid alive, I wanted to let people know that I have pushed all the build patches from the OP to the OpenPdroid github page.

The patches are the same, except they have all been remade to apply in a standard manner. The directions are on each branches README (branches are by Android version and are occasionally split between AOSP and CM/custom) and follow the directions given by pastime1971 on the OP of this thread.

I also found, rebuilt, and pushed svyat's original PDroid framework commit history, so I think I have pretty much got the whole project preserved under one repo.

Thanks to everyone who worked with us; the list is long.

Here is my post on the OpenPDroid thread, with links to our repos.
[LG Optimus 2x] temasek:
Kudos mateo!
[LG Optimus 2x] kulanavhiea:
Absolutely noob,blind,confuse

I'm absolutely blind with this methods,how to compile bla bla bla, what software i need, where to do it, etc. etc etc,i'm very appreciate if there anyone could give me clue or instruction to do this. Btw i use [4.1.2][P7300/P7310] AOSP Android 4.1.2 [27-02-2013][DISCONTINUED] for Gtab 8.9 p7300. thanks,sory my english.
[LG Optimus 2x] SREEPRAJAY:
my friend,

this thread is for P990 Optimus P990. I see that this device is not listed and maybe you posted in the wrong section.

Post in the thread for P7300

Thanks
[LG Optimus 2x] kulanavhiea:
Ouch, I think its will work for another ics rom too..
[LG Optimus 2x] SREEPRAJAY:
maybe....not sure though

but, PM the thread owner and he may help you in that case.
[LG Optimus 2x] kulanavhiea:
Ok thanks for advice, i reach into this thread because i follow it from here : http://xdaforums.com/showthread.php?t=1719408
[LG Optimus 2x] nanerasingh:
Pdriod flasahble zip for mi2s millet

I wan pdriod flasher for my mi2s millet mobile,

i am nube,if some one can teach me how to do,root,patch,etc
[LG Optimus 2x] karamelos:
For root look in your sub forum devices

For openpdroid go to auto patcher thread it's simply way

For compiled patch ( with source) look CyanogenMod wiki and search your device

Use search functionality in xda forum all rtfm link is here
[LG Optimus 2x] nanerasingh:
thanks for reply, as said i am nube,i only can able to use recovery, backup,restore,rom.

if you guide me by snapshot procedure, i will be very thankfull to you.

as i seen some requirements of rom is deodexed. how to knoe,if my rom is odexed then is it possible to make pdriod patch
[LG Optimus 2x] mateorod:
hi friends ;)

Google I/O for 2021 promises improved tooling for permission blocking. Still playing catch-up to PDroid and descendants ;)

This thread changed my life, I cannot stress that enough.

Pastime1971, I owe you a drink someday. Hopefully all your career goals came true.

~ Mateo
[LG Optimus 2x] pastime1971:
confirmed it, which brings me back to thinking that maybe there is a leak in pdroid.

i enabled a bunch of Log to see if so, but didn't find anything indicating maps directly accessed the real location manager... :mad:

for the moment, i am clueless...
[LG Optimus 2x] pastime1971:
an interesting read on network location service, http://bigbrothermobile.com/blog/?tag=httpmobilemaps-clients-google-comglmmmap or more on the topic at

http://bigbrothermobile.com/blog/?cat=4

this post http://bigbrothermobile.com/blog/?p=163 implies that google map network location service is not same as network location permission. it is built-in inside maps app. (therefore, pdroid can't block it.) however, it seems to comply to the system setting about whether to use network location or not.

it sounds like android network location permission is less privacy invading (probably because its source is open) whereas google map network location service does whatever it wants to do behind its binary.

edit: my conclusion of pdroid and google map is that it is

normal

that pdroid can't block gmaps.

edit: i will move on to the next test subject, OS monitor.
[LG Optimus 2x] pastime1971:
what was the issue with OS monitor ? system log ?

edit:

@ mateorod, what was it about OS monitor ?

i restored CM7.2 with PDroid 1.27, installed OS monitor, blocked all 3 permissions including system log, and it still showed log messages. never showed permission toast.
[LG Optimus 2x] mateorod:
Hmm. When I tested it the first time, my memory was that it didn't show those logs in cm7. I checked some things in cm7, and then went to cm9 and checked again. When I found the hole in Google maps, I figured there was a larger problem and so I came back and reported my findings to you. It is more than possible I was mistaken.

I had to leave off testing, because most of my testing time has been eaten up by a package manager Botbrew I have been working on. One of the packages I run every night modifies the services.jar, which incapacitated PDroid. With the new services.jar in, Pdroid spit out the "not updated for ICS" message. If this is suprising to you, let me say it could have been a user error by me, but since I work with Botbrew just about hourly, I had to remove PDroid from my source.

I tell you what, though. I will recompile a PDroid enabled ROM tomorrow and give it a good bit of my day. I want to give back to your work as I very much appreciate it. I reread my last post here and it comes off as slightly entitled, which was not what I intended. I was just actually confused about where the port stood.:p

I'll run some permission blocks through cm7 and then again in cm9 and report back.

Is there a way to put the pk8 package directly in a completed build? And what exactly was the problems you had with the smali edits? I edit system apps on a pretty regular basis and would be willing to try it out, but if the .jar files were wildly different and you couldn't find where to edit or something, then maybe this is a different story.
[LG Optimus 2x] tonyp:
Hm I'm not exactly sure here - it does work in CM7.2 (for me and temasek at least).

You can't block the wifi location detection but as soon as you've switched that off Gmaps is unable to find the location. I haven't tested it wih CM9 but I think you wrote that it will find your location even after disabling the wifi feature?

Assuming you blocked GPS and network location within PDroid of course.
[LG Optimus 2x] pastime1971:
@ mateorod,

i am nothing but grateful to all your effort/input/participation.

initially i only did a barely minimum of testing.

we need more testing from more people to make this work. no program can be ever perfect.

as for smali patching, i'm glad to hear that you are familiar with it. i made an initial attempt to make a smali diff and try to use that, but it miserably failed. (lots of conflict)

maybe you can take a look at it and make it work. i will recompile AOSP and AOSP+PDroid with AOSP 4.0.4 and PDroid 1.32 this weekend, and upload them.

as for pk8, you mean "privacy.pk8" ? i am not sure if we actually need it or not. i didn't have it until svyat posted his source code to google-source site. i didn't see a difference before and after adding it.

will "Settings > Security > Install from SD card" work ? i had installed something.p12 before.

@ tonydl,

yes, tony. you are right. but we are talking about app-wise permission, not system-wide service.

if you disable network location from Settings > Location service > Google's location service, google map can't find you.

however, if you block network location permission from pdroid, google map still find you on the map. (map doesn't center to it once you move it off center, though)

from what i understand is that google map has a built-in network location service in itself other than frameworks > location manager.

it also seems that google map still honors the setting in Settings > Location service and disables its own network location service.
[LG Optimus 2x] tonyp:
I don't really understand what you mean but maybe I didn't make myself clear enough.

Situation: I have disabled "use wireless networks" in Settings - Location Security and blocked GMaps access to GPS in PDroid.

Now I can open GMaps and it will find my location like you described - without the exact position but showing me the area map (via the network triangulation).

But if I block "network location" for Gmaps in PDroid, Google Maps is no longer able to find my location - I moved 50km away to the next city but it would still show me the old location, no matter how often I tried and how long I waited. As soon as I unblock "network location" in PDroid the map will show the area where I am (without the exact position).

So this network location block in PDroid is definiteley working on my phone with CM7.2!
[LG Optimus 2x] pastime1971:
when you say you block "network location" permission in pdroid, Settings > Location & security > use wireless network is still disabled, correct ?

what we want here is to

enable Setting > Location services > Google's location service (CM9) or Settings > Location & security > use wireless networks (CM7)

, and

block "Network Location" permission in PDroid

, and google map shouldn't be able to locate via wifi. (with GPS always blocked.) but it does by using its built-in service which communicates with the google server over wifi.

if you disable Settings > Location services > Google's location service (CM9), you don't even need PDroid to block the permission in PDroid on CM9.

i will have to restore CM7 again and check, but when you disable Settings > Location & security > use wireless network (CM7), can CM7 still use cellular tower ?

edit: blocking "Network Location" permission works fine for G+, News & Weather, etc. just "Google Map" app has a built-in network location service.
[LG Optimus 2x] tonyp:
^aah now I see the mistake I made, you're absolutely right it won't work then.

The network triangulation method I meant will only work when GPS is enabled - also called aGPS (assisted GPS) and will speed up the process of finding your location via GPS and is something totally different to the wifi location service.

Then there's no bug and gmaps is just using some hidden method to get the location like you assumed.

Sorry for taking your time.
[LG Optimus 2x] mateorod:
Well, we can't add the pk8 that way. It doesn't detect any certificates no matter where I put it in the sdcard. But the pk8 is actually a key, anyway, not a certificate.

From what I understand, the pk8 is usually used in conjunction with a .pem file, where the pk8 is a private key and the .pem is a public certificate. They are used to sign packages, like apks or update zips. Since the builds are signed without adding the privacy pk8 and the apk comes signed from the market, I am not sure if the pk8 is necessary. I haven't had a chance to look at pdroid's source code yet. Is this pk8 a part of the patch source? Because it may just be a copy of the test key from the neck, maybe. I am wondering if it is a part of the patch key, because it may have originally been used to resign the .jar files after they were decompiled in cwm for the patch. At which point in wouldn't be necessary to add to the patches for the port, since your patches are changing the system jars before they are built and so they never need to b resigned.

I don't know a ton about the key/certificates, so if anyone knows anymore, please let me know. If it is necessary, you can turn a pk8 into a .pem with Java, and I think maybe that could be installed through the security settings. Maybe.

I'm trying to get to the bottom of this, because if the pk8 is needed, then a way to get it into the ROM needs to be found before any smali patches can work. I'll keep looking as well.
[LG Optimus 2x] pastime1971:
pdroid source patch (build.diff) does include privacy.x509.pem.

i agree it may be a left over of svyat's app, in which case i shouldn't really include this in the zip at all. thanks for pointing it out.

edit: download links updated.

edit: i blindly added it in zip because build/target/product/security/ has all the matching pk8 and pem. i will also look into it more, but for the time being, it is removed from the zip files.
[LG Optimus 2x] pastime1971:
isn't .p12 also key and certificate ? http://en.wikipedia.org/wiki/PKCS

i think i installed my p12 to use with openvpn. i don't remember it any more, but i think i just put .p12 in /mnt/sdcard/ (i could be wrong about which file i put there though. i haven't used it since cm9 doesn't support openvpn yet)
[LG Optimus 2x] mateorod:
Hey,

Yeah, I found the certificate in the build.diff as well. I had looked at how the original patches were made and it looks lie it invokes the signapk.jar, which is what generates the key and certificate. But there are four test keys, and I somewhat wonder if this pk8 isn't one of them, as the idea behind the key/certificate is that the certificate is public while the pk8 key is private and supposedly secured by the developer. Since syvat has it available, it makes me wonder, although I didn't see a privacy pk8 in the test keys. And maybe it changes with open source, I have really just started to look at it.

But while the invoking of the signapk makes me think the privacy pk8 is for creating the update zip, don't rely on only my interpretation. I am just looking at this stuff now, and am far from sure.

But I will keep looking. I have some resources I can tap for this kind of stuff. :-)
[LG Optimus 2x] Sandpapers:
Ok. So i tried, and failed. Idk what im doing when it comes to patching ICS with pdroid.

Can someone do it for me?

http://get.cm/?type=nightly&device=p930 is the nightly that im using, for CM9. I would greatly appreciate it! May donate a "beer" to whoever does it! <3 thx love
[LG Optimus 2x] owain94:
You will need to sync the cyanogenmod sources to you computer then apply the patches and then build it into a rom
[LG Optimus 2x] pastime1971:
+ what owain said, you need to compile it from the source.

this is

not

a smali patch. (well, not yet)
[LG Optimus 2x] Sandpapers:
Damn, oh well. This is just over my head. I'll wait for a patcher or some sort and hold off on ICS / CM9. Can't stand opening an app to find out it needs a gazillion permissions that it surely doesn't need.
[LG Optimus 2x] bonanza123:
maybe a stupid question but is your 4.04 source code for ICS based on the 4.03 code or the 2.34 code?

https://code.google.com/p/pdroid/source/browse/android-4.0.3_r1
[LG Optimus 2x] pastime1971:
It is, and it works for 4.0.3 and 4.0.4 both.
[LG Optimus 2x] temasek:
Another app that PDroid clashes in CM7. Its called "adaway". Does it happen also in CM9?
[LG Optimus 2x] pastime1971:
will test it now. but i'm sure it would be same.

edit: web browser doesn't crash. it seems to work ? i see the following in logcat, and the ad part is blank.

E/browser ( 6150): Console: Unsafe JavaScript attempt to access frame with URL http://xdaforums.com/showthread.php?p=24601829#post24601829 from frame with URL http://ads.xda-developers.com/ads4.html?site=XD&zone=ROS_728_Bottom. Domains, protocols and ports must match.
E/browser ( 6150): null:1
[LG Optimus 2x] pastime1971:
@ mateorod,

updated the first page w/ newly compiled AOSP and AOSP+PDroid.

zip is one of framework.jar & services.jar & core.jar which should be all needed to make a smali patcher.

nonflashable zip of /system/framework of AOSP 4.0.4 compiled for maguro

nonflashable zip of /system/framework of PDroid 1.32 + AOSP 4.0.4 compiled for maguro

i would appreciate if you can make the smali patching work

original linux pdroid patcher v 1.27 at http://www.mediafire.com/?x01xx24dizx83pc
[LG Optimus 2x] mateorod:
I will look at it tonight. I totally borked my repo and have spent most of the weekend trying to fix it. I was building another kernel and somehow introduced a malicious element:mad:

Thanks for making the zips, that was what I recalled having to change from cm7 when I did this. Let me look at 'em.
[LG Optimus 2x] pastime1971:
no rush. take your time. thank you very much.
[LG Optimus 2x] mateorod:
oh man. Fixed my build environment, finally. I don't even want to tell you how bad it was.

Kids, when merging new commits, make a new branch, just like they tell you. It's for your own good.

I am compiling the two builds tonight, so I can hopefully make a patch that will cross devices and not just be useful for AOSP or Nook alone.

It might take awhile, indeed, but I am gonna work on it over the week.
[LG Optimus 2x] SGH-i200:
Would be great to have a patch for the P990, ZTE Skate AND the NOOKColor! :-)
[LG Optimus 2x] Sandpapers:
I know this is probably asking a lot, but if it is possible could someone write a more indepth tutorial on how to patch your own rom with pdroid? The little information on the first post doesn't explain much to me. Idk what prereqs i need in place before I can even start doing it.

Like, what is the pdroid source for cm9 for, where do i place it. Do i need to decompile and sign, compile anything? Should all the files be in the same folder, are we just adding the differences between the pdroid files to my rom files? Blah im trying to read up on all this stuff but jeeze its confusing.

Compiling from source, does that just mean taking my cm9 nightly and adding the pdroid patch to it and recompiling it?

Edit: Can't build under windows. I fail... ha, thanks anyways. I'm too lazy to setup linux. Boogers. I am assuming https://github.com/CyanogenMod/android_device_lge_p930 is the cm9 source from github that I would be using. I think i'll setup a VM and try it out. Any ideas if that site is right for repo
[LG Optimus 2x] owain94:
You need to pull the cyanogenmod sources from their git and build the rom from sources

You can't begin with a zip file you can flash for now

You need to build the whole rom yourself
[LG Optimus 2x] pastime1971:
what owain said.
[LG Optimus 2x] SGH-i200:
@Sandpapers - If you want to get an answer don't edit your old post - but post a new entry.
[LG Optimus 2x] pastime1971:
that is the correct repo for device/lge/p930

there are many tutorial on how to build android from the source, including cm7 http://wiki.cyanogenmod.com/wiki/Building_from_source

for cm9, you will have to make some changes (ics instead of gingerbread)

you will also need to include device repo manually to .repo/local_manifest.xml (many devices are not officially supported yet including p930)

$ cat cyanogen/.repo/local_manifest.xml
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project path="device/lge/star-common" name="CyanogenMod/android_device_lge_star-common" />
<project path="device/lge/p930" name="CyanogenMod/android_device_lge_p930" />
<project path="vendor/lge" name="koush/proprietary_vendor_lge" />
</manifest>

fianlly you need a vendor blob, which is the last item in local_manifest.
[LG Optimus 2x] Sandpapers:
Holler. Will be setting up and trying all this when I am back home. Will report back if it worked out.

I really really really appreciate the help.

Edit: Since I am still the latest post, I am editing it. I still don't quite understand where https://github.com/CyanogenMod/android_device_lge_p930 comes into play. I have read the tutorials XDA has in other areas for different phones.

What I understand from this is to follow those, have the latest CM9 nightly on my phone and all, but i just don't get where that link is used. https://dl-ssl.google.com/dl/googlesource/git-repo/repo and git://github.com/CyanogenMod/android.git are both used but I see nothing on any guide pointing directly at a github device specific link. Does it automatically find it for your specific device?
[LG Optimus 2x] hhairplane:
Any chance for an AOKP Build 31 port?
[LG Optimus 2x] mateorod:
As far as other devices go- I'm working on a smali patch. That, assuming I can pulpit together, should enable people to make their own patches. I've got a lot going on, but it being looked at. I've done work on system apps, but I have never a patch like this, where the work will have to be done off device. I think I have the structure right, now its just a matter of making the patch cross devices.

I spent a couple days really testing PDroid itself first. I wanted to see exactly how well it works. I think it is working great. The way Android shares/handles our data changed significantly but PDroid itself seems to be working fine. The Gmaps "leak" seems to just be a symptom of the way the data is handled, which is primarily through gapps. It's pretty clever on Google's part.

I think that all the questions about PDroid we (or maybe just me) derive from the change. Apps that require contact permissions, for instance, when that permission is evoked, it is often just passed to gapps, be it Gmail or the People app or whatever. It secures users personal data while more tightly interweaving it with Google. How security you feel is really going to describe your feelings about Google more than anything.

It will be interesting watching this going forward. As ICS and its descendants become the standard, I wonder if the apps themselves will end up asking for less permissions. It doesn't seem like they need them. They might just be artifacts left for Honeycomb and below. This is not universally true for all apps or all permissions, but is still happening.

The new privacy policy reflects the engineering to a tee. Very interesting stuff.

Now, as far as distributing the necessary files so other users can get PDroid on their devices, well I do have something. I am testing it now, but it will serve to port Pdroid to the Nook Color, and I already have one made for the maguro using pastime1971's files.

I'll tell you more about it when I finish testing the .opk, probably tomorrow. But it can work for any device I can find a maintainer for. And being a maintainer is easy. I have another package I maintain, and it has cost me maybe an hour over the last month. But I'll hold off on that til later.
[LG Optimus 2x] mateorod:
out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/src/privacy/java/android/privacy/IPrivacySettingsManager.java:183: cannot find symbol

symbol : class PrivacySettings

location: package android.privacy

android.privacy.PrivacySettings _result;

^

out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/src/privacy/java/android/privacy/IPrivacySettingsManager.java:190: package android.privacy.PrivacySettings does not exist

_result = android.privacy.PrivacySettings.CREATOR.createFromParcel(_reply);

make: *** [out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/classes-full-debug.jar] Error 41

There's more, but you get the idea. Still a problem with the removal directions. I don't know a bunch about git myself, but would like to be able to make a clean build without resyncing the entire source.

Let me know if you need help looking it up, I guess. I got some people I could ask. Unless I'm doing something wrong. I don't think so, but anything's possible.
[LG Optimus 2x] pastime1971:
did you do "make clobber" ?

i think it is a bit tricky to do a differential removal.

let me take a look at it and see if i can find a better way.
[LG Optimus 2x] mateorod:
Man you're quick!

Well, I am trying a clobber now. I did a make clean, though, which should work I thought. Don't sweat it until I come back with the clobber report.

Thanks

Update: The clobber worked, just as you said. I don't know why clean did not, though. Still, thank for the new rm code. I will run it tonight. It will make life that much easier when I put out those opks.

Smali patch is still under construction. The patch keeps breaking for me as is. But will keep at it.
[LG Optimus 2x] soccermonster5:
I was able to patch AOKP with the provided CM9 patches. Seems to be working fine for me on my crespo4g.
[LG Optimus 2x] pastime1971:
i am testing a way to differentially remove pdroid source from a build, and the following seems to work.

rm -rf out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/src/privacy/ out/host/common/obj/JAVA_LIBRARIES/layoutlib_intermediates/classes/android/privacy/

it compiles fine for now. i will test the zip to see if i get any error.

edit: you can always "make clobber" to absolutely clean your build.

edit2: hmmm. i did "make clean" and out/ is empty.

edit3: confirmed that removing those two directory succeeds a differential build.