Knox Code Bytes: Knox Remote Control

Knox Code Bytes: Knox Remote Control

08 Oct 2019
By Daljot Singh

Imagine this scenario: you are flying to an important conference and opening your device you find that the very file you need is inaccessible. You’re 35,000 feet above sea level and can’t rush to the IT desk for help! Now begins the tedious process of contacting IT for instructions that may or may not work, wasting a lot of time and effort.

Now imagine getting your IT admin right there with you in the plane. Samsung offers such a feature called ‘Remote Control’, which lets the IT admins directly access, control, and debug devices no matter where the end-users are.


Distinctive benefits of Knox Remote Control

  • Saves time — Since an expert is treating the device for unexpected behavior, it saves time lost in back and forth communication.
  • Improves productivity The user can focus on more important tasks instead of diving into the troubleshooting processes.
  • Enables monitoring  IT admins can remotely monitor devices for corporate policy violations and can implement corrective actions.


Remote control Knox diagram


Where do I find it?

Remote Control has two sub-functions:

  1. RemoteDesktop — for reading device screen content through SurfaceFlinger
  2. RemoteInjection — for keystroke, touch, or trackball events.

The APIs for RemoteDesktop are accessable through the native (C) RemoteDesktop library and those for RemoteInjection through the RemoteInjection (Java) class in the package. To call these functions, you need the “” permission. To learn more about how to generate the license and the prerequisites, go to Knox licenses.


How do I implement it?

You can implement the Remote Control feature using the Device control API (RemoteInjection) and Device view API (Remote Desktop).


Device control API (Remote Injection)

The API definition contains statements that:

  • Get the instance, through RemoteInjection
  • Call the API (for example, injectKeyEvent)
RemoteInjection remInject = RemoteInjection.getInstance();
remInject.injectKeyEvent(ev, false);


Device view API (RemoteDesktop)

IRemoteDesktop *remoteDesktop = RemoteDesktop::getInstance();

To see an example for how to do it go to this SDK page.


Next steps:


See also:

  • Release note on latest changes to Knox Remote Control from Sept 2019 onwards.
  • Managing policies on the Device Administration page on the Android developer web site.