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.

244 questions
3
votes
2 answers

Android: secure IPC alternative to AIDL?

What I'm trying to do: implement lightweight, secure IPC protocol between two applications installed on the device. Client app should be able to send commands and queries to Service running in a service app, and receive back results of…
Vasiliy
  • 16,221
  • 11
  • 71
  • 127
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…
Naveen
  • 7,944
  • 12
  • 78
  • 165
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,493
  • 6
  • 35
  • 45
3
votes
1 answer

C++ Binder without addService()

Is it possible to use C++ Binder API to communicate between two non-privileged processes? All examples I found (e.g. https://github.com/mcr/Android-HelloWorldService) rely on registering service via ServiceManager->addService() which throws…
Iwo Banas
  • 892
  • 8
  • 12
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
  • 1
  • 7
2
votes
0 answers

Android NDK: Inter-process transfers of AHardwareBuffer via Binder

I am writing a C++ library to allow two Android applications to communicate and exchange data. The server-side appication is pure C++ too, with a small amount of Java to create a service/activity. Some of the shared data is best managed by…
Pesho_T
  • 814
  • 1
  • 6
  • 18
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
  • 486
  • 7
  • 18
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
  • 3,344
  • 2
  • 38
  • 63
2
votes
0 answers

Camera service binder died after zooming

I'm capturing a large Bitmap after zooming on TextureView and I get this error after several shot only on some devices and nothing found about this on the web : 2019-12-29 19:27:37.940 3687-26031/? E/CameraService: binderDied: Java client's binder…
nicover
  • 2,213
  • 10
  • 24
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
  • 1
  • 8
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…
2
votes
2 answers

Binder transaction failing in android

Possible Duplicate: Failed Binder Transaction when returning camera image What are the chances of binder transaction failing in android stack? I have an application which switches thru different activities, but the size of data being exchanged…
aTJ
  • 3,823
  • 3
  • 21
  • 25
2
votes
1 answer

Does an Android process without IPC have a Binder thread-pool by default?

I know that Binder threads are used for IPC and by High-level mechanisms such as Intents. But what if an app doesn't use IPC, Intents or any form of Binder-usage, then does it still have a Binder thread-pool by default on creation of the process? In…
Matt
  • 375
  • 3
  • 10
2
votes
2 answers

Instant App crash using WiFi

My instant app crash when i run script “WifiManager.isWifiEnable” Caused by: java.lang.SecurityException: Method class android.net.wifi.IWifiManager$Stub$Proxy.getWifiEnabledState[] not available to instant apps …