Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to determine deprecated permissions?

I'm working on an android application with a huge source code base. I don't like it that my application requires not a few permissions, and i started to suspect that there are a few which are deprecated and no longer needed.

The question is - How to determine if so, and which are really deprecated?

I tried to remove a suspicious permission off and recompile it (using Eclipse Juno), and hoped the compiled to mark it as an error or a warning, but it didn't.

Also tried to explicitly run Lint on the code, and it didn't detect it either.

The application compiled and runs on the device, and i guess that will throw runtime exception with AccessDenied when the relevant API will be called at some code flow.

Is there any effective way to detect that API, without browsing all the source code or running the application in multiple scenarios?

Thanks!

like image 516
Dekel Avatar asked Nov 13 '22 02:11

Dekel


1 Answers

Run your code with -Djava.security.debug=access,failure. That will show you all permissions that are actually used.

like image 102
user207421 Avatar answered Nov 16 '22 04:11

user207421