Hi, 

SurfaceFlinger checks the permissions based on the PID, UID of the caller 
process. 
You could do similar trick, alternatively extend it for checking the caller 
process name. 
However, if your customer want's to hack the device and extract your 
library he/she may
succeed depending on the device's security. Without the header 
files probably he still
wont able to use it. 

Z


On Monday, July 23, 2012 12:15:07 PM UTC+2, Ansujit Panda wrote:
>
> I am building an customized Android 2.3.7,and I have an application which 
> is using my own library.And I do not want to publish the private key to 
> customer.
> So I am wondering how can I modify the android source ,so that when other 
> than my apk, any other apk wants to use my library,it wont allow.
> I am checking the packagemanagerservice.java source and 
> checkpermission(..) is only checking for permission.
> And I think for that I need to check the key,and if the key does not same 
> then it wont allow the user to use my library.
> I think surfaceflinger has the same feature but I am not clear what it is 
> doing from the source.
>
> So can anyone explain me how to do it?
>
> Thanks in advance. 
>
>

-- 
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: http://groups.google.com/group/android-porting

Reply via email to