Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

checkPermission hangs the phone #1

Open
vishaljhala opened this issue Jan 28, 2014 · 2 comments
Open

checkPermission hangs the phone #1

vishaljhala opened this issue Jan 28, 2014 · 2 comments

Comments

@vishaljhala
Copy link

Hello - I have a user app to which I want to grant INSTALL_PACKAGES permission which is only allowed to system apps. So I used part of your commented code "checkPermission" related code to actually avoid checking permissions for my app. But it hangs and phone never starts.

Would really appreciate if you could help.. (Also I want to apply that bypass only to one app.) Is there a way to selectively apply patch for specific app?

@mblanchou
Copy link
Member

A version of this module will be pushed into Introspy-Android at some point and you will be able to select which apps to hook.

The commented code for checkPermission crashes because it hooks abstract methods; some code needs to be added to hook methods of the PackageManager that would return a PM that doesn't perform checks (kind of what Android-SSL-TrustKiller does with the TrustManager).

@vishaljhala
Copy link
Author

Ok so similarly I can hook - grantPermissionsLPw. But it has arguments which are internal api classes. So its very difficult to compile. I tried framework.odex approach but I fail to convert smali code to jar file. So really there is no way for me to move forward. Its grantPermissionsLPw which is removing permissions. Any code sample help to bypass grantPermissionsLPw without crashing would really help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants