Android binder, native binder, framework binder, application binder

binder 真的太複雜

目前看到這四篇的解說最完整

先紀錄起來@@

http://www.cloudchou.com/android/post-332.html

http://www.cloudchou.com/android/post-447.html

http://www.cloudchou.com/android/post-458.html

http://www.cloudchou.com/android/post-468.html

 

還有這三篇給了 native binder addService 跟 app getService 的範例

https://blog.csdn.net/po__oq/article/details/80985658

https://blog.csdn.net/ganyue803/article/details/41315519

https://blog.csdn.net/ganyue803/article/details/41315733

但是 app getService 的時候需要 import android.os.ServiceManager

android.os.ServiceManager 這個 class 不在 Android Studio SDK 裡面,使用 Android.mk 編譯的話必須註解掉 LOCAL_SDK_VERSION := current 然後加上 LOCAL_PRIVATE_PLATFORM_APIS := true

或者用 http://www.cloudchou.com/android/post-468.html 這篇提到的自行建立一個 android.os.ServiceManager 的方法

 

Android 10 multi screen input method(multi-client input editor)

original IME is not compatible with multi-client input editor

AOSP 10 has an multi-client IME sample under development/samples/MultiClientInputMethod

  1. make -j MultiClientInputMethod
  2. $ adb install -r $OUT/system/priv-app/MultiClientInputMethod/MultiClientInputMethod.apk
  3. $ adb root
  4. $ adb shell setprop persist.debug.multi_client_ime \
    com.example.android.multiclientinputmethod/.MultiClientInputMethod
  5. $ adb reboot