In Android is dev/binder
also for layers communication responsible. Is it possible to listen to messages? I know that they must be decoded than, but how can I get this messages. For example if an app send a message to became an Geolocation. I have also root on my android device.
相关问题
- How can I create this custom Bottom Navigation on
- Bottom Navigation View gets Shrink Down
- How to make that the snackbar action button be sho
- Listening to outgoing sms not working android
- How to create Circular view on android wear?
相关文章
- android开发 怎么把图片放入drawable的文件夹下
- android上如何获取/storage/emulated/下的文件列表
- androidStudio有个箭头不认识
- SQLite不能创建表
- Windows - Android SDK manager not listing any plat
- Animate Recycler View grid when number of columns
- Why is the app closing suddenly without showing an
- Android OverlayItem.setMarker(): Change the marker
You can decode most of the Binder transactions that go past using this version of strace: https://github.com/adetaylor/strace-android/tree/android
It has enhancements to decode the
ioctl
calls which are the way processes make requests to the Binder kernel driver. Make sure you use theandroid
branch or you won't get the benefit of those changes.You should be able to build this using an NDK standalone toolchain. See
docs/STANDALONE-TOOLCHAIN.html
within the Android NDK documentation.@Adrian, some good work w.r.t the problem has been done by other developer/researchers, so you could make use of their results.
First of all, I'd recommend to look at the great work of Jonathan Levin (a.k.a Technologeeks), namely his book on the Android internals that recently became free and could be accessed at the book's companion website: newandroidbook.com. From there you'll get links, description and usage examples to
strace
, whose one of the advantages overstrace
isAnother great work, done by Opersys (with Karim Yaghmour), that is definitely worth noting and looking at is
If you're up for installing a custom kernel, the binder driver code (
drivers/staging/android/binder.c
) has pretty good debugging features, including conditional messages and functions that can print binder transactions, etc.Specifically, you'll get various kinds of debug messages in the kernel log by setting
binder_debug_mask
using the appropriate combination of the following enumerators:You could also sprinkle a few of the
print_binder_*
functions that are included inbinder.c
at strategic locations throughout the code. For example,print_binder_buffer()
orprint_binder_transaction()
. You would probably want to make these conditional based on a particular uid or pid, since there will otherwise be a LOT of stuff flying by the log.Short: Nope, it shouldn't be possible, even with root.
There isn't that much informations about Binder in detail on the net but there are some, especially about the security. Refer to this or to point 3.8 here. You may also read the source of the kernel driver and the source of openbinder.
Why, time and time again, do wrong answers get approved as right?
Jtrace - not to be confused with bin dump - requires no modification of Android what-so-ever. And it can snoop binder messages - with the restriction that you have to be jtrace'ing one of the end points.
Bindump uses debugfs, but that only shows endpoints. @Adrian - I'm afraid you got the wrong conclusion.
Jtrace traps sys calls going in and out - and then resolves the binder messages by inspecting process memory (using ptrace(2)). If you have ptrace(2) in your kernel (which you do, because debugserver foolishly needs it) and you are root, you can snoop messages. Again - you have to be on an endpoint.
And @Luminger - while on he subject - just because one can't find info, doesn't mean there isn't info. There's plenty of information on Binder on NewAndroidBook.com - besides the book, look at the Binder presentation link.