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

java.lang.IllegalArgumentException: Invalid int: "today" at android.os.Parcel.readException(Parcel.java:1550)

when i use AIDL,it occured。 this is the exception: java.lang.IllegalArgumentException: Invalid int: "明天天气怎么样" at android.os.Parcel.readException(Parcel.java:1550) …
leooooooo
  • 400
  • 2
  • 12
2
votes
1 answer

Android programming - How to leave binder

Sorry if this is a dumb question. I'm very new to Android. I have written a library that uses a library that uses a binder service. That is, my library has a class that derives from a library class which uses binder. My library is intended to…
2
votes
1 answer

Android binder in native code

I have created the class which implements the Binder interface(Service). I am able to send the data to it from client. If I want to send the asynchronous response back to client, do I need to implement Binder interface at client as well?
Vinay
  • 4,743
  • 7
  • 33
  • 43
2
votes
0 answers

How can I call an IBinder android service from JNI

How can I call an IBinder service (lets say IPackageManager) from JNI and parse the Parcel returned by the method? For example I want to call what should be the same from adb to: adb shell service call package 62 s16 "application.package.id" Where…
2
votes
1 answer

IllegalStateExecption Android studio Webview App

I am currently trying to run my app on a AVD and keep getting this error. When i export it and install it on a tablet at work (unsure of API) but i cant get it to work on the AVD and on an old galaxy note 2. This is the error i get from the android…
Mitchell Day
  • 196
  • 2
  • 14
2
votes
0 answers

Android bypass normal system api to communicate with system service

I will use one specific api, TelephonyManager.getDeviceId, as an example.What I want to implement is bypass TelephonyManager.getDeviceId but still get device's imei. I am new to Java and Android. Java reflection with Android binder is really…
gen
  • 21
  • 1
  • 3
2
votes
1 answer

Android local binding

Why do we use getService method here? public class LocalBinder extends Binder { LocalService getService() { return LocalService.this; } }
2
votes
0 answers

Is there any c interface to use Android binders

Basically I need to use shared memory. From this example, I understood that i need to use binders to pass the fd between 2 processes to be able to use shared memory. But my application is in C. So, is there a C interface for using android binders?
Sandeep
  • 18,356
  • 16
  • 68
  • 108
2
votes
0 answers

Catch Binder TransactionTooLargeException from native code

I'm sending intents from native layer to Java layer at a very high rate ( more than 100 intents / sec ). If the CPU load is high, a TransactionTooLargeException is thrown in logcat, but i cannot catch it back in the native sender. My intents have…
Cumatru
  • 695
  • 2
  • 12
  • 34
2
votes
1 answer

How to understand Android Binder recursion

I read the docs on Android Developer about IBinder/Binder. It says The Binder system also supports recursion across processes. For example if process A performs a transaction to process B, and process B while handling that transaction calls…
刘奔康
  • 185
  • 1
  • 2
  • 7
2
votes
0 answers

Android binder - string truncated while calling JAVA api via native binder interface

I am writing a test code to study binder APIs, referring to (the reference sample also has similar problem) https://github.com/qianjigui/android_system_service_example I wrote a Java service and a native client. It seems everything is fine except…
Robin
  • 10,052
  • 6
  • 31
  • 52
2
votes
1 answer

What is the correct way to share Active Objects between processes?

I am looking into sharing active objects between two processes, however the documentation regarding it is often lackluster and sometimes even incorrect. Specifically I was looking into sharing a Binder objects via parcels. The documentation…
Beryllium
  • 556
  • 1
  • 7
  • 20
2
votes
1 answer

How do user-space applications control hardware (Location/Network/Wifi) in Android?

I have been reading all I can find trying to figure out the software architecture behind Android's BINDER IPC mechanism. From what I understand, BINDER sits in Kernel-space and temporarily gives user-space applications an allocation of shared memory…
sherrellbc
  • 4,650
  • 9
  • 48
  • 77
2
votes
0 answers

Android AIDL without Remote service

Is it possible to implement AIDL without the implementation of remote service? After some investigation of google play services I notice that some AIDL calls executed with the following way Obtain the remote context with the following way Context c…
Jurius
  • 316
  • 3
  • 9
2
votes
0 answers

Android - "service list" vs "dumpsys activity services"

What are the differences between the services shown by these commands? How can I start a Service from normal Java classes and see it in "service list" to be able to access it from another native process to share data? I have a native (C/C++ Code)…
user3387542
  • 611
  • 1
  • 8
  • 28