Is it possible to programmatically block / disable Factory Reset in android?
1 answer
This is possible for specific manufacturers and devices. For example, Samsung has an SDK: https://seap.samsung.com/api-references/android-standard/reference/android/app/enterprise/RestrictionPolicy.html#allowFactoryReset(boolean) which will control access to this. Several other manufacturers have similar functionality, but Android does not support this as far as I know.
Stock Android now supports this using Device Owner Mode.
+1
source to share