Post Reply

[Dev/App/Framework] PDroid 2.0 Touchwiz port for JB OTA

2nd January 2013, 06:33 AM   |  #1  
OP Retired Recognized Developer
Thanks Meter: 3,657
 
2,031 posts
Join Date:Joined: Apr 2007
Donate to Me
Thanks
Thanks always have to go out first - Many thanks to Eschelon for the many hours of wiping/testing for me along with the rest of the Synergy team. I still don't have a gs3 so most of this was done blind and let me say that was a very difficult task. Of course thanks to all the original PDroid developers that made the base code available.

If you want to use this prebuilt into a rom - starting tonight (01Jan13 r147) Synergy builds will have this framework already ported in. You will just need to load on an APK to start blocking perms. Other rom devs I have included just the framework in post 2 - just make sure to give credit back to me/this thread- this took awhile to port over

What is it?
PDroid is a (awesome) security framework similar to superuser but allows selective blocking of app permissions. It creates a "proxy" between the actual permissions and the PDroid framework which allow passing of different return data.
Because of the proxy created this method is better than apps which just remove permissions from manifests because it should not cause any fcs- Apps will never know the difference. It also allows patching permissions such as location/android id/camera to return spoofed data.

PDroid is a very complex mod across many parts of framework. I have not seen a proper port of this done as of yet - We have spent much time verifying that this port of PDroid 2.0 successfully works with various permissions. See below screenshots for proof.

Framework Mods:
The framework portion of this mod is a port of the 20121017 patch of pdroid2.0 for cyanogenmod rewritten by me to work on TW.
The main patches are located here: https://github.com/mateor/auto-patch.../jellybean/cm/ I believe it is based off of CollegeDev's source from
http://forum.xda-developers.com/show....php?t=1923576

Downloads section below contain the modded services.jar/core.jar/framework.jar from the JellyBean OTA.

PDroid Application:
The app I preferred and what most of our testing was done on is called PDroid Manager - This is one of the only GPL licensed PDroid apps I have seen. The original thread is up here - http://forum.xda-developers.com/show....php?t=1994860
I needed to make some changes to deal with exception errors the original source was throwing. The original code is GPL'ed, my source is up in the Downloads section

If you do not want to use Pdroid Manager you can switch to the PDroid 2.0 App by installing it from original thread http://forum.xda-developers.com/show....php?t=1923576
**when switching apps you probably want to uninstall old one, delete /data/system/privacy.db reboot then install new app. I do not believe 2 can coexist**

Verifying PDroid Works:
A good test app is "Network Info II" from market. You can also use my Logging Test App to test some values such as android id. Other valid tests are items such as blocking Phone from Calls and verifying you get a call error or blocking maps from location.
The one thing we did notice was the stock camera app was not able to be blocked, but any 3rd party app that uses camera blocking will work (probably due to samsung's app using some hidden calls in framework via reflection)
Last edited by TrevE; 2nd January 2013 at 08:54 AM.
The Following 28 Users Say Thank You to TrevE For This Useful Post: [ View ]
2nd January 2013, 06:33 AM   |  #2  
OP Retired Recognized Developer
Thanks Meter: 3,657
 
2,031 posts
Join Date:Joined: Apr 2007
Donate to Me
Downloads:
PDroid 2.0 Framework + Application Zip (Its flashable, but untested. Really meant for rom devs) - http://www.androidfilehost.com/?fid=9390248398092763894
PDroid Manager - TrevE Mod APK Only (you must have framework installed aleady to use) - http://www.androidfilehost.com/?fid=9390248398092763896
PDroid Manager - TrevE Mod Source - http://www.androidfilehost.com/?fid=9390248398092763895

Screenshots:
Screenshots of PDroid 2.0 using PDroid Manager Application (Thanks Esch)




Last edited by TrevE; 2nd January 2013 at 07:30 AM.
The Following 14 Users Say Thank You to TrevE For This Useful Post: [ View ]
2nd January 2013, 06:35 AM   |  #3  
eschelon's Avatar
Recognized Developer
Thanks Meter: 8,965
 
1,388 posts
Join Date:Joined: Jun 2009
Donate to Me
asdgfdadsfa
The Following 10 Users Say Thank You to eschelon For This Useful Post: [ View ]
2nd January 2013, 06:37 AM   |  #4  
Virus's Avatar
Senior Recognized Developer
COLUMBIA
Thanks Meter: 9,302
 
3,938 posts
Join Date:Joined: Oct 2009
Donate to Me
MINE!! awesome work mane
The Following 2 Users Say Thank You to Virus For This Useful Post: [ View ]
2nd January 2013, 06:41 AM   |  #5  
santod040's Avatar
Recognized Developer / Recognized Contributor
Flag NorCal
Thanks Meter: 8,539
 
6,330 posts
Join Date:Joined: Nov 2008
Donate to Me
More
Nice work guys!!
The Following User Says Thank You to santod040 For This Useful Post: [ View ]
2nd January 2013, 10:56 AM   |  #6  
ziggy471's Avatar
Senior Member
Flag NoVA
Thanks Meter: 348
 
193 posts
Join Date:Joined: Nov 2006
More
Guess this means my GTalk will finally quiet down some.

Great work guys.


Z
The Following 2 Users Say Thank You to ziggy471 For This Useful Post: [ View ]
2nd January 2013, 11:39 AM   |  #7  
xM Minton Mx's Avatar
Senior Member
Flag Sikeston
Thanks Meter: 94
 
443 posts
Join Date:Joined: Mar 2012
Donate to Me
More
Quote:
Originally Posted by ziggy471

Guess this means my GTalk will finally quiet down some.

Great work guys.


Z

I assume the synergy build will be out soon. Or already has. Just happened to see this first. Great work guys. :thumbup:

Sent from my SCH-I535 using xda premium
2nd January 2013, 01:55 PM   |  #8  
im_on_fire's Avatar
Senior Member
Flag South
Thanks Meter: 81
 
300 posts
Join Date:Joined: Oct 2010
Donate to Me
More
so I'm on the newest synergy and trying to get the hang of pdroid.

if I deny facebook access to anything it won't open and force closes. when i reallow it to access everything it still FCs until I purge pdroid settings. Not really sure what's happening.
2nd January 2013, 05:29 PM   |  #9  
eschelon's Avatar
Recognized Developer
Thanks Meter: 8,965
 
1,388 posts
Join Date:Joined: Jun 2009
Donate to Me
Quote:
Originally Posted by im_on_fire

so I'm on the newest synergy and trying to get the hang of pdroid.

if I deny facebook access to anything it won't open and force closes. when i reallow it to access everything it still FCs until I purge pdroid settings. Not really sure what's happening.

Hmm, it's working properly on my end. It really shouldn't ever FC since PDroid just spoofs fake data, and it doesn't allow you to block full internet access since that would arguably cause most apps to FC, which would defeat PDroid's purpose.

Try deleting facebook and reinstalling fresh from the market. If it still FCs, post a logcat for us so we can take a look and maybe see what's going on.
The Following User Says Thank You to eschelon For This Useful Post: [ View ]
2nd January 2013, 07:32 PM   |  #10  
im_on_fire's Avatar
Senior Member
Flag South
Thanks Meter: 81
 
300 posts
Join Date:Joined: Oct 2010
Donate to Me
More
Quote:
Originally Posted by eschelon

Hmm, it's working properly on my end. It really shouldn't ever FC since PDroid just spoofs fake data, and it doesn't allow you to block full internet access since that would arguably cause most apps to FC, which would defeat PDroid's purpose.

Try deleting facebook and reinstalling fresh from the market. If it still FCs, post a logcat for us so we can take a look and maybe see what's going on.

so this is me opening facebook successfully then opening pdroid and denying facebook gps location. then i try opening facebook again and it force closes:

Code:
--------- beginning of /dev/log/main
I/Adreno200-EGLSUB(24989): <ConfigWindowMatch:2087>: Format RGBA_8888.
I/Adreno200-EGLSUB(24989): <ConfigWindowMatch:2087>: Format RGBA_8888.
W/IInputConnectionWrapper(24989): getExtractedText on inactive InputConnection
W/IInputConnectionWrapper(24989): beginBatchEdit on inactive InputConnection
W/IInputConnectionWrapper(24989): endBatchEdit on inactive InputConnection
W/IInputConnectionWrapper(24989): beginBatchEdit on inactive InputConnection
W/IInputConnectionWrapper(24989): endBatchEdit on inactive InputConnection
W/IInputConnectionWrapper(24989): beginBatchEdit on inactive InputConnection
W/IInputConnectionWrapper(24989): endBatchEdit on inactive InputConnection
W/IInputConnectionWrapper(24989): beginBatchEdit on inactive InputConnection
W/IInputConnectionWrapper(24989): endBatchEdit on inactive InputConnection
I/Term    (24989): Subprocess exited: 129
W/IInputConnectionWrapper(24989): showStatusIcon on inactive InputConnection
E/Term    (24989): onCreate
D/Term    (24989): TermService started
I/TermService(24989): Activity called onBind()
I/Adreno200-EGLSUB(24989): <ConfigWindowMatch:2087>: Format RGBA_8888.
I/Term    (24989): Bound to TermService
I/TermService(24989): Activity binding to service
I/Term    (24989): waiting for: 28326
I/Adreno200-EGLSUB(24989): <ConfigWindowMatch:2087>: Format RGBA_8888.
I/Adreno200-EGLSUB(24989): <ConfigWindowMatch:2087>: Format RGBA_8888.
W/IInputConnectionWrapper(24989): showStatusIcon on inactive InputConnection
E/Term    (24989): onCreate
I/Term    (24989): Bound to TermService
I/TermService(24989): Activity binding to service
I/Adreno200-EGLSUB(24989): <ConfigWindowMatch:2087>: Format RGBA_8888.
I/Adreno200-EGLSUB(24989): <ConfigWindowMatch:2087>: Format RGBA_8888.
let me know if this is incorrect. i used my phone to make the logcat. if not ill make one from my computer tonight. (also, i can't access pastebin from work)

I should also add that this happens with any app, not just facebook.
Last edited by im_on_fire; 2nd January 2013 at 07:46 PM.

Post Reply Subscribe to Thread

Tags
pdroid
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Top Threads in Verizon Galaxy S III Themes and Apps by ThreadRank