Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,728,959 Members 46,941 Now Online
XDA Developers Android and Mobile Development Forum

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

Tip us?
 
TrevE
Old
(Last edited by TrevE; 2nd January 2013 at 08:54 AM.)
#1  
Retired Recognized Developer - OP
Thanks Meter 3653
Posts: 2,031
Join Date: Apr 2007

 
DONATE TO ME
Cool [Dev/App/Framework] PDroid 2.0 Touchwiz port for JB OTA

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)
DONATE TO THE EFF Let them know XDA-Developers sent you or you support the cause (https://www.eff.org/deeplinks/2011/1...s-legal-threat)
The Following 28 Users Say Thank You to TrevE For This Useful Post: [ Click to Expand ]
 
TrevE
Old
(Last edited by TrevE; 2nd January 2013 at 07:30 AM.)
#2  
Retired Recognized Developer - OP
Thanks Meter 3653
Posts: 2,031
Join Date: 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)




DONATE TO THE EFF Let them know XDA-Developers sent you or you support the cause (https://www.eff.org/deeplinks/2011/1...s-legal-threat)
The Following 14 Users Say Thank You to TrevE For This Useful Post: [ Click to Expand ]
 
eschelon
Old
#3  
eschelon's Avatar
Recognized Developer
Thanks Meter 8964
Posts: 1,388
Join Date: Jun 2009

 
DONATE TO ME
asdgfdadsfa
The Following 10 Users Say Thank You to eschelon For This Useful Post: [ Click to Expand ]
 
Virus
Old
#4  
Virus's Avatar
Senior Recognized Developer
Thanks Meter 9262
Posts: 3,914
Join Date: Oct 2009
Location: COLUMBIA

 
DONATE TO ME
MINE!! awesome work mane

The Following 2 Users Say Thank You to Virus For This Useful Post: [ Click to Expand ]
 
santod040
Old
#5  
santod040's Avatar
Recognized Developer / Recognized Contributor
Thanks Meter 7276
Posts: 5,638
Join Date: Nov 2008
Location: NorCal

 
DONATE TO ME
Nice work guys!!
Current Devices: HTC Thunderbolt | HTC Droid DNA | HTC One | HTC One (2014)


Follow me on Twitter
ULTIMATE WALLS WVGA Wallpaper Collection
Donations always appreciated! Never required!


The Following User Says Thank You to santod040 For This Useful Post: [ Click to Expand ]
 
ziggy471
Old
#6  
ziggy471's Avatar
Senior Member
Thanks Meter 348
Posts: 193
Join Date: Nov 2006
Location: NoVA
Guess this means my GTalk will finally quiet down some.

Great work guys.


Z
Life's too short, have fun while you can.
Ziggy471.com

Feel free to click the ads on my site, it's free for you.

The Following 2 Users Say Thank You to ziggy471 For This Useful Post: [ Click to Expand ]
 
xM Minton Mx
Old
#7  
xM Minton Mx's Avatar
Senior Member
Thanks Meter 94
Posts: 443
Join Date: Mar 2012
Location: Sikeston

 
DONATE TO ME
Quote:
Originally Posted by ziggy471 View Post
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
 
im_on_fire
Old
#8  
im_on_fire's Avatar
Senior Member
Thanks Meter 81
Posts: 300
Join Date: Oct 2010
Location: South

 
DONATE TO ME
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.
VZW Samsung Galaxy SIII Alliance ROM r23
 
eschelon
Old
#9  
eschelon's Avatar
Recognized Developer
Thanks Meter 8964
Posts: 1,388
Join Date: Jun 2009

 
DONATE TO ME
Quote:
Originally Posted by im_on_fire View Post
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: [ Click to Expand ]
 
im_on_fire
Old
(Last edited by im_on_fire; 2nd January 2013 at 07:46 PM.)
#10  
im_on_fire's Avatar
Senior Member
Thanks Meter 81
Posts: 300
Join Date: Oct 2010
Location: South

 
DONATE TO ME
Quote:
Originally Posted by eschelon View Post
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.
VZW Samsung Galaxy SIII Alliance ROM r23

Tags
pdroid
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes