I want to know whether there is a way to disable hdmi port of a android device without rooting it?
As of Android 4.2 (SDK level 17), the DisplayManager APIs (http://developer.android.com/reference/android/hardware/display/DisplayManager.html) let you detect external displays and the Presentation class (http://developer.android.com/reference/android/app/Presentation.html) lets you define alternative UI for external displays. Before that SDK level, though (e.g. on Kindle Fire devices running 4.0.3 SDK level 15, which have HDMI ports), there is no supported way to detect or disable external displays.
来源:https://stackoverflow.com/questions/15061621/how-do-i-disable-hdmi-port-of-a-android-device-without-rooting-it