-
Notifications
You must be signed in to change notification settings - Fork 158
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
Unable to resolve Landroid/telephony/SmsManager; #3
Comments
My hook code is like:
However my_dispatch will never get executed, since Landroid/telephony/SmsManager cannot be resolved in dalvik_hook_setup, thus dalvik_hook_setup fails. |
I'm using a 4.1.2 arm emulator in SDK. |
I guess the class name is wrong, look at the internal classes such as: com.android.internal.telephony..... |
Can't find com.android.internal.telephony.SmsManager.sendTextMessage or com.android.internal.telephony.sendTextMessage, however one can find android.telephony.SmsManager.sendTextMessage at http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/4.1.2_r1/android/telephony/SmsManager.java#SmsManager.sendTextMessage%28java.lang.String%2Cjava.lang.String%2Cjava.lang.String%2Candroid.app.PendingIntent%2Candroid.app.PendingIntent%29 |
if you find android.telephony.SmsManager, you can call |
Thanks for your kind reply. The problem is the class "android.telephony.SmsManager" cannot be resolved or found in ddi's world, |
What process are you hooking? On May 8, 2014 9:03:41 PM EDT, flankerhqd [email protected] wrote:
|
Tried |
can you try the system_server? |
Tried system_server without luck, still cannot resolve
|
source pasted here: https://gist.github.com/flankerhqd/afbe1a40531837d09f32 |
I came here to add an issue and found this, its describes my problem exactly. Has this been resolved in anyway? |
can you try to see what classes are present in .phone/.mms ? using dalvik_dump_class(XX, NULL); <- dumps all loaded classes in a process. My guess is that there is just some renaming or name mangle going on. example: static int my_epoll_wait(int epfd, struct epoll_event _events, int maxevents, int timeout) // dump all classes // call original function |
I have tried this several times now. each time the emulator disconnects. |
Class dump pasted here: https://gist.github.com/flankerhqd/c47916dc61386cd9f6e4, no sign of SMS |
to avoid the problem of SmsManager not being available I have attempted to hook the SmsDispatcher. to the example smsdipatch.c provided, however this causes the hooks to fail and the log file remains empty. I have taken the method name and signature directly from the output of dalvik dump. Is there something I have missed? |
sendRawPdu is only available on a few HTC devices. Are you sure your the class name and method + signature look good. is your "my_sendRawPdu" function called at all? |
@VirtualBim try dalvik_dump_class(&d, ""); |
No, I am not certain, I am using the Emulator and trying to catch all the Sms leaving the device. Following the code it looked as though all sms went through sendRawPdu on their way to sendSms. I assumed that sendRawPdu being in the dalivk dump meant it was available. My only real question is where should I hook to catch the sms leaving the machine? given that SmsManager is not available. Thanks for all your help btw :) @flankerhqd thank you, i'll try that. |
I have discovered that most if not all messages go through the call SendSMS in the dispatcher class, however as this is abstract you have to catch the calls to it in gsmDispatcher and cmdaDispatcher. I have hooked on there and caught calls sent through smsManager. Unfortunately the smsbody needs pulling out of the tracker which I have not yet solved. I can get the address string but the hashmap is proving resilient. |
Hello, I am facing same issue.
I want to know how to debug into the line. Thanks & Regards |
Hi thanks for the great tool! However I found I cannot hook functions like
android.telephony.SmsManager.sendTextMessage
. By turning the debug option in dalvik_hook.c (h->debug_me = 1), I found the reason is classandroid.telephony.SmsManager
resolved to NULLThe log is:
Why the class cannot be resolved? java.lang.String works fine.
The text was updated successfully, but these errors were encountered: