Open hua250623 opened 1 year ago
What version of android are you working on?
What version of android are you working on?
my device working on android 12;
when I run examples , we new a Binder. code like this: "unsafe { binder_read_version(fd, &mut binder_version).expect("Failed to read binder version"); }" println!("Binder version is {}", binder_version.protocol_version);
at last, We get result print "Binder version is 8"
The current code should work on android 11. I have not updated it for android 12 but would accept a pr.
The current code should work on android 11. I have not updated it for android 12 but would accept a pr.
OK, expect for your new version. Thx
Is it because of the new mechanism of Android 12 binder libbinder and AIDL, this reason conflicts the current code?
There are subtle differences between the implementation on various version of android. At the moment I don't have an android device to test on... So if you want fixes, you're going to have to make a PR yourself.
when i run examples , it will panic like this " data: BinderTransactionData { target: 0, cookie: 0, code: 0, flags: 8, sender_pid: 0, sender_euid: 1000, data_size: 4, offset_size: 0, data: 0x7c451c6028, offsets: 0x7c451c6030 } Parcel { data: [1, 0, 0, 128], offsets: [] } status: 2147483649 thread 'main' panicked at 'called
Result::unwrap()
on anErr
value: Error { kind: UnexpectedEof, message: "failed to fill whole buffer" }', lib/src/parcel.rs:139:48 note: run withRUST_BACKTRACE=1
environment variable to display a backtrace before write_read 4, 0 after write_read 4, 0 response: []"