It's possible but your app must be signed by system key. I decompiled a wizard application and found an example of code, that disables a home button. I used this code in my wizard application but I can't guarantee that it'll be working everywhere. I checked this code on STB with Android 5, 6 and 7.
private void disableHomeButton(Context context){
ContentResolver contentResolver = context.getContentResolver();
try {
if (Build.VERSION.SDK_INT < 17) {
Settings.System.putInt(contentResolver, Settings.System.DEVICE_PROVISIONED, 0);
} else {
Settings.Global.putInt(contentResolver, Settings.Global.DEVICE_PROVISIONED, 0);
}
Settings.Secure.putInt(contentResolver, Settings.Secure.USER_SETUP_COMPLETE, 0);
}
catch(SecurityException e){
}
}
private void enableHomeButton(Context context){
ContentResolver contentResolver = context.getContentResolver();
try {
if (Build.VERSION.SDK_INT < 17) {
Settings.System.putInt(contentResolver, Settings.System.DEVICE_PROVISIONED, 1);
} else {
Settings.Global.putInt(contentResolver, Settings.Global.DEVICE_PROVISIONED, 1);
}
Settings.Secure.putInt(contentResolver, Settings.Secure.USER_SETUP_COMPLETE, 1);
}
catch(SecurityException e){
}
}
AndroidManifest.xml
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="tv.test.wizard"
android:sharedUserId="android.uid.system">
<uses-permission android:name="android.permission.WRITE_SECURE_SETTINGS" />
<uses-permission android:name="android.permission.WRITE_SETTINGS" />
....