Questions tagged [android-binder]

Android's lightweight remote procedure call mechanism designed for high performance when performing in-process and cross-process calls.

While the term "binder" is somewhat generic, its most popular namesake is the Android-specific interprocess communication mechanism and remote method invocation system. It forms the basis for many of Android's core services.

The official documentation is here, and there is a collection of in-depth information at this wiki.

218 questions
3
votes
1 answer

how can i share a Jupyter Notebook?

I am using Julia but didn't really like the IDE (more of a notebook guy). So I used for the first time Jupyter (lab and notebooks). I started Jupyter from Anaconda and made my notebook. The thing is I want to share it. Like other people can access a…
3
votes
0 answers

Binder - How to get class and method name of the caller from the server?

For research purposes, I'm modifying Android SystemServer code. What am I trying to accomplish? Whenever there is a call to SystemServer (Binder server process), I want to know the source of this call on the Binder client process; more specifically…
Aviad
  • 31
  • 3
3
votes
0 answers

Logging of all interprocess interactions of the target Android application

I want to collect all requests to Binder, which makes an arbitrary Android application running on a real device with root permissions. To be more accurate, I want to write a program that could log all the interprocess interactions of an arbitrary…
3
votes
1 answer

Is there any way to get UID or PID of an IBinder instance?

I need to do security check on an IBinder instance carried from other process via IPC. The creator/receiver of this IBinder may not be the direct caller of the IPC carrying it, so I can't simply use Binder.getCallingUid(). How can I detect the UID…
Oasis Feng
  • 7,280
  • 3
  • 26
  • 43
3
votes
1 answer

Android Binder native service called from Java

I've created a native binder service with a few transactions types. At the moment i have native proxy ( Bp ) for clients, but i want to give Java clients the possibility to use my service. Basically, the Bp should be Java i think. I've found some…
Cumatru
  • 635
  • 2
  • 11
  • 31
3
votes
1 answer

Understanding and implementing native Binders in android using C++

I want to implement a simple IPC mechanism using Binders in android. For that, I searched on the Internet and found this. I compiled it and it runs fine on my Android device. I tried to take an overall understanding of the program, by searching for…
Insane Coder
  • 6,859
  • 11
  • 62
  • 140
3
votes
2 answers

what does it mean when uid equals to zero for Android system

In the NotificationManagerService.java from Android 5.0 framework source code. I don't understand when the uid will be zero. private static boolean isUidSystem(int uid) { final int appid = UserHandle.getAppId(uid); return (appid ==…
shanwu
  • 1,585
  • 6
  • 24
  • 40
3
votes
0 answers

In Android is it possible to force binder death?

I have a Binder that I am sending to a remote process, that remote process uses linkToDeath to watch for when the Binder dies. The remote process gets the callback when the process crashes now, but is there a way I can trigger Binder death…
satur9nine
  • 11,950
  • 3
  • 68
  • 107
3
votes
1 answer

Android IPC and service_manager

Does all Android IPC is pass through the service_manager? How does applications interacts with services and intents? Does all messages passed through the service_manager as a proxy? or applications can "talk" directly?
omri-c
  • 81
  • 7
3
votes
1 answer

Recommended approach for handling errors across process using AIDL (Android)

I have a binder service and a client that live in different processes. Using AIDL, when the client calls into my remote binder service, there are times that I need to relay an error (exception) back to the client. However, from my understanding,…
Jon
  • 1,067
  • 2
  • 10
  • 28
2
votes
1 answer

android binder driver

I am trying to read Android source code to learn about binder, but I am not able to find the part of binder driver as described in the Android system architecture. Any idea where the binder code resides in Android source?
thisEric
  • 306
  • 6
  • 17
2
votes
1 answer

How the same code is shared between two processes in Android?

I've a util class in my android project and it looks something like this, public class MyUtil { public static final String TAG = "tim"; static IBinder mIBinder1 = new Binder(); public static void printHelloWorld() { Log.i(TAG,…
Tom Taylor
  • 2,378
  • 1
  • 27
  • 48
2
votes
1 answer

Android communicating from Service to Clients

I'd like to keep a reference to each client that binds to a started & bound Android service. My service is NOT in a separate process. I can have multiple clients bound, e.g. - 1 Activity and 2 Fragments. They may all be interested in a combination…
2
votes
1 answer

compare android binder's performance with unix-socket

I write a IPC framework using domain socket and protobuf. I compared binder with my IPC Framework in my x86 ubuntu and anbox on it. when data size between 8 byte ~ 4K, the performance has no difference.when data size large than 32K, My IPC…
rockycai
  • 41
  • 7
2
votes
1 answer

How to provide RPC interface in an Android system service?

I'm developing a (native) service process whose executable resides on the system partition on Android 8.1/9.0. Let's call the process S. S is supposed to provide RPC service to a process V whose executable resides on the vendor partition. I read…