Every Android application requires a set of various permissions to be granted when the application installs. Either the user has to accept these permission-requests or the user has to abort installation. In essence, accepting all the permissions requested by an application is the only option left if the user wants to install and use it. Currently there is no way on Android to block access to any permission for an installed application once they are granted. This is where PDroid comes in.
PDroid is a privacy preserving application for Android that allows user to block permissions of the installed applications. PDroid has two parts. Simply speaking, the first and the most important part of PDroid modifies the Android framework and core libraries so that the permission requests from the applications can be intercepted and the decision whether to accept or denial can be made by PDroid. On the other hand, the PDroid user application, downloadable from the Google Play Store, provides the user interface so that the user can select, modify, allow or grant permissions of the applications installed on the system.
PDroid patch and the application were originally developed by the XDA developer "svyat". The original stable PDroid patch was created for Gingerbread (Android version 2.3.4). Later it was ported to Ice Cream Sandwich (Android version 4.0.4) by another XDA developer known as "pastime1971". My contribution here is the same as what pastime1971 has done for Ice Cream Sandwich. I have ported the PDroid to the latest Android Jelly Bean (version 4.1.1).
I have successfully built and tested this patch with Jelly Bean on Google Nexus S phone and Motorola Xoom tablet. Yet, as always, I take absolutely no responsibility if it breaks your phone. Please use it at your own risk.
The instructions below are for Ubuntu Linux.
- Initialize your build environment as per the Android developer's manual on this link.
- Download your Android source as per the developer's manual on this link. Since we will be building Jelly Bean, we need to initialize our repo by doing the following (4.1.1_r4 is the latest revision of Jelly Bean as of now):.
repo init -u https://android.googlesource.com/platform/manifest -b android-4.1.1_r4
repo sync -j $(grep -c 'processor' /proc/cpuinfo)
- Download my patch by doing:
wget https://raw.github.com/gsbabil/PDroid-AOSP-JellyBean/master/pdroid-1.32-aosp-4.1.1_r4.diff
- Apply the patch by doing:
patch –p1 < pdroid-1.32-aosp-4.1.1_rf.diff
- Now you can start the build by doing the following:
source build/envsetup.sh
lunch
make -j $(grep -c 'processor' /proc/cpuinfo)