Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Thread Closed

[APP] PDroid - The Better Privacy Protection [2012-03-18: Bugfixes in Patch 1.32]

OP svyat

21st November 2011, 10:02 PM   |  #1  
OP Senior Member
Thanks Meter: 561
 
171 posts
Join Date:Joined: May 2010




PDroid allows blocking access for any installed application to the following data separately:
  • Device ID (IMEI/MEID/ESN)
  • Subscriber ID (IMSI)
  • SIM serial (ICCID)
  • Phone and mailbox number
  • Incoming call number
  • Outgoing call number
  • GPS location
  • Network location
  • List of accounts (including your google e-mail address)
  • Account auth tokens
  • Contacts
  • Call logs
  • Calendar
  • SMS
  • MMS
  • Browser bookmarks and history
  • System logs
  • SIM info (operator, country)
  • Network info (operator, country)
For device ID, phone and mailbox number, SIM serial, subscriber ID and device location it also allows supplying custom or random values.


Why you would want to use it:
  • Applicaitons do NOT crash when access to private data is blocked (unlike with Permissions Denied or CM)
  • Fine-grained tuning of access to private data
  • No background service needed
  • Very small memory footprint (~700KB)
  • No impact on battery life
  • No impact on performance (5ms overhead on access to private data; yes, that's 0.005s)
  • 100% reliable unlike ROOT applications (LBE), which need to start their background service on boot (see android underground to learn why this is an issue)
  • No ROOT required for the app to run
  • No Android permissions required for the app to run
  • Open-source


Download:

Automatic PDroid Patcher for Windows (XP/Vista/7):
  • JDK 6 or newer is required (get it here http://www.oracle.com/technetwork/ja...ad-346242.html)
  • Install JDK 6 into the default directory (don't change anything when installing)
  • .NET Framework 2.0 or newer required (ships with Windows since XP SP2)
  • Currently only supports Gingerbread (Android 2.3)
  • Will only work with deodexed ROMs (take a look into your ROM's system/framework directory; if there are any *.odex files, your ROM is NOT deodexed)
  • You will need to re-create your settings backup after updating from version 1.27 (it is not compatible with the newer version)

Download PDroid Patcher v1.32 Beta 0.321 for Windows

Patch Installation Requirements:
Installation Instructions:
  1. BACKUP YOUR ROM (HOWTO)
  2. Make a PDroid Patch for your ROM with the PDroid Patcher and put the patch on your SD card
  3. Boot your device into your custom (CWM) recovery (Desire HD: vol down + power)
  4. If you flashed the patch before but PDroid said it still was not installed, then select "mount /system"
  5. Select "install zip from sdcard"
  6. Select "choose zip from sdcard"
  7. Select the PDroid patch you have put on your SD card
  8. After flashing is finished, reboot the device
  9. Install the PDroid app from the Android Market
  10. Rate the app at the Android market (let me know, if you have any issues beforehand)


Patch Changelog:

1.32: Fixed updating from version 1.27 and below
1.31: Fixed patching incompatibility with some ROMs (like Zeus v5)
1.30:
  • Fixed the alarm being put to snooze every time a call is received or made
  • Fixed FC for some applications (like Yandex Maps)
  • Fixed bootloops for AT&T and SonyEricsson devices (hopefully)
  • Many small tweaks
1.27: Fixed an issue, where the Touchwiz launcher (and probably others) would continuously crash
1.26: Fixed an issue, which would make Google Listen and probably other apps crash
1.25:
  • Fixed an issue, where PDroid would conflict with some ROOT applications making them freeze
  • Fixed random geocoordinates generation
  • Fixed other minor bugs
1.22: Fixed the patch version reporting bug (v1.21 reports that it's 1.2)
1.21: Fixed the bug where the device would sometimes boot loop right after the boot is finished
1.2: Added data access notification feature
1.1: Bugfixes
1.0: Initial release


Source:
  • Download: PDroid 2.3.4 source (v1.27) (yes it is based on 2.3.4 but also works with 2.3.3 and 2.3.5 flawlessly)
  • Get the 2.3.4 source from AOSP (branch: android-2.3.4_r1)
  • Extract the patches from the above archive to the 2.3.4 tree root
  • Run:
    Code:
    patch -p1 -i build.patch
    patch -p1 -i frameworks.patch
    patch -p1 -i libcore.patch
Building from source:
  1. Make a clean build
  2. Apply the patches (see above)
  3. Run:
    Code:
    source build/envsetup.sh
    make update-api
    mmm frameworks/base
    mmm frameworks/base/services/java
    mmm libcore
    make snod


FAQ:

Quote:

I do not have Market access, where can I download the PDroid app?

Right here

Quote:

What about controlling the internet access?

Controlling access to the network/internet requires either patching the kernel or using ROOT access within the PDroid app. I try avoiding the former due to portability and the latter due to user privacy/security reasons. I am looking into adding internet access control in a way, which would be the most acceptable/convenient for the user. However, this feature currently isn't on the top of my to-do list.

Quote:

How do I make a patch manually myself?

For experienced developers the following basic steps for creating a PDroid patch should be enough to get you started:
  • Make a clean AOSP build (2.3.4, assuming that your ROM is based on 2.3.x)
  • Make another build with PDroid sources added
  • Decompile the framework.jar, services.jar and core.jar files inside the system/framework directory (of both above builds) using apktool
  • Diff the output so that you know, which parts were changed by PDroid
  • Decompile the above three files from your ROM, you want to patch
  • Add the missing code to your ROM files based on the above diff
  • Recompile your patched ROM files using apktool

Quote:

Do you plan on adding Froyo/ICS support?

Yes. But I have not ported PDroid to Froyo or ICS yet. No ETAs yet. You'll need some patience there.

Quote:

Will you provide a public source code repository for PDroid?

I might, when I get some more spare time

Quote:

Can I backup the privacy settings with TitaniumBackup?

Yes, however you will need to backup your settings to internal memory (PDroid preferences) before making a backup with TitaniumBackup. After restoring with TitaniumBackup, you will need to restore the previously backed up settings. Alternatively you can backup privacy settings to the SD card.

Quote:

Can I use LBE Privacy Guard together with PDroid?

Yes.

Quote:

I have applied the correct patch but my device does not boot, how do I find out what the error is?

  • Restore your backup
  • Get the Android SDK
  • Install it (you don't need the eclipse part)
  • Enable USB-debugging on your device
  • Connect it to your PC
  • Start ddms, which is located in the android-sdk-[platform]\tools directory
  • Apply PDroid patch
  • Reboot the device
  • When your device appears in the ddms window, click on it to see the system log
  • Filter the log by "error"
  • Watch the system log for errors and post them here

Quote:

I have flashed a patch but I am having very weird issues I didn't have before (like you cannot unlock the SIM card or there are weird graphics etc.)?

Have you flashed other mods to your ROM? If so, PDroid is most likely conflicting with them. You will need to create a patch for your customized ROM.

Also make sure that you are using a patch appropriate for your ROM (the CyanogenMod patches for stable 7.1 will mostly not work on nightlies unless the link says so).

Quote:

How do I make a patch for my device after I have flashed some other mods?

If your other mods DO NOT replace any of the three files: framework.jar, services.jar or core.jar in /system/framework, you can just create a patch normally based on your original ROM file.

Otherwise you will need to extract those three files from your device (use a root file manager or adb pull), put them into your ROM zip (also in /system/framework) and then create a PDroid patch based on the ROM zip.
Last edited by svyat; 27th March 2012 at 11:21 PM.
The Following 332 Users Say Thank You to svyat For This Useful Post: [ View ]
21st November 2011, 10:02 PM   |  #2  
OP Senior Member
Thanks Meter: 561
 
171 posts
Join Date:Joined: May 2010
Reserved, just in case
The Following 22 Users Say Thank You to svyat For This Useful Post: [ View ]
21st November 2011, 10:14 PM   |  #3  
sepherian's Avatar
Senior Member
Thanks Meter: 293
 
909 posts
Join Date:Joined: Feb 2011
Donate to Me
More
Yes. This is awesome
21st November 2011, 11:41 PM   |  #4  
Junior Member
Thanks Meter: 0
 
2 posts
Join Date:Joined: Nov 2011
More
Thumbs up
Great !
But I have a Desire... Just for Desire HD?
22nd November 2011, 04:39 AM   |  #5  
Sybregunne's Avatar
Senior Member
Flag Currently in Singapore
Thanks Meter: 1,128
 
973 posts
Join Date:Joined: Jan 2011
Donate to Me
More
I believe you need root to push those jar files... so you do need root. right?
22nd November 2011, 06:33 AM   |  #6  
no_johnr's Avatar
Senior Member
Flag Kristiansand
Thanks Meter: 58
 
537 posts
Join Date:Joined: May 2009
More
So this will not run at all times, and thus not kill the batterytime?

Sent from my HTC Desire HD using XDA App
22nd November 2011, 10:05 AM   |  #7  
Senior Member
Flag Copenhagen, Denmark
Thanks Meter: 67
 
308 posts
Join Date:Joined: Aug 2010
More
Seems interesting, I'll be happy to test out this app if it releases for SGS2.
Sent from my GT-I9100 using XDA App
22nd November 2011, 02:32 PM   |  #8  
OP Senior Member
Thanks Meter: 561
 
171 posts
Join Date:Joined: May 2010
Quote:
Originally Posted by Sybregunne

I believe you need root to push those jar files... so you do need root. right?

Correct, that's what the description says

Quote:
Originally Posted by no_johnr

So this will not run at all times, and thus not kill the batterytime?

That's right. It has virtually no impact on battery life / performance.

Quote:
Originally Posted by hallydamaster

Seems interesting, I'll be happy to test out this app if it releases for SGS2.

Which ROM do you use? Which one is the most popular for SGS2?
The Following 5 Users Say Thank You to svyat For This Useful Post: [ View ]
22nd November 2011, 04:06 PM   |  #9  
Member
Thanks Meter: 2
 
55 posts
Join Date:Joined: Dec 2010
More
Hi,
in where should i set the 3 files?

platform-tools?
22nd November 2011, 04:21 PM   |  #10  
OP Senior Member
Thanks Meter: 561
 
171 posts
Join Date:Joined: May 2010
Quote:
Originally Posted by fe22st

Hi,
in where should i set the 3 files?

platform-tools?

Anywhere, you can run ADB from. And yes, you can place them in platform-tools (I assume, your adb files are located there).

The Following 3 Users Say Thank You to svyat For This Useful Post: [ View ]
Thread Closed Subscribe to Thread

Tags
app, block, pdroid, permissions, privacy, protection
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes