[Nexus S Themes and Apps] NicholasQ:
As featured on the XDA portal Here

Note: I understand that the source is for 2.3.4 right now, but svyat is currently working on an ICS version. Hopefully a talented Dev can figure this first. If not, I will post svyat's ICS source patches when he makes them available.

This thread is really a request/research & development topic. I take absolutely no credit for any of the work done by svyat or any potential/willing ROM dev or chef.

The purpose is to bring to attention a new app created by svyat by the name of PDroid. You can find that thread Here.

PDroid is an app with a capability a lot of you are probably already familiar with; permission control. Permission control is the ability to block which permissions apps have access to on your device. PDroid takes this a step further by allowing you to block or change the information that a requesting app receives.

For example: many of you may be aware of LBE security app or permission control in Cyanogen. A lot of times when you block permissions to an app it will cause the app to break (force close) which requires you to change back your settings allowing the app access to information you would rather deny. What is the purpose of blocking data if it just breaks an app? Well that's why svyat has written Pdroid.

PDroid allows you to block permissions AND if that breaks the app, instead you may provide the app with false information. For example: When an app requests your location, you can have PDroid provide a false location. Or when an app requests your IMEI, you can have PDroid provide a false IMEI that you made up. You are able to do this will many of the permissions.

What I am requesting from a ROM dev or chef:

I am not experienced with programming at all so I will do my best to describe what I understand.

PDroid requires that Roms be patched so that the app can work. Currently svyat is doing the patches at a request basis. This is a slow process (he has many people requesting and is working alone). So I am hoping we can get a willing chef to patch one of his ROMs with this.

You can find the patch source Here

Instructions for patching:

Download: PDroid 2.3.4 source (v1.22) (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:

Make a clean build

Apply the patches (see above)

Run:

Code:

source build/envsetup.sh

make update-api

mmm frameworks/base

mmm frameworks/base/services/java

mmm libcore

make snod

However, 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

I really seeing this type of control being the new standard for custom ROMs. To me, this is another BIG reason to be rooted! :D