Tv Input Framework (TIF) documentaition says:
Only system TV Inputs are eligible to receive
InputEvents, and only if they have theRECEIVE_INPUT_EVENTsystem permission. The TV Input is responsible to determine whichInputEvents to consume and should allow the TV App to handle the keys it does not need to consume.
This RECEIVE_INPUT_EVENT seems to be a system permission.
Trying to enable it via adb fails:
$ adb shell pm grant com.example.mytvinput \
com.android.tv.permission.RECEIVE_INPUT_EVENT
Operation not allowed: java.lang.SecurityException: Permission
com.android.tv.permission.RECEIVE_INPUT_EVENT is not a changeable permission type
Android Open Source Project (AOSP) sources indicate that RECEIVE_INPUT_EVENT permission is signatureOrSystem type, which in turn is defined by Android Permission documentation as:
A permission that the system grants only to applications that are in the Android system image or that are signed with the same certificate as the application that declared the permission.
How to develop an overlay to Android Tv Input Service that is consuming input (e.g. HbbTv)?
Do I have to compile the developed Tv Input into an android image in order to develop it?