yashsingh1/xdaforums huggingface dataset:
[Android Apps and Games] FFU5y:
You can find it here: https://dl.dropbox.com/u/8333531/aokp_maguro_unofficial_Oct-11-12_pdroid_extension.zip

Make sure you take a backup first!

I have found that the Clock app bombs, but I haven't looked into that and nor have I tested withou PDroid Extension so I don't know what the source of the problem is. I also didn't wipe after installing this (from standard AOKP) so that may have an impact.

This is build from a checkout of AOKP Build 4. It doesn't have the PDroid Extension app installed, so you'll need to do that yourself.

Edit: Clock app was because I didn't wipe, not because of PDroid Ext. Still no problems with PDroid Extension yet (although I haven't tested every feature yet).

Once there is an update which resolves the problems caused by the 4.1.2 framework changes, I can build and upload (to somewhere?) AOKP and CM10 for Galaxy Nexus, and Unofficial CM10 for Defy, and Unofficial CM10 for Acer Iconia A500 (which is buggy as hell:the maintainers have gone AWOL).
[Android Apps and Games] CollegeDev:
Please send all patches and ready build to me via pm. I will include them in the first post of my thread. All problems by 4.1.2 have been fixed since few days ago, but I have no time to update the patches because I wasn't at home last weekend. I will try to release the patches with a new version of pdroid and framework changings this week, is that okay?
[Android Apps and Games] FFU5y:
Re: sending you links/patches for specific ROMs - Will do.

Is it ok for you to release the patches when you have time? Hmm, yes :P Whenever you can release them, that's cool.

Maybe it would be easier for you to set up a github and fork the relevant CM10 repositories to change, so you can just push the changes up there as you go. That way, other people can extract the patches. Totally up to you though - was just a thought about how to make things easier.
[Android Apps and Games] BarryBingo:
Thanks for this CollegeDev.

I just pulled and compiled the AOKP-JB source solely to have this functionality on my SGS3-i9300

Been a day now of testing and everything seems to be working.

Here is what I did.

Oct 15th using HEAD AOKP JB repo sources with a pre-built Siyah Kernel 1.7b6

repo sync
patch -p1 < ../PDroidPatches/JB_build.patch

patch -p1 < ../PDroidPatches/JB_libcore.patch

# during libcore patch a file already exists error occures

# do not 'assume -R' and do not 'apply anyway'

# These are default actions so just press enter twice

patch -p1 < ../PDroidPatches/JB_framework.patch

# one hunk fails in core/java/android/app/ContextImpl.java

# this is small but vital for blocking location

# easy to manually insert the patch and also make one of the required mods for 4.1.2 at the same time

# replace

registerService(LOCATION_SERVICE, new ServiceFetcher() {
public Object createService(ContextImpl ctx) {
IBinder b = ServiceManager.getService(LOCATION_SERVICE);
return new LocationManager(ctx, ILocationManager.Stub.asInterface(b));
}});

# with

registerService(LOCATION_SERVICE, new ServiceFetcher() {
public Object createService(ContextImpl ctx) {
IBinder b = ServiceManager.getService(LOCATION_SERVICE);

// BEGIN privacy-modified
ILocationManager service = ILocationManager.Stub.asInterface(b);
return new PrivacyLocationManager(service, ctx);
// END privacy-modified
}});

patch -p1 < ../PDroidPatches/JB_mms.patch

# ms patch fails on one hunk which added some imports

# easy to manually add these so open file and edit

# packages/apps/Mms/src/com/android/mms/transaction/HttpUtils.java

# so the end of the imports at the top of the file looks like this

import java.net.URISyntaxException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Locale;

# as per instructions edit device.mk file and add the PRODUCT_COPY_FILES

nano device/samsung/i9300/i9300.mk

#add

PRODUCT_COPY_FILES += \
privacy/PDroid.jpeg:system/media/PDroid.jpeg

# copy image into new folder

cp -r ../PDroidPatches/privacy/ .

# Build will fail now

# Need to add changes suggested by romracer

# So replace the super call in PrivacyLocationManager.java line 39

# edit frameworks/base/privacy/java/android/privacy/surrogate/PrivacyLocationManager.java

# and change line 39 from super(service); to

super(context, service);

# build

. build/envsetup.sh && brunch aokp_i9300-userdebug

# wipe clean rinse install ROM reboot install app and drink some tea.

This is old news and people compiling their own ROMs will be able to sort these nags out themselves but this is at least the complete picture all in one post.

On a side note I was thinking about creating an update.zip for this patch and not a complete ROM image so I'll start doing some research into how that is actually done.
[Android Apps and Games] Jeffreycat:
Will this work on the Sprint version of the SGS2 ( The Epic 4G Touch; E4GT)? If so, will it work on CM9? Or does it only work on CM10?
[Android Apps and Games] FFU5y:
This only works on CM10, and it requires either that you patch and compile the CM10 ROM yourself or that someone else has done it already. That is, this isn't just an app, but rather it changes some of the Android innards and has an app to control those changes. There is a version of Pdroid (not Pdroid Extension) for CM9, but that likewise reqires a new rom to be compiled. You can also try to use AutoPatcher to patch CM9 to add Pdroid.

More generally: It might be good to split this into two threads: one for development-related stuff (e.g. specific patch feedback, specific bug reports with logcats) and one for general discussion (e.g. will this work on X, is anyone else having problem Y with no logcat, etc).

Of course, a mod might need to do this and/or maintain the threads in which case it would be impractical.

I'd have also created a stub of a relevant Wiki page on the XDA wiki (http://xdaforums.com/wiki/PDroid). I'll add to it when I have some time (which is the most scarce resource ever), but others can feel free to add additional details.

edit: added the answer to the question being asked; and added the wiki page.

edit 2: I've updated the Wiki with some content, but I plan to add quite a bit more. If others want to add to it, go for it. If you disagree with stuff, or have ideas, you can put it in the 'discussion' part of the wiki page too.
[Android Apps and Games] SecUpwN:
CollegeDev, could you include a way to obfuscate the current location from the service provider itself? I'm sure that the phone has to pair with the cell of the service provider to even have a signal, but is there a way to obfuscate/randomize this identification?

Seems paranoid? Yeah, but in certain countries they even secretly trace mobile phones - and my hope is that through using PDroid-Extension, sh!t like this won't be possible anymore (if internet access is deactivated on the phone itself). Possible or not? :cool:
[Android Apps and Games] FFU5y:
Unfortunately, that is not possible - based on relative signal strength, tower connections, etc. the service provider will have access to your location, so long as you are in range of cell towers.

Update: You could potentially mess with the IMEI of the phone (but only on a fairly limited subset of phones - e.g. HTC ones), but that would only make the phone harder to trace - if you were using the same SIM then they would simply trace the SIM. You would also need to restart the phone radio after each time you changed the IMEI I suspect. That, and modifying the IMEI of a phone is illegal in some countries.
[Android Apps and Games] SecUpwN:
Thanks for confirming my assumption.

HTC over here, using PDroid. What if I restrict access to the IMEI for all apps, even the Android system itself? Or do I *have to* randomize it? My intention is not to break any laws, but to maximize my privacy. If any "laws" are violated by doing so, let this be my prob to deal with. Further suggestions to accomplish this mission?
[Android Apps and Games] FFU5y:
It isn't so much restricting *access* to the IMEI (in fact, PDroid already does this - I think it is called the 'Phone ID') but rather the radio of the phone itself uses the IMEI; it sends it to the mobile network.

Also, if you see this thread as an example, it is apparently a disallowed topic on XDA (due to it being illegal). Although you can look here for someone who was trying to do it. You'll find it frequently a disallowed topic (e.g. here on another forum).

I suspect (but am no means sure) that in Australia, and probably the UK, actually making a tool to enable someone to change their IMEI could well be illegal. CollegeDev may have a different perspective to me (and PDroid Extension is CollegeDev's work), but anything that made it possible to change IMEI would be HTC specific, and would require writing to the firmware of the phone.

Edit: from legislation.gov.uk: Changing an IMEI, or having tools to change an IMEI, will get you up to 6 months on summary conviction, or up to 5 years if conviction on indictment (unless you are the phone manufacturer, or authorised repairperson).
[Android Apps and Games] SecUpwN:
I get it, changing the IMEI is a very sensitive subject and illegal in most countries. To be more specific, changing it would invoke that governmental agencies could not trace the owner of the phone or people with such a tool could take over other peoples identity, right? Strange thing that noone coded an android app yet where one could change the IMEI while the system is running..
[Android Apps and Games] mateorod:
Okay, I have been working on porting this, and a bunch of my trouble was I was too lazy to install these patches properly. And also, there were a bunch of failed hunks in the patches due to the upgrade to 4.1.2, which I was applying by hand. Silly.

So I have fixed the patches, including fixing all the fails and the repeated hunks. These patches should replace the ones CollegeDev posted originally, although they probably could use some vetting. I am building from them for the first time now, so I will report with success/failure later.

Also, the patch application method CollegeDev posted is not easily reversible. Like I said, I was lazy and just patched it that way and had a real hard time backing out of the changes (due to the hand-applied hunks as well, no doubt).

So here is how I use these patches. This is slightly modified from how pastime and I were using the original PDroid patches, but it makes switching back and forth easier.

CM10 Pdroid Extension patches

To Apply

cd ~/android/system
repo start pdroid_ext build libcore frameworks/base packages/apps/Mms
repo checkout pdroid_ext
patch -p1 < ~/JB_libcore.patch
patch -p1 < ~/JB_build.patch
patch -p1 < ~/JB_framework.patch
patch -p1 < ~/JB_mms.patch

You will still need to modify the copy file (i.e.Pdroid.jpeg) yourself. I have just been adding it to my ROM after building, and because it is device specific, I didn't add it to the patches. Your choice.

Removal

cd ~/android/system; rm -rf out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/src/privacy/ out/host/common/obj/JAVA_LIBRARIES/layoutlib_intermediates/classes/android/privacy/
cd ~/android/system/build; git checkout . ; git clean -df
cd ~/android/system/libcore; git checkout . ; git clean -df
cd ~/android/system/frameworks/base; git checkout . ; git clean -df
cd ~/android/system; repo abandon pdroid_ext; repo forall -c 'git reset --hard'

These directions assume that your build directory is ~/android/system and that the patches are in your home directory. You can adjust the end of the patching lines to reflect where ever you store the patches.

Let me stress that this is CollegeDev's work, I just adjusted it and remade the patches for ease of use and accuracy. PDroid extension is his alone.

Update: These patches should be considered final, build completed with no problems. I may as well also mention that the only patch that is identical to the OP is the JB_build.patch. Everything else has had some reworking.
[Android Apps and Games] FFU5y:
This is getting pretty OT, so if you want to continue discussion on it you'll probably want to open a new thread.

There are a couple of issues here. First, the IMEI in most phones is (apparently, from what I've heard) irreversibly burned into a rom on the mainboard of the phone, so simply cannot be changed. Second, on those phones where it is stored in a modifiable part of the system, it seems to be stored in firmware. To my knowledge, no-one has put any time into looking at updating firmware at run-time. It is risky business at the best of times.

Changing an IMEI would only enable you to change the identity of the phone, not your identity as a subscriber. It would be useful to change an IMEI if you received a stolen phone and wanted to conceal the identity of the phone; you were changing SIM and wanted to conceal that it was the same phone between the new and old SIM; or you were giving away your phone and didn't want it to be traceable to you. In general, changing the IMEI will not gain you any benefit because your IMSI (your subscriber id, which is written into the SIM) will remain the same - and must in order for you to receive service.

So really, if it is possible to change the IMEI at run-time, there is not much benefit to be had from doing so. If you have no SIM in the phone, then you're better off disabling the radio altogether to avoid detection on the cell network. If you have a SIM, then the SIM is going be the target of tracing rather than the phone. At run-time that is.

@Materod: I'll try out the new patches!

Edit: I patched CM10 for Maguro (Galaxy Nexus) and did a build, which seems to have worked, but I haven't actually *tested* the build. Some of the patches applied 'fuzzy', but that is probably just because my CM10 sources are slightly more up-to-date (or older, or different, or something).

I'm now bringing my AOKP checkout up to date and will do a test build on that.

I'd like to test on Moto Defy and Acer A500 build the builds for both of them are broken at the moment I think, so I'll keep an eye on them for when they come good.

Once I've actually checked the functionality works correctly in these builds, I'll post them (to CollegeDev, for inclusion on the OP).
[Android Apps and Games] mateorod:
If you use the Auto-Patcher, (SecUpwN, I know you've been waiting for this...) and have ApG, I have added testing for Pdroid Extension.

./auto_patcher ROMNAME.zip extension cm10

should do it.

I have also uploaded Auto-Patcher 2.1.9 to our download page at techerrata, but it might take 15-20 mins before it becomes available there. Edit: It's there already.

I have tested this on several CM10 builds, but have not flashed them. This is not dangerous in the least, though, just put the restore.zip in your storage as well. No wiping necessary, at any time, good or ill.

But yeah, this should work. I feel good about it.

If we have success, we will branch out to AOSP, since wbedard ported the build patches and provided me with the files I will need. So hopefully we are getting places, here.

If anyone is curious, the reason PDroid Extension and the latest PDroid update have been kicking my ass so bad is some unresolved bug in the Auto-Patcher. For some reason, when I had the PDroid Extension short-handed as 'pdroid_ext', the auto-patcher was attempting to apply both mods each time I called only one of them.

cost me probably 60 hours of my life I won't get back....renamed to 'extension' and we're looking much better...
[Android Apps and Games] zroice:
Hi Guys, I hope I won't be bashed too hard :p...

I'm not a Dev yet (I'd love to get started though, I do know how to program, but never actually did for my phone/android) but I am quite sophisticated Poweruser and usually find a way to things =)

---

What I would like to do is to get PDroid working on the JellyBam rom. That Rom is a mashup between AOKP, CM10 and PA (Android 4.1.2) and there is also a Version with just AOKP and CM10 (Android 4.2.1 based) - talking about the Galaxy Note here which is my current phone.

I did read the intro/faq in the OP but I need some more hints how to compile the stuff please. What do I need? I'm running Windows but I could set up a VirtualBox if its better to compile things in linux. What "software" do I need to have installed etc. Sorry this probably sounds totally noobish (which it is lol)...

I guess i need JDK and Android SDK? What else and how to I then get to the point where I apply the patches manually? (from there on I'll figure out by the code hopefully what has to be adjusted to get it to work with the JellyBam)

By the way: Do I need the sources of the JellyBam Rom or can the patches also be applied manually on a nandroid backup?

Let the bashing begin! (well I hope you actually could point me in the right direction, thanks)

:rolleyes:
[Android Apps and Games] zroice:
Well I did not try it out myself, but in my searches I only read posts of people where the patching failed and no success whatsoever. So I figured I'd have to do it myself. I had been using LBE in the past on GB, just recently found out there was an updated version for JB here on XDA and checked that out. But then I read about PDroid for the first time and that people failed to apply it on JellyBam. I always strife for perfectionism so naturally I somehow HAVE to get this to run ony the jellybam hehe, can't stand LBE anymore now that I know that something like PDroid exists.

And just as I was so happy to find the JellyBam rom which totally rocks imo (all the costumizations of CM, AOKP and PA together in one rom) it turns out that PDroid does not yet work on it and the dev doesn't seem to be that interested himself to add it to the rom.

Ill try my best, but it won't happen overnight - if at all (not that much time on hands atm, and that loads of Gig's I'd have to download to get started do discourage a bit too indeed)

Thanks alot for your insight!
[Android Apps and Games] seandarcy:
ClockworkMod Recovery required? Not TWRP?

The OP says ClockworkMod Recovery is required. What about TWRP? I'd just as soon not change recovery.
[Android Apps and Games] FFU5y:
Actually, I had a very similar feeling which led me to PDroid. There are pros and cons to both - e.g. the feature of LBE where it prompts you when the app attempts something is great.

PDroid is a bit of a niche thing at the moment, and has been for a while. People have mixed feelings about it in concept, and it is another step in preparing a ROM. I'm not sure it is that way.

Hopefully over time popularity will increase, but there are some bridges to cross before I think that will happen.

Once you get into the flow of it, you can learn pretty quickly. Also, keep in mind that once you've got those gigs of data you don't need to get them ever again (if you are careful with your repositories) because you can clone repos off each other.

TWRP should work just fine - but make sure you have a backup to which you can restore just in case.
[Android Apps and Games] Darkman:
Hi!

You wrote that TW and Sense ROMs not supportet?? Only Odexed or Deodexed to?? Or doesnt work because they use a second twframework-res.apk??
[Android Apps and Games] FFU5y:
The reason Sense ROMs are not supported is because without the source code for the frameworks, libcore etc xPDroidx (i.e. PDroid, OpenPdroid or PDroid 2.0 - it applies to all) needs to be manually inserted in a compiled form into these ROMs, which is a somewhat labor intensive process. It is possible, but it is fairly difficult and fiddly, and the kind of thing someone in the specific ROM community may do rather than CollegeDev (because it is ROM-specific).

At least, that is my understanding of it.
[Android Apps and Games] Scrawson:
Randomization

I've got 1.51 working where openpdroid was crashing things(even without anything set).

One thing that might be nice, though, is a single-shot randomize option. It could go in the dialog for adding a custom string. I noticed that quite a few apps that read the Android ID do it multiple times and pd2.0 churns out another random one for it, even on the same run. Seems like that could cause some trouble.

Also, randomly generated IMEIs are not being valid ones. The last two digits are a checksum. Most apps don't seem to care, but it's kind of a dead giveaway that they aren't good data.
[Android Apps and Games] CollegeDev:
Thanks, it is because the openPdroid contains several (in my opinion) porting "failures". I will inform the developers about that if I have more spare-time and ready with porting at all.

I've already implemented such feature in the new version, but it is a beta and I can't ensure that it will not crash. If you want I can upload this beta here, it contains a lot of changes. Just like:

fixed angry birds bugs (multiple apps with same name can't access the privacy settings)

Fixed bug in batch profile mode where also system apps gets the profile instead of user only

Minor GUI improvements -> new dialog layout, fixed layout for devices which have no hard-keyboard, fixed layout for tablets (ou, that was ugly), a lot of more gui improvements

Added Random button in batch profile mode

Added random and clear button in the settings dialog if you want to add custom values

Added installed notification preference, now you can disable instant notification

Changed the update notification to smartmode -> same function as discussed in thread. Only if permissions changed you will get instant notification

Fixed the search bar

Fixed the keyboard bug if you leave pdroid with home button

......

Nice catch, thanks for information. I will have a look at this for next update!
[Android Apps and Games] Koetermann:
It also works with TWRP. Tested it on my i9300.

@CollegeDev: Could you edit the OP concerning to TWRP?

Regards

Koetermann
[Android Apps and Games] CollegeDev:
Yes, I will do it.

News:

PDroid2.0 goes now to Github. :good::good:

I'm currently learning how to handle sources with github and if anyone has a good solution how I can sync my sources with Github -> please get in touch with me, thanks

You can find me on GitHub for this application under following link:

https://github.com/CollegeDev/PDroid2.0_Manager

Other repos:

https://github.com/CollegeDev/PDroid2.0_Manager_Compiled -> here you can download the newest builds under the "devil" branch

https://github.com/CollegeDev/PDroid2.0_Framework_Patches -> patches

You can now open issues and enhancements if you like :)
[Android Apps and Games] FFU5y:
I don't remember seeing a bug report or post about that: was it in the auto_patcher thread?
[Android Apps and Games] wbedard:
Re: [APP][4+] PDroid 2.0 - goes to GitHub and searching themer - [2012-12-08 v1.52]

http://xdaforums.com/showthread.php?p=36911551
[Android Apps and Games] SecUpwN:
AW: [APP][4+] PDroid 2.0 - goes to GitHub and searching themer - [2012-12-08 v1.52]

Haven't been here since last year, what happened? Did PDroid 2.0 go open source and CollegeDev merged his app with PDroid Manager? Give me a quick sum-up!
[Android Apps and Games] scutworker:
From what I understand PDroid 2.0 is still Pdroid 2.0 and maintained by CollegeDev; he has not opensourced it and it continues as normal (with an update soon, hopefully :D). OpenPdroid is an alternative that is open source which now has it's own thread. It also has a few changes and a few bug fixes too.

OpenPdroid also works on Jellybean 4.2.1 whereas Pdroid 2.0 doesn't yet.

CollegeDev's Pdroid app is used to control Pdroid 2.0 as usual and can also control OpenPdroid, but with a few errors. FFU5y's app, Pdroid Manager, is used to control OpenPdroid and doesn't have the same errors.

Both Pdroid 2.0 and OpenPdroid are now included into The AutoPatcher and you have to chose one of the other.

I'm not sure if they will all merge one day or not.

Hope that helps.