RikkaApps / Shizuku-API

The API and the developer guide for Shizuku and Sui.
MIT License
964 stars 227 forks source link

rish:use aidl-cpp to generate c++ binding to binder instead of rely on java #58

Closed ccaapton closed 6 months ago

ccaapton commented 9 months ago

Currently every call of rish will result in a dex process creation, which is very resources inefficient. Why not use c++ binding instead like described here?

RikkaW commented 9 months ago

NDK Binder (the official public API) was added from API 29, and really becomes useable from API 30 if I remember correctly. I didn't choose NDK Binder at first considering compatibility.

aidl-cpp is an AOSP tool, so the generated code needs to be compiled with AOSP, and the final binary should link libbinder if I'm correct. Obviously, it's not guaranteed to work on all API versions / all systems.