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

mRemote is nolonger used #2

Open
i-yyi opened this issue Sep 24, 2022 · 7 comments
Open

mRemote is nolonger used #2

i-yyi opened this issue Sep 24, 2022 · 7 comments
Assignees
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@i-yyi
Copy link

i-yyi commented Sep 24, 2022

According to https://android.googlesource.com/platform/frameworks/base/+/master/core/java/android/os/ServiceManagerNative.java

mRemote is no longer used

I'm developing other hook way for API32

Maybe you have some idea?

@SarotecK
Copy link
Member

Thanks for ur feedback. Good question. First we should check source code / debugger what they use instead...

Is this for all BinderProxies now or only for ServiceManagerNative... could be that they use some special API to commincate with this particular service... however, would be nice to have a new iteration on this project. Thanks.

@SarotecK SarotecK self-assigned this Sep 27, 2022
@SarotecK SarotecK added bug Something isn't working help wanted Extra attention is needed labels Sep 27, 2022
@SarotecK
Copy link
Member

I migrated the project to API 33 (may I should test 32 according to ur report). However, the test scenario seems to work... Means in general mRemote is still used in Generic BinderProxy objects... however, next would be to check ServiceManagerNative... witch is indeed a very interesting service ;) Did some research in the past about it...

@i-yyi
Copy link
Author

i-yyi commented Sep 28, 2022

Sorry, maybe I had a non-complete test.(I have used a system image not from Google but from my own company) And thank you for your work!

@SarotecK
Copy link
Member

Well you could checkout this branch: https://github.com/ChickenHook/BinderHook/tree/2-mremote-is-nolonger-used

and have a look if the test scenario works (means the hook function will be called while request permissions) on ur image.

However, I guess ServiceManagerNative has a unique implementation.

@SarotecK
Copy link
Member

Well.. in the end https://android.googlesource.com/platform/frameworks/base/+/master/core/java/android/os/ServiceManagerNative.java#38 they pass the mRemote object into the Stub... I guess there mRemote will be called. We should be able to access the object there. I will add a test to the feature branch for that service.

@SarotecK
Copy link
Member

Hy

finally I hooked ServiceManagerNative. You can have a look on latest commit. Tested on API 33 Emulator. If you

You should see this log line in logcat:

Log.d("MainActivity", "hookSeriveManagerNative [+] finally gor method call -" + method + "- on objact -" + original + "-");

@SarotecK
Copy link
Member

d107afc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

2 participants