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
5
votes
2 answers

Android Binder clearing caller identity

Recently I read Android source codes and find that a pair of methods are always called when doing some Binder IPC call. I read the comment, but I can't clearly know the root reason. The pair of method is as follow: final long origId =…
Crystal Jake
  • 201
  • 4
  • 12
5
votes
1 answer

Sharing file descriptor using Android binder

How can I share file descriptor across process using Android binder IPC in C++? Can you post example also?
user1844484
  • 101
  • 1
  • 3
5
votes
2 answers

How can I use AIDL remote service to deal with defferent clients' concurrent requests?

I'm writting a plug-in which defines a remote Service and provides a AIDL interface for 3rd party developers. How can I use this remote service to deal with defferent clients' concurrent requests? It is that service apk's activitys can keep status…
Shrek.Z
  • 51
  • 1
  • 2
5
votes
2 answers

Android Binder Internals

I am working on a project where we add some non-standard security features to an android system, and I have some serious problems to adapt the Binder. Does anyone have a deep knowledge on the Binder System and knows why the Binder "blocks" a process…
user1685376
  • 51
  • 1
  • 2
4
votes
1 answer

Android: trouble with bindService() -> service is null

I'm having a problem with binding service to an activity. I get playing_service==null. I can't find what I'm doing wrong. Why is playing_service null?? MyActivity class: private playService playing_service=null; private ServiceConnection…
Primož Kralj
  • 5,534
  • 14
  • 65
  • 125
4
votes
2 answers

Android Local Service Sample, bindservice(), and ServiceConnection()

I have a question which is related to this question that was asked by @mnish about a year ago. Please have a look at his question and code. He implements a ServiceConnection() and passes it to bindService(). This follows the Local Service Sample in…
Marie
  • 611
  • 4
  • 10
  • 23
4
votes
0 answers

how to find out what data the saveInstance is saving

got android.os.TransactionTooLargeException, it is said because of “This exception occurs when too much data is transferred via Parcels concurrently. The underlying Binder transaction buffer has a limited fixed size, currently 1Mb, which is shared…
lannyf
  • 6,775
  • 4
  • 49
  • 92
4
votes
1 answer

Is it possible to bind to a Java Service, from a Native c++ client, and transact, receive data from the service?

I'm currently studying how binders work in general. By looking at the following projects : https://github.com/qianjigui/android_system_service_example https://github.com/cloudchou/NativeBinderJavaClientDemo I understand that binder transaction is…
4
votes
2 answers

Android Binder Example

I am looking for simple binder IPC example in C/C++. Recently I started reading about the Android Binder basic (http://bharathi.posterous.com/android-binder) and gone thru the code in Android source also. Most of the binder usage part is in C++. Can…
Midson
  • 968
  • 3
  • 11
  • 22
4
votes
1 answer

android - broadcast receiver - caller verification

I am writing an Android application wherein I need to receive some broadcasts sent by the system. I want to make sure the broadcasts are indeed sent by the system. I found this OWASP video. At time 18:00 in the video, the speaker suggests one of…
Jake
  • 14,859
  • 42
  • 114
  • 188
4
votes
2 answers

Android Widgets allowed to exceed Binder transaction limit somehow?

In the Android documentation for AppWidgetManager it says The total Bitmap memory used by the RemoteViews object cannot exceed that required to fill the screen 1.5 times, ie. (screen width x screen height x 4 x 1.5) bytes. But the documentation…
satur9nine
  • 11,950
  • 3
  • 68
  • 107
4
votes
3 answers

What are the ordering guarantees of AIDL "oneway" remote calls?

AIDL methods and interfaces marked with the "oneway" keyword are asynchronous Binder calls for remote processes, and it is said that the ordering of the calls is not guaranteed. On the other hand, the last comment of Dianne Hackborn (author of…
br1
  • 367
  • 2
  • 9
3
votes
2 answers

Android remote method data limit

for my application I need to pass data between my activity and the the service both of which are in different processes. I know that Google recommends to keep the data passed while sending intent to a minimum (not full size bitmaps). Does a similar…
android_devrah
  • 250
  • 4
  • 11
3
votes
2 answers

Getting notified when clients attach and detach to an Android Service

I have an Android Service which exports an RPC interface via AIDL. The interface is connection-oriented, where a client will connect to it, transact with it, then disconnect on exit. Unfortunately is the client exits abnormally, e.g. gets killed by…
David Given
  • 12,261
  • 6
  • 63
  • 114
3
votes
3 answers

failed binder transaction on widget update

i am updating one bitmap in widget (the whole widget is only one ImageView) like this remoteViews.setImageViewBitmap(...) and in some rare situations (it happend 3 times in 6 months of every day use) i get "!!! FAILED BINDER TRANSACTION !!!". then,…
shelll
  • 3,031
  • 3
  • 31
  • 62
1 2
3
14 15